org.eclipse.ui.ide.IDEActionFactory Java Examples

The following examples show how to use org.eclipse.ui.ide.IDEActionFactory. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GenerateActionGroup.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 6 votes vote down vote up
private void setGlobalActionHandlers(IActionBars actionBar) {
	actionBar.setGlobalActionHandler(JdtActionConstants.ADD_IMPORT, fAddImport);
	actionBar.setGlobalActionHandler(JdtActionConstants.OVERRIDE_METHODS, fOverrideMethods);
	actionBar.setGlobalActionHandler(JdtActionConstants.GENERATE_GETTER_SETTER, fAddGetterSetter);
	actionBar.setGlobalActionHandler(JdtActionConstants.GENERATE_DELEGATE_METHODS, fAddDelegateMethods);
	actionBar.setGlobalActionHandler(JdtActionConstants.ADD_CONSTRUCTOR_FROM_SUPERCLASS, fAddUnimplementedConstructors);
	actionBar.setGlobalActionHandler(JdtActionConstants.GENERATE_CONSTRUCTOR_USING_FIELDS, fGenerateConstructorUsingFields);
	actionBar.setGlobalActionHandler(JdtActionConstants.GENERATE_HASHCODE_EQUALS, fHashCodeEquals);
	actionBar.setGlobalActionHandler(JdtActionConstants.GENERATE_TOSTRING, fToString);
	actionBar.setGlobalActionHandler(JdtActionConstants.ADD_JAVA_DOC_COMMENT, fAddJavaDocStub);
	actionBar.setGlobalActionHandler(JdtActionConstants.EXTERNALIZE_STRINGS, fExternalizeStrings);
	actionBar.setGlobalActionHandler(JdtActionConstants.CLEAN_UP, fCleanUp);
	actionBar.setGlobalActionHandler(FindBrokenNLSKeysAction.ACTION_HANDLER_ID, fFindNLSProblems);
	actionBar.setGlobalActionHandler(JdtActionConstants.ORGANIZE_IMPORTS, fOrganizeImports);
	actionBar.setGlobalActionHandler(JdtActionConstants.SORT_MEMBERS, fSortMembers);
	if (!isEditorOwner()) {
		// editor provides its own implementation of these actions.
		actionBar.setGlobalActionHandler(IDEActionFactory.BOOKMARK.getId(), fAddBookmark);
		actionBar.setGlobalActionHandler(IDEActionFactory.ADD_TASK.getId(), fAddTaskAction);
		actionBar.setGlobalActionHandler(JdtActionConstants.FORMAT, fFormatAll);
	}
}
 
Example #2
Source File: N4JSProjectActionGroup.java    From n4js with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public void fillActionBars(final IActionBars actionBars) {
	super.fillActionBars(actionBars);
	actionBars.setGlobalActionHandler(IDEActionFactory.CLOSE_PROJECT.getId(), closeAction);
	actionBars.setGlobalActionHandler(IDEActionFactory.CLOSE_UNRELATED_PROJECTS.getId(), closeUnrelatedAction);
	actionBars.setGlobalActionHandler(IDEActionFactory.OPEN_PROJECT.getId(), openAction);
}
 
Example #3
Source File: MultiPageEditorContributor.java    From hybris-commerce-eclipse-plugin with Apache License 2.0 5 votes vote down vote up
public void setActivePage(IEditorPart part) {
	if (activeEditorPart == part)
		return;

	activeEditorPart = part;

	IActionBars actionBars = getActionBars();
	if (actionBars != null) {
		ITextEditor editor = (part instanceof ITextEditor) ? (ITextEditor) part : null;

		actionBars.setGlobalActionHandler(ActionFactory.DELETE.getId(),
		                getAction(editor, ITextEditorActionConstants.DELETE));
		actionBars.setGlobalActionHandler(ActionFactory.UNDO.getId(),
		                getAction(editor, ITextEditorActionConstants.UNDO));
		actionBars.setGlobalActionHandler(ActionFactory.REDO.getId(),
		                getAction(editor, ITextEditorActionConstants.REDO));
		actionBars.setGlobalActionHandler(ActionFactory.CUT.getId(),
		                getAction(editor, ITextEditorActionConstants.CUT));
		actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(),
		                getAction(editor, ITextEditorActionConstants.COPY));
		actionBars.setGlobalActionHandler(ActionFactory.PASTE.getId(),
		                getAction(editor, ITextEditorActionConstants.PASTE));
		actionBars.setGlobalActionHandler(ActionFactory.SELECT_ALL.getId(),
		                getAction(editor, ITextEditorActionConstants.SELECT_ALL));
		actionBars.setGlobalActionHandler(ActionFactory.FIND.getId(),
		                getAction(editor, ITextEditorActionConstants.FIND));
		actionBars.setGlobalActionHandler(IDEActionFactory.BOOKMARK.getId(),
		                getAction(editor, IDEActionFactory.BOOKMARK.getId()));
		actionBars.updateActionBars();

	}
}
 
