Extension SDK 9.0.5

oracle.jdeveloper.model
Class JProjectStructureController

java.lang.Object
  extended byoracle.jdeveloper.model.JProjectStructureController
All Implemented Interfaces:
Addin, Controller, Module

public class JProjectStructureController
extends java.lang.Object
implements Controller, Addin

The JProjectStructureController controller is responsible for handling the project structuring commands. The controller's handleEvent(oracle.ide.IdeAction, oracle.ide.addin.Context) method gets called with the appropriate Command specified. If the Controller does not handle the requested command it delegates the Command to a supervising Controller. Controllers are also responsible for determining the availability of a specific command. The update(oracle.ide.IdeAction, oracle.ide.addin.Context) method is called to do just that.

See Also:
Command, Controller, IdeAction

Field Summary
static int ADD_TO_PROJECT_CMD_ID
           
static int ADD_TO_PROJECT_CONTEXT_CMD_ID
           
static int CATEGORY_VIEW_CMD_ID
           
static int DIRECTORY_TREE_VIEW_CMD_ID
           
static int FILE_LIST_VIEW_CMD_ID
           
static int PACKAGE_LIST_VIEW_CMD_ID
           
static int PACKAGE_TREE_VIEW_CMD_ID
           
static int SORT_BY_TYPE_CMD_ID
           
static int VIEW_ALL_FILES_CMD_ID
           
 
Constructor Summary
JProjectStructureController()
          Default constructor for JProjectStructureController
 
Method Summary
 boolean canShutdown()
          This method is called by the IDE to confirm that the ide can shutdown.
static ChildFilter findFilter(TNode tnode, int filterType)
           
 boolean handleEvent(IdeAction action, Context context)
          This method is called when a user interaction with a View triggers the execution of a command.
 float ideVersion()
          This method is called to determine the ide version number for which this feature was implemented.
 void initialize()
          This method is called by the IDE to request that the feature be initialized.
static boolean isFilteredBy(TNode tnode, int filterType)
           
static boolean isFilterSupported(TNode tnode, int filterType)
          Call to determine if the specified tnode can be viewed using the specified filter.
static boolean isInCategoryView(Context context)
           
static boolean isInCategoryView(TNode tnode)
           
static boolean isInProject(TNode tnode)
          Call to determine if the specified tnode is the descendent of a project.
 void shutdown()
          This method is called by the IDE to request that the feature release any resources held before the ide shuts down.
 boolean update(IdeAction action, Context context)
          This method updates the enabled status of the specified action within the specified context.
 float version()
          This method is called to determine the feature version number, i.e.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ADD_TO_PROJECT_CMD_ID

public static final int ADD_TO_PROJECT_CMD_ID

ADD_TO_PROJECT_CONTEXT_CMD_ID

public static final int ADD_TO_PROJECT_CONTEXT_CMD_ID

CATEGORY_VIEW_CMD_ID

public static final int CATEGORY_VIEW_CMD_ID

DIRECTORY_TREE_VIEW_CMD_ID

public static final int DIRECTORY_TREE_VIEW_CMD_ID

FILE_LIST_VIEW_CMD_ID

public static final int FILE_LIST_VIEW_CMD_ID

PACKAGE_LIST_VIEW_CMD_ID

public static final int PACKAGE_LIST_VIEW_CMD_ID

PACKAGE_TREE_VIEW_CMD_ID

public static final int PACKAGE_TREE_VIEW_CMD_ID

VIEW_ALL_FILES_CMD_ID

public static final int VIEW_ALL_FILES_CMD_ID

SORT_BY_TYPE_CMD_ID

public static final int SORT_BY_TYPE_CMD_ID
Constructor Detail

JProjectStructureController

public JProjectStructureController()
Default constructor for JProjectStructureController

Method Detail

isFilterSupported

public static boolean isFilterSupported(TNode tnode,
                                        int filterType)
Call to determine if the specified tnode can be viewed using the specified filter.


findFilter

public static ChildFilter findFilter(TNode tnode,
                                     int filterType)

isFilteredBy

public static boolean isFilteredBy(TNode tnode,
                                   int filterType)

isInProject

public static boolean isInProject(TNode tnode)
Call to determine if the specified tnode is the descendent of a project. That is the tnode is contained within a project.


isInCategoryView

public static boolean isInCategoryView(Context context)

isInCategoryView

public static boolean isInCategoryView(TNode tnode)

handleEvent

public boolean handleEvent(IdeAction action,
                           Context context)
Description copied from interface: Controller
This method is called when a user interaction with a View triggers the execution of a command.

Specified by:
handleEvent in interface Controller
Parameters:
action - action whose command is to be executed.
Returns:
true if the controller handles the specified command.

update

public boolean update(IdeAction action,
                      Context context)
Description copied from interface: Controller
This method updates the enabled status of the specified action within the specified context. It should generally be called on the controller associated with the active view to allow that controller to take the first crack at determining its enabled status. If that controller wants to update its enabled status, it does so and returns true to indicate that further controllers do not need to be consulted. If the controller does not deal with setting the enabled status of an action, it delegates the request to its supervising controller, all the way up to the Ide. The Ide has a special implementation of update(xx) that further delegates the request to root controllers, until one of them returns true indicating the request was handled by the controller.

Specified by:
update in interface Controller
Parameters:
action - action whose command is to be executed.
context - the current context
Returns:
true if the controller handles the specified command.

initialize

public void initialize()
This method is called by the IDE to request that the feature be initialized.

Specified by:
initialize in interface Addin
See Also:
AddinManager

shutdown

public void shutdown()
This method is called by the IDE to request that the feature release any resources held before the ide shuts down.

Specified by:
shutdown in interface Addin

canShutdown

public boolean canShutdown()
This method is called by the IDE to confirm that the ide can shutdown.

Specified by:
canShutdown in interface Addin

version

public float version()
This method is called to determine the feature version number, i.e. 1.0

Specified by:
version in interface Addin
Returns:
the feature version number.

ideVersion

public float ideVersion()
This method is called to determine the ide version number for which this feature was implemented.

Specified by:
ideVersion in interface Addin
Returns:
the ide version number, i.e. 5.0 .

Extension SDK

 

Copyright © 1997, 2004, Oracle. All rights reserved.