Extension SDK 10.1.2

oracle.ide
Class Ide

java.lang.Object
  extended byoracle.ide.Ide
All Implemented Interfaces:
IdeConstants

public final class Ide
extends java.lang.Object
implements IdeConstants

This class is responsible for coordinating startup of the IDE.


Field Summary
 
Fields inherited from interface oracle.ide.IdeConstants
ACTIVATE_LEFT_BUTTON_CMD_ID, ACTIVATE_RIGHT_BUTTON_CMD_ID, ACTIVE_PROJECT_CHANGED, AFTER, APPLICATIONS_CMD, APPLICATIONS_CMD_ID, BEFORE, BROWSE_SYMBOL_CMD, BROWSE_SYMBOL_CMD_ID, CENTER, CLOSE_ALL_CMD, CLOSE_ALL_CMD_ID, CLOSE_EDITOR_CMD, CLOSE_EDITOR_CMD_ID, CLOSE_NODE_CMD, CLOSE_NODE_CMD_ID, COLLAPSE_ALL_CMD_ID, COLOR_IDE_LINES, CONNECTIONS_CMD, CONNECTIONS_CMD_ID, CONTEXT_MENU_CMD, CONTEXT_MENU_CMD_ID, COPY_CMD, COPY_CMD_ID, CUT_CMD, CUT_CMD_ID, DEFAULT_PROJECT_SETTINGS_CMD, DEFAULT_PROJECT_SETTINGS_CMD_ID, DELETE_CMD_ID, EAST, EXIT_CMD, EXIT_CMD_ID, EXPAND_ALL_CMD_ID, EXPLORER_CMD, EXPLORER_CMD_ID, FIND_CMD, FIND_CMD_ID, FLAT_LOOK, FREEZE_CMD_ID, GOTO_LINE_NUMBER_CMD, GOTO_LINE_NUMBER_CMD_ID, HORZ, IDE_PROPERTIES_FILE, IDE_SETTINGS_CMD, IDE_SETTINGS_CMD_ID, IDE_VERSION, INCREMENTAL_SEARCH_BACKWARD_CMD, INCREMENTAL_SEARCH_BACKWARD_CMD_ID, INCREMENTAL_SEARCH_FORWARD_CMD, INCREMENTAL_SEARCH_FORWARD_CMD_ID, INSPECTOR_CMD, INSPECTOR_CMD_ID, LAST_PREDEFINED_CMD, LOG_WINDOW_CMD, LOG_WINDOW_CMD_ID, MENU_ADDIN_SECTION_ID, MENU_SECTION_ID, MENU_WEIGHT, MENU_WEIGHT_SECTION_UNDEFINED, NAVIGATE_CMD, NAVIGATE_CMD_ID, NEW_CLASS_CMD, NEW_CLASS_CMD_ID, NEW_EMPTY_PROJECT_CMD, NEW_EMPTY_PROJECT_CMD_ID, NEW_EXPLORER_CMD, NEW_EXPLORER_CMD_ID, NEW_INSPECTOR_CMD, NEW_INSPECTOR_CMD_ID, NEW_NAVIGATOR_CMD, NEW_NAVIGATOR_CMD_ID, NEW_PROJECT_CMD, NEW_PROJECT_CMD_ID, NEW_VIEW_CMD_ID, NEW_WORKSPACE_CMD, NEW_WORKSPACE_CMD_ID, NEXT_EDITOR_CMD, NEXT_EDITOR_CMD_ID, NEXT_EDITORFRAME_CMD, NEXT_EDITORFRAME_CMD_ID, NEXTMSG_CMD, NEXTMSG_CMD_ID, NORTH, OPEN_CMD, OPEN_CMD_ID, PASTE_CMD, PASTE_CMD_ID, PREV_EDITOR_CMD, PREV_EDITOR_CMD_ID, PREV_EDITORFRAME_CMD, PREV_EDITORFRAME_CMD_ID, PREVMSG_CMD, PREVMSG_CMD_ID, PRINT_CMD, PRINT_CMD_ID, PRINTER_SETUP_CMD, PRINTER_SETUP_CMD_ID, PROJECT_SETTINGS_CMD, PROJECT_SETTINGS_CMD_ID, PROPERTIES_CMD_ID, PROPERTY_SET_CMD_ID, REDO_CMD, REDO_CMD_ID, REFRESH_CMD_ID, RELOAD_NODES_CMD, RELOAD_NODES_CMD_ID, REMOVE_FILE_CMD, REMOVE_FILE_CMD_ID, REMOVE_FROM_DISK_CMD, REMOVE_FROM_DISK_CMD_ID, RENAME_CMD, RENAME_CMD_ID, REOPEN_CMD, REOPEN_CMD_ID, REPLACE_CMD, REPLACE_CMD_ID, REVERT_CMD, REVERT_CMD_ID, SAVE_ALL_CMD, SAVE_ALL_CMD_ID, SAVE_AS_CMD, SAVE_AS_CMD_ID, SAVE_CMD, SAVE_CMD_ID, SEARCH_AGAIN_CMD, SEARCH_AGAIN_CMD_ID, SEARCH_BACKWARD_CMD, SEARCH_BACKWARD_CMD_ID, SEARCH_SOURCE_PATH_CMD, SEARCH_SOURCE_PATH_CMD_ID, SELECT_ALL_CMD, SELECT_ALL_CMD_ID, SOUTH, STATUS_BAR_CMD, STATUS_BAR_CMD_ID, STRUCTURE_CHANGE_CMD_ID, TOOLBAR_CMD, TOOLBAR_CMD_ID, UNDO_CMD, UNDO_CMD_ID, VERT, WEST, WINDOW_CASCADE_CMD_ID, WINDOW_TILE_HORZ_CMD_ID, WINDOW_TILE_VERT_CMD_ID, WINDOWS_DOT_DOT_DOT_CMD, WINDOWS_DOT_DOT_DOT_CMD_ID, WORKSPACES_CMD, WORKSPACES_CMD_ID
 
