Hi,
Am 03.11.2011 18:36, schrieb Jörn Kottmann:
+1 for the changes in DefaultCasDocumentProvider, it is just a small
nice change
to refactor the existing listener.
I am a little confused about the change you did to the ICasDocument and
its listener. Shouldn't the document change be announced by the editor
itself?
Yes, this was my first solution, but I removed it because of many
smaller reasons. See below.
Otherwise a client, needs to swap its listener when a document
changed, and it is also
not the place I would look for a document changed event.
Doesn't the client needs to do that anyway? I think there is no ways to
keep the document object. So we get a new object, the listeners need to
be removed and added to the new object. Therefore, when the method is
called the old and the new document need to be available and I prefer to
provide them both in the interface instead of calling
editor.getDocument() or something.
Did I miss here something?
I suggest that we add a new listener which can be registered on the
ICasEditor
to announce ICasDocument swaps, what do you think?
It's fine for me and not much work. I removed the code again, because
the naming wasn't intuitive but misleading. CasDocumentListener sounds
like stuff the concerns also its changes. There is for example also the
viewChanged method and that's for me also something like a cas change. I
would maybe merge the cas change and the view switch event. Then, the
editor has already a listener whose name (of the field) sounded a bit
conflicting and I didn't want to rename the field. There were also some
other reasons, but I dont' remember them right now. Overall, no
important reasons, but the sum made the current solution look a bit more
sound.
If you like, then I add an additional listener structure tomorrow. I
named the interface something like ICasEditorInputListener.
What do you think?
Peter
On 11/3/11 5:57 PM, Jörn Kottmann wrote:
On 11/3/11 5:45 PM, Peter Klügl wrote:
I worked with a strict formatting style for some years now, so it's
really ingrained.
I agree of course with your agruments and will take care that this
won't happen again.
Your editor still replaces tabs with spaces. According to our
guideline we should
use spaces. So we might just want let some source code clean up tool
exchange
them all at once, or tolerate them and fix them while we work on the
lines which contain them.
I am still reviewing your changes and will give feedback soon.
Jörn