Extension SDK 10.1.3.36.73

oracle.ide
Class Ide

java.lang.Object
  extended byoracle.ide.Ide

public final class Ide
extends java.lang.Object

This class is responsible for coordinating startup of the IDE.


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 boolean canRestart()
          Get whether the IDE is capable of being restarted.
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()
          Gets the default Workspace
static DTCache getDTCache()
          Gets the DTCache
static EnvironOptions getEnvironOptions()
          Gets the EnvironOptions
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()
          Gets the {@link IdeArgs)
static Controller getIdeController()
          Internal only.
static javax.swing.InputMap getIdeInputMap()
          Returns an InputMap for the IDE's accelerator keys.
static IdeProperties getIdeProperties()
          Gets the IdeProperties instance
static java.lang.String getInstallDirectory(java.io.File systemDir)
          Gets the install directory
static KeyStrokeContextRegistry getKeyStrokeContextRegistry()
          Gets the KeyStrokeContextRegistry
static NavigatorWindow getLastActiveNavigator()
          Gets the NavigatorWindow of the last active navigator.
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 getProductID()
          Gets the extension ID of the current product.
static java.lang.String getProductVersion()
          Gets a human readable description of the product name and version.
static java.lang.String getProgramName()
          Return the IDE product's full program name.
static java.lang.String getProgramShortName()
          Returns the short name of the product.
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()
          Gets the IdeSettings
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()
          Gets the ComponentVersionManager
static WaitCursor getWaitCursor()
          Gets the WaitCursor
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)
          Loads the history list
static int quit()
          Perform a controlled shut down of the IDE.
static int quit(IdeAction action, Context context)
          Perform a controlled shut down of the IDE.
static void removeIdeListener(IdeListener l)
          Removes a listener to the IDE.
static void restart()
          Restarts the product with the exact same arguments as this instance of the product was started with.
static void setActiveProject(Project project)
          Sets the active project
static void setActiveWorkspace(Workspace workspace)
          Sets the active 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)
          Used to startup the IDE
static void startup(IdeCore core, IdeArgs args)
          Used to startup the IDE
 
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. You should not rely on a specific value being returned from this method since JDeveloper's version number cannot accurately be represented using a float.

However, we do guarantee that for builds a and b of JDeveloper, where b is a later minor release of the same major release or a later major release that b.getVersion() > a.getVersion().

For a more accurate representation of the product version, use getProductVersion().

Returns:
a float value indicating which version of JDeveloper this is.

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()
Gets the {@link IdeArgs)

Returns:
the IdeArgs

getProductID

public static java.lang.String getProductID()
Gets the extension ID of the current product. This value may be used when retrieving detailed version information from the AddinManager.


getProductVersion

public static java.lang.String getProductVersion()
Gets a human readable description of the product name and version. This is suitable only for text in dialogs, etc. The value returned is not necessarily suitable for parsing out a reliable version.


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.

Returns:
the name of the product.

getProgramShortName

public static java.lang.String getProgramShortName()
Returns the short name of the product.

Returns:
the short name of the product.

getIdeProperties

public static IdeProperties getIdeProperties()
Gets the IdeProperties instance

Returns:
the ide properties

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(String)

getWaitCursor

public static WaitCursor getWaitCursor()
Gets the WaitCursor

Returns:
the wait cursor

getVersionInfo

public static ComponentVersionManager getVersionInfo()
Gets the ComponentVersionManager

Returns:
the component version manager

getSettings

public static IdeSettings getSettings()
Gets the IdeSettings

Returns:
the ide settings

getKeyStrokeContextRegistry

public static KeyStrokeContextRegistry getKeyStrokeContextRegistry()
Gets the KeyStrokeContextRegistry

Returns:
the key stroke context registry

getEnvironOptions

public static EnvironOptions getEnvironOptions()
Gets the EnvironOptions

Returns:
the environ options

getDTCache

public static DTCache getDTCache()
Gets the DTCache

Returns:
the design-time cache

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)
Sets the active workspace

Parameters:
workspace - to set as the active 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)
Sets the active project

Parameters:
project - to set as the active project

getDefaultProject

public static Project getDefaultProject()
Gets the default project node

Returns:
the default project node

getDefaultWorkspace

public static Workspace getDefaultWorkspace()
Gets the default Workspace

Returns:
the default workspace

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)
Perform a controlled shut down of the IDE.

Parameters:
action - the action to shut down with.
context - the context in which to shut down
Returns:

quit

public static int quit()
Perform a controlled shut down of the IDE.


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()
Gets the NavigatorWindow of the last active navigator.

Returns:
the last active navigator window; may return null

loadHistoryList

public static HistoryList loadHistoryList(java.lang.String name)
Loads the history list

Parameters:
name -
Returns:
the HistoryList

startup

public static void startup(IdeArgs args)
Used to startup the IDE

Parameters:
args -

startup

public static void startup(IdeCore core,
                           IdeArgs args)
Used to startup the IDE

Parameters:
core -
args -

getIdeController

public static Controller getIdeController()
Internal only. Do not use.


getInstallDirectory

public static java.lang.String getInstallDirectory(java.io.File systemDir)
Gets the install directory

Parameters:
systemDir -
Returns:
string that represents the install directory

canRestart

public static final boolean canRestart()
Get whether the IDE is capable of being restarted. Support for automatic restart is platform dependent.

Note that a return value of true does not guarantee that a call to restart() will be successful. However, it does provide immediate information about whether restarting is supported at all on the current platform prior to actually calling restart().

Returns:
true if the IDE can be restarted on the current platform.

restart

public static final void restart()
                          throws java.lang.UnsupportedOperationException
Restarts the product with the exact same arguments as this instance of the product was started with. The implementation of this method is platform specific and it therefore may not work on all platforms. To determine whether restarting is supported on the current platform, call canRestart().

Throws:
java.lang.UnsupportedOperationException - if restarting is not possible.

Extension SDK 10.1.3.36.73

 

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