Lines 69-74
Link Here
|
69 |
private static final String nextPerspectiveActionDefId = "org.eclipse.ui.window.nextPerspective"; //$NON-NLS-1$ |
69 |
private static final String nextPerspectiveActionDefId = "org.eclipse.ui.window.nextPerspective"; //$NON-NLS-1$ |
70 |
private static final String prevPerspectiveActionDefId = "org.eclipse.ui.window.previousPerspective"; //$NON-NLS-1$ |
70 |
private static final String prevPerspectiveActionDefId = "org.eclipse.ui.window.previousPerspective"; //$NON-NLS-1$ |
71 |
private static final String activateEditorActionDefId = "org.eclipse.ui.window.activateEditor"; //$NON-NLS-1$ |
71 |
private static final String activateEditorActionDefId = "org.eclipse.ui.window.activateEditor"; //$NON-NLS-1$ |
|
|
72 |
private static final String maximizePartActionDefId = "org.eclipse.ui.window.maximizePart"; //$NON-NLS-1$ |
72 |
private static final String workbenchEditorsActionDefId = "org.eclipse.ui.window.switchToEditor"; //$NON-NLS-1$ |
73 |
private static final String workbenchEditorsActionDefId = "org.eclipse.ui.window.switchToEditor"; //$NON-NLS-1$ |
73 |
private static final String buildAllActionDefId = "org.eclipse.ui.project.buildAll"; //$NON-NLS-1$ |
74 |
private static final String buildAllActionDefId = "org.eclipse.ui.project.buildAll"; //$NON-NLS-1$ |
74 |
private static final String rebuildAllActionDefId = "org.eclipse.ui.project.rebuildAll"; //$NON-NLS-1$ |
75 |
private static final String rebuildAllActionDefId = "org.eclipse.ui.project.rebuildAll"; //$NON-NLS-1$ |
Lines 123-128
Link Here
|
123 |
private CyclePerspectiveAction nextPerspectiveAction; |
124 |
private CyclePerspectiveAction nextPerspectiveAction; |
124 |
private CyclePerspectiveAction prevPerspectiveAction; |
125 |
private CyclePerspectiveAction prevPerspectiveAction; |
125 |
private ActivateEditorAction activateEditorAction; |
126 |
private ActivateEditorAction activateEditorAction; |
|
|
127 |
private MaximizePartAction maximizePartAction; |
126 |
|
128 |
|
127 |
private WorkbenchEditorsAction workbenchEditorsAction; |
129 |
private WorkbenchEditorsAction workbenchEditorsAction; |
128 |
|
130 |
|
Lines 511-516
Link Here
|
511 |
subMenu.add(showViewMenuAction); |
513 |
subMenu.add(showViewMenuAction); |
512 |
subMenu.add(new Separator()); |
514 |
subMenu.add(new Separator()); |
513 |
subMenu.add(activateEditorAction); |
515 |
subMenu.add(activateEditorAction); |
|
|
516 |
subMenu.add(maximizePartAction); |
514 |
subMenu.add(nextEditorAction); |
517 |
subMenu.add(nextEditorAction); |
515 |
subMenu.add(prevEditorAction); |
518 |
subMenu.add(prevEditorAction); |
516 |
subMenu.add(new Separator()); |
519 |
subMenu.add(new Separator()); |
Lines 634-655
Link Here
|
634 |
* Create actions for the menu bar and toolbar |
637 |
* Create actions for the menu bar and toolbar |
635 |
*/ |
638 |
*/ |
636 |
private void makeActions() { |
639 |
private void makeActions() { |
637 |
|
640 |
|
638 |
// The actions in jface do not have menu vs. enable, vs. disable vs. color |
641 |
// The actions in jface do not have menu vs. enable, vs. disable vs. color |
639 |
// There are actions in here being passed the workbench - problem |
642 |
// There are actions in here being passed the workbench - problem |
640 |
|
643 |
|
641 |
// Get services for notification. |
644 |
// Get services for notification. |
642 |
IPartService partService = getWindow().getPartService(); |
645 |
IPartService partService = getWindow().getPartService(); |
643 |
WWinKeyBindingService keyBindingService = |
646 |
WWinKeyBindingService keyBindingService = |
644 |
getWindow().getKeyBindingService(); |
647 |
getWindow().getKeyBindingService(); |
645 |
|
648 |
|
646 |
// Many actions need the workbench. |
649 |
// Many actions need the workbench. |
647 |
IWorkbench workbench = getWindow().getWorkbench(); |
650 |
IWorkbench workbench = getWindow().getWorkbench(); |
648 |
|
651 |
|
649 |
newWizardAction = new NewWizardAction(); |
652 |
newWizardAction = new NewWizardAction(); |
650 |
// images for this action are set in its constructor |
653 |
// images for this action are set in its constructor |
651 |
keyBindingService.registerGlobalAction(newWizardAction); |
654 |
keyBindingService.registerGlobalAction(newWizardAction); |
652 |
|
655 |
|
653 |
ISharedImages sharedImages = workbench.getSharedImages(); |
656 |
ISharedImages sharedImages = workbench.getSharedImages(); |
654 |
newWizardDropDownAction = |
657 |
newWizardDropDownAction = |
655 |
new NewWizardDropDownAction(workbench, newWizardAction); |
658 |
new NewWizardDropDownAction(workbench, newWizardAction); |
Lines 659-665
Link Here
|
659 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_NEW_WIZARD_HOVER)); |
662 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_NEW_WIZARD_HOVER)); |
660 |
newWizardDropDownAction.setDisabledImageDescriptor( |
663 |
newWizardDropDownAction.setDisabledImageDescriptor( |
661 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_NEW_WIZARD_DISABLED)); |
664 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_NEW_WIZARD_DISABLED)); |
662 |
|
665 |
|
663 |
importResourcesAction = new ImportResourcesAction(workbench); |
666 |
importResourcesAction = new ImportResourcesAction(workbench); |
664 |
importResourcesAction.setImageDescriptor( |
667 |
importResourcesAction.setImageDescriptor( |
665 |
WorkbenchImages.getImageDescriptor( |
668 |
WorkbenchImages.getImageDescriptor( |
Lines 670-676
Link Here
|
670 |
importResourcesAction.setDisabledImageDescriptor( |
673 |
importResourcesAction.setDisabledImageDescriptor( |
671 |
WorkbenchImages.getImageDescriptor( |
674 |
WorkbenchImages.getImageDescriptor( |
672 |
IWorkbenchGraphicConstants.IMG_CTOOL_IMPORT_WIZ_DISABLED)); |
675 |
IWorkbenchGraphicConstants.IMG_CTOOL_IMPORT_WIZ_DISABLED)); |
673 |
|
676 |
|
674 |
exportResourcesAction = new ExportResourcesAction(workbench, WorkbenchMessages.getString("ExportResourcesAction.fileMenuText")); //$NON-NLS-1$ |
677 |
exportResourcesAction = new ExportResourcesAction(workbench, WorkbenchMessages.getString("ExportResourcesAction.fileMenuText")); //$NON-NLS-1$ |
675 |
exportResourcesAction.setImageDescriptor( |
678 |
exportResourcesAction.setImageDescriptor( |
676 |
WorkbenchImages.getImageDescriptor( |
679 |
WorkbenchImages.getImageDescriptor( |
Lines 681-692
Link Here
|
681 |
exportResourcesAction.setDisabledImageDescriptor( |
684 |
exportResourcesAction.setDisabledImageDescriptor( |
682 |
WorkbenchImages.getImageDescriptor( |
685 |
WorkbenchImages.getImageDescriptor( |
683 |
IWorkbenchGraphicConstants.IMG_CTOOL_EXPORT_WIZ_DISABLED)); |
686 |
IWorkbenchGraphicConstants.IMG_CTOOL_EXPORT_WIZ_DISABLED)); |
684 |
|
687 |
|
685 |
rebuildAllAction = |
688 |
rebuildAllAction = |
686 |
new GlobalBuildAction(window, IncrementalProjectBuilder.FULL_BUILD); |
689 |
new GlobalBuildAction(window, IncrementalProjectBuilder.FULL_BUILD); |
687 |
rebuildAllAction.setActionDefinitionId(rebuildAllActionDefId); |
690 |
rebuildAllAction.setActionDefinitionId(rebuildAllActionDefId); |
688 |
keyBindingService.registerGlobalAction(rebuildAllAction); |
691 |
keyBindingService.registerGlobalAction(rebuildAllAction); |
689 |
|
692 |
|
690 |
buildAllAction = |
693 |
buildAllAction = |
691 |
new GlobalBuildAction( |
694 |
new GlobalBuildAction( |
692 |
window, |
695 |
window, |
Lines 702-708
Link Here
|
702 |
IWorkbenchGraphicConstants.IMG_CTOOL_BUILD_EXEC_DISABLED)); |
705 |
IWorkbenchGraphicConstants.IMG_CTOOL_BUILD_EXEC_DISABLED)); |
703 |
buildAllAction.setActionDefinitionId(buildAllActionDefId); |
706 |
buildAllAction.setActionDefinitionId(buildAllActionDefId); |
704 |
keyBindingService.registerGlobalAction(buildAllAction); |
707 |
keyBindingService.registerGlobalAction(buildAllAction); |
705 |
|
708 |
|
706 |
saveAction = new SaveAction(window); |
709 |
saveAction = new SaveAction(window); |
707 |
saveAction.setImageDescriptor( |
710 |
saveAction.setImageDescriptor( |
708 |
WorkbenchImages.getImageDescriptor( |
711 |
WorkbenchImages.getImageDescriptor( |
Lines 716-722
Link Here
|
716 |
partService.addPartListener(saveAction); |
719 |
partService.addPartListener(saveAction); |
717 |
saveAction.setActionDefinitionId(saveActionDefId); |
720 |
saveAction.setActionDefinitionId(saveActionDefId); |
718 |
keyBindingService.registerGlobalAction(saveAction); |
721 |
keyBindingService.registerGlobalAction(saveAction); |
719 |
|
722 |
|
720 |
saveAsAction = new SaveAsAction(window); |
723 |
saveAsAction = new SaveAsAction(window); |
721 |
saveAsAction.setImageDescriptor( |
724 |
saveAsAction.setImageDescriptor( |
722 |
WorkbenchImages.getImageDescriptor( |
725 |
WorkbenchImages.getImageDescriptor( |
Lines 728-734
Link Here
|
728 |
WorkbenchImages.getImageDescriptor( |
731 |
WorkbenchImages.getImageDescriptor( |
729 |
IWorkbenchGraphicConstants.IMG_CTOOL_SAVEAS_EDIT_DISABLED)); |
732 |
IWorkbenchGraphicConstants.IMG_CTOOL_SAVEAS_EDIT_DISABLED)); |
730 |
partService.addPartListener(saveAsAction); |
733 |
partService.addPartListener(saveAsAction); |
731 |
|
734 |
|
732 |
saveAllAction = new SaveAllAction(window); |
735 |
saveAllAction = new SaveAllAction(window); |
733 |
saveAllAction.setImageDescriptor( |
736 |
saveAllAction.setImageDescriptor( |
734 |
WorkbenchImages.getImageDescriptor( |
737 |
WorkbenchImages.getImageDescriptor( |
Lines 742-748
Link Here
|
742 |
partService.addPartListener(saveAllAction); |
745 |
partService.addPartListener(saveAllAction); |
743 |
saveAllAction.setActionDefinitionId(saveAllActionDefId); |
746 |
saveAllAction.setActionDefinitionId(saveAllActionDefId); |
744 |
keyBindingService.registerGlobalAction(saveAllAction); |
747 |
keyBindingService.registerGlobalAction(saveAllAction); |
745 |
|
748 |
|
746 |
undoAction = createGlobalAction(IWorkbenchActionConstants.UNDO, "edit", true); //$NON-NLS-1$ |
749 |
undoAction = createGlobalAction(IWorkbenchActionConstants.UNDO, "edit", true); //$NON-NLS-1$ |
747 |
undoAction.setImageDescriptor( |
750 |
undoAction.setImageDescriptor( |
748 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_UNDO)); |
751 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_UNDO)); |
Lines 750-756
Link Here
|
750 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_UNDO_HOVER)); |
753 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_UNDO_HOVER)); |
751 |
undoAction.setDisabledImageDescriptor( |
754 |
undoAction.setDisabledImageDescriptor( |
752 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_UNDO_DISABLED)); |
755 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_UNDO_DISABLED)); |
753 |
|
756 |
|
754 |
redoAction = createGlobalAction(IWorkbenchActionConstants.REDO, "edit", true); //$NON-NLS-1$ |
757 |
redoAction = createGlobalAction(IWorkbenchActionConstants.REDO, "edit", true); //$NON-NLS-1$ |
755 |
redoAction.setImageDescriptor( |
758 |
redoAction.setImageDescriptor( |
756 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_REDO)); |
759 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_REDO)); |
Lines 758-764
Link Here
|
758 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_REDO_HOVER)); |
761 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_REDO_HOVER)); |
759 |
redoAction.setDisabledImageDescriptor( |
762 |
redoAction.setDisabledImageDescriptor( |
760 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_REDO_DISABLED)); |
763 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_REDO_DISABLED)); |
761 |
|
764 |
|
762 |
cutAction = createGlobalAction(IWorkbenchActionConstants.CUT, "edit", false); //$NON-NLS-1$ |
765 |
cutAction = createGlobalAction(IWorkbenchActionConstants.CUT, "edit", false); //$NON-NLS-1$ |
763 |
cutAction.setImageDescriptor( |
766 |
cutAction.setImageDescriptor( |
764 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_CUT)); |
767 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_CUT)); |
Lines 766-772
Link Here
|
766 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_CUT_HOVER)); |
769 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_CUT_HOVER)); |
767 |
cutAction.setDisabledImageDescriptor( |
770 |
cutAction.setDisabledImageDescriptor( |
768 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_CUT_DISABLED)); |
771 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_CUT_DISABLED)); |
769 |
|
772 |
|
770 |
copyAction = createGlobalAction(IWorkbenchActionConstants.COPY, "edit", false); //$NON-NLS-1$ |
773 |
copyAction = createGlobalAction(IWorkbenchActionConstants.COPY, "edit", false); //$NON-NLS-1$ |
771 |
copyAction.setImageDescriptor( |
774 |
copyAction.setImageDescriptor( |
772 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY)); |
775 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY)); |
Lines 774-780
Link Here
|
774 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY_HOVER)); |
777 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY_HOVER)); |
775 |
copyAction.setDisabledImageDescriptor( |
778 |
copyAction.setDisabledImageDescriptor( |
776 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY_DISABLED)); |
779 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_COPY_DISABLED)); |
777 |
|
780 |
|
778 |
pasteAction = createGlobalAction(IWorkbenchActionConstants.PASTE, "edit", false); //$NON-NLS-1$ |
781 |
pasteAction = createGlobalAction(IWorkbenchActionConstants.PASTE, "edit", false); //$NON-NLS-1$ |
779 |
pasteAction.setImageDescriptor( |
782 |
pasteAction.setImageDescriptor( |
780 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE)); |
783 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE)); |
Lines 782-788
Link Here
|
782 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE_HOVER)); |
785 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE_HOVER)); |
783 |
pasteAction.setDisabledImageDescriptor( |
786 |
pasteAction.setDisabledImageDescriptor( |
784 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE_DISABLED)); |
787 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE_DISABLED)); |
785 |
|
788 |
|
786 |
printAction = createGlobalAction(IWorkbenchActionConstants.PRINT, "file", false); //$NON-NLS-1$ |
789 |
printAction = createGlobalAction(IWorkbenchActionConstants.PRINT, "file", false); //$NON-NLS-1$ |
787 |
printAction.setImageDescriptor( |
790 |
printAction.setImageDescriptor( |
788 |
WorkbenchImages.getImageDescriptor( |
791 |
WorkbenchImages.getImageDescriptor( |
Lines 793-823
Link Here
|
793 |
printAction.setDisabledImageDescriptor( |
796 |
printAction.setDisabledImageDescriptor( |
794 |
WorkbenchImages.getImageDescriptor( |
797 |
WorkbenchImages.getImageDescriptor( |
795 |
IWorkbenchGraphicConstants.IMG_CTOOL_PRINT_EDIT_DISABLED)); |
798 |
IWorkbenchGraphicConstants.IMG_CTOOL_PRINT_EDIT_DISABLED)); |
796 |
|
799 |
|
797 |
selectAllAction = createGlobalAction(IWorkbenchActionConstants.SELECT_ALL, "edit", false); //$NON-NLS-1$ |
800 |
selectAllAction = createGlobalAction(IWorkbenchActionConstants.SELECT_ALL, "edit", false); //$NON-NLS-1$ |
798 |
|
801 |
|
799 |
findAction = createGlobalAction(IWorkbenchActionConstants.FIND, "findReplace", "edit", "findReplace", false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
802 |
findAction = createGlobalAction(IWorkbenchActionConstants.FIND, "findReplace", "edit", "findReplace", false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
800 |
// Find's images are commented out due to a conflict with Search. |
803 |
// Find's images are commented out due to a conflict with Search. |
801 |
// See bug 16412. |
804 |
// See bug 16412. |
802 |
// findAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_SEARCH_SRC)); |
805 |
// findAction.setImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_SEARCH_SRC)); |
803 |
// findAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_SEARCH_SRC_HOVER)); |
806 |
// findAction.setHoverImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_SEARCH_SRC_HOVER)); |
804 |
// findAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_SEARCH_SRC_DISABLED)); |
807 |
// findAction.setDisabledImageDescriptor(WorkbenchImages.getImageDescriptor(IWorkbenchGraphicConstants.IMG_CTOOL_SEARCH_SRC_DISABLED)); |
805 |
|
808 |
|
806 |
closeAction = new CloseEditorAction(window); |
809 |
closeAction = new CloseEditorAction(window); |
807 |
partService.addPartListener(closeAction); |
810 |
partService.addPartListener(closeAction); |
808 |
closeAction.setActionDefinitionId(closeActionDefId); |
811 |
closeAction.setActionDefinitionId(closeActionDefId); |
809 |
keyBindingService.registerGlobalAction(closeAction); |
812 |
keyBindingService.registerGlobalAction(closeAction); |
810 |
|
813 |
|
811 |
closeAllAction = new CloseAllAction(window); |
814 |
closeAllAction = new CloseAllAction(window); |
812 |
partService.addPartListener(closeAllAction); |
815 |
partService.addPartListener(closeAllAction); |
813 |
closeAllAction.setActionDefinitionId(closeAllActionDefId); |
816 |
closeAllAction.setActionDefinitionId(closeAllActionDefId); |
814 |
keyBindingService.registerGlobalAction(closeAllAction); |
817 |
keyBindingService.registerGlobalAction(closeAllAction); |
815 |
|
818 |
|
816 |
closeAllSavedAction = new CloseAllSavedAction(window); |
819 |
closeAllSavedAction = new CloseAllSavedAction(window); |
817 |
partService.addPartListener(closeAllSavedAction); |
820 |
partService.addPartListener(closeAllSavedAction); |
818 |
closeAllSavedAction.setActionDefinitionId(closeAllSavedActionDefId); |
821 |
closeAllSavedAction.setActionDefinitionId(closeAllSavedActionDefId); |
819 |
keyBindingService.registerGlobalAction(closeAllSavedAction); |
822 |
keyBindingService.registerGlobalAction(closeAllSavedAction); |
820 |
|
823 |
|
821 |
pinEditorAction = new PinEditorAction(window); |
824 |
pinEditorAction = new PinEditorAction(window); |
822 |
partService.addPartListener(pinEditorAction); |
825 |
partService.addPartListener(pinEditorAction); |
823 |
pinEditorAction.setImageDescriptor( |
826 |
pinEditorAction.setImageDescriptor( |
Lines 829-845
Link Here
|
829 |
pinEditorAction.setDisabledImageDescriptor( |
832 |
pinEditorAction.setDisabledImageDescriptor( |
830 |
WorkbenchImages.getImageDescriptor( |
833 |
WorkbenchImages.getImageDescriptor( |
831 |
IWorkbenchGraphicConstants.IMG_CTOOL_PIN_EDITOR_DISABLED)); |
834 |
IWorkbenchGraphicConstants.IMG_CTOOL_PIN_EDITOR_DISABLED)); |
832 |
|
835 |
|
833 |
aboutAction = new AboutAction(window); |
836 |
aboutAction = new AboutAction(window); |
834 |
aboutAction.setImageDescriptor( |
837 |
aboutAction.setImageDescriptor( |
835 |
WorkbenchImages.getImageDescriptor( |
838 |
WorkbenchImages.getImageDescriptor( |
836 |
IWorkbenchGraphicConstants.IMG_OBJS_DEFAULT_PROD)); |
839 |
IWorkbenchGraphicConstants.IMG_OBJS_DEFAULT_PROD)); |
837 |
|
840 |
|
838 |
openPreferencesAction = new OpenPreferencesAction(window); |
841 |
openPreferencesAction = new OpenPreferencesAction(window); |
839 |
|
842 |
|
840 |
addBookmarkAction = createGlobalAction(IWorkbenchActionConstants.BOOKMARK, "addBookMark", "edit", "addBookmark", false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
843 |
addBookmarkAction = createGlobalAction(IWorkbenchActionConstants.BOOKMARK, "addBookMark", "edit", "addBookmark", false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
841 |
addTaskAction = createGlobalAction(IWorkbenchActionConstants.ADD_TASK, "edit", false); //$NON-NLS-1$ |
844 |
addTaskAction = createGlobalAction(IWorkbenchActionConstants.ADD_TASK, "edit", false); //$NON-NLS-1$ |
842 |
|
845 |
|
843 |
// can't use createGlobalAction convenience since deleteAction is not registered with the key binding service |
846 |
// can't use createGlobalAction convenience since deleteAction is not registered with the key binding service |
844 |
deleteAction = new RetargetAction(IWorkbenchActionConstants.DELETE, WorkbenchMessages.getString("Workbench.delete")); //$NON-NLS-1$ |
847 |
deleteAction = new RetargetAction(IWorkbenchActionConstants.DELETE, WorkbenchMessages.getString("Workbench.delete")); //$NON-NLS-1$ |
845 |
deleteAction.setToolTipText(WorkbenchMessages.getString("Workbench.deleteToolTip")); //$NON-NLS-1$ |
848 |
deleteAction.setToolTipText(WorkbenchMessages.getString("Workbench.deleteToolTip")); //$NON-NLS-1$ |
Lines 859-865
Link Here
|
859 |
// doing so would break cell editors that listen for keyPressed SWT |
862 |
// doing so would break cell editors that listen for keyPressed SWT |
860 |
// events. |
863 |
// events. |
861 |
//keyBindingService.registerGlobalAction(deleteAction); |
864 |
//keyBindingService.registerGlobalAction(deleteAction); |
862 |
|
865 |
|
863 |
AboutInfo[] infos = |
866 |
AboutInfo[] infos = |
864 |
((Workbench) workbench).getConfigurationInfo().getFeaturesInfo(); |
867 |
((Workbench) workbench).getConfigurationInfo().getFeaturesInfo(); |
865 |
// See if a welcome page is specified |
868 |
// See if a welcome page is specified |
Lines 876-925
Link Here
|
876 |
break; |
879 |
break; |
877 |
} |
880 |
} |
878 |
} |
881 |
} |
879 |
|
882 |
|
880 |
// Actions for invisible accelerators |
883 |
// Actions for invisible accelerators |
881 |
showViewMenuAction = new ShowViewMenuAction(window); |
884 |
showViewMenuAction = new ShowViewMenuAction(window); |
882 |
showViewMenuAction.setActionDefinitionId(showViewMenuActionDefId); |
885 |
showViewMenuAction.setActionDefinitionId(showViewMenuActionDefId); |
883 |
keyBindingService.registerGlobalAction(showViewMenuAction); |
886 |
keyBindingService.registerGlobalAction(showViewMenuAction); |
884 |
|
887 |
|
885 |
showPartPaneMenuAction = new ShowPartPaneMenuAction(window); |
888 |
showPartPaneMenuAction = new ShowPartPaneMenuAction(window); |
886 |
showPartPaneMenuAction.setActionDefinitionId( |
889 |
showPartPaneMenuAction.setActionDefinitionId( |
887 |
showPartPaneMenuActionDefId); |
890 |
showPartPaneMenuActionDefId); |
888 |
keyBindingService.registerGlobalAction(showPartPaneMenuAction); |
891 |
keyBindingService.registerGlobalAction(showPartPaneMenuAction); |
889 |
|
892 |
|
890 |
nextEditorAction = new CycleEditorAction(window, true); |
893 |
nextEditorAction = new CycleEditorAction(window, true); |
891 |
nextEditorAction.setActionDefinitionId(nextEditorActionDefId); |
894 |
nextEditorAction.setActionDefinitionId(nextEditorActionDefId); |
892 |
keyBindingService.registerGlobalAction(nextEditorAction); |
895 |
keyBindingService.registerGlobalAction(nextEditorAction); |
893 |
|
896 |
|
894 |
prevEditorAction = new CycleEditorAction(window, false); |
897 |
prevEditorAction = new CycleEditorAction(window, false); |
895 |
prevEditorAction.setActionDefinitionId(prevEditorActionDefId); |
898 |
prevEditorAction.setActionDefinitionId(prevEditorActionDefId); |
896 |
keyBindingService.registerGlobalAction(prevEditorAction); |
899 |
keyBindingService.registerGlobalAction(prevEditorAction); |
897 |
|
900 |
|
898 |
nextPartAction = new CyclePartAction(window, true); |
901 |
nextPartAction = new CyclePartAction(window, true); |
899 |
nextPartAction.setActionDefinitionId(nextPartActionDefId); |
902 |
nextPartAction.setActionDefinitionId(nextPartActionDefId); |
900 |
keyBindingService.registerGlobalAction(nextPartAction); |
903 |
keyBindingService.registerGlobalAction(nextPartAction); |
901 |
|
904 |
|
902 |
prevPartAction = new CyclePartAction(window, false); |
905 |
prevPartAction = new CyclePartAction(window, false); |
903 |
prevPartAction.setActionDefinitionId(prevPartActionDefId); |
906 |
prevPartAction.setActionDefinitionId(prevPartActionDefId); |
904 |
keyBindingService.registerGlobalAction(prevPartAction); |
907 |
keyBindingService.registerGlobalAction(prevPartAction); |
905 |
|
908 |
|
906 |
nextPerspectiveAction = new CyclePerspectiveAction(window, true); |
909 |
nextPerspectiveAction = new CyclePerspectiveAction(window, true); |
907 |
nextPerspectiveAction.setActionDefinitionId(nextPerspectiveActionDefId); |
910 |
nextPerspectiveAction.setActionDefinitionId(nextPerspectiveActionDefId); |
908 |
keyBindingService.registerGlobalAction(nextPerspectiveAction); |
911 |
keyBindingService.registerGlobalAction(nextPerspectiveAction); |
909 |
|
912 |
|
910 |
prevPerspectiveAction = new CyclePerspectiveAction(window, false); |
913 |
prevPerspectiveAction = new CyclePerspectiveAction(window, false); |
911 |
prevPerspectiveAction.setActionDefinitionId(prevPerspectiveActionDefId); |
914 |
prevPerspectiveAction.setActionDefinitionId(prevPerspectiveActionDefId); |
912 |
keyBindingService.registerGlobalAction(prevPerspectiveAction); |
915 |
keyBindingService.registerGlobalAction(prevPerspectiveAction); |
913 |
|
916 |
|
914 |
activateEditorAction = new ActivateEditorAction(window); |
917 |
activateEditorAction = new ActivateEditorAction(window); |
915 |
activateEditorAction.setActionDefinitionId(activateEditorActionDefId); |
918 |
activateEditorAction.setActionDefinitionId(activateEditorActionDefId); |
916 |
keyBindingService.registerGlobalAction(activateEditorAction); |
919 |
keyBindingService.registerGlobalAction(activateEditorAction); |
917 |
|
920 |
|
|
|
921 |
maximizePartAction = new MaximizePartAction(window); |
922 |
maximizePartAction.setActionDefinitionId(maximizePartActionDefId); |
923 |
keyBindingService.registerGlobalAction(maximizePartAction); |
924 |
|
918 |
workbenchEditorsAction = new WorkbenchEditorsAction(window); |
925 |
workbenchEditorsAction = new WorkbenchEditorsAction(window); |
919 |
workbenchEditorsAction.setActionDefinitionId( |
926 |
workbenchEditorsAction.setActionDefinitionId( |
920 |
workbenchEditorsActionDefId); |
927 |
workbenchEditorsActionDefId); |
921 |
keyBindingService.registerGlobalAction(workbenchEditorsAction); |
928 |
keyBindingService.registerGlobalAction(workbenchEditorsAction); |
922 |
|
929 |
|
923 |
hideShowEditorAction = new ToggleEditorsVisibilityAction(window); |
930 |
hideShowEditorAction = new ToggleEditorsVisibilityAction(window); |
924 |
savePerspectiveAction = new SavePerspectiveAction(window); |
931 |
savePerspectiveAction = new SavePerspectiveAction(window); |
925 |
editActionSetAction = new EditActionSetsAction(window); |
932 |
editActionSetAction = new EditActionSetsAction(window); |
Lines 927-933
Link Here
|
927 |
resetPerspectiveAction = new ResetPerspectiveAction(window); |
934 |
resetPerspectiveAction = new ResetPerspectiveAction(window); |
928 |
closePerspAction = new ClosePerspectiveAction(window); |
935 |
closePerspAction = new ClosePerspectiveAction(window); |
929 |
closeAllPerspsAction = new CloseAllPerspectivesAction(window); |
936 |
closeAllPerspsAction = new CloseAllPerspectivesAction(window); |
930 |
|
937 |
|
931 |
backwardHistoryAction = new NavigationHistoryAction(window, false); |
938 |
backwardHistoryAction = new NavigationHistoryAction(window, false); |
932 |
backwardHistoryAction.setImageDescriptor( |
939 |
backwardHistoryAction.setImageDescriptor( |
933 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_BACK)); |
940 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_BACK)); |
Lines 937-943
Link Here
|
937 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_BACK_DISABLED)); |
944 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_BACK_DISABLED)); |
938 |
backwardHistoryAction.setActionDefinitionId(backwardHistoryActionDefId); |
945 |
backwardHistoryAction.setActionDefinitionId(backwardHistoryActionDefId); |
939 |
keyBindingService.registerGlobalAction(backwardHistoryAction); |
946 |
keyBindingService.registerGlobalAction(backwardHistoryAction); |
940 |
|
947 |
|
941 |
forwardHistoryAction = new NavigationHistoryAction(window, true); |
948 |
forwardHistoryAction = new NavigationHistoryAction(window, true); |
942 |
forwardHistoryAction.setImageDescriptor( |
949 |
forwardHistoryAction.setImageDescriptor( |
943 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_FORWARD)); |
950 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_FORWARD)); |
Lines 947-953
Link Here
|
947 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_FORWARD_DISABLED)); |
954 |
sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_FORWARD_DISABLED)); |
948 |
forwardHistoryAction.setActionDefinitionId(forwardHistoryActionDefId); |
955 |
forwardHistoryAction.setActionDefinitionId(forwardHistoryActionDefId); |
949 |
keyBindingService.registerGlobalAction(forwardHistoryAction); |
956 |
keyBindingService.registerGlobalAction(forwardHistoryAction); |
950 |
|
957 |
|
951 |
revertAction = createGlobalAction(IWorkbenchActionConstants.REVERT, "file", false); //$NON-NLS-1$ |
958 |
revertAction = createGlobalAction(IWorkbenchActionConstants.REVERT, "file", false); //$NON-NLS-1$ |
952 |
refreshAction = createGlobalAction(IWorkbenchActionConstants.REFRESH, "file", false); //$NON-NLS-1$ |
959 |
refreshAction = createGlobalAction(IWorkbenchActionConstants.REFRESH, "file", false); //$NON-NLS-1$ |
953 |
propertiesAction = createGlobalAction(IWorkbenchActionConstants.PROPERTIES, "file", false); //$NON-NLS-1$ |
960 |
propertiesAction = createGlobalAction(IWorkbenchActionConstants.PROPERTIES, "file", false); //$NON-NLS-1$ |