menus in RCP developer

SWT Designer allows you to create the views, editors, perspectives, pref pages, composites, etc. that comprise Eclipse SWT & RCP applications and plug-ins.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

menus in RCP developer

Postby roocell » Wed Jan 17, 2007 4:46 pm

Hi,
I'm new to eclipse and SWT designer.
I tried the windows builder and had no problem building menus.

But now I've uninstalled everthing and installed RCP developer (beta). I'm trying to figure out how to build menus graphically and I cant seem to get it to work.

I've created the contacts RCP application. Which file do I edit to modify the menus? If I open ApplicationActionBarAdvisor.java in design mode, I get the display of the application with the menus, but the menu portion of the palette doesn't exist.

Am I editing the proper file? This is the only file I can open to display the main application window with the menus.
Please help - I'm currently evaluating RCP developer and considering it for purchase. I know the menu palette works, because I can use it while editing the ViewParts.

regards.
roocell
 
Posts: 2
Joined: Wed Jan 17, 2007 1:13 pm

Re: menus in RCP developer

Postby Eric Clayberg » Wed Jan 17, 2007 7:36 pm

roocell wrote:I've created the contacts RCP application. Which file do I edit to modify the menus? If I open ApplicationActionBarAdvisor.java in design mode, I get the display of the application with the menus, but the menu portion of the palette doesn't exist.

See the ActionBarAdvisor docs.

Creating Actions, Coolbars and Menus is covered in detail.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

menus in RCP developer

Postby roocell » Thu Jan 18, 2007 6:54 am

thanks for the tip. I've figured it out.
What confused me was that I expected the menu creation to be just like
http://download.instantiations.com/DesignerDoc/integration/latest/docs/html/tutorial/creating_menus.htm

Also if I follow this
http://downloads.instantiations.com/RCPPackagerDoc/integration/latest/docs/html/gettingstarted/GenSample.html
there is no toolbar by default. And I couldn't figure out how to start a toolbar.

Seems the only way to have a toolbar is to follow
http://download.instantiations.com/DesignerDoc/integration/latest/docs/html/wizards/wizard_eclipse_actionbaradvisor.html. Now I guess I have to figure out how to link in my NEW actionbaradvisor to my application.

Ideally what I wanted to do was start with the simple helloRCP, create a menu from scratch and create a toolbar from scratch (all graphically since my java knowledge isn't strong). I wanted to see how far I could get without have to write a single line of code.

Thanks though - your reply did help a lot.

cheers.
roocell
 
Posts: 2
Joined: Wed Jan 17, 2007 1:13 pm

Re: menus in RCP developer

Postby Eric Clayberg » Thu Jan 18, 2007 11:43 am

roocell wrote:thanks for the tip. I've figured it out.
What confused me was that I expected the menu creation to be just like
http://download.instantiations.com/DesignerDoc/integration/latest/docs/html/tutorial/creating_menus.htm

Unfortunately, ActionBarAdvisor classes don't use MenuBars and MenuItems like standalone SWT windows. They create Action instances and then configure them into toolbars/coolbars and sets of menus.

roocell wrote:Also if I follow this
http://downloads.instantiations.com/RCPPackagerDoc/integration/latest/docs/html/gettingstarted/GenSample.html
there is no toolbar by default. And I couldn't figure out how to start a toolbar.

If you open the ActionBarAdvisor class created by the RCP wizard, you can add a toolbar via the Actions tab in the editor (just like you can edit the menus).

roocell wrote:Seems the only way to have a toolbar is to follow
http://download.instantiations.com/DesignerDoc/integration/latest/docs/html/wizards/wizard_eclipse_actionbaradvisor.html. Now I guess I have to figure out how to link in my NEW actionbaradvisor to my application.

Your application should only have one ActionBarAdvisor, and you should be able to simply start with the one created by the RCP wizard. You should not need to create a second one.

roocell wrote:Ideally what I wanted to do was start with the simple helloRCP, create a menu from scratch and create a toolbar from scratch (all graphically since my java knowledge isn't strong). I wanted to see how far I could get without have to write a single line of code

You should be able to edit both the toolbar and the menu of the RCP app's ActionBarAdvisor class without writing any Java code.

I should warn you, however, that the RCP framework itself requires reasonably strong (at least intermediate) Java skills. If you are just starting out with Java or Eclipse, it could prove to be quite challenging.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to SWT Designer

Who is online

Users browsing this forum: No registered users and 2 guests