Example #4
Source File: ProjectActionGroup.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public void fillActionBars(IActionBars actionBars) {
	super.fillActionBars(actionBars);
	actionBars.setGlobalActionHandler(IDEActionFactory.CLOSE_PROJECT.getId(), fCloseAction);
	actionBars.setGlobalActionHandler(IDEActionFactory.CLOSE_UNRELATED_PROJECTS.getId(), fCloseUnrelatedAction);
	actionBars.setGlobalActionHandler(IDEActionFactory.OPEN_PROJECT.getId(), fOpenAction);
}
 
Example #5
Source File: ResourceMgmtActionProvider.java    From translationstudio8 with GNU General Public License v2.0 5 votes vote down vote up
public void fillActionBars(IActionBars actionBars) {
	actionBars.setGlobalActionHandler(ActionFactory.REFRESH.getId(), refreshAction);
	// actionBars.setGlobalActionHandler(IDEActionFactory.BUILD_PROJECT.getId(), buildAction);
	actionBars.setGlobalActionHandler(IDEActionFactory.OPEN_PROJECT.getId(), openProjectAction);
	actionBars.setGlobalActionHandler(IDEActionFactory.CLOSE_PROJECT.getId(), closeProjectAction);
	// actionBars.setGlobalActionHandler(IDEActionFactory.CLOSE_UNRELATED_PROJECTS.getId(),
	// closeUnrelatedProjectsAction);
	updateActionBars();
}
 
Example #6
Source File: ResourceMgmtActionProvider.java    From tmxeditor8 with GNU General Public License v2.0 5 votes vote down vote up
public void fillActionBars(IActionBars actionBars) {
	actionBars.setGlobalActionHandler(ActionFactory.REFRESH.getId(), refreshAction);
	// actionBars.setGlobalActionHandler(IDEActionFactory.BUILD_PROJECT.getId(), buildAction);
	actionBars.setGlobalActionHandler(IDEActionFactory.OPEN_PROJECT.getId(), openProjectAction);
	actionBars.setGlobalActionHandler(IDEActionFactory.CLOSE_PROJECT.getId(), closeProjectAction);
	// actionBars.setGlobalActionHandler(IDEActionFactory.CLOSE_UNRELATED_PROJECTS.getId(),
	// closeUnrelatedProjectsAction);
	updateActionBars();
}
 
Example #7
Source File: MultiPageEditorContributor.java    From uima-uimaj with Apache License 2.0 5 votes vote down vote up
@Override
public void setActiveEditor(IEditorPart part) {
  if (activeEditorPart == part)
    return;

  if (null == part)
    return;
  activeEditorPart = part;

  IActionBars actionBars = getActionBars();
  if (actionBars != null) {

    MultiPageEditorPart editor = (MultiPageEditorPart) part;

    actionBars.setGlobalActionHandler(ActionFactory.DELETE.getId(), getAction(editor,
            ITextEditorActionConstants.DELETE));
    actionBars.setGlobalActionHandler(ActionFactory.UNDO.getId(), getAction(editor,
            ITextEditorActionConstants.UNDO));
    actionBars.setGlobalActionHandler(ActionFactory.REDO.getId(), getAction(editor,
            ITextEditorActionConstants.REDO));
    actionBars.setGlobalActionHandler(ActionFactory.CUT.getId(), getAction(editor,
            ITextEditorActionConstants.CUT));
    actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(), getAction(editor,
            ITextEditorActionConstants.COPY));
    actionBars.setGlobalActionHandler(ActionFactory.PASTE.getId(), getAction(editor,
            ITextEditorActionConstants.PASTE));
    actionBars.setGlobalActionHandler(ActionFactory.SELECT_ALL.getId(), getAction(editor,
            ITextEditorActionConstants.SELECT_ALL));
    actionBars.setGlobalActionHandler(ActionFactory.FIND.getId(), getAction(editor,
            ITextEditorActionConstants.FIND));
    actionBars.setGlobalActionHandler(IDEActionFactory.BOOKMARK.getId(), getAction(editor,
            IDEActionFactory.BOOKMARK.getId()));
    actionBars.updateActionBars();
  }
}
 
Example #8
Source File: MultiPageEditorContributor.java    From uima-uimaj with Apache License 2.0 5 votes vote down vote up
@Override
public void setActivePage(IEditorPart part) {

  IActionBars actionBars = getActionBars();
  if (actionBars != null) {

    ITextEditor textEditor = (part instanceof XMLEditor) ? (ITextEditor) part : null;

    actionBars.setGlobalActionHandler(ActionFactory.DELETE.getId(), getAction1(textEditor,
            ITextEditorActionConstants.DELETE));
    actionBars.setGlobalActionHandler(ActionFactory.UNDO.getId(), getAction1(textEditor,
            ITextEditorActionConstants.UNDO));
    actionBars.setGlobalActionHandler(ActionFactory.REDO.getId(), getAction1(textEditor,
            ITextEditorActionConstants.REDO));
    actionBars.setGlobalActionHandler(ActionFactory.CUT.getId(), getAction1(textEditor,
            ITextEditorActionConstants.CUT));
    actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(), getAction1(textEditor,
            ITextEditorActionConstants.COPY));
    actionBars.setGlobalActionHandler(ActionFactory.PASTE.getId(), getAction1(textEditor,
            ITextEditorActionConstants.PASTE));
    actionBars.setGlobalActionHandler(ActionFactory.SELECT_ALL.getId(), getAction1(textEditor,
            ITextEditorActionConstants.SELECT_ALL));
    actionBars.setGlobalActionHandler(ActionFactory.FIND.getId(), getAction1(textEditor,
            ITextEditorActionConstants.FIND));
    actionBars.setGlobalActionHandler(IDEActionFactory.BOOKMARK.getId(), getAction1(textEditor,
            IDEActionFactory.BOOKMARK.getId()));
    actionBars.updateActionBars();
  }
}
 