Method Summary
static void addIdeListener(IdeListener l)
          Adds a listener to the IDE.
static boolean addToMiscellaneousFolder(Element element)
          Adds an Element object to the MiscellaneousFolder.
static int createCmdID(java.lang.String commandName)
           
static java.lang.Integer findCmdID(java.lang.String commandName)
          If the specified String is associated with a command ID number, that number is returned as an Integer.
static java.lang.String findCmdName(int cmdID)
          Find the command name associated with the specified id.
static int findOrCreateCmdID(java.lang.String commandName)
          This is the primary method that addins should use to allocate a command ID for actions that will be handled by a Controller.
static Project getActiveProject()
          Returns the currently active Project.
static Workspace getActiveWorkspace()
          Returns the currently active Workspace.
static java.lang.String getBinDirectory()
          Retrieve the directory the IDE was started from.
static Project getDefaultProject()
          Gets the default project node
static Workspace getDefaultWorkspace()
           
static DTCache getDTCache()
           
static EnvironOptions getEnvironOptions()
           
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 IdeArgs getIdeArgs()
           
static javax.swing.InputMap getIdeInputMap()
          Returns an InputMap for the IDE's accelerator keys.
static IdeProperties getIdeProperties()
           
static KeyStrokeContextRegistry getKeyStrokeContextRegistry()
           
static NavigatorWindow getLastActiveNavigator()
           
static java.lang.String getLibDirectory()
          Retrieve the IDE lib directory.
static java.util.Map getMacros()
          Gets the default Map of the macros in use by the IDE.
static IdeMainWindow getMainWindow()
          Gets the IdeMainWindow instance.
static Menubar getMenubar()
          Gets the menubar.
static MiscellaneousFolder getMiscellaneousFolder()
          Gets the miscellaneous files folder.
static java.lang.String getOracleHomeDirectory()
          Returns the Oracle products install directory.
static java.lang.String getProductVersion()
          Gets the current product version number.
static java.lang.String getProgramName()
          Return the IDE product'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 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 WaitCursor getWaitCursor()
           
static java.lang.String getWorkDirectory()
           
