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


Java Action.setText方法代码示例

本文整理汇总了Java中org.eclipse.jface.action.Action.setText方法的典型用法代码示例。如果您正苦于以下问题:Java Action.setText方法的具体用法?Java Action.setText怎么用?Java Action.setText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.jface.action.Action的用法示例。


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

示例1: makeActions

import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
private void makeActions() {
	actionUpdate = new Action() {
		@Override
		public void run() {
			updateComparison();
		}
	};
	actionUpdate.setText("Update");
	actionUpdate.setToolTipText(
			"Recompute comparison for all API project and their implementation projects in the workspace.");
	// action2.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().
	// getImageDescriptor(ISharedImages.IMG_OBJS_INFO_TSK));

	actionOpenInEditor = new Action() {
		@Override
		public void run() {
			ISelection selection = viewer.getSelection();
			Object obj = ((IStructuredSelection) selection).getFirstElement();
			if (obj instanceof ProjectComparisonEntry)
				showInEditor((ProjectComparisonEntry) obj, true, true);
		}
	};
	actionOpenInEditor.setText("Open in Editor");
	actionOpenInEditor.setToolTipText(
			"Open the currently selected API element and its implementations in N4JS editors.");
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:27,代码来源:ApiCompareView.java

示例2: createActions

import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
private void createActions() {
    newNodeAction = new NewNodeAction(this);
    renameNodeAction = new RenameNodeAction(this);
    deleteNodeAction = new DeleteNodeAction(this);
    moveUpNodeAction = new MoveUpNodeAction(this);
    moveDownNodeAction = new MoveDownNodeAction(this);
    promoteNodeAction = new PromoteNodeAction(this);
    demoteNodeAction = new DemoteNodeAction(this);
    refreshAction = new Action() {
        @Override
        public void run() {
            refresh();
        }
    };
    refreshAction.setText(Messages.getString("CommonStructureControl.RefreshActionText")); //$NON-NLS-1$
    refreshAction.setImageDescriptor(
        AbstractUIPlugin.imageDescriptorFromPlugin(TFSCommonUIClientPlugin.PLUGIN_ID, "icons/Refresh.gif")); //$NON-NLS-1$
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:19,代码来源:CommonStructureControl.java

示例3: createActions

import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
private void createActions() {
    evaluateAction = new Action() {
        @Override
        public void run() {
            evaluate();
        }
    };
    evaluateAction.setText(Messages.getString("PolicyWarningsCheckinControl.EvaluateActionText")); //$NON-NLS-1$

    helpAction = new Action() {
        @Override
        public void run() {
            final PolicyFailureData policyFailure = policyFailureTable.getSelectedPolicyFailure();

            if (policyFailure != null) {
                policyFailure.displayHelp();
            }
        }
    };
    helpAction.setText(Messages.getString("PolicyWarningsCheckinControl.HelpActionText")); //$NON-NLS-1$
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:22,代码来源:PolicyWarningsCheckinControl.java

示例4: configureAction

import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
@Override
protected void configureAction(Action action) {
	action.setText("Hide Local Types");
	action.setDescription("Hide Local Types");
	action.setToolTipText("Hide Local (not exported) types");
	action.setImageDescriptor(imageHelper.getImageDescriptor("localtypes_co.png"));
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:8,代码来源:N4JSFilterLocalTypesOutlineContribution.java

示例5: configureAction

import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
@Override
protected void configureAction(Action action) {
	action.setText("Hide Static Members");
	action.setDescription("Hide Static Members");
	action.setToolTipText("Hide Static Fields and Methods");
	action.setImageDescriptor(imageHelper.getImageDescriptor("static_co.png"));
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:8,代码来源:N4JSFilterStaticMembersOutlineContribution.java

示例6: configureAction

import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
@Override
protected void configureAction(Action action) {
	action.setText("Hide Non-Public Members");
	action.setDescription("Hide Non-Public Members");
	action.setToolTipText("Hide Non-Public Fields and Methods");
	action.setImageDescriptor(imageHelper.getImageDescriptor("public_co.png"));
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:8,代码来源:N4JSFilterNonPublicMembersOutlineContribution.java

示例7: configureAction

import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
@Override
protected void configureAction(Action action) {
	action.setText("Show Inherited Members");
	action.setDescription("Show Inherited Members");
	action.setToolTipText("Show inherited, consumed, and polyfilled members");
	action.setImageDescriptor(imageHelper.getImageDescriptor("inher_co.png"));
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:8,代码来源:N4JSShowInheritedMembersOutlineContribution.java

示例8: createAction

import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
private Action createAction(String label, int style, String tooltip, ImageDescriptor image,
		Consumer<Action> onRun) {
	final Action result = new Action(label, style) {
		@Override
		public void run() {
			onRun.accept(this);
		}
	};
	result.setText(label);
	result.setToolTipText(tooltip);
	result.setImageDescriptor(image);
	getViewSite().getActionBars().getToolBarManager().add(result);
	return result;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:15,代码来源:PerformanceView.java

示例9: createActions

import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
private void createActions() {
	sampleAction = new Action() {
		public void run() {
			MessageDialog.openInformation(null, "osets-eclipse-plugin", "Sample Action Executed");
		}
	};
	sampleAction.setText("Sample Action");
	sampleAction.setToolTipText("Sample Action tool tip");
	sampleAction.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(IDE.SharedImages.IMG_OBJS_TASK_TSK));
}
 
开发者ID:dstl,项目名称:Open_Source_ECOA_Toolset_AS5,代码行数:11,代码来源:CompDefEditorContributor.java

示例10: createControl

import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
@Override
public void createControl(Composite parent) {
	super.createControl(parent);
	this.getTreeViewer().setLabelProvider(new PropertiesOutlineLabelProvider());
	this.getTreeViewer().setContentProvider(new PropsOutlineProvider());
	this.getTreeViewer().setInput(inputPropertyFile);

	IToolBarManager toolbar = getSite().getActionBars().getToolBarManager();
	Action action = new SortAction("Sort", 2);
	action.setText(action.getText());
	action.setImageDescriptor(getDescriptor());
	toolbar.add(action);
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:14,代码来源:PropertiesOutlinePage.java

示例11: createActions

import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
private void createActions() {
    runQueryAction = new RunQueryAction(this);
    runQueryAction.setText(Messages.getString("QueryResultsEditor.RunQueryActionText")); //$NON-NLS-1$

    viewQueryAction = new ViewQueryAction(this);
    viewQueryAction.setText(Messages.getString("QueryResultsEditor.EditQueryActionText")); //$NON-NLS-1$

    columnOptionsAction = new ColumnOptionsAction(this);
    columnOptionsAction.setText(Messages.getString("QueryResultsEditor.ColumnOptionsActionText")); //$NON-NLS-1$

    debugInfoAction = new Action() {
        @Override
        public void run() {
            final StringBuffer info = new StringBuffer();

            info.append("editor input: " + getEditorInput().toString()).append(NEWLINE); //$NON-NLS-1$
            info.append(NEWLINE);

            UIQueryUtils.generateDebugInfo(getQueryDocument(), info);
            info.append(NEWLINE);

            info.append("WIQL being displayed:").append(NEWLINE); //$NON-NLS-1$
            info.append(wiqlBeingDisplayed).append(NEWLINE);

            final TextDisplayDialog dlg = new TextDisplayDialog(getSite().getShell(), "Query Editor Debug Info: " //$NON-NLS-1$
                + getPartName(), info.toString(), getClass().getName());

            dlg.open();
        }
    };
    debugInfoAction.setText(Messages.getString("QueryResultsEditor.DebugInfoActionText")); //$NON-NLS-1$
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:33,代码来源:QueryResultsEditor.java

示例12: createActions

import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
private void createActions() {
    cutAction = new Action() {
        @Override
        public void run() {
            WorkingFolderDataTable.this.cutSelectionToClipboard();
        }
    };
    cutAction.setText(Messages.getString("WorkingFolderDataTable.CutActionText")); //$NON-NLS-1$
    cutAction.setActionDefinitionId(CommandIDs.CUT);

    copyAction = new Action() {
        @Override
        public void run() {
            WorkingFolderDataTable.this.copySelectionToClipboard();
        }
    };
    copyAction.setText(Messages.getString("WorkingFolderDataTable.CopyActionText")); //$NON-NLS-1$
    copyAction.setActionDefinitionId("org.eclipse.ui.edit.copy"); //$NON-NLS-1$

    pasteAction = new Action() {
        @Override
        public void run() {
            WorkingFolderDataTable.this.pasteFromClipboard();
        }
    };
    pasteAction.setText(Messages.getString("WorkingFolderDataTable.PasteActionText")); //$NON-NLS-1$
    pasteAction.setActionDefinitionId(CommandIDs.PASTE);

    deleteAction = new Action() {
        @Override
        public void run() {
            WorkingFolderDataTable.this.removeSelectedWorkingFolders();
        }
    };
    deleteAction.setText(Messages.getString("WorkingFolderDataTable.DeleteActionText")); //$NON-NLS-1$
    deleteAction.setAccelerator(SWT.DEL);
    deleteAction.setActionDefinitionId(CommandIDs.DELETE);

    selectAllAction = new Action() {
        @Override
        public void run() {
            WorkingFolderDataTable.this.selectAll();
        }
    };
    selectAllAction.setText(Messages.getString("WorkingFolderDataTable.SelectAllActionText")); //$NON-NLS-1$
    selectAllAction.setActionDefinitionId(CommandIDs.SELECT_ALL);

    new ActionValidatorBinding(new IAction[] {
        cutAction,
        copyAction,
        deleteAction
    }).bind(getSelectionValidator());

    /*
     * IMPORTANT: this keybinding support is only appropriate for
     * dialogs/wizards. If this control is ever hosted in a view or editor
     * (or standalone in a SWT/JFace application outside the workbench) then
     * this support will need to be made optional instead of hardcoded.
     */
    actionCommandSupport = ActionKeyBindingSupportFactory.newInstance(getShell());
    actionCommandSupport.addAction(cutAction);
    actionCommandSupport.addAction(copyAction);
    actionCommandSupport.addAction(pasteAction);
    actionCommandSupport.addAction(selectAllAction);
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:66,代码来源:WorkingFolderDataTable.java

示例13: createActions

import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
private void createActions() {
    refreshAction = new Action() {
        @Override
        public void run() {
            final TypedServerItem item = getSelectedItem();
            serverItemSource.clearChildCache(item);
            viewer.refresh(item);
        }
    };

    refreshAction.setText(Messages.getString("ServerItemTreeControl.RefreshActionName")); //$NON-NLS-1$

    new ActionValidatorBinding(refreshAction).bind(getSelectionValidator());
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:15,代码来源:ServerItemTreeControl.java

示例14: createActions

import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
private void createActions() {
    copyAction = new Action() {
        @Override
        public void run() {
            ShelvesetsTable.this.copySelectionToClipboard();
        }
    };
    copyAction.setText(Messages.getString("ShelvesetsTable.Copy")); //$NON-NLS-1$
    copyAction.setActionDefinitionId("org.eclipse.ui.edit.copy"); //$NON-NLS-1$

    selectAllAction = new Action() {
        @Override
        public void run() {
            ShelvesetsTable.this.selectAll();
        }
    };
    selectAllAction.setText(Messages.getString("ShelvesetsTable.SelectAll")); //$NON-NLS-1$
    selectAllAction.setActionDefinitionId(CommandIDs.SELECT_ALL);

    /*
     * IMPORTANT: this keybinding support is only appropriate for
     * dialogs/wizards. If this control is ever hosted in a view or editor
     * (or standalone in a SWT/JFace application outside the workbench) then
     * this support will need to be made optional instead of hardcoded.
     */
    actionCommandSupport = ActionKeyBindingSupportFactory.newInstance(getShell());
    actionCommandSupport.addAction(copyAction);
    actionCommandSupport.addAction(selectAllAction);

}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:31,代码来源:ShelvesetsTable.java

示例15: WorkspaceToolbarPulldownAction

import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
public WorkspaceToolbarPulldownAction(final Shell shell) {
    super(true);
    this.shell = shell;

    // Create the manage workspace action.
    manageWorkspacesAction = new Action() {
        @Override
        public void run() {
            manageWorkspaces();
        }
    };
    manageWorkspacesAction.setText(Messages.getString("WorkspaceToolbarPulldownAction.ManageWorkspacesActionText")); //$NON-NLS-1$

    final TFSServer server =
        TFSCommonUIClientPlugin.getDefault().getProductPlugin().getServerManager().getDefaultServer();

    if (server != null) {
        server.getConnection().getVersionControlClient().getEventEngine().addWorkspaceCreatedListener(
            workspaceListener);
        server.getConnection().getVersionControlClient().getEventEngine().addWorkspaceDeletedListener(
            workspaceListener);
        server.getConnection().getVersionControlClient().getEventEngine().addWorkspaceUpdatedListener(
            workspaceListener);
    }

    TFSCommonUIClientPlugin.getDefault().getProductPlugin().getServerManager().addListener(connectionListener);
    TFSCommonUIClientPlugin.getDefault().getProductPlugin().getRepositoryManager().addListener(connectionListener);

    repopulate();
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:31,代码来源:WorkspaceToolbarPulldownAction.java


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