Example #9
Source File: GamaActionBarAdvisor.java    From gama with GNU General Public License v3.0 4 votes vote down vote up
public void createPropertyDialogAction(final IWorkbenchWindow aWindow) {
	projectPropertyDialogAction = IDEActionFactory.OPEN_PROJECT_PROPERTIES.create(aWindow);
	register(projectPropertyDialogAction);
}
 
Example #10
Source File: GamaActionBarAdvisor.java    From gama with GNU General Public License v3.0 4 votes vote down vote up
public void createOpenWorkspaceAction(final IWorkbenchWindow aWindow) {
	openWorkspaceAction = IDEActionFactory.OPEN_WORKSPACE.create(aWindow);
	register(openWorkspaceAction);
}
 
Example #11
Source File: OpenCloseActionProvider.java    From gama with GNU General Public License v3.0 4 votes vote down vote up
@Override
public void fillActionBars(final IActionBars actionBars) {
	actionBars.setGlobalActionHandler(IDEActionFactory.OPEN_PROJECT.getId(), openProjectAction);
	actionBars.setGlobalActionHandler(IDEActionFactory.CLOSE_PROJECT.getId(), closeProjectAction);
	updateActionBars();
}
 
Example #12
Source File: BibtexContributor.java    From slr-toolkit with Eclipse Public License 1.0 4 votes vote down vote up
public void setActivePage(IEditorPart part) {
	if (activeEditorPart == part)
		return;

	activeEditorPart = part;

	IActionBars actionBars = getActionBars();
	if (actionBars != null) {

		ITextEditor editor = (part instanceof ITextEditor) ? (ITextEditor) part : null;

		actionBars.setGlobalActionHandler(
			ActionFactory.DELETE.getId(),
			getAction(editor, ITextEditorActionConstants.DELETE));
		actionBars.setGlobalActionHandler(
			ActionFactory.UNDO.getId(),
			getAction(editor, ITextEditorActionConstants.UNDO));
		actionBars.setGlobalActionHandler(
			ActionFactory.REDO.getId(),
			getAction(editor, ITextEditorActionConstants.REDO));
		actionBars.setGlobalActionHandler(
			ActionFactory.CUT.getId(),
			getAction(editor, ITextEditorActionConstants.CUT));
		actionBars.setGlobalActionHandler(
			ActionFactory.COPY.getId(),
			getAction(editor, ITextEditorActionConstants.COPY));
		actionBars.setGlobalActionHandler(
			ActionFactory.PASTE.getId(),
			getAction(editor, ITextEditorActionConstants.PASTE));
		actionBars.setGlobalActionHandler(
			ActionFactory.SELECT_ALL.getId(),
			getAction(editor, ITextEditorActionConstants.SELECT_ALL));
		actionBars.setGlobalActionHandler(
			ActionFactory.FIND.getId(),
			getAction(editor, ITextEditorActionConstants.FIND));
		actionBars.setGlobalActionHandler(
			IDEActionFactory.BOOKMARK.getId(),
			getAction(editor, IDEActionFactory.BOOKMARK.getId()));
		actionBars.updateActionBars();
	}
}
 
Example #13
Source File: BuildActionGroup.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
private void setGlobalActionHandlers(IActionBars actionBar) {
	actionBar.setGlobalActionHandler(IDEActionFactory.BUILD_PROJECT.getId(), fBuildAction);
	actionBar.setGlobalActionHandler(ActionFactory.REFRESH.getId(), fRefreshAction);
}
 
Example #14
Source File: WorkManagementActionProvider.java    From translationstudio8 with GNU General Public License v2.0 4 votes vote down vote up
public void fillActionBars(IActionBars actionBars) {
	super.fillActionBars(actionBars);
	actionBars.setGlobalActionHandler(IDEActionFactory.BOOKMARK.getId(), addBookmarkAction);
	actionBars.setGlobalActionHandler(IDEActionFactory.ADD_TASK.getId(), addTaskAction);
}
 
Example #15
Source File: WorkManagementActionProvider.java    From tmxeditor8 with GNU General Public License v2.0 4 votes vote down vote up
public void fillActionBars(IActionBars actionBars) {
	super.fillActionBars(actionBars);
	actionBars.setGlobalActionHandler(IDEActionFactory.BOOKMARK.getId(), addBookmarkAction);
	actionBars.setGlobalActionHandler(IDEActionFactory.ADD_TASK.getId(), addTaskAction);
}