当前位置: 首页>>代码示例>>Java>>正文


Java IDEActionFactory类代码示例

本文整理汇总了Java中org.eclipse.ui.ide.IDEActionFactory的典型用法代码示例。如果您正苦于以下问题:Java IDEActionFactory类的具体用法?Java IDEActionFactory怎么用?Java IDEActionFactory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


IDEActionFactory类属于org.eclipse.ui.ide包,在下文中一共展示了IDEActionFactory类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setActivePage

import org.eclipse.ui.ide.IDEActionFactory; //导入依赖的package包/类
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();
	}
}
 
开发者ID:dstl,项目名称:Open_Source_ECOA_Toolset_AS5,代码行数:24,代码来源:CompDefEditorContributor.java

示例2: setGlobalActionHandlers

import org.eclipse.ui.ide.IDEActionFactory; //导入依赖的package包/类
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);
	}
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:23,代码来源:GenerateActionGroup.java

示例3: setActiveEditor

import org.eclipse.ui.ide.IDEActionFactory; //导入依赖的package包/类
public void setActiveEditor(IEditorPart part) {
	super.setActiveEditor(part);

	if (!(part instanceof ITextEditor))
		return;
	ITextEditor editor = (ITextEditor) part;

	IActionBars actionBars = getActionBars();
	if (actionBars == null)
		return;

	actionBars.setGlobalActionHandler(IDEActionFactory.ADD_TASK.getId(),

	getAction(editor, IDEActionFactory.ADD_TASK.getId()));
	actionBars.setGlobalActionHandler(IDEActionFactory.BOOKMARK.getId(),

	getAction(editor, IDEActionFactory.BOOKMARK.getId()));
}
 
开发者ID:yinonavraham,项目名称:myLOGO4Eclipse,代码行数:19,代码来源:LogoScriptEditorActionContributor.java

示例4: fillActionBars

import org.eclipse.ui.ide.IDEActionFactory; //导入依赖的package包/类
@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);
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:8,代码来源:N4JSProjectActionGroup.java

示例5: setActivePage

import org.eclipse.ui.ide.IDEActionFactory; //导入依赖的package包/类
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();
	}
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:33,代码来源:PropEditorContributor.java

示例6: setActivePage

import org.eclipse.ui.ide.IDEActionFactory; //导入依赖的package包/类
/**
 * @see org.eclipse.ui.part.MultiPageEditorActionBarContributor#setActivePage(org.eclipse.ui.IEditorPart)
 */
@Override
public void setActivePage(IEditorPart part) {
	if (this.activeEditorPart == part) {
		return;
	}

	this.activeEditorPart = part;

	final IActionBars actionBars = getActionBars();
	if (actionBars != null) {
		final 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();
	}
}
 
开发者ID:wendehals,项目名称:arduino_sct_tools,代码行数:36,代码来源:SGenMultiPageEditorContributor.java

示例7: setActivePage

import org.eclipse.ui.ide.IDEActionFactory; //导入依赖的package包/类
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();

	}
}
 
开发者ID:SAP,项目名称:hybris-commerce-eclipse-plugin,代码行数:33,代码来源:MultiPageEditorContributor.java

示例8: fillActionBars

import org.eclipse.ui.ide.IDEActionFactory; //导入依赖的package包/类
/**
 * @see org.eclipse.ui.actions.ActionGroup#fillActionBars(org.eclipse.ui.IActionBars)
 */
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();
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:13,代码来源:UMLResourceMgmtActionProvider.java

示例9: setActivePage

import org.eclipse.ui.ide.IDEActionFactory; //导入依赖的package包/类
/**
 * @see MultiPageEditorActionBarContributor
 *      #setActivePage(org.eclipse.ui.IEditorPart)
 */
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();
    }
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:40,代码来源:MessagesEditorContributor.java

示例10: getBookmarkItem

import org.eclipse.ui.ide.IDEActionFactory; //导入依赖的package包/类
private IContributionItem getBookmarkItem()
{
  return getItem(IDEActionFactory.BOOKMARK.getId(),
      IDEActionFactory.BOOKMARK.getCommandId(), null, null,
      IDEWorkbenchMessages.Workbench_addBookmark,
      IDEWorkbenchMessages.Workbench_addBookmarkToolTip, null);
}
 
