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


Java ViewPart类代码示例

本文整理汇总了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;
}
 
开发者ID:eclipse,项目名称:eavp,代码行数:25,代码来源:AddVisitPlotAction.java

示例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;
}
 
开发者ID:eclipse,项目名称:eavp,代码行数:25,代码来源:LaunchPythonScriptDialogAction.java

示例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;
}
 
开发者ID:eclipse,项目名称:eavp,代码行数:25,代码来源:DeleteFileAction.java

示例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;

}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:25,代码来源:UIUtils.java

示例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;
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:18,代码来源:AbstractWorkbenchTestCase.java

示例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");
}
 
开发者ID:nextinterfaces,项目名称:http4e,代码行数:8,代码来源:ExportAjaxJQueryAction.java

示例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");
}
 
开发者ID:nextinterfaces,项目名称:http4e,代码行数:8,代码来源:ExportJMeterAction.java

示例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");
}
 
开发者ID:nextinterfaces,项目名称:http4e,代码行数:8,代码来源:ExportFlexAction.java

示例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");
   }
 
开发者ID:nextinterfaces,项目名称:http4e,代码行数:8,代码来源:ImportLiveHttpHeadersAction.java

示例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");
}
 
开发者ID:nextinterfaces,项目名称:http4e,代码行数:8,代码来源:ImportHTTP4eAction.java

示例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");
}
 
开发者ID:nextinterfaces,项目名称:http4e,代码行数:8,代码来源:ExportVbAction.java

示例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");
}
 
开发者ID:nextinterfaces,项目名称:http4e,代码行数:8,代码来源:ExportJavaHttp4Action.java

示例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);
}
 
开发者ID:nextinterfaces,项目名称:http4e,代码行数:11,代码来源:HelpAboutAction.java

示例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");
}
 
开发者ID:nextinterfaces,项目名称:http4e,代码行数:12,代码来源:PrintAction.java

示例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);
}
 
开发者ID:nextinterfaces,项目名称:http4e,代码行数:9,代码来源:ConfigAction.java


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