Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Show Preferences window in RCP
Show Preferences window in RCP [message #237093] Tue, 21 July 2009 11:45 Go to next message
Peter Lang is currently offline Peter LangFriend
Messages: 153
Registered: July 2009
Senior Member
When generating a GMF RCP application, the only item in the Window-menu is
"Open in New Window".

Is there a way to get the "Preferences" item too?

Thanks in advance,
Peter
Re: Show Preferences window in RCP [message #237100 is a reply to message #237093] Tue, 21 July 2009 12:23 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Peter,

Please file a request for it.

-----------------
Alex Shatalin
Re: Show Preferences window in RCP [message #237119 is a reply to message #237100] Tue, 21 July 2009 13:20 Go to previous messageGo to next message
Peter Lang is currently offline Peter LangFriend
Messages: 153
Registered: July 2009
Senior Member
Hi Alex,

thanks for your reply.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=284124

Is there a workaround you could suggest?

Best regards, Peter
Re: Show Preferences window in RCP [message #237131 is a reply to message #237119] Tue, 21 July 2009 13:46 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Peter,

You can manually modify generated ActionBarAdvisor using WorkbenchActionBuilder
as an example (openPreferencesAction ?)

-----------------
Alex Shatalin
Re: Show Preferences window in RCP [message #237137 is a reply to message #237131] Tue, 21 July 2009 14:38 Go to previous messageGo to next message
Peter Lang is currently offline Peter LangFriend
Messages: 153
Registered: July 2009
Senior Member
Now that was almost too easy - thanks a lot, Alex :)

In generated DiagramEditorActionBarAdvisor add the following:

protected void makeActions(IWorkbenchWindow window) {
[...]
// add:
register(ActionFactory.PREFERENCES.create(window));
}


protected void fillMenuBar(IMenuManager menu) {
[...]
menuX.add(getAction(ActionFactory.OPEN_NEW_WINDOW.getId()));

// add:
menuX.add(new Separator());
menuX.add(getAction(ActionFactory.PREFERENCES.getId()));
[...]
}
Re: Show Preferences window in RCP [message #237149 is a reply to message #237137] Tue, 21 July 2009 15:01 Go to previous messageGo to next message
Peter Lang is currently offline Peter LangFriend
Messages: 153
Registered: July 2009
Senior Member
It even works with adding these items into .gmfgen-file, but after
regenerating .gmfgen from .gmfmap the changes are lost again.

Not sure if this is the expected behavior?
Re: Show Preferences window in RCP [message #237184 is a reply to message #237149] Wed, 22 July 2009 09:25 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Peter,

> Not sure if this is the expected behavior?
You can file a request asking to correctly merge existing .gmfgen model with
one produced by map->gen transformation in this case.

-----------------
Alex Shatalin
Previous Topic:Workflow Engine configuration
Next Topic:Why are my adapters being removed when I'm using diagram partitioning? ...and how to listen to the c
Goto Forum:
  


Current Time: Thu Mar 28 16:27:07 GMT 2024

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

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

Back to the top