Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Two editor windows on the same file; examples don't prop changes
Two editor windows on the same file; examples don't prop changes [message #214729] Thu, 20 April 2006 20:45 Go to next message
Eclipse UserFriend
Originally posted by: eclipse.chris-lott.org

Hi,

I'd like to understand how a GEF editor should be set up so that the user
can pick the item "New Editor" to get two editors on the same file, and
changes made to one appear in the other. This works nicely in text
editors, and any change made in window window immediately appears in the
other window.

I am working with the standard shapes example, Randy Hudson's flowgraph
example, and Phio Zoio's db schema editor. In all of them, I can open a
second window by right-clicking on the edit pane's tab, then move/dock it
at the right-hand side so I can see two windows at once. However, changes
made to one window are not immediately propagated to the other window.

The edit parts seem to be listening to model changes, but something must
be missing. Please advise, thanks in advance!

chris...
Re: Two editor windows on the same file; examples don't prop changes [message #216560 is a reply to message #214729] Fri, 19 May 2006 16:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.chris-lott.org

Well I don't know if I have stumped the newsgroup, but I sure have not
found an answer to this yet. In a nutshell I want my users to be able to
open two windows on the same file. Eclipse clearly makes this possible,
as can be seen in its plain text editor, but the GEF examples like Zoio's
db table schema editor don't seem to work the way I expect. Please reply.
Thanks in advance!

chris...
Re: Two editor windows on the same file; examples don't prop changes [message #216630 is a reply to message #216560] Mon, 22 May 2006 17:54 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse.chris-lott.org

After some rummaging through the text editor class hierarchy I think I
have an answer. The reason that two text editors open on the same file
are able to see and reflect all changes appears to be that they use a
DocumentProvider object to share access to editor input like a file. In
contrast, all of the GEF examples I have seen do not use any kind of
DocumentProvider object. I had hoped the solution for GEF would be a
simple thing, like setting a flag or adding a listener, but it does not
appear to be that simple.

If someone would please confirm this, it sure would help. Thanks in
advance.

chris...
Previous Topic:Using the PaletteView with multiple editor instances
Next Topic:GTK+ Performance
Goto Forum:
  


Current Time: Thu Dec 08 17:20:31 GMT 2022

Powered by FUDForum. Page generated in 0.02241 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top