本文整理汇总了Java中org.eclipse.ui.part.ViewPart类的典型用法代码示例。如果您正苦于以下问题:Java ViewPart类的具体用法?Java ViewPart怎么用?Java ViewPart使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ViewPart类属于org.eclipse.ui.part包,在下文中一共展示了ViewPart类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: AddVisitPlotAction
import org.eclipse.ui.part.ViewPart; //导入依赖的package包/类
/**
* The constructor
*
* @param parent
* The ViewPart to whom the object of this class belongs.
*/
public AddVisitPlotAction(ViewPart parent) {
viewer = parent;
// Set the action's tool tip text.
setToolTipText("Add a plot to the list");
// Set the action's image (the green plus button for adding).
Bundle bundle = FrameworkUtil.getBundle(getClass());
Path imagePath = new Path(
"icons" + System.getProperty("file.separator") + "add.png");
URL imageURL = FileLocator.find(bundle, imagePath, null);
ImageDescriptor imageDescriptor = ImageDescriptor
.createFromURL(imageURL);
setImageDescriptor(imageDescriptor);
return;
}
示例2: LaunchPythonScriptDialogAction
import org.eclipse.ui.part.ViewPart; //导入依赖的package包/类
/**
* The constructor
*
* @param parent
* The ViewPart to whom the object of this class belongs.
*/
public LaunchPythonScriptDialogAction(ViewPart parent) {
viewer = parent;
// Set the action's tool tip text.
setToolTipText("Execute a Python script");
// Set the action's image (the green plus button for adding).
Bundle bundle = FrameworkUtil.getBundle(getClass());
Path imagePath = new Path("icons"
+ System.getProperty("file.separator") + "launch.png");
URL imageURL = FileLocator.find(bundle, imagePath, null);
ImageDescriptor imageDescriptor = ImageDescriptor
.createFromURL(imageURL);
setImageDescriptor(imageDescriptor);
return;
}
示例3: DeleteFileAction
import org.eclipse.ui.part.ViewPart; //导入依赖的package包/类
/**
* The constructor
*
* @param parent
* The ViewPart to whom the object of this class belongs.
*/
public DeleteFileAction(ViewPart parent) {
viewer = parent;
// Set the action's tool tip text.
setToolTipText("Delete the selected file from the list");
// Set the action's image (the red x button).
Bundle bundle = FrameworkUtil.getBundle(getClass());
Path imagePath = new Path("icons"
+ System.getProperty("file.separator") + "delete_X.png");
URL imageURL = FileLocator.find(bundle, imagePath, null);
ImageDescriptor imageDescriptor = ImageDescriptor
.createFromURL(imageURL);
setImageDescriptor(imageDescriptor);
return;
}
示例4: getView
import org.eclipse.ui.part.ViewPart; //导入依赖的package包/类
public static ViewPart getView(String viewId, boolean forceVisible) {
IWorkbenchWindow workbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
try {
if (workbenchWindow == null) {
return null;
}
IWorkbenchPage page = workbenchWindow.getActivePage();
if (forceVisible) {
return (ViewPart) page.showView(viewId, null, IWorkbenchPage.VIEW_VISIBLE);
} else {
IViewReference viewReference = page.findViewReference(viewId);
if (viewReference != null) {
//if it's there, return it (but don't restore it if it's still not there).
//when made visible, it'll handle things properly later on.
return (ViewPart) viewReference.getView(false);
}
}
} catch (Exception e) {
Log.log(e);
}
return null;
}
示例5: getPyUnitViewAction
import org.eclipse.ui.part.ViewPart; //导入依赖的package包/类
protected IAction getPyUnitViewAction(ViewPart view, Class<?> class1) {
IAction action = null;
IContributionItem[] items = view.getViewSite().getActionBars().getToolBarManager().getItems();
for (IContributionItem iContributionItem : items) {
if (iContributionItem instanceof ActionContributionItem) {
ActionContributionItem item = (ActionContributionItem) iContributionItem;
IAction lAction = item.getAction();
if (class1.isInstance(lAction)) {
action = lAction;
}
}
}
if (action == null) {
fail("Could not find action of class: " + class1);
}
return action;
}
示例6: ExportAjaxJQueryAction
import org.eclipse.ui.part.ViewPart; //导入依赖的package包/类
public ExportAjaxJQueryAction( ViewPart view) {
this.view = view;
fMenu = null;
setToolTipText("Export call as JQuery script");
setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.JS)));
setText(" JQuery");
}
示例7: ExportJMeterAction
import org.eclipse.ui.part.ViewPart; //导入依赖的package包/类
public ExportJMeterAction( ViewPart view) {
this.view = view;
fMenu = null;
setToolTipText("Export tabs as JMeter script");
setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.JMETER)));
setText("Export all tabs as JMeter script");
}
示例8: ExportFlexAction
import org.eclipse.ui.part.ViewPart; //导入依赖的package包/类
public ExportFlexAction( ViewPart view) {
this.view = view;
fMenu = null;
setToolTipText("Export call as Flex/ActionScript");
setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.FLEX)));
setText(" Flex/ActionScript");
}
示例9: ImportLiveHttpHeadersAction
import org.eclipse.ui.part.ViewPart; //导入依赖的package包/类
public ImportLiveHttpHeadersAction( ViewPart view) {
this.view = view;
fMenu = null;
setToolTipText("Import Firefox LiveHTTP Headers");
// setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.LOGO)));
setText("Import Firefox LiveHTTP Headers");
}
示例10: ImportHTTP4eAction
import org.eclipse.ui.part.ViewPart; //导入依赖的package包/类
public ImportHTTP4eAction( ViewPart view) {
this.view = view;
fMenu = null;
setToolTipText("Import HTTP4e script");
setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.LOGO)));
setText("Import HTTP4e script");
}
示例11: ExportVbAction
import org.eclipse.ui.part.ViewPart; //导入依赖的package包/类
public ExportVbAction( ViewPart view) {
this.view = view;
fMenu = null;
setToolTipText("Export call as Visual Basic");
setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.VB)));
setText(" Visual Basic");
}
示例12: ExportJavaHttp4Action
import org.eclipse.ui.part.ViewPart; //导入依赖的package包/类
public ExportJavaHttp4Action( ViewPart view) {
this.view = view;
fMenu = null;
setToolTipText("Export call as Apache HttpComponents 4 script");
setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.JAVA)));
setText(" Apache HttpComponents 4");
}
示例13: HelpAboutAction
import org.eclipse.ui.part.ViewPart; //导入依赖的package包/类
public HelpAboutAction( ViewPart view, String title) {
super();
this.view = view;
setText(title);
// setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreImages.HELP)));
// setDisabledImageDescriptor(PDEPluginImages.DESC_PLUGIN_OBJ);
setDescription(title);
setToolTipText(title);
}
示例14: PrintAction
import org.eclipse.ui.part.ViewPart; //导入依赖的package包/类
public PrintAction( ViewPart view, String title) {
super();
this.view = view;
setText(title);
setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.HELP)));
// setDisabledImageDescriptor(PDEPluginImages.DESC_PLUGIN_OBJ);
setDescription("Print Http Packet");
setToolTipText("Print Http Packet");
}
示例15: ConfigAction
import org.eclipse.ui.part.ViewPart; //导入依赖的package包/类
public ConfigAction( ViewPart view, String title) {
super();
this.view = view;
setText(title);
setDescription(title);
setToolTipText(title);
}