Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [orion-dev] onChanged surprises


You should not get that event if the model text was empty. If you see a case where this is happening please log a bug. What is probably happing is that the model had content that was added before your listener got hooked.

We tried to specify that indices are zero based throughout the editor/model js doc. I will see if we missed some cases.

Silenio


From: "John J. Barton" <johnjbarton@xxxxxxxxxxxxxxx>
To: Orion developer discussions <orion-dev@xxxxxxxxxxx>
Date: 03/11/2011 12:07 PM
Subject: [orion-dev] onChanged surprises
Sent by: orion-dev-bounces@xxxxxxxxxxx





In using eclipse.TextModel listener onChanged I found a couple of surprises:
  1) The first thing you get is a change event on line 0, event though
the source did not change. The event in my case has 65 removed and 554
added characters.  I suppose if it always comes first and always is on
line zero then I can work around it.
  2) The first thing you get is a change event on line 0 ;-).  So the
line index is zero based, like the documentation says but nevertheless a
surprise.

I'd put these on the wiki but the current client documentation seems to
be about 'eclipse' which is some kind of factory, while the part I'm
looking at are instances so I'm not sure where to put stuff.

I have been able to get a tiny demo going, where an Orion panel in
Firebug edits css and the changes simultaneously apply to the page.

jjb
_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/orion-dev



Back to the top