/** * Creates a new action with no text and no image * * <p> * Configure the action later using the set methods. * </p> * * @param site the site this action is working on * @param provider a special selection provider which is used * instead of the site's selection provider or <code>null</code> to use the site's * selection provider. Clients can for example use a {@link ConvertingSelectionProvider} * to first convert a selection before passing it to the action. * * @since 3.2 * @deprecated Use {@link #setSpecialSelectionProvider(ISelectionProvider)} instead. This constructor will be * removed after 3.2 M5. */ protected SelectionDispatchAction(IWorkbenchSite site, ISelectionProvider provider) { this(site); setSpecialSelectionProvider(provider); }
/** * Creates a new action with no text and no image * * <p> * Configure the action later using the set methods. * </p> * * @param site the site this action is working on * @param provider a special selection provider which is used * instead of the site's selection provider or <code>null</code> to use the site's * selection provider. Clients can for example use a {@link ConvertingSelectionProvider} * to first convert a selection before passing it to the action. * * @since 3.2 * @deprecated Use {@link #setSpecialSelectionProvider(ISelectionProvider)} instead. This constructor will be * removed after 3.2 M5. */ @Deprecated protected SelectionDispatchAction(IWorkbenchSite site, ISelectionProvider provider) { this(site); setSpecialSelectionProvider(provider); }
/** * Creates a new action with no text and no image * * <p> * Configure the action later using the set methods. * </p> * * @param site the site this action is working on * @param provider a special selection provider which is used * instead of the site's selection provider or <code>null</code> to use the site's * selection provider. Clients can for example use a {@link ConvertingSelectionProvider} * to first convert a selection before passing it to the action. * * @since 3.2 * @deprecated Use {@link #setSpecialSelectionProvider(ISelectionProvider)} instead. This constructor will be * removed after 3.2 M5. */ @Deprecated protected SelectionDispatchAction(IWorkbenchSite site, ISelectionProvider provider) { this(site); setSpecialSelectionProvider(provider); }
private void registerAction(SelectionDispatchAction action, ISelectionProvider provider, ISelection selection, ISelectionProvider specialSelectionProvider) { action.update(selection); provider.addSelectionChangedListener(action); if (specialSelectionProvider != null) action.setSpecialSelectionProvider(specialSelectionProvider); }
private void registerAction(SelectionDispatchAction action, ISelectionProvider provider, ISelection selection, ISelectionProvider specialSelectionProvider) { action.update(selection); provider.addSelectionChangedListener(action); if (specialSelectionProvider != null) action.setSpecialSelectionProvider(specialSelectionProvider); }
private void registerAction(SelectionDispatchAction action, ISelectionProvider provider, ISelection selection, ISelectionProvider specialSelectionProvider) { action.update(selection); provider.addSelectionChangedListener(action); if (specialSelectionProvider != null) action.setSpecialSelectionProvider(specialSelectionProvider); }
private void registerAction(SelectionDispatchAction action, ISelectionProvider provider, ISelection selection, ISelectionProvider specialSelectionProvider) { action.update(selection); provider.addSelectionChangedListener(action); if (specialSelectionProvider != null) action.setSpecialSelectionProvider(specialSelectionProvider); }
private void registerAction(SelectionDispatchAction action, ISelectionProvider provider, ISelection selection, ISelectionProvider specialSelectionProvider) { action.update(selection); provider.addSelectionChangedListener(action); if (specialSelectionProvider != null) action.setSpecialSelectionProvider(specialSelectionProvider); }
private void registerAction(SelectionDispatchAction action, ISelectionProvider provider, ISelection selection, ISelectionProvider specialSelectionProvider) { action.update(selection); provider.addSelectionChangedListener(action); if (specialSelectionProvider != null) action.setSpecialSelectionProvider(specialSelectionProvider); }
private void registerAction(SelectionDispatchAction action, ISelectionProvider provider, ISelection selection, ISelectionProvider specialSelectionProvider) { action.update(selection); provider.addSelectionChangedListener(action); if (specialSelectionProvider != null) action.setSpecialSelectionProvider(specialSelectionProvider); }
private void registerAction(SelectionDispatchAction action, ISelectionProvider provider, ISelection selection, ISelectionProvider specialSelectionProvider) { action.update(selection); provider.addSelectionChangedListener(action); if (specialSelectionProvider != null) action.setSpecialSelectionProvider(specialSelectionProvider); }
private void registerAction(SelectionDispatchAction action, ISelectionProvider provider, ISelection selection, ISelectionProvider specialSelectionProvider) { action.update(selection); provider.addSelectionChangedListener(action); if (specialSelectionProvider != null) action.setSpecialSelectionProvider(specialSelectionProvider); }
private void registerAction(SelectionDispatchAction action, ISelectionProvider provider, ISelection selection, ISelectionProvider specialSelectionProvider) { action.update(selection); provider.addSelectionChangedListener(action); if (specialSelectionProvider != null) action.setSpecialSelectionProvider(specialSelectionProvider); }
private void registerAction(SelectionDispatchAction action, ISelectionProvider provider, ISelection selection, ISelectionProvider specialSelectionProvider) { action.update(selection); provider.addSelectionChangedListener(action); if (specialSelectionProvider != null) action.setSpecialSelectionProvider(specialSelectionProvider); }
private void registerAction(SelectionDispatchAction action, ISelectionProvider provider, ISelection selection, ISelectionProvider specialSelectionProvider) { action.update(selection); provider.addSelectionChangedListener(action); if (specialSelectionProvider != null) action.setSpecialSelectionProvider(specialSelectionProvider); }
@Override public void setSpecialSelectionProvider(ISelectionProvider provider) { super.setSpecialSelectionProvider(provider); fMoveInstanceMethodAction.setSpecialSelectionProvider(provider); fMoveStaticMembersAction.setSpecialSelectionProvider(provider); fReorgMoveAction.setSpecialSelectionProvider(provider); }
/** * Sets actionDefinitionId, updates enablement, adds to fActions, * and adds selection changed listener if provider is not <code>null</code>. * * @param action the action * @param provider can be <code>null</code> * @param specialProvider a special selection provider or <code>null</code> * @param selection the selection * @param actionDefinitionId the action definition id */ private void initUpdatingAction(SelectionDispatchAction action, ISelectionProvider provider, ISelectionProvider specialProvider, ISelection selection, String actionDefinitionId) { action.setActionDefinitionId(actionDefinitionId); action.update(selection); if (provider != null) provider.addSelectionChangedListener(action); if (specialProvider != null) action.setSpecialSelectionProvider(specialProvider); fActions.add(action); }
@Override public void setSpecialSelectionProvider(ISelectionProvider provider) { super.setSpecialSelectionProvider(provider); fMoveInstanceMethodAction.setSpecialSelectionProvider(provider); fMoveStaticMembersAction.setSpecialSelectionProvider(provider); fReorgMoveAction.setSpecialSelectionProvider(provider); }
/** * Sets actionDefinitionId, updates enablement, adds to fActions, * and adds selection changed listener if provider is not <code>null</code>. * * @param action the action * @param provider can be <code>null</code> * @param specialProvider a special selection provider or <code>null</code> * @param selection the selection * @param actionDefinitionId the action definition id */ private void initUpdatingAction(SelectionDispatchAction action, ISelectionProvider provider, ISelectionProvider specialProvider, ISelection selection, String actionDefinitionId) { action.setActionDefinitionId(actionDefinitionId); action.update(selection); if (provider != null) provider.addSelectionChangedListener(action); if (specialProvider != null) action.setSpecialSelectionProvider(specialProvider); fActions.add(action); }
fActions[i].setSpecialSelectionProvider(specialSelectionProvider);