| org.eclipse.ui.actions.SelectionListenerAction org.eclipse.ui.actions.WorkspaceAction org.eclipse.ui.actions.CloseResourceAction
All known Subclasses: org.eclipse.ui.actions.CloseUnrelatedProjectsAction,
CloseResourceAction | public class CloseResourceAction extends WorkspaceAction implements IResourceChangeListener(Code) | | Standard action for closing the currently selected project(s).
This class may be instantiated; it is not intended to be subclassed.
|
Field Summary | |
final public static String | ID The id of this action. |
Method Summary | |
List | getDirtyEditors(List projects) Return a list of dirty editors associated with the given projects. | List | getEditorsToSave(List dirtyEditors) Open a dialog that can be used to select which of the given
editors to save. | public String[] | getModelProviderIds() Returns the model provider ids that are known to the client
that instantiated this operation. | protected String | getOperationMessage() | protected String | getProblemsMessage() | protected String | getProblemsTitle() | protected void | invokeOperation(IResource resource, IProgressMonitor monitor) | public void | resourceChanged(IResourceChangeEvent event) Handles a resource changed event by updating the enablement
if one of the selected projects is opened or closed. | public void | run() The implementation of this WorkspaceAction method
method saves and closes the resource's dirty editors before closing
it. | boolean | saveDirtyEditors() Causes all dirty editors associated to the resource(s) to be saved, if so
specified by the user, and closed. | public void | setModelProviderIds(String[] modelProviderIds) Sets the model provider ids that are known to the client
that instantiated this operation. | protected boolean | shouldPerformResourcePruning() | protected boolean | updateSelection(IStructuredSelection s) The CloseResourceAction implementation of this
SelectionListenerAction method ensures that this action is
enabled only if one of the selections is an open project. |
ID | final public static String ID(Code) | | The id of this action.
|
CloseResourceAction | public CloseResourceAction(Shell shell)(Code) | | Creates a new action.
Parameters: shell - the shell for any dialogs |
CloseResourceAction | protected CloseResourceAction(Shell shell, String text)(Code) | | Override super constructor to allow subclass to
override with unique text.
|
getDirtyEditors | List getDirtyEditors(List projects)(Code) | | Return a list of dirty editors associated with the given projects. Return
editors from all perspectives.
List the dirty editors |
getEditorsToSave | List getEditorsToSave(List dirtyEditors)(Code) | | Open a dialog that can be used to select which of the given
editors to save. Return the list of editors to save. A value of
null implies that the operation was cancelled.
List the editors to save |
getModelProviderIds | public String[] getModelProviderIds()(Code) | | Returns the model provider ids that are known to the client
that instantiated this operation.
the model provider ids that are known to the clientthat instantiated this operation. since: 3.2 |
getOperationMessage | protected String getOperationMessage()(Code) | | |
getProblemsMessage | protected String getProblemsMessage()(Code) | | |
invokeOperation | protected void invokeOperation(IResource resource, IProgressMonitor monitor) throws CoreException(Code) | | |
resourceChanged | public void resourceChanged(IResourceChangeEvent event)(Code) | | Handles a resource changed event by updating the enablement
if one of the selected projects is opened or closed.
|
run | public void run()(Code) | | The implementation of this WorkspaceAction method
method saves and closes the resource's dirty editors before closing
it.
|
saveDirtyEditors | boolean saveDirtyEditors()(Code) | | Causes all dirty editors associated to the resource(s) to be saved, if so
specified by the user, and closed.
|
setModelProviderIds | public void setModelProviderIds(String[] modelProviderIds)(Code) | | Sets the model provider ids that are known to the client
that instantiated this operation. Any potential side effects
reported by these models during validation will be ignored.
Parameters: modelProviderIds - the model providers known to the clientwho is using this operation. since: 3.2 |
shouldPerformResourcePruning | protected boolean shouldPerformResourcePruning()(Code) | | |
updateSelection | protected boolean updateSelection(IStructuredSelection s)(Code) | | The CloseResourceAction implementation of this
SelectionListenerAction method ensures that this action is
enabled only if one of the selections is an open project.
|
|
|