: had a bad night, going to be very late, don't wait up. May or may not be there before the end of the meeting; will definately be there to work on embedded s/w lab report afterward.
At the moment: No, but they have unique identifiers (different from the name).
We're developing a plug-in for Eclipse to modify a particular visual notation. The notation consists of diagrams which contain, among others, stubs. Stubs are placeholders for one or more other diagrams. To make a long story short, we want our editor to display a diagram and when someone double clicks on a stub, the other diagram is shown.
The current version of the notation has all diagrams self contained in one XML file. Along with our plug-in, we'll be introducing a new version of the notation. We're discussing two options:
1) One XML file contains all diagrams.
2) One XML file per diagram.
We want to be able to have multiple diagrams opened simultaneously. My question is the following:
If we have only one file to contain all diagrams, is it possible to load different editors that use(read/modify/write) different portions of the same resource?
My reading shows me:
Only one editor can be open for any particular editor input in a workbench page. For example, if the user is editing readme.txt in the workbench, opening it again in the same perspective will activate the same editor. (You can open another editor on the same file from a different workbench window or perspective). Unlike views, however, the same editor type, such as a text editor, may be open many times within one workbench page for different inputs. Is it just me or even if we managed to seperate our files into different chunks where each chunk could be opened seperately, we'd probably run into a truck load of problems relating to file modification notations when we would try to save. Do you have any examples of plugins for visual notations using recursive editors? I'm really interested in seeing how to respect the Eclipse UI guidelines by using the right metaphors. Are these using different editors for each portion, the same one with some other navigation mechanism, etc.
Thanks for your time,
Jason Kealey
jkealey@shade.ca
One editor per resource per window. You could open different diagrams in
different tabs (
Multi Editor?) but since there are probably a variable
number of diagrams, this won't work.
If you go down the one XML file per diagram path, you will find there's
no mechanism to ensure that multiple files are kept in sync (which I
imagine is what you're worried about). You could work around that by
finding all the open editors on "your" files and forcing a save in each
one. Not sure how that will look in the UI. And, of course, one of the
saves could fail.
To switch between editors, you can simply use the API to open your
editor on the resource. IIRC, if it is already open, it will come to the
foreground. If not, it will be opened.
To cause the other editor to reposition within a diagram, though, would
involve some inter-editor communication.
Bob Foster
As for allowed connections, the Z.152 draft includes he following, which should still hold: