/** * Note: This constructor is for internal use only. Clients should not call this constructor. * * @param editor the Script editor */ public OpenEditorActionGroup(ScriptEditor editor) { fIsEditorOwner = true; fOpen = new OpenAction(editor); fOpen.setActionDefinitionId(IScriptEditorActionDefinitionIds.OPEN_EDITOR); editor.setAction("OpenEditor", fOpen); // $NON-NLS-1$ fSite = editor.getEditorSite(); initialize(fSite.getSelectionProvider()); }
/** * Creates a new <code>OpenEditorActionGroup</code>. The group requires that the selection * provided by the given selection provider is of type {@link IStructuredSelection}. * * @param site the site that will own the action group. * @param specialSelectionProvider the selection provider used instead of the site's selection * provider. */ public OpenEditorActionGroup( IWorkbenchPartSite site, ISelectionProvider specialSelectionProvider) { fSite = site; fOpen = new OpenAction(fSite); fOpen.setActionDefinitionId(DartEditorActionDefinitionIds.OPEN_EDITOR); fSelectionProvider = specialSelectionProvider == null ? fSite.getSelectionProvider() : specialSelectionProvider; initialize(); if (specialSelectionProvider != null) { fOpen.setSpecialSelectionProvider(specialSelectionProvider); } }
/** * Creates a new <code>OpenActionGroup</code>. The group requires that the selection provided by * the part's selection provider is of type <code> * org.eclipse.jface.viewers.IStructuredSelection</code>. * * @param part the view part that owns this action group */ public OpenEditorActionGroup(IViewPart part) { fSite = part.getSite(); fOpen = new OpenAction(fSite); fOpen.setActionDefinitionId(IScriptEditorActionDefinitionIds.OPEN_EDITOR); initialize(fSite.getSelectionProvider()); }