org.eclipse.jet.taglib.workspace
Interface IWorkspaceAction

All Known Implementing Classes:
AbstractWorkspaceAction

public interface IWorkspaceAction

Represents a workspace action managed by WorkspaceContextExtender.


Method Summary
 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(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

public IResource getResource()
                      throws JET2TagException
Returns the workspace resource with which the action is associated. This method is only called if IWorkspaceAction.requiresValidateEdit() returns true.

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

getTagInfo

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

Returns:
a non-null TagInfo object.

getTemplatePath

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

Returns:
a non-null String

requiresValidateEdit

public 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 IWorkspaceAction.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

public void performAction(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.