开发者ID:debrief,项目名称:limpet,代码行数:8,代码来源:ApplicationActionBarAdvisor.java

示例11: getTaskItem

import org.eclipse.ui.ide.IDEActionFactory; //导入依赖的package包/类
private IContributionItem getTaskItem()
{
  return getItem(IDEActionFactory.ADD_TASK.getId(),
      IDEActionFactory.ADD_TASK.getCommandId(), null, null,
      IDEWorkbenchMessages.Workbench_addTask,
      IDEWorkbenchMessages.Workbench_addTaskToolTip, null);
}
 
开发者ID:debrief,项目名称:limpet,代码行数:8,代码来源:ApplicationActionBarAdvisor.java

示例12: fillActionBars

import org.eclipse.ui.ide.IDEActionFactory; //导入依赖的package包/类
@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);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:8,代码来源:ProjectActionGroup.java

示例13: setActiveEditor

import org.eclipse.ui.ide.IDEActionFactory; //导入依赖的package包/类
@Override
public void setActiveEditor(IEditorPart part) {
	super.setActiveEditor(part);

	ITextEditor textEditor= null;
	if (part instanceof ITextEditor)
		textEditor= (ITextEditor) part;

	fContentAssist.setAction(getAction(textEditor, ITextEditorActionConstants.CONTENT_ASSIST));
	fContextInformation.setAction(getAction(textEditor, ITextEditorActionConstants.CONTENT_ASSIST_CONTEXT_INFORMATION));
	fQuickAssistAction.setAction(getAction(textEditor, ITextEditorActionConstants.QUICK_ASSIST));

	if (fSpecificAssistActions != null) {
		for (int i= 0; i < fSpecificAssistActions.length; i++) {
			SpecificContentAssistAction assistAction= fSpecificAssistActions[i];
			assistAction.setActiveEditor(part);
		}
	}

	fChangeEncodingAction.setAction(getAction(textEditor, ITextEditorActionConstants.CHANGE_ENCODING));

	IActionBars actionBars= getActionBars();
	actionBars.setGlobalActionHandler(JdtActionConstants.SHIFT_RIGHT, getAction(textEditor, "ShiftRight")); //$NON-NLS-1$
	actionBars.setGlobalActionHandler(JdtActionConstants.SHIFT_LEFT, getAction(textEditor, "ShiftLeft")); //$NON-NLS-1$

	actionBars.setGlobalActionHandler(IDEActionFactory.ADD_TASK.getId(), getAction(textEditor, IDEActionFactory.ADD_TASK.getId()));
	actionBars.setGlobalActionHandler(IDEActionFactory.BOOKMARK.getId(), getAction(textEditor, IDEActionFactory.BOOKMARK.getId()));

	actionBars.setGlobalActionHandler(IDEActionFactory.OPEN_PROJECT.getId(), getAction(textEditor, IDEActionFactory.OPEN_PROJECT.getId()));
	actionBars.setGlobalActionHandler(IDEActionFactory.CLOSE_PROJECT.getId(), getAction(textEditor, IDEActionFactory.CLOSE_PROJECT.getId()));
	actionBars.setGlobalActionHandler(IDEActionFactory.CLOSE_UNRELATED_PROJECTS.getId(), getAction(textEditor, IDEActionFactory.CLOSE_UNRELATED_PROJECTS.getId()));
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:33,代码来源:BasicCompilationUnitEditorActionContributor.java

示例14: fillActionBars

import org.eclipse.ui.ide.IDEActionFactory; //导入依赖的package包/类
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();
}
 
开发者ID:heartsome,项目名称:translationstudio8,代码行数:10,代码来源:ResourceMgmtActionProvider.java

示例15: setActivePage

import org.eclipse.ui.ide.IDEActionFactory; //导入依赖的package包/类
/**
 * Sets the active page for the editor.
 * 
 * @param part the part to set
 */
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();
    }
}
 
开发者ID:SSEHUB,项目名称:EASyProducer,代码行数:39,代码来源:ProductLineConfigurationEditorContributor.java


注:本文中的org.eclipse.ui.ide.IDEActionFactory类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。