Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| org.netbeans.modules.projectapi/1 1.9.22
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.netbeans.spi.project
Interface ActionProvider

    public interface ActionProvider

Ability for a project to have various actions (e.g. Build) invoked on it. Should be registered in a project's lookup and will be used by UI infrastructure.

See Also:
  `Project.getLookup()`, `ActionUtils`

Field Summary
`static String` | `COMMAND_BUILD` Standard command to incrementally build the project.
`static String` | `COMMAND_CLEAN` Standard command to clean build products.
`static String` | `COMMAND_COMPILE_SINGLE` Standard command for compiling set of files
`static String` | `COMMAND_COPY` Standard command for deleting the project.
`static String` | `COMMAND_DEBUG` Standard command for running the project in debugger
`static String` | `COMMAND_DEBUG_SINGLE` Standard command for running single file in debugger
`static String` | `COMMAND_DEBUG_STEP_INTO` Standard command for starting app in debugger and stopping at the beginning of app whatever that means.
`static String` | `COMMAND_DEBUG_TEST_SINGLE` Standard command for running one test in debugger
`static String` | `COMMAND_DELETE` Standard command for deleting the project.
`static String` | `COMMAND_MOVE` Standard command for deleting the project.
`static String` | `COMMAND_REBUILD` Standard command to do a "clean" (forced) rebuild.
`static String` | `COMMAND_RENAME` Standard command for deleting the project.
`static String` | `COMMAND_RUN` Standard command for running the project
`static String` | `COMMAND_RUN_SINGLE` Standard command for running one file
`static String` | `COMMAND_TEST` Standard command for running tests on given projects
`static String` | `COMMAND_TEST_SINGLE` Standard command for running one test file

Method Summary
`String[]` | `getSupportedActions()` Get a list of all commands which this project supports.
`void` | `invokeAction(String command, Lookup context)` Run a project command.
`boolean` | `isActionEnabled(String command, Lookup context)` Tells whether the command can be invoked in given context and thus if actions representing this command should be enabled or disabled.

Field Detail

### COMMAND_BUILD

    static final String COMMAND_BUILD

  Standard command to incrementally build the project.

  See Also:
    Constant Field Values

### COMMAND_COMPILE_SINGLE

    static final String COMMAND_COMPILE_SINGLE

  Standard command for compiling set of files

  See Also:
    Constant Field Values

### COMMAND_CLEAN

    static final String COMMAND_CLEAN

  Standard command to clean build products.

  See Also:
    Constant Field Values

### COMMAND_REBUILD

    static final String COMMAND_REBUILD

  Standard command to do a "clean" (forced) rebuild.

  See Also:
    Constant Field Values

### COMMAND_RUN

    static final String COMMAND_RUN

  Standard command for running the project

  See Also:
    Constant Field Values

### COMMAND_RUN_SINGLE

    static final String COMMAND_RUN_SINGLE

  Standard command for running one file

  See Also:
    Constant Field Values

### COMMAND_TEST

    static final String COMMAND_TEST

  Standard command for running tests on given projects

  See Also:
    Constant Field Values

### COMMAND_TEST_SINGLE

    static final String COMMAND_TEST_SINGLE

  Standard command for running one test file

  See Also:
    Constant Field Values

### COMMAND_DEBUG

    static final String COMMAND_DEBUG

  Standard command for running the project in debugger

  See Also:
    Constant Field Values

### COMMAND_DEBUG_SINGLE

    static final String COMMAND_DEBUG_SINGLE

  Standard command for running single file in debugger

  See Also:
    Constant Field Values

### COMMAND_DEBUG_TEST_SINGLE

    static final String COMMAND_DEBUG_TEST_SINGLE

  Standard command for running one test in debugger

  See Also:
    Constant Field Values

### COMMAND_DEBUG_STEP_INTO

    static final String COMMAND_DEBUG_STEP_INTO

  Standard command for starting app in debugger and stopping at the beginning of app whatever that means.

  See Also:
    Constant Field Values

### COMMAND_DELETE

    static final String COMMAND_DELETE

  Standard command for deleting the project.

  Since:
    1.6
  See Also:
    Constant Field Values

### COMMAND_COPY

    static final String COMMAND_COPY

  Standard command for deleting the project.

  Since:
    1.7
  See Also:
    Constant Field Values

### COMMAND_MOVE

    static final String COMMAND_MOVE

  Standard command for deleting the project.

  Since:
    1.7
  See Also:
    Constant Field Values

### COMMAND_RENAME

    static final String COMMAND_RENAME

  Standard command for deleting the project.

  Since:
    1.7
  See Also:
    Constant Field Values

Method Detail

### getSupportedActions

    String[] getSupportedActions()

  Get a list of all commands which this project supports.

  Returns:
    a list of command names suitable for `invokeAction(java.lang.String, org.openide.util.Lookup)`
  See Also:
    `COMMAND_BUILD`, `COMMAND_CLEAN`, `COMMAND_REBUILD`

### invokeAction

    void invokeAction(String command,
                      Lookup context)
                      throws IllegalArgumentException

  Run a project command. Will be invoked in the event thread. The context may be ignored by some commands, but some may need it in order to get e.g. the selected source file to build by itself, etc.

  Parameters:
    `command` - a predefined command name (must be among `getSupportedActions()`)
    `context` - any action context, e.g. for a node selection (as in `ContextAwareAction`)
  Throws:
    `IllegalArgumentException` - if the requested command is not supported

### isActionEnabled

    boolean isActionEnabled(String command,
                            Lookup context)
                            throws IllegalArgumentException

  Tells whether the command can be invoked in given context and thus if actions representing this command should be enabled or disabled. The context may be ignored by some commands, but some may need it in order to get e.g. the selected source file to build by itself, etc.

  Parameters:
    `command` - a predefined command name (must be among `getSupportedActions()`)
    `context` - any action context, e.g. for a node selection (as in `ContextAwareAction`)
  Throws:
    `IllegalArgumentException` - if the requested command is not supported

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| org.netbeans.modules.projectapi/1 1.9.22
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Built on December 7 2006. | Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.