Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ui-dev] Multiple editors for same resource (how to?)

You might be able to get around the Input problem by fabricating your own
IEditorInput and opening additional editors using your own Action in the
Navigator.
Or, you might be able to get around this problem because you need another
resource to store additional information about the View you are adding.
Another resource gives you another Input.  But, this probably doesn't give
you the stacking that you were describing.

To address extensibility, this could be done.  For example, HTML in WSAD is
a MultiPageEditorPart, using 3 Editors (Preview, WYSIWYG, and source).
WSAD could define an extension point for defining additional Editors, which
it would instantiate and stack on its MultiPageEditorPane.  JDT could do
the same for .java files, allowing you to put VCE, JavaDOC, or BeanInfo
Tabs on the standard source editor.

I think sounds like a great idea, but I don't think every Editor should be
made to support unknown Tabs.  You should probably lobby the component
teams for the resource types that you specifically want to add to.
Eventually code could probably get pushed back into platform-UI, such as
MultiPageEditor enhancements, etc.



|---------+--------------------------------->
|         |           "Bob Foster"          |
|         |           <bob@xxxxxxxxxx>      |
|         |           Sent by:              |
|         |           platform-ui-dev-admin@|
|         |           eclipse.org           |
|         |                                 |
|         |                                 |
|         |           03/26/2002 05:42 PM   |
|         |           Please respond to     |
|         |           platform-ui-dev       |
|         |                                 |
|---------+--------------------------------->
  >---------------------------------------------------------------------------------------------------------------------------------------------|
  |                                                                                                                                             |
  |       To:       <platform-ui-dev@xxxxxxxxxxx>                                                                                               |
  |       cc:                                                                                                                                   |
  |       Subject:  [platform-ui-dev] Multiple editors for same resource (how to?)                                                              |
  |                                                                                                                                             |
  |                                                                                                                                             |
  >---------------------------------------------------------------------------------------------------------------------------------------------|



There are many circumstances where multiple editors might be used for the
same resource in rapid sequence (or even simultaneously). E.g., a source
editor in combination with a graphical editor for a Java source file
defining a dialog, a graphical editor for an XML file containing a schema,
an HTML WYSIWYG editor, etc. It is very important from a UI perspective
that
these choices be in the user's face and not buried in some configuration
API.

In other IDEs, e.g., JBuilder, XMLSpy, this relationship is often
represented by inner tabs within the resource tab. An example of this
representation in Eclipse is the plugin.xml editor.

A cursory look at editor support tells me that an editor can set itself up
to to be tabbed or not, but I do not find how one plugin can add an editor
tab to a resource "already" edited by another plugin. E.g., a graphical
editor for a Java source file. In fact, IEditorPart javadoc says "... only
one editor can exist for each editor input within a page." It looks like
the
user would have to open a different editor each time she wants to switch
between graphical and text views, which seems obscure and very clumsy. It
seems absurd that the only way to accomplish a tabbed representation would
be to, e.g., supply one's own Java editor.

Less clumsy (once the user managed to get the right perspectives open)
would
be to switch editors in different perspectives, but the editor re-use
policy
seems to work against that approach. E.g., if a user turns off re-use so a
different editor can be seen in the "graphical perspective," what happens
in
the debug perspective?

Quite possibly I have missed some feature that makes this scenario
possible.
Any insight would be appreciated.

Bob
Object Factory Inc.

_______________________________________________
platform-ui-dev mailing list
platform-ui-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-ui-dev





Back to the top