|
Extension SDK 10.1.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.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_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 |
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 |
areExtensionsLoaded()
Have all extenions that are marked for loading been been load |
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 |
static AddinManager |
getAddinManager()
The AddinManager class is a singleton class. |
java.lang.String |
getCommand(int commandID,
java.lang.String defaultCommand)
|
java.lang.String |
getCommand(java.lang.String commandName,
java.lang.String defaultCommand)
|
java.util.List |
getGroup(java.lang.String name)
Get the extension group(s). |
static AddinManager |
getInstance()
The AddinManager class is a singleton class. |
java.util.Properties |
getProductProperties()
Load the addins.properties file. |
WebUpdateManager |
getWebUpdateManager()
Get the web update manager. |
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. |
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_PRODUCT_POSTFIX
public static final java.lang.String ADDIN_USER_POSTFIX
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 SYSTEM_EXTENSION
public static final java.lang.String MY_EXTENSION
Method Detail |
public static AddinManager getInstance()
AddinManager
class is a singleton class. The static member
instance
holds the class single instance.
AddinManager
class single instance.public static AddinManager getAddinManager()
AddinManager
class is a singleton class. The static member
instance
holds the class single instance.
AddinManager
instance.public boolean areExtensionsLoaded()
true
extensions loaded; false
extensions not loaded.public final java.util.Properties getProductProperties()
null
empty if file has not been
loaded and parsed.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 calledpublic 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 null
public Addin getAddin(java.lang.String className)
public void addAddin(Addin addin)
public void setWebUpdateManager(WebUpdateManager wum)
wum
- public WebUpdateManager getWebUpdateManager()
public java.util.List getGroup(java.lang.String name)
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.