org.eclipse.jet.taglib.workspace
Interface IWorkspaceAction

All Known Subinterfaces:
IWorkspaceAction2
All Known Implementing Classes:
AbstractWorkspaceAction, AbstractWorkspaceAction2

public interface IWorkspaceAction

Represents a workspace action managed by WorkspaceContextExtender.

Since 0.9 clients that perform expensive actions that can be avoided should implement IWorkspaceAction2 in preference to IWorkspaceAction and should derive their implementations for AbstractWorkspaceAction2 instead of AbstractWorkspaceAction.

Since 0.9, the following extension interfaces may be implemented:


Method Summary
 org.eclipse.core.resources.IResource getResource()
          Returns the workspace resource with which the action is associated.
 TagInfo getTagInfo()
          Returns the Tag information of the tag that originated this action.
 java.lang.String getTemplatePath()
          Returns the path of the template that originated this action.
 void performAction(org.eclipse.core.runtime.IProgressMonitor monitor)
          Perform the workspace action
 boolean requiresValidateEdit()
          Tests whether the action resource must participate in an Eclipse Team validateEdit operation prior to the action being performed.
 

Method Detail

getResource

org.eclipse.core.resources.IResource getResource()
                                                 throws JET2TagException
Returns the workspace resource with which the action is associated. If the associated workspace resource is unknown at the time of the call, null may be returned.

Returns:
an Eclipse resource handle or null
Throws:
JET2TagException - if the resource cannot be created

getTagInfo

TagInfo getTagInfo()
Returns the Tag information of the tag that originated this action.

Returns:
a non-null TagInfo object.

getTemplatePath

java.lang.String getTemplatePath()
Returns the path of the template that originated this action.

Returns:
a non-null String

requiresValidateEdit

boolean requiresValidateEdit()
                             throws JET2TagException
Tests whether the action resource must participate in an Eclipse Team validateEdit operation prior to the action being performed. If true is returned, then getResource() must return an instance of IFile.

Returns:
true if the resource must participate in validateEdit.
Throws:
JET2TagException - if the result cannot calculated because of some error
See Also:
IWorkspace.validateEdit(org.eclipse.core.resources.IFile[], java.lang.Object)

performAction

void performAction(org.eclipse.core.runtime.IProgressMonitor monitor)
                   throws JET2TagException
Perform the workspace action

Parameters:
monitor - the progress monitor to which progress information will be written.
Throws:
JET2TagException - if the action cannot be successfully performed.

Copyright 2006 IBM Corporation and others.
All Rights Reserved.