Extension SDK 10.1.2

oracle.ide.gallery
Class ObjectGalleryAddin

java.lang.Object
  extended byoracle.ide.gallery.GalleryManager
      extended byoracle.ide.gallery.ObjectGalleryAddin
All Implemented Interfaces:
Addin, ContextMenuListener, Controller, Module

public class ObjectGalleryAddin
extends GalleryManager
implements Controller, ContextMenuListener

Addin which glues the Object Gallery into the JDeveloper IDE.


Field Summary
static java.lang.String OBJECT_GALLERY_CMD
           
static int OBJECT_GALLERY_CMD_ID
           
 
Constructor Summary
ObjectGalleryAddin()
          Constructor
 
Method Summary
protected  void addPendingGalleryItems()
          Add all pending gallery items that were registered programmatically via the GalleryManager.
 boolean canShutdown()
          This method is invoked by the AddinManager before the IDE terminates.
 java.util.Properties getBuilderProperties()
          Get builder generator properties.
 ObjectGallery getGallery()
          Get the instance of the Object Gallery.
 boolean handleDefaultAction(Context context)
          Called when the user double clicks on an item that has a popup menu.
 boolean handleEvent(IdeAction action, Context context)
          This method is called when a user interaction with a View triggers the execution of a command.
 float ideVersion()
          This method is called to determine the ide version number for which this Addin was implemented.
 void initialize()
          Initialize the addin.
 void poppingDown(ContextMenu popup)
           
 void poppingUp(ContextMenu popup)
          Called just before the context menu is popping up.
 void registerGalleryElement(ElementInfo info)
          Register an element to be added to the gallery.
protected  void removePendingGalleryItems()
          Remove all pending gallery items that were registered programmatically via the GalleryManager.
 void shutdown()
          This method is invoked by the AddinManager when the IDE terminates.
 void unregisterGalleryElement(ElementInfo info)
          Unregister an element to be removed from the gallery.
 boolean update(IdeAction action, Context context)
          This method updates the enabled status of the specified action within the specified context.
 float version()
          This method is called to determine the Addin version number.
 
Methods inherited from class oracle.ide.gallery.GalleryManager
getGalleryManager, setGalleryManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OBJECT_GALLERY_CMD_ID

public static final int OBJECT_GALLERY_CMD_ID

OBJECT_GALLERY_CMD

public static final java.lang.String OBJECT_GALLERY_CMD
See Also:
Constant Field Values
Constructor Detail

ObjectGalleryAddin

public ObjectGalleryAddin()
Constructor

Method Detail

getGallery

public ObjectGallery getGallery()
Description copied from class: GalleryManager
Get the instance of the Object Gallery.

Specified by:
getGallery in class GalleryManager

registerGalleryElement

public void registerGalleryElement(ElementInfo info)
Register an element to be added to the gallery.

Specified by:
registerGalleryElement in class GalleryManager
Parameters:
info - information specifying the location and attributes of the new gallery element to be added.

unregisterGalleryElement

public void unregisterGalleryElement(ElementInfo info)
Unregister an element to be removed from the gallery.

Specified by:
unregisterGalleryElement in class GalleryManager
Parameters:
info - information specifying the location and attributes of the existing gallery element to be removed.

getBuilderProperties

public java.util.Properties getBuilderProperties()
Get builder generator properties. These are a set properties which are used when a gallery element is invoked. For example a code template for the new class.

Specified by:
getBuilderProperties in class GalleryManager
Returns:
property set of the generator properties

initialize

public void initialize()
Initialize the addin. The goal here is to do as little as possible that will take up time until absolutely required.

Specified by:
initialize in interface Addin
See Also:
AddinManager

canShutdown

public boolean canShutdown()
Description copied from interface: Addin
This method is invoked by the AddinManager before the IDE terminates. Addins should NOT use this method to release resources. They should only use this method to give users the opportunity to cancel the exit process if there is some process started by this addin still running. Implementations should return false to cancel the shutdown process.

Specified by:
canShutdown in interface Addin

shutdown

public void shutdown()
Description copied from interface: Addin
This method is invoked by the AddinManager when the IDE terminates. Any non java resources (file handles, database connections, etc) which are still being held by this Addin should be released by this method immediately. This method is not guaranteed to be called, but on normal terminations of the IDE, this method will be invoked.

Specified by:
shutdown in interface Addin

version

public float version()
Description copied from interface: Addin
This method is called to determine the Addin version number.

Specified by:
version in interface Addin
Returns:
the version number.

ideVersion

public float ideVersion()
Description copied from interface: Addin
This method is called to determine the ide version number for which this Addin was implemented.

Specified by:
ideVersion in interface Addin
Returns:
the ide version number.

handleEvent

public boolean handleEvent(IdeAction action,
                           Context context)
Description copied from interface: Controller
This method is called when a user interaction with a View triggers the execution of a command.

Specified by:
handleEvent in interface Controller
Parameters:
action - action whose command is to be executed.
Returns:
true if the controller handles the specified command.

update

public boolean update(IdeAction action,
                      Context context)
Description copied from interface: Controller
This method updates the enabled status of the specified action within the specified context. It should generally be called on the controller associated with the active view to allow that controller to take the first crack at determining its enabled status. If that controller wants to update its enabled status, it does so and returns true to indicate that further controllers do not need to be consulted. If the controller does not deal with setting the enabled status of an action, it delegates the request to its supervising controller, all the way up to the Ide. The Ide has a special implementation of update(xx) that further delegates the request to root controllers, until one of them returns true indicating the request was handled by the controller.

Specified by:
update in interface Controller
Parameters:
action - action whose command is to be executed.
context - the current context
Returns:
true if the controller handles the specified command.

poppingUp

public void poppingUp(ContextMenu popup)
Description copied from interface: ContextMenuListener
Called just before the context menu is popping up.

Specified by:
poppingUp in interface ContextMenuListener

poppingDown

public void poppingDown(ContextMenu popup)
Specified by:
poppingDown in interface ContextMenuListener

handleDefaultAction

public boolean handleDefaultAction(Context context)
Description copied from interface: ContextMenuListener
Called when the user double clicks on an item that has a popup menu. Only one listener should return true from this menu.

Specified by:
handleDefaultAction in interface ContextMenuListener
Parameters:
context - the current context

addPendingGalleryItems

protected void addPendingGalleryItems()
Add all pending gallery items that were registered programmatically via the GalleryManager. This is called lazily when the gallery dialog is opened, to avoid having to open the gallery file until absolutely necessary.


removePendingGalleryItems

protected void removePendingGalleryItems()
Remove all pending gallery items that were registered programmatically via the GalleryManager. This is called lazily when the gallery dialog is opened, to avoid having to open the gallery file until absolutely necessary.


Extension SDK

 

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