Java Code Examples for org.eclipse.ui.navigator.ICommonViewerWorkbenchSite#getPage()
The following examples show how to use
org.eclipse.ui.navigator.ICommonViewerWorkbenchSite#getPage() .
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: TmfActionProvider.java From tracecompass with Eclipse Public License 2.0 | 5 votes |
@Override public void init(ICommonActionExtensionSite aSite) { ICommonViewerSite viewSite = aSite.getViewSite(); if (viewSite instanceof ICommonViewerWorkbenchSite) { ICommonViewerWorkbenchSite workbenchSite = (ICommonViewerWorkbenchSite) viewSite; page = workbenchSite.getPage(); openAction = new OpenAction(page, workbenchSite.getSelectionProvider()); } }
Example 2
Source File: OpenActionProvider.java From gama with GNU General Public License v3.0 | 5 votes |
@Override public void init(final ICommonActionExtensionSite aConfig) { if (aConfig.getViewSite() instanceof ICommonViewerWorkbenchSite) { viewSite = (ICommonViewerWorkbenchSite) aConfig.getViewSite(); openFileAction = new OpenFileAction(viewSite.getPage()); contribute = true; } }
Example 3
Source File: OpenActionProvider.java From translationstudio8 with GNU General Public License v2.0 | 5 votes |
public void init(ICommonActionExtensionSite aConfig) { if (aConfig.getViewSite() instanceof ICommonViewerWorkbenchSite) { viewSite = (ICommonViewerWorkbenchSite) aConfig.getViewSite(); openFileAction = new OpenFileWithValidAction(viewSite.getPage()); openFileAction.setText(WorkbenchNavigatorMessages.actions_OpenActionProvider_openFileAction); contribute = true; } }
Example 4
Source File: OpenActionProvider.java From tmxeditor8 with GNU General Public License v2.0 | 5 votes |
public void init(ICommonActionExtensionSite aConfig) { if (aConfig.getViewSite() instanceof ICommonViewerWorkbenchSite) { viewSite = (ICommonViewerWorkbenchSite) aConfig.getViewSite(); openFileAction = new OpenFileWithValidAction(viewSite.getPage()); openFileAction.setText(WorkbenchNavigatorMessages.actions_OpenActionProvider_openFileAction); contribute = true; } }
Example 5
Source File: PythonActionProvider.java From Pydev with Eclipse Public License 1.0 | 5 votes |
@Override public void init(ICommonActionExtensionSite aSite) { ICommonViewerSite viewSite = aSite.getViewSite(); if (viewSite instanceof ICommonViewerWorkbenchSite) { ICommonViewerWorkbenchSite site = (ICommonViewerWorkbenchSite) viewSite; Shell shell = site.getShell(); ISharedImages images = PlatformUI.getWorkbench().getSharedImages(); clipboard = new Clipboard(shell.getDisplay()); selectionProvider = site.getSelectionProvider(); openPythonAction = new PyOpenPythonFileAction(site.getPage(), selectionProvider); openResourceAction = new PyOpenResourceAction(site.getPage(), selectionProvider); openExternalAction = new PyOpenExternalAction(site.getPage(), selectionProvider); deleteResourceAction = new PyDeleteResourceAction(shell, selectionProvider); copyResourceAction = new PyCopyResourceAction(shell, selectionProvider, clipboard); pasteAction = new PyPasteAction(shell, selectionProvider, clipboard); moveResourceAction = new PyMoveResourceAction(shell, selectionProvider); copyResourceAction.setDisabledImageDescriptor(images .getImageDescriptor(ISharedImages.IMG_TOOL_COPY_DISABLED)); copyResourceAction.setImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_COPY)); pasteAction.setDisabledImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE_DISABLED)); pasteAction.setImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_PASTE)); deleteResourceAction.setDisabledImageDescriptor(images .getImageDescriptor(ISharedImages.IMG_TOOL_DELETE_DISABLED)); deleteResourceAction.setImageDescriptor(images.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE)); } }
Example 6
Source File: GoNavigatorActionProvider.java From goclipse with Eclipse Public License 1.0 | 5 votes |
@Override public void init(ICommonActionExtensionSite aSite) { super.init(aSite); ICommonViewerSite viewSite = aSite.getViewSite(); if(viewSite instanceof ICommonViewerWorkbenchSite) { ICommonViewerWorkbenchSite cvws = (ICommonViewerWorkbenchSite) viewSite; navigatorOpenAction = new NavigatorOpenAction(cvws.getPage(), cvws.getSelectionProvider()); } }