Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Questions about MultiPageEditor
Questions about MultiPageEditor [message #306196] Tue, 25 July 2006 07:16 Go to next message
Eclipse UserFriend
Originally posted by: jiefei.ma.morganstanley.com

Hi, I have a number of questions about writing a MultiPageEditor.

At the moment I have 3 editors: a WTP XML Editor (extends
MultiPageEditor), a EMF generated domain editor (extends MultiPageEditor)
and a GMF generated diagram editor (extends DiagramEditor). each editor
has its own action bar contributor, command stacks & etc.

I'd like to put all of them inside a single MultiPageEditor as pages. and
I have the following questions:

1. How can I let the menu bar show the undo/redo commands correctly? For
example, when I choose the XML editor, it will show the undo/redo commands
of the XML editor; when I choose the EMF editor, it will show the commands
of the EMF editor.

2. What is the best way to "merge" all the individual action bar
contributors into a single MultiPageActionBarContributor?

3. This is a problem indeed: Now, I have already put the 3 editors inside
a multipage editor. However, the Properties View dosn't work properly -
it can only work with one editor. For example, when the MultiPageEditor
is opened, the XML editor is brought to front, and the Properties View can
"hook" to it and display information according the XML editor's selection.
However, when I choose the EMF editor or the GMF editor, the Properties
View doesn't work. In order to have the Properties View to "hook" to the
EMF editor or the GMF editor, I have to 1. activate the editor, 2. close
the Properties View and open it again. Can anyone help me to fix it?

Many thanks!

Jiefei
Re: Questions about MultiPageEditor [message #306203 is a reply to message #306196] Tue, 25 July 2006 09:21 Go to previous messageGo to next message
Eclipse UserFriend
Jiefei Ma wrote:
> Hi, I have a number of questions about writing a MultiPageEditor.

MultiPageEditor is deprecated ... I'm assuming you are using
MultiPageEditorPart.


for #2, you are going to have to build your own ActionBarContributor
based off of MultiPageActionBarContributor ... and it would have to do
the work of the 3 action bar contributors (and mediate between them).
Now you might just be able to delegate to each of the 3 action bar
contributors at the appropriate time, but that depends on how they are
coded.

For #3, I'm not sure. It could be that the Properties view tracks
changes in the active editor ... your MultiPageEditorPart. If you
choose the EMF editor and then change your MPEP to a java editor and
back to the MPEP, does the Properties view update from the XML editor to
the EMF editor?

Later,
PW
Re: Questions about MultiPageEditor [message #306273 is a reply to message #306203] Wed, 26 July 2006 09:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jiefei.ma.morganstanley.com

Hi Paul,

Thanks for your reply!

> MultiPageEditor is deprecated ... I'm assuming you are using
> MultiPageEditorPart.

Sorry, my mistake. Yes, I am using MultiPageEditorPart.

> for #2, you are going to have to build your own ActionBarContributor
> based off of MultiPageActionBarContributor ... and it would have to do
> the work of the 3 action bar contributors (and mediate between them).
> Now you might just be able to delegate to each of the 3 action bar
> contributors at the appropriate time, but that depends on how they are
> coded.

is there any code example?

> For #3, I'm not sure. It could be that the Properties view tracks
> changes in the active editor ... your MultiPageEditorPart. If you
> choose the EMF editor and then change your MPEP to a java editor and
> back to the MPEP, does the Properties view update from the XML editor to
> the EMF editor?

no, the properties view doesn't update from the XML editor to the EMF
editor.

Jiefei
Re: Questions about MultiPageEditor [message #306309 is a reply to message #306273] Wed, 26 July 2006 13:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.chris-lott.org

The IBM redbook on GEF has an example of a multi-page editor that uses
GEF.

http://publib-b.boulder.ibm.com/Redbooks.nsf/RedbookAbstract s/sg246302.html?Open

This is built for Eclipse v2, and does not build in v3 without some
significant work. I asked them about releasing a more recent version but
didn't get an encouraging reply. I used their example to guide me in
working up a multi-page version of Phio Zoio's database schema editor, and
had modest succes.

Unfortunately the multi-page editor feature is not shown well in existing
code examples. To me it is necessary for a full-featured editor.
Otherwise you tend to wind up with editable objects in windows that appear
in the lower (viewer) pane, which I find undesirable.

It seems to me that the designers of GEF might not have planned very well
for multi-page editors. I believe that edit domains and command stacks
are the problematic areas.

chris...
Re: Questions about MultiPageEditor [message #314406 is a reply to message #306196] Wed, 11 April 2007 11:42 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

I have similar case: each of sub-editors contribute global action
handlers(undo, redo....).
How can I "activate/deactivate" these handlers, when user switches pages
at multipage editor?

good luck,
Yury


Jiefei Ma пишет:
> Hi, I have a number of questions about writing a MultiPageEditor.
>
> At the moment I have 3 editors: a WTP XML Editor (extends
> MultiPageEditor), a EMF generated domain editor (extends
> MultiPageEditor) and a GMF generated diagram editor (extends
> DiagramEditor). each editor has its own action bar contributor, command
> stacks & etc.
> I'd like to put all of them inside a single MultiPageEditor as pages.
> and I have the following questions:
>
> 1. How can I let the menu bar show the undo/redo commands correctly? For
> example, when I choose the XML editor, it will show the undo/redo
> commands of the XML editor; when I choose the EMF editor, it will show
> the commands of the EMF editor.
>
> 2. What is the best way to "merge" all the individual action bar
> contributors into a single MultiPageActionBarContributor?
>
> 3. This is a problem indeed: Now, I have already put the 3 editors
> inside a multipage editor. However, the Properties View dosn't work
> properly - it can only work with one editor. For example, when the
> MultiPageEditor is opened, the XML editor is brought to front, and the
> Properties View can "hook" to it and display information according the
> XML editor's selection. However, when I choose the EMF editor or the GMF
> editor, the Properties View doesn't work. In order to have the
> Properties View to "hook" to the EMF editor or the GMF editor, I have to
> 1. activate the editor, 2. close the Properties View and open it
> again. Can anyone help me to fix it?
>
> Many thanks!
>
> Jiefei
>
>
Re: Questions about MultiPageEditor [message #314524 is a reply to message #314406] Mon, 16 April 2007 13:23 Go to previous message
Eclipse UserFriend
Yury Chernikov wrote:
> Hi,
>
> I have similar case: each of sub-editors contribute global action
> handlers(undo, redo....).
> How can I "activate/deactivate" these handlers, when user switches pages
> at multipage editor?
>
> good luck,
> Yury
>


If the sub editors were using their IActionBars, then they should be
activated/deactivated for you by the SubActionBars. ... check out how
MultiPageEditorPart does the page change

Later,
PW
Previous Topic:[bug?] Ctrl+M doesn't work
Next Topic:Search menu appears from nowhere
Goto Forum:
  


Current Time: Sat May 03 17:40:42 EDT 2025

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

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

Back to the top