Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Toolbar GroupMarker problem
Toolbar GroupMarker problem [message #437616] Fri, 30 September 2005 00:19
Eclipse UserFriend
Originally posted by: mcheng.cisco.com

Hi,

I added the following code in fillActionBars() in MyWorkbenchAdvisor:
ToolBarManager toolbar = new ToolBarManager(SWT.FLAT);
toolbar.add(new
GroupMarker(IWorkbenchActionConstants.TOOLBAR_FILE));
toolbar.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
<----A
toolbar.add(new GroupMarker("group.actions"));
toolbar.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
toolbar.add(ActionFactory.SAVE.create(window));
toolbar.add(ActionFactory.PRINT.create(window));
toolbar.add(new Separator());

I also specified actions in the toolbar by setting toolbarPath in actionsets
of plugin.xml.
Action A -> toolbarPath="org.eclipse.ui.workbench.file/additions"
Action B -> toolbarPath="org.eclipse.ui.workbench.file/additions"
Action C -> toolbarPath="group.actions/additions"
Action D -> toolbarPath="group.actions/additions"
Action E -> toolbarPath="group.actions/additions"

The toolbar looks like this now:
| A B | SAVE PRINT | C | D | E


The problems are:
1) Why C, D and E are not in the same group (each is separated by the
separator) since they are using the same group marker ?
2) Why C, D and E appear after SAVE and PRINT
3) If I remove line A after TOOLBAR_File group marker and specify
toolbarPath="org.eclipse.ui.workbench.file", then A and B won't be in the
first group, it will be mingled with C, D and E each with its own separator.

I can tell GroupMarker("group.actions") not working, but don't know why? Is
anything else I need to do to create the GroupMarker?
Also why do we need the additions (Line A) in order for file group to work
(for question 3)?


Regards,
Mike
Previous Topic:RCP application and BuildAction action
Next Topic:Using IResource in RCp
Goto Forum:
  


Current Time: Wed Dec 04 15:56:44 GMT 2024

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

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

Back to the top