|
Lines 30-36
Link Here
|
| 30 |
import org.eclipse.jface.action.MenuManager; |
30 |
import org.eclipse.jface.action.MenuManager; |
| 31 |
import org.eclipse.jface.action.Separator; |
31 |
import org.eclipse.jface.action.Separator; |
| 32 |
import org.eclipse.jface.action.ToolBarContributionItem; |
32 |
import org.eclipse.jface.action.ToolBarContributionItem; |
| 33 |
import org.eclipse.jface.action.ToolBarManager; |
|
|
| 34 |
import org.eclipse.jface.preference.IPreferenceStore; |
33 |
import org.eclipse.jface.preference.IPreferenceStore; |
| 35 |
import org.eclipse.jface.util.IPropertyChangeListener; |
34 |
import org.eclipse.jface.util.IPropertyChangeListener; |
| 36 |
import org.eclipse.jface.util.PropertyChangeEvent; |
35 |
import org.eclipse.jface.util.PropertyChangeEvent; |
|
Lines 217-224
Link Here
|
| 217 |
private IWorkbenchAction openProjectAction; |
216 |
private IWorkbenchAction openProjectAction; |
| 218 |
|
217 |
|
| 219 |
private IWorkbenchAction closeProjectAction; |
218 |
private IWorkbenchAction closeProjectAction; |
| 220 |
|
|
|
| 221 |
private IWorkbenchAction closeUnrelatedProjectsAction; |
| 222 |
|
219 |
|
| 223 |
// contribution items |
220 |
// contribution items |
| 224 |
// @issue should obtain from ContributionItemFactory |
221 |
// @issue should obtain from ContributionItemFactory |
|
Lines 358-363
Link Here
|
| 358 |
*/ |
355 |
*/ |
| 359 |
protected void fillCoolBar(ICoolBarManager coolBar) { |
356 |
protected void fillCoolBar(ICoolBarManager coolBar) { |
| 360 |
|
357 |
|
|
|
358 |
IActionBarConfigurer actionBarConfigurer = getActionBarConfigurer(); |
| 361 |
{ // Set up the context Menu |
359 |
{ // Set up the context Menu |
| 362 |
IMenuManager popUpMenu = new MenuManager(); |
360 |
IMenuManager popUpMenu = new MenuManager(); |
| 363 |
popUpMenu.add(new ActionContributionItem(lockToolBarAction)); |
361 |
popUpMenu.add(new ActionContributionItem(lockToolBarAction)); |
|
Lines 366-373
Link Here
|
| 366 |
} |
364 |
} |
| 367 |
coolBar.add(new GroupMarker(IIDEActionConstants.GROUP_FILE)); |
365 |
coolBar.add(new GroupMarker(IIDEActionConstants.GROUP_FILE)); |
| 368 |
{ // File Group |
366 |
{ // File Group |
| 369 |
IToolBarManager fileToolBar = new ToolBarManager(coolBar |
367 |
IToolBarManager fileToolBar = actionBarConfigurer.createToolBarManager(coolBar.getStyle()); |
| 370 |
.getStyle()); |
|
|
| 371 |
fileToolBar.add(new Separator(IWorkbenchActionConstants.NEW_GROUP)); |
368 |
fileToolBar.add(new Separator(IWorkbenchActionConstants.NEW_GROUP)); |
| 372 |
fileToolBar.add(newWizardDropDownAction); |
369 |
fileToolBar.add(newWizardDropDownAction); |
| 373 |
fileToolBar.add(new GroupMarker(IWorkbenchActionConstants.NEW_EXT)); |
370 |
fileToolBar.add(new GroupMarker(IWorkbenchActionConstants.NEW_EXT)); |
|
Lines 388-394
Link Here
|
| 388 |
IWorkbenchActionConstants.MB_ADDITIONS)); |
385 |
IWorkbenchActionConstants.MB_ADDITIONS)); |
| 389 |
|
386 |
|
| 390 |
// Add to the cool bar manager |
387 |
// Add to the cool bar manager |
| 391 |
coolBar.add(new ToolBarContributionItem(fileToolBar, |
388 |
coolBar.add(actionBarConfigurer.createToolBarContributionItem(fileToolBar, |
| 392 |
IWorkbenchActionConstants.TOOLBAR_FILE)); |
389 |
IWorkbenchActionConstants.TOOLBAR_FILE)); |
| 393 |
} |
390 |
} |
| 394 |
|
391 |
|
|
Lines 396-402
Link Here
|
| 396 |
|
393 |
|
| 397 |
coolBar.add(new GroupMarker(IIDEActionConstants.GROUP_NAV)); |
394 |
coolBar.add(new GroupMarker(IIDEActionConstants.GROUP_NAV)); |
| 398 |
{ // Navigate group |
395 |
{ // Navigate group |
| 399 |
IToolBarManager navToolBar = new ToolBarManager(coolBar |
396 |
IToolBarManager navToolBar = actionBarConfigurer.createToolBarManager(coolBar |
| 400 |
.getStyle()); |
397 |
.getStyle()); |
| 401 |
navToolBar.add(new Separator( |
398 |
navToolBar.add(new Separator( |
| 402 |
IWorkbenchActionConstants.HISTORY_GROUP)); |
399 |
IWorkbenchActionConstants.HISTORY_GROUP)); |
|
Lines 408-414
Link Here
|
| 408 |
navToolBar.add(pinEditorContributionItem); |
405 |
navToolBar.add(pinEditorContributionItem); |
| 409 |
|
406 |
|
| 410 |
// Add to the cool bar manager |
407 |
// Add to the cool bar manager |
| 411 |
coolBar.add(new ToolBarContributionItem(navToolBar, |
408 |
coolBar.add(actionBarConfigurer.createToolBarContributionItem(navToolBar, |
| 412 |
IWorkbenchActionConstants.TOOLBAR_NAVIGATE)); |
409 |
IWorkbenchActionConstants.TOOLBAR_NAVIGATE)); |
| 413 |
} |
410 |
} |
| 414 |
|
411 |
|
|
Lines 417-430
Link Here
|
| 417 |
coolBar.add(new GroupMarker(IWorkbenchActionConstants.GROUP_HELP)); |
414 |
coolBar.add(new GroupMarker(IWorkbenchActionConstants.GROUP_HELP)); |
| 418 |
|
415 |
|
| 419 |
{ // Help group |
416 |
{ // Help group |
| 420 |
IToolBarManager helpToolBar = new ToolBarManager(coolBar |
417 |
IToolBarManager helpToolBar = actionBarConfigurer.createToolBarManager(coolBar |
| 421 |
.getStyle()); |
418 |
.getStyle()); |
| 422 |
helpToolBar.add(new Separator(IWorkbenchActionConstants.GROUP_HELP)); |
419 |
helpToolBar.add(new Separator(IWorkbenchActionConstants.GROUP_HELP)); |
| 423 |
// helpToolBar.add(searchComboItem); |
420 |
// helpToolBar.add(searchComboItem); |
| 424 |
// Add the group for applications to contribute |
421 |
// Add the group for applications to contribute |
| 425 |
helpToolBar.add(new GroupMarker(IWorkbenchActionConstants.GROUP_APP)); |
422 |
helpToolBar.add(new GroupMarker(IWorkbenchActionConstants.GROUP_APP)); |
| 426 |
// Add to the cool bar manager |
423 |
// Add to the cool bar manager |
| 427 |
coolBar.add(new ToolBarContributionItem(helpToolBar, |
424 |
coolBar.add(actionBarConfigurer.createToolBarContributionItem(helpToolBar, |
| 428 |
IWorkbenchActionConstants.TOOLBAR_HELP)); |
425 |
IWorkbenchActionConstants.TOOLBAR_HELP)); |
| 429 |
} |
426 |
} |
| 430 |
|
427 |
|
|
Lines 611-617
Link Here
|
| 611 |
|
608 |
|
| 612 |
menu.add(openProjectAction); |
609 |
menu.add(openProjectAction); |
| 613 |
menu.add(closeProjectAction); |
610 |
menu.add(closeProjectAction); |
| 614 |
menu.add(closeUnrelatedProjectsAction); |
|
|
| 615 |
menu.add(new GroupMarker(IWorkbenchActionConstants.OPEN_EXT)); |
611 |
menu.add(new GroupMarker(IWorkbenchActionConstants.OPEN_EXT)); |
| 616 |
menu.add(new Separator()); |
612 |
menu.add(new Separator()); |
| 617 |
menu.add(buildAllAction); |
613 |
menu.add(buildAllAction); |
|
Lines 1120-1126
Link Here
|
| 1120 |
buildProjectAction = null; |
1116 |
buildProjectAction = null; |
| 1121 |
openProjectAction = null; |
1117 |
openProjectAction = null; |
| 1122 |
closeProjectAction = null; |
1118 |
closeProjectAction = null; |
| 1123 |
closeUnrelatedProjectsAction = null; |
|
|
| 1124 |
newWizardMenu = null; |
1119 |
newWizardMenu = null; |
| 1125 |
pinEditorContributionItem = null; |
1120 |
pinEditorContributionItem = null; |
| 1126 |
// searchComboItem = null; |
1121 |
// searchComboItem = null; |
|
Lines 1402-1410
Link Here
|
| 1402 |
closeProjectAction = IDEActionFactory.CLOSE_PROJECT.create(window); |
1397 |
closeProjectAction = IDEActionFactory.CLOSE_PROJECT.create(window); |
| 1403 |
register(closeProjectAction); |
1398 |
register(closeProjectAction); |
| 1404 |
|
1399 |
|
| 1405 |
closeUnrelatedProjectsAction = IDEActionFactory.CLOSE_UNRELATED_PROJECTS.create(window); |
|
|
| 1406 |
register(closeUnrelatedProjectsAction); |
| 1407 |
|
| 1408 |
openWorkspaceAction = IDEActionFactory.OPEN_WORKSPACE |
1400 |
openWorkspaceAction = IDEActionFactory.OPEN_WORKSPACE |
| 1409 |
.create(window); |
1401 |
.create(window); |
| 1410 |
register(openWorkspaceAction); |
1402 |
register(openWorkspaceAction); |