本文整理汇总了Java中org.eclipse.jface.action.Action.setToolTipText方法的典型用法代码示例。如果您正苦于以下问题:Java Action.setToolTipText方法的具体用法?Java Action.setToolTipText怎么用?Java Action.setToolTipText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jface.action.Action
的用法示例。
在下文中一共展示了Action.setToolTipText方法的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: createTerminateAction
import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
private Action createTerminateAction() {
Action terminate = new Action(Messages.getString("action.stop")) {
@Override
public void run() {
DeployJob job = console.getJob();
if (job != null) {
job.cancel();
update();
}
}
};
terminate.setToolTipText(Messages.getString("action.stop"));
terminate.setImageDescriptor(getSharedImage(ISharedImages.IMG_ELCL_STOP));
terminate.setHoverImageDescriptor(getSharedImage(ISharedImages.IMG_ELCL_STOP));
terminate.setDisabledImageDescriptor(getSharedImage(ISharedImages.IMG_ELCL_STOP_DISABLED));
return terminate;
}
示例3: configureToolBar
import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
private void configureToolBar(IToolBarManager toolbarManager) {
terminateAction = new Action(Messages.actionStop) {
@Override
public void run() {
//code to execute when button is pressed
LocalAppEngineServerBehaviour serverBehaviour = console.getServerBehaviourDelegate();
if (serverBehaviour != null) {
// try to initiate a nice shutdown
boolean force = serverBehaviour.getServer().getServerState() == IServer.STATE_STOPPING;
serverBehaviour.stop(force);
}
update();
}
};
terminateAction.setToolTipText(Messages.actionStopToolTip);
terminateAction.setImageDescriptor(ImageResource.getImageDescriptor(ImageResource.IMG_ELCL_STOP));
terminateAction.setHoverImageDescriptor(ImageResource.getImageDescriptor(ImageResource.IMG_CLCL_STOP));
terminateAction.setDisabledImageDescriptor(ImageResource.getImageDescriptor(ImageResource.IMG_DLCL_STOP));
toolbarManager.appendToGroup(IConsoleConstants.LAUNCH_GROUP, terminateAction);
}
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:22,代码来源:LocalAppEngineConsolePageParticipant.java
示例4: createActions
import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
private void createActions() {
/*
* Action: Restore default
*/
_actionRestoreDefaults = new Action() {
@Override
public void run() {
resetToDefaults();
}
};
_actionRestoreDefaults.setImageDescriptor(//
TourbookPlugin.getImageDescriptor(Messages.Image__App_RestoreDefault));
_actionRestoreDefaults.setToolTipText(Messages.App_Action_RestoreDefault_Tooltip);
}
示例5: createActions
import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
private void createActions() {
/*
* Action: Restore default
*/
_actionRestoreDefaults = new Action() {
@Override
public void run() {
resetToDefaults();
}
};
_actionRestoreDefaults.setToolTipText(Messages.App_Action_RestoreDefault_Tooltip);
_actionRestoreDefaults.setImageDescriptor(//
TourbookPlugin.getImageDescriptor(Messages.Image__App_RestoreDefault));
}
示例6: createActions
import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
private void createActions() {
/*
* Action: Restore default
*/
_actionRestoreDefaults = new Action() {
@Override
public void run() {
resetToDefaults();
}
};
_actionRestoreDefaults.setToolTipText(Messages.App_Action_RestoreDefault_Tooltip);
_actionRestoreDefaults.setImageDescriptor(//
TourbookPlugin.getImageDescriptor(Messages.Image__App_RestoreDefault));
_actionEditHrZones = new ActionEditHrZones(_trainingView);
}
示例7: createActions
import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
private void createActions() {
_actionTTSpeed_Add = new ActionSpeedTourType_Add();
_actionTTSpeed_Sort = new ActionSpeedTourType_Sort();
_actionOpenTourTypePrefs = new ActionOpenPrefDialog(
Messages.action_tourType_modify_tourTypes,
ITourbookPreferences.PREF_PAGE_TOUR_TYPE);
/*
* Action: Restore default
*/
_actionRestoreDefaults = new Action() {
@Override
public void run() {
resetDashboardToDefaults();
}
};
_actionRestoreDefaults.setImageDescriptor(//
TourbookPlugin.getImageDescriptor(Messages.Image__App_RestoreDefault));
_actionRestoreDefaults.setToolTipText(Messages.App_Action_RestoreDefault_Tooltip);
}
示例8: createActions
import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
private void createActions() {
/*
* Action: Restore default
*/
_actionRestoreDefaults = new Action() {
@Override
public void run() {
resetToDefaults();
}
};
_actionRestoreDefaults.setImageDescriptor(//
TourbookPlugin.getImageDescriptor(Messages.Image__App_RestoreDefault));
_actionRestoreDefaults.setToolTipText(Messages.App_Action_RestoreDefault_Tooltip);
_actionPrefDialog = new ActionOpenPrefDialog(
Messages.Tour_Action_EditStatisticPreferences,
PrefPageStatistic.ID);
_actionPrefDialog.closeThisTooltip(this);
_actionPrefDialog.setShell(_parentShell);
}
示例9: 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"));
}
示例10: 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"));
}
示例11: 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"));
}
示例12: 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"));
}
示例13: createAction
import org.eclipse.jface.action.Action; //导入方法依赖的package包/类
/**
* Creates a single action.
*/
protected Action createAction(String text, int style, String tooltip, ImageDescriptor imageDescriptor,
Runnable runnable) {
final Action a = new Action(text, style) {
@Override
public void run() {
if (runnable != null)
runnable.run();
}
};
a.setToolTipText(tooltip);
a.setImageDescriptor(imageDescriptor);
return a;
}
示例14: 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;
}
示例15: 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));
}