static Workspaces getWorkspaces()
          Gets the workspaces.
static boolean isQuitting()
          Returns true when the IDE is quitting.
static boolean isRunning()
          Returns true when the IDE is running, even if the IDE is just starting or quitting.
static boolean isStarting()
          Returns true when the IDE is starting up.
static HistoryList loadHistoryList(java.lang.String name)
           
static int quit(IdeAction action, Context context)
           
static void removeIdeListener(IdeListener l)
          Removes a listener to the IDE.
static void setActiveProject(Project project)
           
static void setActiveWorkspace(Workspace workspace)
           
static java.lang.String setProperty(java.lang.String key, java.lang.String value)
          Sets the IDE property indicated by the specified key.
static void startup(IdeArgs args)
           
static void startup(IdeCore core, IdeArgs args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getVersion

public static float getVersion()
Gets the current IDE version number.


isRunning

public static boolean isRunning()
Returns true when the IDE is running, even if the IDE is just starting or quitting.


getMainWindow

public static IdeMainWindow getMainWindow()
Gets the IdeMainWindow instance.


getIdeArgs

public static IdeArgs getIdeArgs()

getProductVersion

public static java.lang.String getProductVersion()
Gets the current product version number.


getBinDirectory

public static java.lang.String getBinDirectory()
Retrieve the directory the IDE was started from.

Returns:
the directory the IDE was started from (for example, C:\Oracle\JDeveloper\bin\).

getHomeDirectory

public static java.lang.String getHomeDirectory()
Retrieve the IDE install directory. The directory path will include a trailing path separator.

Returns:
the full pathname of the root directory where the IDE-based product is installed. (for example, C:\Oracle\JDeveloper\, or /opt/JDeveloper/)

getOracleHomeDirectory

public static java.lang.String getOracleHomeDirectory()
Returns the Oracle products install directory. This is the parent directory of the IDE product's home directory.


getLibDirectory

public static java.lang.String getLibDirectory()
Retrieve the IDE lib directory. The directory path will include a trailing path separator.

Returns:
the full pathname of the IDE product's lib directory. (for example, C:\Oracle\JDeveloper50\lib\, or /opt/JDeveloper50/lib/)

getUserHomeDirectory

public static java.lang.String getUserHomeDirectory()
Get the directory where the user specific files will reside. This is mainly the system, and mywork directories.

Returns:
The full pathname to the user-specific home directory.

getTrueUserHomeDirectory

public static java.lang.String getTrueUserHomeDirectory()
Get the user's actual home directory, represented by the "user.home" system property. If the user.home property is not set, then this method returns the same value as getUserHomeDirectory().

Returns:
The full pathname to the user's home directory.

getSystemDirectory

public static java.lang.String getSystemDirectory()
Returns:
the full pathname of the 'System' directory which is the root directory for all system property files.

getWorkDirectory

public static java.lang.String getWorkDirectory()
Returns:
the full pathname of the 'MyWork' directory which is the root directory for all source files built by user projects.

getProgramName

public static java.lang.String getProgramName()
Return the IDE product's full program name.


getIdeProperties

public static IdeProperties getIdeProperties()

getProperty

public static java.lang.String getProperty(java.lang.String key)
Gets the IDE property indicated by the specified key.

Parameters:
key - the name of the IDE property.
Returns:
the string value of the IDE property, or null if there is no property with that key.
See Also:
setProperty(java.lang.String, java.lang.String)

getProperty

public static java.lang.String getProperty(java.lang.String key,
                                           java.lang.String def)
Gets the IDE property indicated by the specified key.

Parameters:
key - the name of the IDE property.
def - a default value.
Returns:
the string value of the IDE property, or the default value if there is no property with that key.
See Also:
setProperty(java.lang.String, java.lang.String)

setProperty

public static java.lang.String setProperty(java.lang.String key,
                                           java.lang.String value)
Sets the IDE property indicated by the specified key.

Parameters:
key - the name of the IDE property.
value - the value of the IDE property.
Returns:
the previous value of the IDE property, or null if it did not have one.
See Also:
getProperty(java.lang.String)

getWaitCursor

public static WaitCursor getWaitCursor()

getVersionInfo

public static ComponentVersionManager getVersionInfo()

getSettings

public static IdeSettings getSettings()

getKeyStrokeContextRegistry

public static KeyStrokeContextRegistry getKeyStrokeContextRegistry()

getEnvironOptions

public static EnvironOptions getEnvironOptions()

getDTCache

public static DTCache getDTCache()

getSystem

public static IdeSystem getSystem()
Gets the user's system. The workspace contains all the users work, settings,giving him access to the database and repositories.

Returns:
the user's system.

getWorkspaces

public static Workspaces getWorkspaces()
Gets the workspaces.

Returns:
the user's workspaces.

getActiveWorkspace

public static Workspace getActiveWorkspace()
Returns the currently active Workspace. If there is no currently active Workspace, this method will return null.


setActiveWorkspace

public static void setActiveWorkspace(Workspace workspace)

getActiveProject

public static Project getActiveProject()
Returns the currently active Project. If there is no currently active Project, this method will return null.


setActiveProject

public static void setActiveProject(Project project)

getDefaultProject

public static Project getDefaultProject()
Gets the default project node

Returns:
the default project node

getDefaultWorkspace

public static Workspace getDefaultWorkspace()

getMiscellaneousFolder

public static MiscellaneousFolder getMiscellaneousFolder()
Gets the miscellaneous files folder. Creates it if folder is not yet available.

Returns:
the miscellaneous files folder

addToMiscellaneousFolder

public static boolean addToMiscellaneousFolder(Element element)
Adds an 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.


addIdeListener

public static void addIdeListener(IdeListener l)
Adds a listener to the IDE.

See Also:
IdeListener

removeIdeListener

public static void removeIdeListener(IdeListener l)
Removes a listener to the IDE.

See Also:
IdeListener

getIdeInputMap

public static javax.swing.InputMap getIdeInputMap()
Returns an InputMap for the IDE's accelerator keys. If this method is called before the main window is created it throws an exception.


getIdeActionMap

public static javax.swing.ActionMap getIdeActionMap()
Returns an ActionMap for the IDE's accelerator keys. If this method is called before the main window is created it returns any action map.


isQuitting

public static boolean isQuitting()
Returns true when the IDE is quitting.


isStarting

public static boolean isStarting()
Returns true when the IDE is starting up. Returns false all other times.


findCmdID

public static java.lang.Integer findCmdID(java.lang.String commandName)
If the specified String is associated with a command ID number, that number is returned as an Integer. If no assocation exists, null is returned.


findCmdName

public static java.lang.String findCmdName(int cmdID)
Find the command name associated with the specified id.


createCmdID

public static int createCmdID(java.lang.String commandName)
Returns:
a command id used to identify a system command. System commands are recorded in a hashtable because they can be overriden by specifying a different command class in the addins.properties file.

findOrCreateCmdID

public static int findOrCreateCmdID(java.lang.String commandName)
This is the primary method that addins should use to allocate a command ID for actions that will be handled by a Controller. For the specified String, this method will return either an existing command ID number if such a number has already been allotted for the String or a new command ID.


getMacros

public static java.util.Map getMacros()
Gets the default Map of the macros in use by the IDE.

Returns:
Map of IDE macros

quit

public static int quit(IdeAction action,
                       Context context)

getMenubar

public static Menubar getMenubar()
Gets the menubar. The menubar is a singleton object used to add menus to the ide main window.

Returns:
the menu bar.

getToolbar

public static Toolbar getToolbar()
Gets the Toolbar. The toolbar is a singleton object used to add tools to the ide main window toolbar.

Returns:
the toolbar.

getStatusBar

public static StatusBar getStatusBar()
Gets the StatusBar instance.


getLastActiveNavigator

public static NavigatorWindow getLastActiveNavigator()

loadHistoryList

public static HistoryList loadHistoryList(java.lang.String name)

startup

public static void startup(IdeArgs args)

startup

public static void startup(IdeCore core,
                           IdeArgs args)

Extension SDK

 

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