org.eclipse.ui.part.ViewPart Java Examples
The following examples show how to use
org.eclipse.ui.part.ViewPart.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AbstractWorkbenchTestCase.java From Pydev with Eclipse Public License 1.0 | 6 votes |
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; }
Example #2
Source File: UIUtils.java From Pydev with Eclipse Public License 1.0 | 6 votes |
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; }
Example #3
Source File: ExportAjaxJQueryAction.java From http4e with Apache License 2.0 | 5 votes |
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"); }
Example #4
Source File: ExportPythonAction.java From http4e with Apache License 2.0 | 5 votes |
public ExportPythonAction( ViewPart view) { this.view = view; fMenu = null; setToolTipText("Export call as Python"); setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.PYTHON))); setText(" Python"); }
Example #5
Source File: ExportAjaxJSAction.java From http4e with Apache License 2.0 | 5 votes |
public ExportAjaxJSAction( ViewPart view) { this.view = view; fMenu = null; setToolTipText("Export call as JavaScript"); setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.JS))); setText(" JavaScript"); }
Example #6
Source File: ExportRubyAction.java From http4e with Apache License 2.0 | 5 votes |
public ExportRubyAction( ViewPart view) { this.view = view; fMenu = null; setToolTipText("Export call as Ruby"); setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.RUBY))); setText(" Ruby"); }
Example #7
Source File: ExportHTTP4eAction.java From http4e with Apache License 2.0 | 5 votes |
public ExportHTTP4eAction( ViewPart view) { this.view = view; fMenu = null; setToolTipText("Export tabs as HTTP4e script"); setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.LOGO))); setText("Export all tabs as HTTP4e script"); }
Example #8
Source File: ExportCsAction.java From http4e with Apache License 2.0 | 5 votes |
public ExportCsAction( ViewPart view) { this.view = view; fMenu = null; setToolTipText("Export call as C# script"); setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.CSHARP))); setText(" C#"); }
Example #9
Source File: ExportJavaHttp3Action.java From http4e with Apache License 2.0 | 5 votes |
public ExportJavaHttp3Action( ViewPart view) { this.view = view; fMenu = null; setToolTipText("Export call as Apache HttpClient 3 script"); setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.JAVA))); setText(" Apache HttpClient 3"); }
Example #10
Source File: ExportPHPAction.java From http4e with Apache License 2.0 | 5 votes |
public ExportPHPAction( ViewPart view) { this.view = view; fMenu = null; setToolTipText("Export call as PHP script"); setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.PHP))); setText(" PHP"); }
Example #11
Source File: ExportDialog.java From http4e with Apache License 2.0 | 5 votes |
public ExportDialog( ViewPart view, String title, String titleMessage, String source) { super(view.getViewSite().getShell()); setTitleImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.LOGO_DIALOG)); this.view = view; this.title = title; this.titleMessage = titleMessage; this.source = source; }
Example #12
Source File: ExportAjaxPrototypeAction.java From http4e with Apache License 2.0 | 5 votes |
public ExportAjaxPrototypeAction( ViewPart view) { this.view = view; fMenu = null; setToolTipText("Export call as Prototype script"); setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.JS))); setText(" Prototype"); }
Example #13
Source File: SDWidget.java From tracecompass with Eclipse Public License 2.0 | 5 votes |
/** * Sets view part. * * @param viewSite The view part to set */ public void setSite(ViewPart viewSite) { fSite = viewSite; fSite.getSite().setSelectionProvider(fSelProvider); Object serviceObject = fSite.getSite().getWorkbenchWindow().getService(IContextService.class); IContextService service = (IContextService) serviceObject; service.activateContext("org.eclipse.linuxtools.tmf.ui.view.uml2sd.context"); //$NON-NLS-1$ service.activateContext(IContextIds.CONTEXT_ID_WINDOW); }
Example #14
Source File: ExportCocoaAction.java From http4e with Apache License 2.0 | 5 votes |
public ExportCocoaAction( ViewPart view) { this.view = view; fMenu = null; setToolTipText("Export call as Cocoa"); setImageDescriptor(ImageDescriptor.createFromImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.OC))); setText(" Cocoa"); }
Example #15
Source File: ConfigAction.java From http4e with Apache License 2.0 | 5 votes |
public ConfigAction( ViewPart view, String title) { super(); this.view = view; setText(title); setDescription(title); setToolTipText(title); }
Example #16
Source File: PrintAction.java From http4e with Apache License 2.0 | 5 votes |
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"); }
Example #17
Source File: HelpAboutAction.java From http4e with Apache License 2.0 | 5 votes |
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); }
Example #18
Source File: ExportJavaHttp4Action.java From http4e with Apache License 2.0 | 5 votes |
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"); }
Example #19
Source File: ExportVbAction.java From http4e with Apache License 2.0 | 5 votes |
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"); }
Example #20
Source File: ImportHTTP4eAction.java From http4e with Apache License 2.0 | 5 votes |
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"); }
Example #21
Source File: ImportLiveHttpHeadersAction.java From http4e with Apache License 2.0 | 5 votes |
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"); }
Example #22
Source File: ExportFlexAction.java From http4e with Apache License 2.0 | 5 votes |
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"); }
Example #23
Source File: ExportJMeterAction.java From http4e with Apache License 2.0 | 5 votes |
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"); }
Example #24
Source File: AbstractWorkbenchTestCase.java From Pydev with Eclipse Public License 1.0 | 4 votes |
protected IAction executePyUnitViewAction(ViewPart view, Class<?> class1) { IAction action = getPyUnitViewAction(view, class1); action.run(); return action; }
Example #25
Source File: HierarchyTreeContentProvider.java From xtext-eclipse with Eclipse Public License 2.0 | 4 votes |
public HierarchyTreeContentProvider(ViewPart viewPart) { this.viewPart = viewPart; }
Example #26
Source File: RefreshingPartListener.java From elexis-3-core with Eclipse Public License 1.0 | 4 votes |
public RefreshingPartListener(ViewPart part){ this.part = part; }
Example #27
Source File: XViewer.java From nebula with Eclipse Public License 2.0 | 4 votes |
public void addCustomizeToViewToolbar(final ViewPart viewPart) { addCustomizeToViewToolbar(viewPart.getViewSite().getActionBars().getToolBarManager()); }
Example #28
Source File: PatListeContentProvider.java From elexis-3-core with Eclipse Public License 1.0 | 4 votes |
public PatListeContentProvider(CommonViewer cv, String[] fieldsToOrder, ViewPart s){ super(cv); site = s; updateFields(fieldsToOrder); }
Example #29
Source File: ExportEmptyAction.java From http4e with Apache License 2.0 | 4 votes |
public ExportEmptyAction( ViewPart view) { fMenu = null; setText("Export As .."); setEnabled(false); }
Example #30
Source File: ParameterizeDialog.java From http4e with Apache License 2.0 | 4 votes |
public ParameterizeDialog( ViewPart view) { super(view.getViewSite().getShell()); setTitleImage(ResourceUtils.getImage(CoreConstants.PLUGIN_UI, CoreImages.LOGO_DIALOG)); }