|
Extension SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.ide.Ide
Each View
has an associated Controller
.
Controllers receive requests to handle the commands associated with user
actions.
The Ide
controller is associated with the
MainWindow
. This controller handles system commands such as
exit, save, new, etc..
The controller's handleEvent
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
method is called to do just that.
Command
,
IdeAction
,
MainWindow
Field Summary | |
static java.lang.String |
IDE_PROPERTIES_FILE
ide properties file: ide.properties. |
static java.lang.String |
INSTALL_PATH
Ide property for the path of the running installation. |
Method Summary | |
static void |
activateProjectInWorkspace(Project project,
Workspace wsp,
Observer origin)
|
void |
activeViewChanged(ActiveViewEvent e)
This method is called every time a view becomes the active view. |
static void |
addContextSensitiveAction(IdeAction action)
Adding a context sensitive action allows the Ide to update the sensitivity of actions that are that have a controller associated with them. |
static void |
addIdeListener(IdeListener l)
Adds a listener to the IDE. |
static void |
addRootController(Controller controller)
|
static boolean |
addToMiscellaneousFolder(Element element)
Adds an Element object to the MiscellaneousFolder . |
void |
checkCommands(Context context,
Controller activeController)
checkCommands() should be called on the controller associated with the active view whenever the Context changes. |
static java.lang.String |
cmdName(int cmdId)
Find the command name associated with the specified id. |
static void |
fireActiveProjectChanged(Project project,
Workspace workspace,
Observer origin)
|
static IdeLayout |
getActiveLayout()
|
static Project |
getActiveProject()
Returns the currently active Project . |
static Workspace |
getActiveWorkspace()
Returns the currently active Workspace . |
static AddinManager |
getAddinManager()
Gets the AddinManager instance. |
static java.lang.String |
getBinDirectory()
Retrieve the directory the IDE was started from. |
static oracle.ide.webbrowser.BrowserRunner |
getBrowserRunner()
Gets the WebBrowser Runner |
static ClassSelectionDialog |
getClassSelectionDialog()
|
static int |
getCmdID(java.lang.String commandName)
|
static CommandProcessor |
getCommandProcessor()
Gets the CommandProcessor . |
static Compiler |
getCompiler()
Gets the compiler instance. |
static Debugger |
getDebugger()
Gets the debugger instance. |
static Project |
getDefaultProject()
Gets the default project node |
static Workspace |
getDefaultWorkspace()
|
static DockStation |
getDockStation()
Gets the docking DockStation . |
static DTCache |
getDTCache()
|
static EditorManager |
getEditorManager()
Gets the EditorManager instance. |
static EnvironOptions |
getEnvironOptions()
|
static ExplorerManager |
getExplorerManager()
Gets the ExplorerManager instance. |
static FeatureManager |
getFeatures()
|
static FileOpenHistory |
getFileOpenHistory()
Gets the opened file history tracker |
static oracle.ide.gallery.GalleryManager |
getGalleryManager()
Gets the gallery manager |
static HelpSystem |
getHelpSystem()
Gets the HelpSystem instance. |
static java.lang.String |
getHomeDirectory()
Retrieve the IDE install directory. |
static javax.swing.ActionMap |
getIdeActionMap()
Returns an ActionMap for the IDE's accelerator keys. |
static javax.swing.InputMap |
getIdeInputMap()
Returns an InputMap for the IDE's accelerator keys. |
static IdeProperties |
getIdeProperties()
|
static java.lang.String |
getIdePropertiesFilename()
|
static InspectorManager |
getInspectorManager()
Gets the InspectorManager instance. |
static Ide |
getInstance()
The Ide controller is a singleton class. |
static KeyStrokeContextRegistry |
getKeyStrokeContextRegistry()
|
static Layouts |
getLayouts()
|
static java.lang.String |
getLibDirectory()
Retrieve the IDE lib directory. |
static LogManager |
getLogManager()
Gets the LogManager instance. |
static LogWindow |
getLogWindow()
Gets the LogWindow instance. |
static java.util.Map |
getMacros()
Gets the default Map of the macros in use by the IDE. |
static MainWindow |
getMainWindow()
Gets the MainWindow instance. |
static Menubar |
getMenubar()
Gets the menubar . |
static oracle.ide.migration.MigrationManager |
getMigrationManager()
Gets the MigrationMananger instance. |
static MiscellaneousFolder |
getMiscellaneousFolder()
Gets the miscellaneous files folder. |
static NavigatorManager |
getNavigatorManager()
Gets the NavigatorManager instance. |
static java.lang.String |
getOracleHomeDirectory()
Returns the Oracle products install directory. |
static PaletteManager |
getPaletteManager()
Gets the PaletteManager instance. |
static Preferences |
getPreferences()
Gets the user's preferences. |
static PrintManager |
getPrintManager()
Gets the PrintManager instance. |
static java.lang.String |
getProductVersion()
Gets the current product version number. |
static java.lang.String |
getProgramName()
Return JDeveloper's full program name. |
static java.lang.String |
getProperty(java.lang.String key)
Gets the IDE property indicated by the specified key. |
static java.lang.String |
getProperty(java.lang.String key,
java.lang.String def)
Gets the IDE property indicated by the specified key. |
static java.util.Iterator |
getRootControllers()
Controllers that are not subordinate to the ide controller should be registered as root controllers. |
static Runner |
getRunner()
Gets the runner instance. |
static java.lang.SecurityManager |
getSecurityManager()
Gets the SecurityManager |
static IdeSettings |
getSettings()
|
static StatusBar |
getStatusBar()
Gets the StatusBar instance. |
static IdeSystem |
getSystem()
Gets the user's system. |
static java.lang.String |
getSystemDirectory()
|
static Toolbar |
getToolbar()
Gets the Toolbar . |
static java.lang.String |
getTrueUserHomeDirectory()
Get the user's actual home directory, represented by the "user.home" system property. |
static java.lang.String |
getUserHomeDirectory()
Get the directory where the user specific files will reside. |
static float |
getVersion()
Gets the current ide version number. |
static ComponentVersionManager |
getVersionInfo()
|
static oracle.ide.versionsystem.VersionSystem |
getVersionSystem()
Gets the IDE's version system implementation. |
static WaitCursor |
getWaitCursor()
|
static oracle.ide.window.WindowManager |
getWindowManager()
Gets the WindowManager instance. |
static WizardManager |
getWizardManager()
Returns the reference to the WizardManager instance. |
static java.lang.String |
getWorkDirectory()
|
static Workspaces |
getWorkspaces()
Gets the workspaces. |
boolean |
handleEvent(IdeAction action,
Context context)
Called to handle the specified command. |
static boolean |
isQuitting()
Returns true when JDeveloper is quitting. |
static boolean |
isStarting()
Returns true when JDeveloper is starting up Returns
false all other times. |
static HistoryList |
loadHistoryList(java.lang.String name)
|
static int |
newCmd(java.lang.String commandName)
|
static int |
newSysCmd(java.lang.String commandName)
|
static void |
preTerminate()
Called when closing the MainWindow. |
static int |
quit(IdeAction action,
Context context)
|
static void |
removeIdeListener(IdeListener l)
Removes a listener to the IDE. |
static void |
removeRootController(Controller controller)
|
static java.lang.Integer |
searchCmdID(java.lang.String commandName)
|
static void |
setActiveProject(Project project)
|
static void |
setActiveWorkspace(Workspace workspace)
|
static void |
setBrowserRunner(oracle.ide.webbrowser.BrowserRunner browserRunner)
|
static void |
setCompiler(Compiler compiler)
|
static void |
setDebugger(Debugger debugger)
|
static void |
setFeatures(FeatureManager features)
|
static void |
setHelpSystem(HelpSystem helpSys)
|
static java.lang.String |
setProperty(java.lang.String key,
java.lang.String value)
Sets the IDE property indicated by the specified key. |
static void |
setRunner(Runner runner)
|
static void |
setVersionSystem(oracle.ide.versionsystem.VersionSystem system)
Sets the IDE's version system implementation. |
static void |
startup(IdeArgs args)
|
Controller |
supervisor()
Gets the supervising controller. |
static void |
terminate()
Called when the MainWindow is closed. |
boolean |
update(IdeAction action,
Context context)
This method updates the enabled status of the specified action within the specified context. |
void |
viewSelectionChanged(ViewSelectionEvent e)
This method is called every time the selection changes in a view. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String INSTALL_PATH
public static final java.lang.String IDE_PROPERTIES_FILE
Method Detail |
public static final FeatureManager getFeatures()
public static final void setFeatures(FeatureManager features)
public static final Ide getInstance()
Ide
controller is a singleton class. This method
gets this controller's single instance.
Ide
controller single instance.public static final float getVersion()
public static final java.lang.String getProductVersion()
public static final java.lang.String getBinDirectory()
public static final java.lang.String getHomeDirectory()
public static final java.lang.String getOracleHomeDirectory()
public static final java.lang.String getLibDirectory()
public static final java.lang.String getUserHomeDirectory()
public static final java.lang.String getTrueUserHomeDirectory()
getUserHomeDirectory()
.
public static final java.lang.String getSystemDirectory()
public static final java.lang.String getWorkDirectory()
public static final java.lang.String getProgramName()
public static final java.lang.String getProperty(java.lang.String key)
key
- the name of the IDE property.
null
if there is no property with that key.setProperty(java.lang.String, java.lang.String)
public static final java.lang.String getProperty(java.lang.String key, java.lang.String def)
key
- the name of the IDE property.def
- a default value.
setProperty(java.lang.String, java.lang.String)
public static final java.lang.String setProperty(java.lang.String key, java.lang.String value)
key
- the name of the IDE property.value
- the value of the IDE property.
null
if it did not have one.getProperty(java.lang.String)
public static final java.lang.String getIdePropertiesFilename()
public static final Menubar getMenubar()
menubar
. The menubar is a singleton object
used to add menus to the ide main window.
public static final WaitCursor getWaitCursor()
public static final IdeProperties getIdeProperties()
public static final HistoryList loadHistoryList(java.lang.String name)
public static final Layouts getLayouts()
public static final IdeLayout getActiveLayout()
public static final Toolbar getToolbar()
Toolbar
. The toolbar is a singleton
object used to add tools to the ide main window toolbar.
public static final StatusBar getStatusBar()
StatusBar
instance.
public static final MainWindow getMainWindow()
MainWindow
instance.
public static final LogWindow getLogWindow()
LogWindow
instance.
public static final Runner getRunner()
public static final void setRunner(Runner runner)
public static final Debugger getDebugger()
public static final void setDebugger(Debugger debugger)
public static final oracle.ide.webbrowser.BrowserRunner getBrowserRunner()
public static final void setBrowserRunner(oracle.ide.webbrowser.BrowserRunner browserRunner)
public static final Compiler getCompiler()
public static final void setCompiler(Compiler compiler)
public static final HelpSystem getHelpSystem()
public static final void setHelpSystem(HelpSystem helpSys)
public static final ComponentVersionManager getVersionInfo()
public static final KeyStrokeContextRegistry getKeyStrokeContextRegistry()
public static final IdeSettings getSettings()
public static final EnvironOptions getEnvironOptions()
public static final DTCache getDTCache()
public static final CommandProcessor getCommandProcessor()
CommandProcessor
. Controllers use the command
processor to execute commands.
public static final IdeSystem getSystem()
public static final Preferences getPreferences()
public static final Workspaces getWorkspaces()
public static final Workspace getActiveWorkspace()
Workspace
. If there is
no currently active Workspace
, this method will return
null.
public static final void setActiveWorkspace(Workspace workspace)
public static final Project getActiveProject()
Project
. If there is
no currently active Project
, this method will return
null.
public static final void setActiveProject(Project project)
public static final Project getDefaultProject()
public static final Workspace getDefaultWorkspace()
public static final MiscellaneousFolder getMiscellaneousFolder()
public static final boolean addToMiscellaneousFolder(Element element)
Element
object to the MiscellaneousFolder
.
Does the bookkeeping necessary to determine whether the miscellaneous
folder needs to be displayed and fires the required update
notifications.
public static final FileOpenHistory getFileOpenHistory()
public static final WizardManager getWizardManager()
WizardManager
instance. The
WizardManager
is in charge of registering and handling
all Wizard
's in the Oracle IDE.
WizardManager
.
Wizard
public static final AddinManager getAddinManager()
AddinManager
instance.
public static final oracle.ide.migration.MigrationManager getMigrationManager()
public static final java.util.Iterator getRootControllers()
public static final void addRootController(Controller controller)
public static final void removeRootController(Controller controller)
public static final void addIdeListener(IdeListener l)
IdeListener
public static final void removeIdeListener(IdeListener l)
IdeListener
public static final void setVersionSystem(oracle.ide.versionsystem.VersionSystem system)
system
- the version system, interface to the version manager.public static final oracle.ide.versionsystem.VersionSystem getVersionSystem()
public static final EditorManager getEditorManager()
EditorManager
instance.
public static final PaletteManager getPaletteManager()
PaletteManager
instance.
public static final oracle.ide.window.WindowManager getWindowManager()
WindowManager
instance.
public static final ExplorerManager getExplorerManager()
ExplorerManager
instance.
public static final InspectorManager getInspectorManager()
InspectorManager
instance.
public static final NavigatorManager getNavigatorManager()
NavigatorManager
instance.
public static final LogManager getLogManager()
LogManager
instance.
public static final PrintManager getPrintManager()
PrintManager
instance.
public static final DockStation getDockStation()
DockStation
.
public static final oracle.ide.gallery.GalleryManager getGalleryManager()
public static final java.lang.SecurityManager getSecurityManager()
public static final javax.swing.InputMap getIdeInputMap()
public static final javax.swing.ActionMap getIdeActionMap()
public static final boolean isQuitting()
true
when JDeveloper is quitting.
public static final boolean isStarting()
true
when JDeveloper is starting up Returns
false
all other times.
public static final ClassSelectionDialog getClassSelectionDialog()
public static final void addContextSensitiveAction(IdeAction action)
public static final java.lang.Integer searchCmdID(java.lang.String commandName)
public static final int newCmd(java.lang.String commandName)
public static final int newSysCmd(java.lang.String commandName)
public static final java.lang.String cmdName(int cmdId)
public static final int getCmdID(java.lang.String commandName)
public static final java.util.Map getMacros()
Map
of the macros in use by the IDE.
public static final void startup(IdeArgs args)
public static final void activateProjectInWorkspace(Project project, Workspace wsp, Observer origin)
public static final void fireActiveProjectChanged(Project project, Workspace workspace, Observer origin)
public static final int quit(IdeAction action, Context context)
public static final void preTerminate()
public static final void terminate()
public final Controller supervisor()
supervisor
in interface Controller
public boolean update(IdeAction action, Context context)
Note that checkCommands() uses a non-overlapping upwards delegation model to update the enabled status of all actions, whereas update() provides a 'virtual-like' mechanism for allowing the most-specific controllers to determine the enabled status of each action being checked.
update
in interface Controller
action
- action whose command is to be executed.context
- the current context
public final boolean handleEvent(IdeAction action, Context context)
Controllers must use the CommandProcessor
to execute all
commands. Doing so takes care of the Undo/Redo functionality.
handleEvent
in interface Controller
action
- action whose command is to be executed.
true
if this controller handled the action.public void checkCommands(Context context, Controller activeController)
Note that the only context-sensitive Actions should be updated inside a checkCommands() method.
Updating the enabled/disabled state of an action is handled by the update() command.
checkCommands
in interface Controller
context
- the current context. Null values are acceptable.activeController
- the controller associated with the active view.
Null values are acceptable.public void activeViewChanged(ActiveViewEvent e)
ActiveViewListener
ActiveViewEvent
will have information about the
view that is becoming active and the view that became inactive.
activeViewChanged
in interface ActiveViewListener
public void viewSelectionChanged(ViewSelectionEvent e)
ViewSelectionListener
ViewSelectionEvent
object has detailed information
of the objects selected in the view.
viewSelectionChanged
in interface ViewSelectionListener
|
Extension SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright ©1997, 2003, Oracle. All rights reserved.