本文整理汇总了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.");
}
示例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$
}
示例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$
}
示例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"));
}
示例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"));
}
示例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"));
}
示例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"));
}
示例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;
}
示例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));
}
示例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);
}
示例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$
}
示例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);
}
示例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());
}
示例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);
}
示例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();
}