|
Extension SDK | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectoracle.ide.AddinManager
The AddinManager class is responsible for loading extensions
(Addins) to the IDE. The most common use of the AddinManager
for Addin developers is to obtain an instance of an Addin.
Example:
AddinManager am = AddinManager.getInstance();
Addin myAddin = am.getAddin("oracle.jdeveloper.cm.dt.ConnectionAddin");
try
{
ConnectionAddin ca = (ConnectionAddin) myAddin;
ca.someMethodOnMyAddin();
}
catch (ClassCastException ex)
{
handleError(ex);
}
The AddinManager uses the data files core-addins.xml
and addins.xml located in the
${JDEV_HOME}/bin directory to obtain the list of addins
to load. An additional data file, user-addins.xml,
located in the ${JDEV_HOME}/system directory and containing
user specific addins is loaded last.
Addin| Field Summary | |
static java.lang.String |
ADDIN_CORE_POSTFIX
Postfix used to build the addins-core.properties file. |
static java.lang.String |
ADDIN_CORE_XML_FILE
Constant: core-addins properties file. |
static java.lang.String |
ADDIN_PRODUCT_POSTFIX
Postfix used to build the addins.properties file. |
static java.lang.String |
ADDIN_PRODUCT_XML_FILE
Constant: product addins properties file. |
static java.lang.String |
ADDIN_PROPERTIES_DIR_PROP
Constant: System property indicating location of addin properties |
static java.lang.String |
ADDIN_PROPERTIES_FILE_EXT
Addins properties file extension. |
static java.lang.String |
ADDIN_PROPERTIES_PREFIX_PROP
System property indicating a prefix used in naming the the addins files. |
static java.lang.String |
ADDIN_USER_POSTFIX
Postfix used to build the addins-user.properties file. |
static java.lang.String |
ADDIN_USER_XML_FILE
Constant: user-addins properties file. |
static java.lang.String |
ADDIN_XML_DIR_PROP
Constant: System property indicating location of addin properties |
static java.lang.String |
ADDIN_XML_FILE_EXT
Addins xml file extension. |
static java.lang.String |
MY_EXTENSION
|
static java.lang.String |
QUIET_START_PROP
Constant: If defined, addin initialization times are not shown. |
static java.lang.String |
SYSTEM_EXTENSION
|
| Method Summary | |
void |
addAddin(Addin addin)
Allow a addin which as already been initialized to be added to the AddinManager. |
boolean |
addinsInitialized(java.lang.String name)
Are the addins for dependency name initialized. |
boolean |
canShutdown()
Called before the IDE is shutting down. |
java.util.List |
findAddins(java.lang.String name)
Find initialized and non-intialized addins for which |
Addin |
getAddin(java.lang.Class clazz)
Returns the Addin instance for the given class name. |
Addin |
getAddin(java.lang.String className)
Returns the first addin whos class is assignable from the given class name |
java.lang.String |
getCommand(int commandID,
java.lang.String defaultCommand)
|
java.lang.String |
getCommand(java.lang.String commandName,
java.lang.String defaultCommand)
|
static AddinManager |
getInstance()
The Features class is a singleton class. |
java.util.Properties |
getProductProperties()
Load the addins.properties file. |
WebUpdateManager |
getWebUpdateManager()
Get the web update manager. |
void |
initCoreAddins()
Creates and initializes the addins recorded in the file addins-core.xml. |
void |
initProductAddins(java.lang.String prefix)
Creates and initializes the addins recorded in addins.xml that are signified by the specified
key. |
void |
initProductAndUserAddins()
Creates and initializes the addins recorded in the file addins.xml and addins-user.xml. |
boolean |
registerAddin(java.lang.String clazz,
boolean quietStart)
Registers an Addin with the AddinManager. |
void |
registerExtensionHandler(java.lang.String xmlTag,
ExtensionTagHandler handler)
Register xml extension tag handler. |
void |
setWebUpdateManager(WebUpdateManager wum)
Set the web update manager. |
void |
shutdown()
Called when the IDE is shutting down. |
void |
useMinSetofAddins()
Enables the IDE to be invoked with no UI |
| 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 ADDIN_PROPERTIES_FILE_EXT
public static final java.lang.String ADDIN_XML_FILE_EXT
public static final java.lang.String ADDIN_CORE_POSTFIX
public static final java.lang.String ADDIN_PRODUCT_POSTFIX
public static final java.lang.String ADDIN_USER_POSTFIX
public static final java.lang.String ADDIN_CORE_XML_FILE
public static final java.lang.String ADDIN_PRODUCT_XML_FILE
public static final java.lang.String ADDIN_USER_XML_FILE
public static final java.lang.String ADDIN_PROPERTIES_DIR_PROP
public static final java.lang.String ADDIN_XML_DIR_PROP
public static final java.lang.String ADDIN_PROPERTIES_PREFIX_PROP
AddinManager builds the addins file names as
follows:
public static final java.lang.String QUIET_START_PROP
public static final java.lang.String SYSTEM_EXTENSION
public static final java.lang.String MY_EXTENSION
| Method Detail |
public static AddinManager getInstance()
Features class is a singleton class. The static member
instance holds the class single instance.
Features class single instance.public final java.util.Properties getProductProperties()
null empty if file has not been
loaded and parsed.public final void initCoreAddins()
addins-core.xml.
public final void initProductAndUserAddins()
addins.xml and addins-user.xml.
public final void initProductAddins(java.lang.String prefix)
addins.xml that are signified by the specified
key.
prefix - The string prefix to prepend to the property names that
identify which addins to load; the prefix may not be
null.
public final void registerExtensionHandler(java.lang.String xmlTag,
ExtensionTagHandler handler)
xmlTag - xml element tag on which the handler will be called
public boolean registerAddin(java.lang.String clazz,
boolean quietStart)
Addin with the AddinManager.
The addin class clazz will be loaded, and then the
Addin method initialize will be invoked on the
newly created addin. An Addin or other class can use this
method to register addins after the IDE has already started up. The
AddinManager will be responsible for the
shutdown notification to the newly registered
Addin when the IDE is exiting.
clazz - The class name of the Addin to registerquietStart - if true then a diagnostic message using
the Assert class will be displayed with
the class name of the Addin, as well as
the startup time.
Addin,
Assert.println(java.lang.String)public java.util.List findAddins(java.lang.String name)
public boolean addinsInitialized(java.lang.String name)
name initialized. If
name is not a dependency for any addin then true is returned.
If name is a dependency for more than one addin and only some
addins are initialized then true is returned.
public final java.lang.String getCommand(java.lang.String commandName,
java.lang.String defaultCommand)
public final java.lang.String getCommand(int commandID,
java.lang.String defaultCommand)
public final void shutdown()
public final boolean canShutdown()
false from the
Addin.canShutdown method.
public Addin getAddin(java.lang.Class clazz)
Addin instance for the given class name. The
class may be either an interface or an addin implementation, but no match
will be found if it is a superclass of an implementation.
clazz - The class name of the Addin to return.
Addin if it exists,
otherwise nullpublic Addin getAddin(java.lang.String className)
public void addAddin(Addin addin)
public void useMinSetofAddins()
public void setWebUpdateManager(WebUpdateManager wum)
wum - public WebUpdateManager getWebUpdateManager()
|
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.