Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Multiple editors, same resource; UI questions.
Multiple editors, same resource; UI questions. [message #280141] Sun, 30 January 2005 21:21 Go to next message
Eclipse UserFriend
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
Re: Multiple editors, same resource; UI questions. [message #280413 is a reply to message #280141] Wed, 02 February 2005 19:48 Go to previous message
Eclipse UserFriend
Originally posted by: bob.objfac.com

One editor per resource per window. You could open different diagrams in
different tabs (MultiEditor) 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

Jason Kealey wrote:
> 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
Previous Topic:markerType in annotations
Next Topic:Toolbar action extension works in runtime workbench, but not in deployed plugin..
Goto Forum:
  


Current Time: Wed Jul 23 05:58:45 EDT 2025

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

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

Back to the top