1 11 package org.eclipse.ui.internal.ide; 12 13 import org.eclipse.core.resources.IProject; 14 import org.eclipse.core.resources.IResourceChangeEvent; 15 import org.eclipse.core.resources.IResourceChangeListener; 16 import org.eclipse.core.resources.IResourceDelta; 17 import org.eclipse.core.resources.IWorkspace; 18 import org.eclipse.core.resources.IncrementalProjectBuilder; 19 import org.eclipse.core.resources.ResourcesPlugin; 20 import org.eclipse.core.runtime.Platform; 21 import org.eclipse.core.runtime.Preferences; 22 import org.eclipse.jface.action.ActionContributionItem; 23 import org.eclipse.jface.action.GroupMarker; 24 import org.eclipse.jface.action.IAction; 25 import org.eclipse.jface.action.IContributionItem; 26 import org.eclipse.jface.action.ICoolBarManager; 27 import org.eclipse.jface.action.IMenuManager; 28 import org.eclipse.jface.action.IStatusLineManager; 29 import org.eclipse.jface.action.IToolBarManager; 30 import org.eclipse.jface.action.MenuManager; 31 import org.eclipse.jface.action.Separator; 32 import org.eclipse.jface.internal.provisional.action.IToolBarContributionItem; 33 import org.eclipse.jface.preference.IPreferenceStore; 34 import org.eclipse.jface.util.IPropertyChangeListener; 35 import org.eclipse.jface.util.PropertyChangeEvent; 36 import org.eclipse.swt.SWT; 37 import org.eclipse.swt.widgets.Shell; 38 import org.eclipse.ui.IPageListener; 39 import org.eclipse.ui.IWorkbenchActionConstants; 40 import org.eclipse.ui.IWorkbenchPage; 41 import org.eclipse.ui.IWorkbenchWindow; 42 import org.eclipse.ui.actions.ActionFactory; 43 import org.eclipse.ui.actions.BuildAction; 44 import org.eclipse.ui.actions.ContributionItemFactory; 45 import org.eclipse.ui.actions.NewWizardMenu; 46 import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction; 47 import org.eclipse.ui.application.ActionBarAdvisor; 48 import org.eclipse.ui.application.IActionBarConfigurer; 49 import org.eclipse.ui.ide.IDEActionFactory; 50 import org.eclipse.ui.ide.IIDEActionConstants; 51 import org.eclipse.ui.internal.IPreferenceConstants; 52 import org.eclipse.ui.internal.WorkbenchPlugin; 53 import org.eclipse.ui.internal.ide.actions.BuildSetMenu; 54 import org.eclipse.ui.internal.ide.actions.BuildUtilities; 55 import org.eclipse.ui.internal.ide.actions.QuickMenuAction; 56 import org.eclipse.ui.internal.ide.actions.RetargetActionWithDefault; 57 import org.eclipse.ui.internal.provisional.application.IActionBarConfigurer2; 58 import org.eclipse.ui.internal.util.StatusLineContributionItem; 59 import org.eclipse.ui.menus.IMenuService; 60 61 64 public final class WorkbenchActionBuilder extends ActionBarAdvisor { 65 private final IWorkbenchWindow window; 66 67 private IWorkbenchAction closeAction; 69 70 private IWorkbenchAction closeAllAction; 71 72 private IWorkbenchAction closeOthersAction; 73 74 private IWorkbenchAction closeAllSavedAction; 75 76 private IWorkbenchAction saveAction; 77 78 private IWorkbenchAction saveAllAction; 79 80 private IWorkbenchAction newWindowAction; 81 82 private IWorkbenchAction newEditorAction; 83 84 private IWorkbenchAction helpContentsAction; 85 86 private IWorkbenchAction helpSearchAction; 87 88 private IWorkbenchAction dynamicHelpAction; 89 90 private IWorkbenchAction aboutAction; 91 92 private IWorkbenchAction openPreferencesAction; 93 94 private IWorkbenchAction saveAsAction; 95 96 private IWorkbenchAction hideShowEditorAction; 97 98 private IWorkbenchAction savePerspectiveAction; 99 100 private IWorkbenchAction resetPerspectiveAction; 101 102 private IWorkbenchAction editActionSetAction; 103 104 private IWorkbenchAction closePerspAction; 105 106 private IWorkbenchAction lockToolBarAction; 107 108 private IWorkbenchAction closeAllPerspsAction; 109 110 private IWorkbenchAction showViewMenuAction; 111 112 private IWorkbenchAction showPartPaneMenuAction; 113 114 private IWorkbenchAction nextPartAction; 115 116 private IWorkbenchAction prevPartAction; 117 118 private IWorkbenchAction nextEditorAction; 119 120 private IWorkbenchAction prevEditorAction; 121 122 private IWorkbenchAction nextPerspectiveAction; 123 124 private IWorkbenchAction prevPerspectiveAction; 125 126 private IWorkbenchAction activateEditorAction; 127 128 private IWorkbenchAction maximizePartAction; 129 130 private IWorkbenchAction minimizePartAction; 131 132 private IWorkbenchAction switchToEditorAction; 133 134 private IWorkbenchAction workbookEditorsAction; 135 136 private IWorkbenchAction quickAccessAction; 137 138 private IWorkbenchAction backwardHistoryAction; 139 140 private IWorkbenchAction forwardHistoryAction; 141 142 private IWorkbenchAction undoAction; 144 145 private IWorkbenchAction redoAction; 146 147 private IWorkbenchAction cutAction; 148 149 private IWorkbenchAction copyAction; 150 151 private IWorkbenchAction pasteAction; 152 153 private IWorkbenchAction deleteAction; 154 155 private IWorkbenchAction selectAllAction; 156 157 private IWorkbenchAction findAction; 158 159 private IWorkbenchAction printAction; 160 161 private IWorkbenchAction revertAction; 162 163 private IWorkbenchAction refreshAction; 164 165 private IWorkbenchAction propertiesAction; 166 167 private IWorkbenchAction quitAction; 168 169 private IWorkbenchAction moveAction; 170 171 private IWorkbenchAction renameAction; 172 173 private IWorkbenchAction goIntoAction; 174 175 private IWorkbenchAction backAction; 176 177 private IWorkbenchAction forwardAction; 178 179 private IWorkbenchAction upAction; 180 181 private IWorkbenchAction nextAction; 182 183 private IWorkbenchAction previousAction; 184 185 private IWorkbenchAction openWorkspaceAction; 187 188 private IWorkbenchAction projectPropertyDialogAction; 189 190 private IWorkbenchAction newWizardAction; 191 192 private IWorkbenchAction newWizardDropDownAction; 193 194 private IWorkbenchAction importResourcesAction; 195 196 private IWorkbenchAction exportResourcesAction; 197 198 IWorkbenchAction buildAllAction; 200 private IWorkbenchAction cleanAction; 201 202 private IWorkbenchAction toggleAutoBuildAction; 203 204 MenuManager buildWorkingSetMenu; 205 206 private IWorkbenchAction quickStartAction; 207 208 private IWorkbenchAction tipsAndTricksAction; 209 210 private QuickMenuAction showInQuickMenu; 211 212 private QuickMenuAction newQuickMenu; 213 214 private IWorkbenchAction introAction; 215 216 private IWorkbenchAction addBookmarkAction; 218 219 private IWorkbenchAction addTaskAction; 220 221 IWorkbenchAction buildProjectAction; 222 223 private IWorkbenchAction openProjectAction; 224 225 private IWorkbenchAction closeProjectAction; 226 227 private NewWizardMenu newWizardMenu; 230 231 private IContributionItem pinEditorContributionItem; 232 233 235 private StatusLineContributionItem statusLineItem; 237 238 private Preferences.IPropertyChangeListener prefListener; 239 240 private IPropertyChangeListener propPrefListener; 243 244 private IPageListener pageListener; 245 246 private IResourceChangeListener resourceListener; 247 248 251 private boolean isDisposed = false; 252 253 257 private MenuManager coolbarPopupMenuManager; 258 259 265 public WorkbenchActionBuilder(IActionBarConfigurer configurer) { 266 super(configurer); 267 window = configurer.getWindowConfigurer().getWindow(); 268 } 269 270 273 private IWorkbenchWindow getWindow() { 274 return window; 275 } 276 277 280 private void hookListeners() { 281 282 pageListener = new IPageListener() { 283 public void pageActivated(IWorkbenchPage page) { 284 } 286 287 public void pageClosed(IWorkbenchPage page) { 288 } 290 291 public void pageOpened(IWorkbenchPage page) { 292 IAction buildHandler = new BuildAction(page.getWorkbenchWindow().getShell(), IncrementalProjectBuilder.INCREMENTAL_BUILD); 294 ((RetargetActionWithDefault)buildProjectAction).setDefaultHandler(buildHandler); 295 } 296 }; 297 getWindow().addPageListener(pageListener); 298 299 prefListener = new Preferences.IPropertyChangeListener() { 300 public void propertyChange(Preferences.PropertyChangeEvent event) { 301 if (event.getProperty().equals( 302 ResourcesPlugin.PREF_AUTO_BUILDING)) { 303 updateBuildActions(false); 304 } 305 } 306 }; 307 ResourcesPlugin.getPlugin().getPluginPreferences() 308 .addPropertyChangeListener(prefListener); 309 310 propPrefListener = new IPropertyChangeListener() { 313 public void propertyChange(PropertyChangeEvent event) { 314 if (event.getProperty().equals( 315 IPreferenceConstants.REUSE_EDITORS_BOOLEAN)) { 316 if (window.getShell() != null 317 && !window.getShell().isDisposed()) { 318 window.getShell().getDisplay().syncExec(new Runnable () { 320 public void run() { 321 updatePinActionToolbar(); 322 } 323 }); 324 } 325 } 326 } 327 }; 328 335 WorkbenchPlugin.getDefault().getPreferenceStore() 336 .addPropertyChangeListener(propPrefListener); 337 resourceListener = new IResourceChangeListener() { 339 public void resourceChanged(IResourceChangeEvent event) { 340 IResourceDelta delta = event.getDelta(); 341 if (delta == null) { 342 return; 343 } 344 IResourceDelta[] projectDeltas = delta.getAffectedChildren(); 345 for (int i = 0; i < projectDeltas.length; i++) { 346 int kind = projectDeltas[i].getKind(); 347 boolean changed = (projectDeltas[i].getFlags() & (IResourceDelta.DESCRIPTION | IResourceDelta.OPEN)) != 0; 349 if (kind != IResourceDelta.CHANGED || changed) { 350 updateBuildActions(false); 351 return; 352 } 353 } 354 } 355 }; 356 ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceListener, IResourceChangeEvent.POST_CHANGE); 357 } 358 359 public void fillActionBars(int flags) { 360 super.fillActionBars(flags); 361 if ((flags & FILL_PROXY) == 0) { 362 updateBuildActions(true); 363 hookListeners(); 364 } 365 } 366 367 370 protected void fillCoolBar(ICoolBarManager coolBar) { 371 372 IActionBarConfigurer2 actionBarConfigurer = (IActionBarConfigurer2) getActionBarConfigurer(); 373 { coolbarPopupMenuManager = new MenuManager(); 375 coolbarPopupMenuManager.add(new ActionContributionItem(lockToolBarAction)); 376 coolbarPopupMenuManager.add(new ActionContributionItem(editActionSetAction)); 377 coolBar.setContextMenuManager(coolbarPopupMenuManager); 378 IMenuService menuService = (IMenuService) window.getService(IMenuService.class); 379 menuService.populateContributionManager(coolbarPopupMenuManager, "popup:windowCoolbarContextMenu"); } 381 coolBar.add(new GroupMarker(IIDEActionConstants.GROUP_FILE)); 382 { IToolBarManager fileToolBar = actionBarConfigurer.createToolBarManager(); 384 fileToolBar.add(new Separator(IWorkbenchActionConstants.NEW_GROUP)); 385 fileToolBar.add(newWizardDropDownAction); 386 fileToolBar.add(new GroupMarker(IWorkbenchActionConstants.NEW_EXT)); 387 fileToolBar.add(new GroupMarker( 388 IWorkbenchActionConstants.SAVE_GROUP)); 389 fileToolBar.add(saveAction); 390 fileToolBar 391 .add(new GroupMarker(IWorkbenchActionConstants.SAVE_EXT)); 392 fileToolBar.add(printAction); 393 fileToolBar 394 .add(new GroupMarker(IWorkbenchActionConstants.PRINT_EXT)); 395 396 fileToolBar 397 .add(new Separator(IWorkbenchActionConstants.BUILD_GROUP)); 398 fileToolBar 399 .add(new GroupMarker(IWorkbenchActionConstants.BUILD_EXT)); 400 fileToolBar.add(new Separator( 401 IWorkbenchActionConstants.MB_ADDITIONS)); 402 403 coolBar.add(actionBarConfigurer.createToolBarContributionItem(fileToolBar, 405 IWorkbenchActionConstants.TOOLBAR_FILE)); 406 } 407 408 coolBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS)); 409 410 coolBar.add(new GroupMarker(IIDEActionConstants.GROUP_NAV)); 411 { IToolBarManager navToolBar = actionBarConfigurer.createToolBarManager(); 413 navToolBar.add(new Separator( 414 IWorkbenchActionConstants.HISTORY_GROUP)); 415 navToolBar 416 .add(new GroupMarker(IWorkbenchActionConstants.GROUP_APP)); 417 navToolBar.add(backwardHistoryAction); 418 navToolBar.add(forwardHistoryAction); 419 navToolBar.add(new Separator(IWorkbenchActionConstants.PIN_GROUP)); 420 navToolBar.add(pinEditorContributionItem); 421 422 coolBar.add(actionBarConfigurer.createToolBarContributionItem(navToolBar, 424 IWorkbenchActionConstants.TOOLBAR_NAVIGATE)); 425 } 426 427 coolBar.add(new GroupMarker(IWorkbenchActionConstants.GROUP_EDITOR)); 428 429 coolBar.add(new GroupMarker(IWorkbenchActionConstants.GROUP_HELP)); 430 431 { IToolBarManager helpToolBar = actionBarConfigurer.createToolBarManager(); 433 helpToolBar.add(new Separator(IWorkbenchActionConstants.GROUP_HELP)); 434 helpToolBar.add(new GroupMarker(IWorkbenchActionConstants.GROUP_APP)); 437 coolBar.add(actionBarConfigurer.createToolBarContributionItem(helpToolBar, 439 IWorkbenchActionConstants.TOOLBAR_HELP)); 440 } 441 442 } 443 444 447 protected void fillMenuBar(IMenuManager menuBar) { 448 menuBar.add(createFileMenu()); 449 menuBar.add(createEditMenu()); 450 menuBar.add(createNavigateMenu()); 451 menuBar.add(createProjectMenu()); 452 menuBar.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS)); 453 menuBar.add(createWindowMenu()); 454 menuBar.add(createHelpMenu()); 455 } 456 457 460 private MenuManager createFileMenu() { 461 MenuManager menu = new MenuManager(IDEWorkbenchMessages.Workbench_file, IWorkbenchActionConstants.M_FILE); 462 menu.add(new GroupMarker(IWorkbenchActionConstants.FILE_START)); 463 { 464 String newText = IDEWorkbenchMessages.Workbench_new; 466 String newId = ActionFactory.NEW.getId(); 467 MenuManager newMenu = new MenuManager(newText, newId) { 468 public String getMenuText() { 469 String result = super.getMenuText(); 470 if (newQuickMenu == null) { 471 return result; 472 } 473 String shortCut = newQuickMenu.getShortCutString(); 474 if (shortCut == null) { 475 return result; 476 } 477 return result + "\t" + shortCut; } 479 }; 480 newMenu.add(new Separator(newId)); 481 this.newWizardMenu = new NewWizardMenu(getWindow()); 482 newMenu.add(this.newWizardMenu); 483 newMenu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS)); 484 menu.add(newMenu); 485 } 486 487 menu.add(new GroupMarker(IWorkbenchActionConstants.NEW_EXT)); 488 menu.add(new Separator()); 489 490 menu.add(closeAction); 491 menu.add(closeAllAction); 492 menu.add(new GroupMarker(IWorkbenchActionConstants.CLOSE_EXT)); 494 menu.add(new Separator()); 495 menu.add(saveAction); 496 menu.add(saveAsAction); 497 menu.add(saveAllAction); 498 menu.add(revertAction); 499 menu.add(new Separator()); 500 menu.add(moveAction); 501 menu.add(renameAction); 502 menu.add(refreshAction); 503 504 menu.add(new GroupMarker(IWorkbenchActionConstants.SAVE_EXT)); 505 menu.add(new Separator()); 506 menu.add(printAction); 507 menu.add(new GroupMarker(IWorkbenchActionConstants.PRINT_EXT)); 508 menu.add(new Separator()); 509 menu.add(openWorkspaceAction); 510 menu.add(new GroupMarker(IWorkbenchActionConstants.OPEN_EXT)); 511 menu.add(new Separator()); 512 menu.add(importResourcesAction); 513 menu.add(exportResourcesAction); 514 menu.add(new GroupMarker(IWorkbenchActionConstants.IMPORT_EXT)); 515 menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS)); 516 517 menu.add(new Separator()); 518 menu.add(propertiesAction); 519 520 menu.add(ContributionItemFactory.REOPEN_EDITORS.create(getWindow())); 521 menu.add(new GroupMarker(IWorkbenchActionConstants.MRU)); 522 menu.add(new Separator()); 523 524 ActionContributionItem quitItem = new ActionContributionItem(quitAction); 530 quitItem.setVisible(!"carbon".equals(SWT.getPlatform())); menu.add(quitItem); 532 menu.add(new GroupMarker(IWorkbenchActionConstants.FILE_END)); 533 return menu; 534 } 535 536 539 private MenuManager createEditMenu() { 540 MenuManager menu = new MenuManager(IDEWorkbenchMessages.Workbench_edit, IWorkbenchActionConstants.M_EDIT); 541 menu.add(new GroupMarker(IWorkbenchActionConstants.EDIT_START)); 542 543 menu.add(undoAction); 544 menu.add(redoAction); 545 menu.add(new GroupMarker(IWorkbenchActionConstants.UNDO_EXT)); 546 menu.add(new Separator()); 547 548 menu.add(cutAction); 549 menu.add(copyAction); 550 menu.add(pasteAction); 551 menu.add(new GroupMarker(IWorkbenchActionConstants.CUT_EXT)); 552 menu.add(new Separator()); 553 554 menu.add(deleteAction); 555 menu.add(selectAllAction); 556 menu.add(new Separator()); 557 558 menu.add(findAction); 559 menu.add(new GroupMarker(IWorkbenchActionConstants.FIND_EXT)); 560 menu.add(new Separator()); 561 562 menu.add(addBookmarkAction); 563 menu.add(addTaskAction); 564 menu.add(new GroupMarker(IWorkbenchActionConstants.ADD_EXT)); 565 566 menu.add(new GroupMarker(IWorkbenchActionConstants.EDIT_END)); 567 menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS)); 568 return menu; 569 } 570 571 574 private MenuManager createNavigateMenu() { 575 MenuManager menu = new MenuManager( 576 IDEWorkbenchMessages.Workbench_navigate, IWorkbenchActionConstants.M_NAVIGATE); 577 menu.add(new GroupMarker(IWorkbenchActionConstants.NAV_START)); 578 menu.add(goIntoAction); 579 580 MenuManager goToSubMenu = new MenuManager(IDEWorkbenchMessages.Workbench_goTo, IWorkbenchActionConstants.GO_TO); 581 menu.add(goToSubMenu); 582 goToSubMenu.add(backAction); 583 goToSubMenu.add(forwardAction); 584 goToSubMenu.add(upAction); 585 goToSubMenu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS)); 586 587 menu.add(new Separator(IWorkbenchActionConstants.OPEN_EXT)); 588 for (int i = 2; i < 5; ++i) { 589 menu.add(new Separator(IWorkbenchActionConstants.OPEN_EXT + i)); 590 } 591 menu.add(new Separator(IWorkbenchActionConstants.SHOW_EXT)); 592 { 593 594 MenuManager showInSubMenu = new MenuManager(IDEWorkbenchMessages.Workbench_showIn, "showIn") { public String getMenuText() { 596 String result = super.getMenuText(); 597 if (showInQuickMenu == null) { 598 return null; 599 } 600 String shortCut = showInQuickMenu.getShortCutString(); 601 if (shortCut == null) { 602 return result; 603 } 604 return result + "\t" + shortCut; } 606 }; 607 showInSubMenu.add(ContributionItemFactory.VIEWS_SHOW_IN 608 .create(getWindow())); 609 menu.add(showInSubMenu); 610 } 611 for (int i = 2; i < 5; ++i) { 612 menu.add(new Separator(IWorkbenchActionConstants.SHOW_EXT + i)); 613 } 614 menu.add(new Separator()); 615 menu.add(nextAction); 616 menu.add(previousAction); 617 menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS)); 618 menu.add(new GroupMarker(IWorkbenchActionConstants.NAV_END)); 619 620 menu.add(new Separator()); 622 menu.add(backwardHistoryAction); 623 menu.add(forwardHistoryAction); 624 return menu; 625 } 626 627 630 private MenuManager createProjectMenu() { 631 MenuManager menu = new MenuManager( 632 IDEWorkbenchMessages.Workbench_project, IWorkbenchActionConstants.M_PROJECT); 633 menu.add(new Separator(IWorkbenchActionConstants.PROJ_START)); 634 635 menu.add(openProjectAction); 636 menu.add(closeProjectAction); 637 menu.add(new GroupMarker(IWorkbenchActionConstants.OPEN_EXT)); 638 menu.add(new Separator()); 639 menu.add(buildAllAction); 640 menu.add(buildProjectAction); 641 addWorkingSetBuildActions(menu); 642 menu.add(cleanAction); 643 menu.add(toggleAutoBuildAction); 644 menu.add(new GroupMarker(IWorkbenchActionConstants.BUILD_EXT)); 645 menu.add(new Separator()); 646 647 menu.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS)); 648 menu.add(new GroupMarker(IWorkbenchActionConstants.PROJ_END)); 649 menu.add(new Separator()); 650 menu.add(projectPropertyDialogAction); 651 return menu; 652 } 653 654 657 private MenuManager createWindowMenu() { 658 MenuManager menu = new MenuManager( 659 IDEWorkbenchMessages.Workbench_window, IWorkbenchActionConstants.M_WINDOW); 660 661 menu.add(newWindowAction); 662 menu.add(newEditorAction); 663 664 menu.add(new Separator()); 665 addPerspectiveActions(menu); 666 menu.add(new Separator()); 667 addKeyboardShortcuts(menu); 668 menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS)); 669 670 ActionContributionItem openPreferencesItem = new ActionContributionItem(openPreferencesAction); 672 openPreferencesItem.setVisible(!"carbon".equals(SWT.getPlatform())); menu.add(openPreferencesItem); 674 675 menu.add(ContributionItemFactory.OPEN_WINDOWS.create(getWindow())); 676 return menu; 677 } 678 679 682 private void addPerspectiveActions(MenuManager menu) { 683 { 684 String openText = IDEWorkbenchMessages.Workbench_openPerspective; 685 MenuManager changePerspMenuMgr = new MenuManager(openText, 686 "openPerspective"); IContributionItem changePerspMenuItem = ContributionItemFactory.PERSPECTIVES_SHORTLIST 688 .create(getWindow()); 689 changePerspMenuMgr.add(changePerspMenuItem); 690 menu.add(changePerspMenuMgr); 691 } 692 { 693 MenuManager showViewMenuMgr = new MenuManager(IDEWorkbenchMessages.Workbench_showView, "showView"); IContributionItem showViewMenu = ContributionItemFactory.VIEWS_SHORTLIST 695 .create(getWindow()); 696 showViewMenuMgr.add(showViewMenu); 697 menu.add(showViewMenuMgr); 698 } 699 menu.add(new Separator()); 700 menu.add(editActionSetAction); 701 menu.add(savePerspectiveAction); 702 menu.add(resetPerspectiveAction); 703 menu.add(closePerspAction); 704 menu.add(closeAllPerspsAction); 705 } 706 707 710 private void addWorkingSetBuildActions(MenuManager menu) { 711 buildWorkingSetMenu = new MenuManager(IDEWorkbenchMessages.Workbench_buildSet); 712 IContributionItem workingSetBuilds = new BuildSetMenu(window, 713 getActionBarConfigurer()); 714 buildWorkingSetMenu.add(workingSetBuilds); 715 menu.add(buildWorkingSetMenu); 716 } 717 718 721 private void addKeyboardShortcuts(MenuManager menu) { 722 MenuManager subMenu = new MenuManager(IDEWorkbenchMessages.Workbench_shortcuts, "shortcuts"); menu.add(subMenu); 724 subMenu.add(showPartPaneMenuAction); 725 subMenu.add(showViewMenuAction); 726 subMenu.add(quickAccessAction); 727 subMenu.add(new Separator()); 728 subMenu.add(maximizePartAction); 729 subMenu.add(minimizePartAction); 730 subMenu.add(new Separator()); 731 subMenu.add(activateEditorAction); 732 subMenu.add(nextEditorAction); 733 subMenu.add(prevEditorAction); 734 subMenu.add(switchToEditorAction); 735 subMenu.add(new Separator()); 736 subMenu.add(nextPartAction); 737 subMenu.add(prevPartAction); 738 subMenu.add(new Separator()); 739 subMenu.add(nextPerspectiveAction); 740 subMenu.add(prevPerspectiveAction); 741 } 742 743 746 private MenuManager createHelpMenu() { 747 MenuManager menu = new MenuManager(IDEWorkbenchMessages.Workbench_help, IWorkbenchActionConstants.M_HELP); 748 addSeparatorOrGroupMarker(menu, "group.intro"); if (introAction != null) { 751 menu.add(introAction); 752 } else if (quickStartAction != null) { 753 menu.add(quickStartAction); 754 } 755 menu.add(new GroupMarker("group.intro.ext")); addSeparatorOrGroupMarker(menu, "group.main"); menu.add(helpContentsAction); 758 menu.add(helpSearchAction); 759 menu.add(dynamicHelpAction); 760 addSeparatorOrGroupMarker(menu, "group.assist"); if (tipsAndTricksAction != null) { 763 menu.add(tipsAndTricksAction); 764 } 765 menu.add(new GroupMarker(IWorkbenchActionConstants.HELP_START)); 768 menu.add(new GroupMarker("group.main.ext")); addSeparatorOrGroupMarker(menu, "group.tutorials"); addSeparatorOrGroupMarker(menu, "group.tools"); addSeparatorOrGroupMarker(menu, "group.updates"); menu.add(new GroupMarker(IWorkbenchActionConstants.HELP_END)); 773 addSeparatorOrGroupMarker(menu, IWorkbenchActionConstants.MB_ADDITIONS); 774 menu.add(new Separator("group.about")); 777 ActionContributionItem aboutItem = new ActionContributionItem(aboutAction); 778 aboutItem.setVisible(!"carbon".equals(SWT.getPlatform())); menu.add(aboutItem); 780 menu.add(new GroupMarker("group.about.ext")); return menu; 782 } 783 784 795 private void addSeparatorOrGroupMarker(MenuManager menu, String groupId) { 796 String prefId = "useSeparator." + menu.getId() + "." + groupId; boolean addExtraSeparators = IDEWorkbenchPlugin.getDefault() 798 .getPreferenceStore().getBoolean(prefId); 799 if (addExtraSeparators) { 800 menu.add(new Separator(groupId)); 801 } else { 802 menu.add(new GroupMarker(groupId)); 803 } 804 } 805 806 810 public void dispose() { 811 if (isDisposed) { 812 return; 813 } 814 isDisposed = true; 815 IMenuService menuService = (IMenuService) window.getService(IMenuService.class); 816 menuService.releaseContributions(coolbarPopupMenuManager); 817 coolbarPopupMenuManager.dispose(); 818 819 getActionBarConfigurer().getStatusLineManager().remove(statusLineItem); 820 if (pageListener != null) { 821 window.removePageListener(pageListener); 822 pageListener = null; 823 } 824 if (prefListener != null) { 825 ResourcesPlugin.getPlugin().getPluginPreferences() 826 .removePropertyChangeListener(prefListener); 827 prefListener = null; 828 } 829 if (propPrefListener != null) { 830 WorkbenchPlugin.getDefault().getPreferenceStore() 831 .removePropertyChangeListener(propPrefListener); 832 propPrefListener = null; 833 } 834 if (resourceListener != null) { 835 ResourcesPlugin.getWorkspace().removeResourceChangeListener(resourceListener); 836 resourceListener = null; 837 } 838 839 pinEditorContributionItem.dispose(); 840 showInQuickMenu.dispose(); 841 newQuickMenu.dispose(); 842 844 closeAction = null; 846 closeAllAction = null; 847 closeAllSavedAction = null; 848 closeOthersAction = null; 849 saveAction = null; 850 saveAllAction = null; 851 newWindowAction = null; 852 newEditorAction = null; 853 helpContentsAction = null; 854 helpSearchAction = null; 855 dynamicHelpAction = null; 856 aboutAction = null; 857 openPreferencesAction = null; 858 saveAsAction = null; 859 hideShowEditorAction = null; 860 savePerspectiveAction = null; 861 resetPerspectiveAction = null; 862 editActionSetAction = null; 863 closePerspAction = null; 864 lockToolBarAction = null; 865 closeAllPerspsAction = null; 866 showViewMenuAction = null; 867 showPartPaneMenuAction = null; 868 nextPartAction = null; 869 prevPartAction = null; 870 nextEditorAction = null; 871 prevEditorAction = null; 872 nextPerspectiveAction = null; 873 prevPerspectiveAction = null; 874 activateEditorAction = null; 875 maximizePartAction = null; 876 minimizePartAction = null; 877 switchToEditorAction = null; 878 quickAccessAction = null; 879 backwardHistoryAction = null; 880 forwardHistoryAction = null; 881 undoAction = null; 882 redoAction = null; 883 cutAction = null; 884 copyAction = null; 885 pasteAction = null; 886 deleteAction = null; 887 selectAllAction = null; 888 findAction = null; 889 printAction = null; 890 revertAction = null; 891 refreshAction = null; 892 propertiesAction = null; 893 quitAction = null; 894 moveAction = null; 895 renameAction = null; 896 goIntoAction = null; 897 backAction = null; 898 forwardAction = null; 899 upAction = null; 900 nextAction = null; 901 previousAction = null; 902 openWorkspaceAction = null; 903 projectPropertyDialogAction = null; 904 newWizardAction = null; 905 newWizardDropDownAction = null; 906 importResourcesAction = null; 907 exportResourcesAction = null; 908 buildAllAction = null; 909 cleanAction = null; 910 toggleAutoBuildAction = null; 911 buildWorkingSetMenu = null; 912 quickStartAction = null; 913 tipsAndTricksAction = null; 914 showInQuickMenu = null; 915 newQuickMenu = null; 916 addBookmarkAction = null; 917 addTaskAction = null; 918 buildProjectAction = null; 919 openProjectAction = null; 920 closeProjectAction = null; 921 newWizardMenu = null; 922 pinEditorContributionItem = null; 923 statusLineItem = null; 925 prefListener = null; 926 propPrefListener = null; 927 introAction = null; 928 929 super.dispose(); 930 } 931 932 void updateModeLine(final String text) { 933 statusLineItem.setText(text); 934 } 935 936 941 public boolean isApplicationMenu(String menuId) { 942 if (menuId.equals(IWorkbenchActionConstants.M_FILE)) { 943 return true; 944 } 945 if (menuId.equals(IWorkbenchActionConstants.M_WINDOW)) { 946 return true; 947 } 948 return false; 949 } 950 951 955 public boolean isWorkbenchCoolItemId(String id) { 956 if (IWorkbenchActionConstants.TOOLBAR_FILE.equalsIgnoreCase(id)) { 957 return true; 958 } 959 if (IWorkbenchActionConstants.TOOLBAR_NAVIGATE.equalsIgnoreCase(id)) { 960 return true; 961 } 962 return false; 963 } 964 965 968 protected void fillStatusLine(IStatusLineManager statusLine) { 969 statusLine.add(statusLineItem); 970 } 971 972 975 protected void makeActions(final IWorkbenchWindow window) { 976 977 statusLineItem = new StatusLineContributionItem("ModeContributionItem"); 980 newWizardAction = ActionFactory.NEW.create(window); 981 register(newWizardAction); 982 983 newWizardDropDownAction = IDEActionFactory.NEW_WIZARD_DROP_DOWN 984 .create(window); 985 register(newWizardDropDownAction); 986 987 importResourcesAction = ActionFactory.IMPORT.create(window); 988 register(importResourcesAction); 989 990 exportResourcesAction = ActionFactory.EXPORT.create(window); 991 register(exportResourcesAction); 992 993 buildAllAction = IDEActionFactory.BUILD.create(window); 994 register(buildAllAction); 995 996 cleanAction = IDEActionFactory.BUILD_CLEAN.create(window); 997 register(cleanAction); 998 999 toggleAutoBuildAction = IDEActionFactory.BUILD_AUTOMATICALLY 1000 .create(window); 1001 register(toggleAutoBuildAction); 1002 1003 saveAction = ActionFactory.SAVE.create(window); 1004 register(saveAction); 1005 1006 saveAsAction = ActionFactory.SAVE_AS.create(window); 1007 register(saveAsAction); 1008 1009 saveAllAction = ActionFactory.SAVE_ALL.create(window); 1010 register(saveAllAction); 1011 1012 newWindowAction = ActionFactory.OPEN_NEW_WINDOW.create(getWindow()); 1013 newWindowAction.setText(IDEWorkbenchMessages.Workbench_openNewWindow); 1014 register(newWindowAction); 1015 1016 newEditorAction = ActionFactory.NEW_EDITOR.create(window); 1017 register(newEditorAction); 1018 1019 undoAction = ActionFactory.UNDO.create(window); 1020 register(undoAction); 1021 1022 redoAction = ActionFactory.REDO.create(window); 1023 register(redoAction); 1024 1025 cutAction = ActionFactory.CUT.create(window); 1026 register(cutAction); 1027 1028 copyAction = ActionFactory.COPY.create(window); 1029 register(copyAction); 1030 1031 pasteAction = ActionFactory.PASTE.create(window); 1032 register(pasteAction); 1033 1034 printAction = ActionFactory.PRINT.create(window); 1035 register(printAction); 1036 1037 selectAllAction = ActionFactory.SELECT_ALL.create(window); 1038 register(selectAllAction); 1039 1040 findAction = ActionFactory.FIND.create(window); 1041 register(findAction); 1042 1043 closeAction = ActionFactory.CLOSE.create(window); 1044 register(closeAction); 1045 1046 closeAllAction = ActionFactory.CLOSE_ALL.create(window); 1047 register(closeAllAction); 1048 1049 closeOthersAction = ActionFactory.CLOSE_OTHERS.create(window); 1050 register(closeOthersAction); 1051 1052 closeAllSavedAction = ActionFactory.CLOSE_ALL_SAVED.create(window); 1053 register(closeAllSavedAction); 1054 1055 helpContentsAction = ActionFactory.HELP_CONTENTS.create(window); 1056 register(helpContentsAction); 1057 1058 helpSearchAction = ActionFactory.HELP_SEARCH.create(window); 1059 register(helpSearchAction); 1060 1061 dynamicHelpAction = ActionFactory.DYNAMIC_HELP.create(window); 1062 register(dynamicHelpAction); 1063 1064 aboutAction = ActionFactory.ABOUT.create(window); 1065 aboutAction 1066 .setImageDescriptor(IDEInternalWorkbenchImages 1067 .getImageDescriptor(IDEInternalWorkbenchImages.IMG_OBJS_DEFAULT_PROD)); 1068 register(aboutAction); 1069 1070 openPreferencesAction = ActionFactory.PREFERENCES.create(window); 1071 register(openPreferencesAction); 1072 1073 addBookmarkAction = IDEActionFactory.BOOKMARK.create(window); 1074 register(addBookmarkAction); 1075 1076 addTaskAction = IDEActionFactory.ADD_TASK.create(window); 1077 register(addTaskAction); 1078 1079 deleteAction = ActionFactory.DELETE.create(window); 1080 register(deleteAction); 1081 1082 makeFeatureDependentActions(window); 1083 1084 showViewMenuAction = ActionFactory.SHOW_VIEW_MENU.create(window); 1086 register(showViewMenuAction); 1087 1088 showPartPaneMenuAction = ActionFactory.SHOW_PART_PANE_MENU 1089 .create(window); 1090 register(showPartPaneMenuAction); 1091 1092 nextEditorAction = ActionFactory.NEXT_EDITOR.create(window); 1093 register(nextEditorAction); 1094 prevEditorAction = ActionFactory.PREVIOUS_EDITOR.create(window); 1095 register(prevEditorAction); 1096 ActionFactory.linkCycleActionPair(nextEditorAction, prevEditorAction); 1097 1098 nextPartAction = ActionFactory.NEXT_PART.create(window); 1099 register(nextPartAction); 1100 prevPartAction = ActionFactory.PREVIOUS_PART.create(window); 1101 register(prevPartAction); 1102 ActionFactory.linkCycleActionPair(nextPartAction, prevPartAction); 1103 1104 nextPerspectiveAction = ActionFactory.NEXT_PERSPECTIVE 1105 .create(window); 1106 register(nextPerspectiveAction); 1107 prevPerspectiveAction = ActionFactory.PREVIOUS_PERSPECTIVE 1108 .create(window); 1109 register(prevPerspectiveAction); 1110 ActionFactory.linkCycleActionPair(nextPerspectiveAction, 1111 prevPerspectiveAction); 1112 1113 activateEditorAction = ActionFactory.ACTIVATE_EDITOR 1114 .create(window); 1115 register(activateEditorAction); 1116 1117 maximizePartAction = ActionFactory.MAXIMIZE.create(window); 1118 register(maximizePartAction); 1119 1120 minimizePartAction = ActionFactory.MINIMIZE.create(window); 1121 register(minimizePartAction); 1122 1123 switchToEditorAction = ActionFactory.SHOW_OPEN_EDITORS 1124 .create(window); 1125 register(switchToEditorAction); 1126 1127 workbookEditorsAction = ActionFactory.SHOW_WORKBOOK_EDITORS 1128 .create(window); 1129 register(workbookEditorsAction); 1130 1131 quickAccessAction = ActionFactory.SHOW_QUICK_ACCESS 1132 .create(window); 1133 1134 hideShowEditorAction = ActionFactory.SHOW_EDITOR.create(window); 1135 register(hideShowEditorAction); 1136 savePerspectiveAction = ActionFactory.SAVE_PERSPECTIVE 1137 .create(window); 1138 register(savePerspectiveAction); 1139 editActionSetAction = ActionFactory.EDIT_ACTION_SETS 1140 .create(window); 1141 register(editActionSetAction); 1142 lockToolBarAction = ActionFactory.LOCK_TOOL_BAR.create(window); 1143 register(lockToolBarAction); 1144 resetPerspectiveAction = ActionFactory.RESET_PERSPECTIVE 1145 .create(window); 1146 register(resetPerspectiveAction); 1147 closePerspAction = ActionFactory.CLOSE_PERSPECTIVE.create(window); 1148 register(closePerspAction); 1149 closeAllPerspsAction = ActionFactory.CLOSE_ALL_PERSPECTIVES 1150 .create(window); 1151 register(closeAllPerspsAction); 1152 1153 forwardHistoryAction = ActionFactory.FORWARD_HISTORY 1154 .create(window); 1155 register(forwardHistoryAction); 1156 1157 backwardHistoryAction = ActionFactory.BACKWARD_HISTORY 1158 .create(window); 1159 register(backwardHistoryAction); 1160 1161 revertAction = ActionFactory.REVERT.create(window); 1162 register(revertAction); 1163 1164 refreshAction = ActionFactory.REFRESH.create(window); 1165 register(refreshAction); 1166 1167 propertiesAction = ActionFactory.PROPERTIES.create(window); 1168 register(propertiesAction); 1169 1170 quitAction = ActionFactory.QUIT.create(window); 1171 register(quitAction); 1172 1173 moveAction = ActionFactory.MOVE.create(window); 1174 register(moveAction); 1175 1176 renameAction = ActionFactory.RENAME.create(window); 1177 register(renameAction); 1178 1179 goIntoAction = ActionFactory.GO_INTO.create(window); 1180 register(goIntoAction); 1181 1182 backAction = ActionFactory.BACK.create(window); 1183 register(backAction); 1184 1185 forwardAction = ActionFactory.FORWARD.create(window); 1186 register(forwardAction); 1187 1188 upAction = ActionFactory.UP.create(window); 1189 register(upAction); 1190 1191 nextAction = ActionFactory.NEXT.create(window); 1192 nextAction 1193 .setImageDescriptor(IDEInternalWorkbenchImages 1194 .getImageDescriptor(IDEInternalWorkbenchImages.IMG_ETOOL_NEXT_NAV)); 1195 register(nextAction); 1196 1197 previousAction = ActionFactory.PREVIOUS.create(window); 1198 previousAction 1199 .setImageDescriptor(IDEInternalWorkbenchImages 1200 .getImageDescriptor(IDEInternalWorkbenchImages.IMG_ETOOL_PREVIOUS_NAV)); 1201 register(previousAction); 1202 1203 buildProjectAction = IDEActionFactory.BUILD_PROJECT.create(window); 1204 register(buildProjectAction); 1205 1206 openProjectAction = IDEActionFactory.OPEN_PROJECT.create(window); 1207 register(openProjectAction); 1208 1209 closeProjectAction = IDEActionFactory.CLOSE_PROJECT.create(window); 1210 register(closeProjectAction); 1211 1212 openWorkspaceAction = IDEActionFactory.OPEN_WORKSPACE 1213 .create(window); 1214 register(openWorkspaceAction); 1215 1216 projectPropertyDialogAction = IDEActionFactory.OPEN_PROJECT_PROPERTIES 1217 .create(window); 1218 register(projectPropertyDialogAction); 1219 1220 if (window.getWorkbench().getIntroManager().hasIntro()) { 1221 introAction = ActionFactory.INTRO.create(window); 1222 register(introAction); 1223 } 1224 1225 String showInQuickMenuId = "org.eclipse.ui.navigate.showInQuickMenu"; showInQuickMenu = new QuickMenuAction(showInQuickMenuId) { 1227 protected void fillMenu(IMenuManager menu) { 1228 menu.add(ContributionItemFactory.VIEWS_SHOW_IN 1229 .create(window)); 1230 } 1231 }; 1232 register(showInQuickMenu); 1233 1234 final String newQuickMenuId = "org.eclipse.ui.file.newQuickMenu"; newQuickMenu = new QuickMenuAction(newQuickMenuId) { 1236 protected void fillMenu(IMenuManager menu) { 1237 menu.add(new NewWizardMenu(window)); 1238 } 1239 }; 1240 register(newQuickMenu); 1241 1242 pinEditorContributionItem = ContributionItemFactory.PIN_EDITOR 1243 .create(window); 1244 1245 } 1247 1248 1251 private void makeFeatureDependentActions(IWorkbenchWindow window) { 1252 AboutInfo[] infos = null; 1253 1254 IPreferenceStore prefs = IDEWorkbenchPlugin.getDefault().getPreferenceStore(); 1255 1256 String stateKey = "platformState"; String prevState = prefs.getString(stateKey); 1260 String currentState = String.valueOf(Platform.getStateStamp()); 1261 boolean sameState = currentState.equals(prevState); 1262 if (!sameState) { 1263 prefs.putValue(stateKey, currentState); 1264 } 1265 1266 String quickStartKey = IDEActionFactory.QUICK_START.getId(); 1269 String showQuickStart = prefs.getString(quickStartKey); 1270 if (sameState && "true".equals(showQuickStart)) { quickStartAction = IDEActionFactory.QUICK_START.create(window); 1272 register(quickStartAction); 1273 } 1274 else if (sameState && "false".equals(showQuickStart)) { } 1277 else { 1278 infos = IDEWorkbenchPlugin.getDefault().getFeatureInfos(); 1280 boolean found = hasWelcomePage(infos); 1281 prefs.setValue(quickStartKey, found); 1282 if (found) { 1283 quickStartAction = IDEActionFactory.QUICK_START.create(window); 1284 register(quickStartAction); 1285 } 1286 } 1287 1288 String tipsAndTricksKey = IDEActionFactory.TIPS_AND_TRICKS.getId(); 1291 String showTipsAndTricks = prefs.getString(tipsAndTricksKey); 1292 if (sameState && "true".equals(showTipsAndTricks)) { tipsAndTricksAction = IDEActionFactory.TIPS_AND_TRICKS 1294 .create(window); 1295 register(tipsAndTricksAction); 1296 } 1297 else if (sameState && "false".equals(showTipsAndTricks)) { } 1300 else { 1301 if (infos == null) { 1303 infos = IDEWorkbenchPlugin.getDefault().getFeatureInfos(); 1304 } 1305 boolean found = hasTipsAndTricks(infos); 1306 prefs.setValue(tipsAndTricksKey, found); 1307 if (found) { 1308 tipsAndTricksAction = IDEActionFactory.TIPS_AND_TRICKS 1309 .create(window); 1310 register(tipsAndTricksAction); 1311 } 1312 } 1313 } 1314 1315 1321 private boolean hasWelcomePage(AboutInfo[] infos) { 1322 for (int i = 0; i < infos.length; i++) { 1323 if (infos[i].getWelcomePageURL() != null) { 1324 return true; 1325 } 1326 } 1327 return false; 1328 } 1329 1330 1336 private boolean hasTipsAndTricks(AboutInfo[] infos) { 1337 for (int i = 0; i < infos.length; i++) { 1338 if (infos[i].getTipsAndTricksHref() != null) { 1339 return true; 1340 } 1341 } 1342 return false; 1343 } 1344 1345 1354 void updateBuildActions(boolean immediately) { 1355 Runnable update = new Runnable () { 1357 public void run() { 1358 if (isDisposed) { 1359 return; 1360 } 1361 IWorkspace workspace = ResourcesPlugin.getWorkspace(); 1362 IProject[] projects = workspace.getRoot().getProjects(); 1363 boolean enabled = BuildUtilities.isEnabled(projects, IncrementalProjectBuilder.INCREMENTAL_BUILD); 1364 buildAllAction.setEnabled(enabled); 1366 buildProjectAction.setEnabled(enabled); 1367 toggleAutoBuildAction.setChecked(workspace.isAutoBuilding()); 1368 cleanAction.setEnabled(BuildUtilities.isEnabled(projects, IncrementalProjectBuilder.CLEAN_BUILD)); 1369 1370 ICoolBarManager coolBarManager = getActionBarConfigurer() 1372 .getCoolBarManager(); 1373 IContributionItem cbItem = coolBarManager 1374 .find(IWorkbenchActionConstants.TOOLBAR_FILE); 1375 if (!(cbItem instanceof IToolBarContributionItem)) { 1376 IDEWorkbenchPlugin.log("File toolbar contribution item is missing"); return; 1379 } 1380 IToolBarContributionItem toolBarItem = (IToolBarContributionItem) cbItem; 1381 IToolBarManager toolBarManager = toolBarItem.getToolBarManager(); 1382 if (toolBarManager == null) { 1383 IDEWorkbenchPlugin.log("File toolbar is missing"); return; 1386 } 1387 boolean found = toolBarManager.find(buildAllAction.getId()) != null; 1389 if (enabled && !found) { 1390 toolBarManager.appendToGroup(IWorkbenchActionConstants.BUILD_GROUP, 1391 buildAllAction); 1392 toolBarManager.update(false); 1393 toolBarItem.update(ICoolBarManager.SIZE); 1394 } else if (buildAllAction != null && found && !enabled) { 1395 toolBarManager.remove(buildAllAction.getId()); 1396 toolBarManager.update(false); 1397 toolBarItem.update(ICoolBarManager.SIZE); 1398 } 1399 } 1400 }; 1401 if (immediately) { 1402 update.run(); 1403 } 1404 else { 1405 Shell shell = window.getShell(); 1408 if (shell != null && !shell.isDisposed()) { 1409 shell.getDisplay().asyncExec(update); 1410 } 1411 } 1412 } 1413 1414 1417 void updatePinActionToolbar() { 1418 1419 ICoolBarManager coolBarManager = getActionBarConfigurer() 1420 .getCoolBarManager(); 1421 IContributionItem cbItem = coolBarManager 1422 .find(IWorkbenchActionConstants.TOOLBAR_NAVIGATE); 1423 if (!(cbItem instanceof IToolBarContributionItem)) { 1424 IDEWorkbenchPlugin 1426 .log("Navigation toolbar contribution item is missing"); return; 1428 } 1429 IToolBarContributionItem toolBarItem = (IToolBarContributionItem) cbItem; 1430 IToolBarManager toolBarManager = toolBarItem.getToolBarManager(); 1431 if (toolBarManager == null) { 1432 IDEWorkbenchPlugin.log("Navigate toolbar is missing"); return; 1435 } 1436 1437 toolBarManager.update(false); 1438 toolBarItem.update(ICoolBarManager.SIZE); 1439 } 1440} 1441 | Popular Tags |