Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Property sheet problems with MPE
Property sheet problems with MPE [message #175743] Wed, 06 April 2005 00:28 Go to next message
Barry Lay is currently offline Barry LayFriend
Messages: 48
Registered: July 2009
Member
I have an editor with multiple GEF editor pages in it, written based on
the Redbook example (EMF plus GEF) and EDiagram. I find that after I
have created and loaded several editors the property pages are not
working properly. If I click on a part I get a "generic" page with what
looks like the properties for the top-level part. If I click on another
editor's tab and come back again the correct properties are being
displayed until I click on another part.

In setActivePage and pageChange I call the following:

super...
getDelegatingCommandStack().setCurrentCommandStack(
getCurrentPage().getCommandStack() );
getDelegatingZoomManager().setCurrentZoomManager(
getZoomManager(getCurrentPage().getGraphicalViewer()) );
getOutlinePage().initialize( getCurrentPage() );

I presume that the delegatingCommandStack is waking up the
UndoablePropertySheetEntry but I can't quite figure out what is going
astray after that.

Thanks,
Barry
Re: Property sheet problems with MPE [message #175833 is a reply to message #175743] Wed, 06 April 2005 17:50 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
You're not using EMF's providers as property sources, are you?

I don't know how the MPE works, but I take it that somewhere somebody is
properly updating the selection provider when pages are flipped. Something
like:
getSite().getWorkbenchWindow().getSelectionService().setSele ctionProvider(ge
tCurrentPage().getGraphicalViewer()).

Add a listener to the workbench's selection service and see what do you get
when you click on something in the viewer. Also, you can add a breakpoint
to select() in your graphical viewer and trace it to see where it's getting
lost.

"Barry Lay" <blay@laysercomputing.com> wrote in message
news:d2valc$npi$1@news.eclipse.org...
> I have an editor with multiple GEF editor pages in it, written based on
> the Redbook example (EMF plus GEF) and EDiagram. I find that after I
> have created and loaded several editors the property pages are not
> working properly. If I click on a part I get a "generic" page with what
> looks like the properties for the top-level part. If I click on another
> editor's tab and come back again the correct properties are being
> displayed until I click on another part.
>
> In setActivePage and pageChange I call the following:
>
> super...
> getDelegatingCommandStack().setCurrentCommandStack(
> getCurrentPage().getCommandStack() );
> getDelegatingZoomManager().setCurrentZoomManager(
> getZoomManager(getCurrentPage().getGraphicalViewer()) );
> getOutlinePage().initialize( getCurrentPage() );
>
> I presume that the delegatingCommandStack is waking up the
> UndoablePropertySheetEntry but I can't quite figure out what is going
> astray after that.
>
> Thanks,
> Barry
Re: Property sheet problems with MPE [message #176121 is a reply to message #175833] Fri, 08 April 2005 02:56 Go to previous messageGo to next message
Barry Lay is currently offline Barry LayFriend
Messages: 48
Registered: July 2009
Member
Pratik Shah wrote:
> You're not using EMF's providers as property sources, are you?

Yes I am. I used the mechanism EDiagram uses to do this.

> I don't know how the MPE works, but I take it that somewhere somebody is
> properly updating the selection provider when pages are flipped. Something
> like:
> getSite().getWorkbenchWindow().getSelectionService().setSele ctionProvider(ge
> tCurrentPage().getGraphicalViewer()).

This method doesn't exist, but getSite().setSelectionProvider() does. I
added this to the setFocus method of the GEF editor page and this seems
to fix the problem.

I guess that multiple GEF editors wasn't part of thinking for the
examples - its not exactly a beginner issue. Perhaps this detail might
be included in a future example for those of us that are too ambitious
for our own good.

Thanks for all of your help. You lead me to the solution.

Barry
Re: Property sheet problems with MPE [message #176256 is a reply to message #176121] Fri, 08 April 2005 18:34 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

See https://bugs.eclipse.org/bugs/show_bug.cgi?id=46207

The current MPE in the workbench is a flawed concept. It will never work as
you want it to.

"Barry Lay" <blay@laysercomputing.com> wrote in message
news:d34s5m$95q$1@news.eclipse.org...
> Pratik Shah wrote:
>> You're not using EMF's providers as property sources, are you?
>
> Yes I am. I used the mechanism EDiagram uses to do this.
>
>> I don't know how the MPE works, but I take it that somewhere somebody is
>> properly updating the selection provider when pages are flipped.
>> Something
>> like:
>> getSite().getWorkbenchWindow().getSelectionService().setSele ctionProvider(ge
>> tCurrentPage().getGraphicalViewer()).
>
> This method doesn't exist, but getSite().setSelectionProvider() does. I
> added this to the setFocus method of the GEF editor page and this seems to
> fix the problem.
>
> I guess that multiple GEF editors wasn't part of thinking for the
> examples - its not exactly a beginner issue. Perhaps this detail might be
> included in a future example for those of us that are too ambitious for
> our own good.
>
> Thanks for all of your help. You lead me to the solution.
>
> Barry
Previous Topic:EMF & GEF, 1:1 mapping between model object and EditParts
Next Topic:Updating contents of FigureCanvas
Goto Forum:
  


Current Time: Thu Apr 25 12:29:13 GMT 2024

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

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

Back to the top