當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。