org.openide.actions
Class AbstractCompileAction
java.lang.Object
|
+--org.openide.util.SharedClassObject
|
+--org.openide.util.actions.SystemAction
|
+--org.openide.util.actions.CallableSystemAction
|
+--org.openide.util.actions.NodeAction
|
+--org.openide.actions.AbstractCompileAction
- All Implemented Interfaces:
- Action, ActionListener, EventListener, Externalizable, Presenter, Presenter.Menu, Presenter.Popup, Presenter.Toolbar, Serializable
- Direct Known Subclasses:
- BuildAction, BuildAllAction, CleanAction, CleanAllAction, CompileAction, CompileAllAction
- public abstract class AbstractCompileAction
- extends NodeAction
Compilation action--compiles all selected nodes.
Concrete subclasses must specify what type of
compilation is needed (e.g. compile vs. build) and whether to operate
recursively.
- See Also:
- org.openide.compiler, Serialized Form
Methods inherited from class org.openide.util.actions.SystemAction |
clearSharedData, createPopupMenu, createToolbarPresenter, get, getHelpCtx, getIcon, getIcon, getName, getValue, iconResource, linkActions, putValue, setIcon |
Methods inherited from class org.openide.util.SharedClassObject |
addPropertyChangeListener, equals, finalize, findObject, findObject, firePropertyChange, getLock, getProperty, hashCode, putProperty, putProperty, readExternal, removePropertyChangeListener, writeExternal, writeReplace |
AbstractCompileAction
public AbstractCompileAction()
performAction
protected void performAction(Node[] activatedNodes)
- Description copied from class:
NodeAction
- Perform the action based on the currently activated nodes.
Note that if the source of the event triggering this action was itself
a node, that node will be the sole argument to this method, rather
than the activated nodes.
- Overrides:
performAction
in class NodeAction
- Following copied from class:
org.openide.util.actions.NodeAction
- Parameters:
activatedNodes
- current activated nodes, may be empty but not null
enable
protected boolean enable(Node[] arr)
- Checks whether the depth is supported.
- Overrides:
enable
in class NodeAction
- Following copied from class:
org.openide.util.actions.NodeAction
- Parameters:
activatedNodes
- current activated nodes, may be empty but not null
- Returns:
true
to be enabled, false
to be disabled
depth
protected abstract Compiler.Depth depth()
- Get the depth the compiler compiles on.
- Returns:
- depth for the job that this compiler works on
cookie
protected abstract Class cookie()
- Get the requested cookie class.
- Returns:
- the class, e.g.
CompilerCookie.Compile
message
protected String message()
- Message to display when the action is looking for
object that should be processed.
- Returns:
- text to display at status line
createJob
public static CompilerJob createJob(Enumeration en,
Compiler.Depth depth)
- Create a job for compilation over a set of cookies.
- Parameters:
en
- enumeration of CompilerCookie
depth
- the requested depth- Returns:
- the compiler job
compile
public static boolean compile(Enumeration compileCookies,
String name)
- Compile a number of files.
Should actually be files, not directories (i.e. a zero depth will be used).
- Parameters:
compileCookies
- enumeration of CompilerCookie
name
- name of the job to use- Returns:
true
if compilation was successful, false
if there was some sort of error
Built on December 12 2001. | Portions Copyright 1997-2001 Sun Microsystems, Inc. All rights reserved.