use of org.eclipse.ui.navigator.ICommonViewerWorkbenchSite in project translationstudio8 by heartsome.
the class NewActionProvider method init.
public void init(ICommonActionExtensionSite anExtensionSite) {
if (anExtensionSite.getViewSite() instanceof ICommonViewerWorkbenchSite) {
IWorkbenchWindow window = ((ICommonViewerWorkbenchSite) anExtensionSite.getViewSite()).getWorkbenchWindow();
showDlgAction = ActionFactory.NEW_WIZARD_DROP_DOWN.create(window);
showDlgAction.setText(WorkbenchNavigatorMessages.actions_NewActionProvider_NewMenu_label);
contribute = true;
}
}
use of org.eclipse.ui.navigator.ICommonViewerWorkbenchSite in project sling by apache.
the class PackageExplorerOpenActionProvider method init.
@Override
public void init(ICommonActionExtensionSite site) {
super.init(site);
action = new OpenFileAction(getActivePage());
ICommonViewerWorkbenchSite workbenchSite = null;
if (site.getViewSite() instanceof ICommonViewerWorkbenchSite)
workbenchSite = (ICommonViewerWorkbenchSite) site.getViewSite();
if (workbenchSite != null) {
if (workbenchSite.getPart() != null && workbenchSite.getPart() instanceof IViewPart) {
IViewPart viewPart = (IViewPart) workbenchSite.getPart();
if (site.getStructuredViewer() instanceof TreeViewer) {
treeViewer = (TreeViewer) site.getStructuredViewer();
treeViewer.addSelectionChangedListener(action);
}
fInViewPart = true;
}
}
}
use of org.eclipse.ui.navigator.ICommonViewerWorkbenchSite in project translationstudio8 by heartsome.
the class UndoRedoActionProvider method init.
/*
* (non-Javadoc)
*
* @see org.eclipse.ui.navigator.CommonActionProvider#init(org.eclipse.ui.navigator.ICommonActionExtensionSite)
*/
public void init(ICommonActionExtensionSite anActionSite) {
IUndoContext workspaceContext = (IUndoContext) ResourcesPlugin.getWorkspace().getAdapter(IUndoContext.class);
undoRedoGroup = new UndoRedoActionGroup(((ICommonViewerWorkbenchSite) anActionSite.getViewSite()).getSite(), workspaceContext, true);
}
use of org.eclipse.ui.navigator.ICommonViewerWorkbenchSite in project translationstudio8 by heartsome.
the class PortingActionProvider method init.
public void init(ICommonActionExtensionSite anExtensionSite) {
Assert.isTrue(!disposed);
if (anExtensionSite.getViewSite() instanceof ICommonViewerWorkbenchSite) {
IWorkbenchWindow window = ((ICommonViewerWorkbenchSite) anExtensionSite.getViewSite()).getWorkbenchWindow();
importAction = new ImportResourcesAction(window);
importAction.setText(WorkbenchNavigatorMessages.PortingActionProvider_ImportResourcesMenu_label);
exportAction = new ExportResourcesAction(window);
exportAction.setText(WorkbenchNavigatorMessages.PortingActionProvider_ExportResourcesMenu_label);
importWizardActionGroup = new WizardActionGroup(window, PlatformUI.getWorkbench().getImportWizardRegistry(), WizardActionGroup.TYPE_IMPORT, anExtensionSite.getContentService());
exportWizardActionGroup = new WizardActionGroup(window, PlatformUI.getWorkbench().getExportWizardRegistry(), WizardActionGroup.TYPE_EXPORT, anExtensionSite.getContentService());
contribute = true;
}
}
Aggregations