com.ibm.designer.domino.xsp.palette
Class AbstractXPDropAction

java.lang.Object
  extended by org.eclipse.core.commands.common.EventManager
      extended by org.eclipse.jface.action.AbstractAction
          extended by org.eclipse.jface.action.Action
              extended by com.ibm.etools.xve.palette.PaletteDropAction
                  extended by com.ibm.designer.domino.xsp.palette.AbstractXPDropAction
All Implemented Interfaces:
org.eclipse.jface.action.IAction

public abstract class AbstractXPDropAction
extends com.ibm.etools.xve.palette.PaletteDropAction

A base drop action for XPages control being inserted from the Controls Palette. It is suggested that clients extend com.ibm.designer.domino.xsp.api.palette.XPDropAction rather than extending this class. Clients may also extend this class, but need to be aware that functionality such as selecting the tag after it is inserted is not easily achievable without using XPDropAction.


Field Summary
 
Fields inherited from interface org.eclipse.jface.action.IAction
AS_CHECK_BOX, AS_DROP_DOWN_MENU, AS_PUSH_BUTTON, AS_RADIO_BUTTON, AS_UNSPECIFIED, CHECKED, DESCRIPTION, ENABLED, HANDLED, IMAGE, RESULT, TEXT, TOOL_TIP_TEXT
 
Constructor Summary
AbstractXPDropAction()
           
 
Method Summary
 void disposeEditorPart()
          Dispose the editor reference that is held by the drop action.
 DesignerProject getDesignerProject()
          Returns the DesignerProject that represents the current application.
 org.eclipse.ui.IEditorPart getEditorPart()
          Returns the editor part for the currently active editor.
 java.lang.String getTagName()
          Returns the tag name (XML local name) of the tag being dropped from the palette.
 java.lang.String getUri()
          Returns the URI that corresponds to the tag/control being dropped.
 void setDesignerProject(DesignerProject designerProject)
          Sets the DesignerProject for the current action.
 void setEditorPart(org.eclipse.ui.IEditorPart editor)
          Sets the editor associated with this action.
 void setTagName(java.lang.String tagName)
          Set the tag name that is to be inserted in the page.
 void setUri(java.lang.String uri)
          Set the URI corresponding to the tag that is to be inserted in the page.
 
Methods inherited from class com.ibm.etools.xve.palette.PaletteDropAction
getCommandStack, getControl, getDocument, getEvent, getPosition, getProperties, getSelectionMediator, getTagname, setCommandStack, setControl, setDocument, setEvent, setPosition, setSelectionMediator
 
Methods inherited from class org.eclipse.jface.action.Action
convertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, isHandled, notifyResult, removeAcceleratorText, removeMnemonics, run, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText
 
Methods inherited from class org.eclipse.jface.action.AbstractAction
addPropertyChangeListener, firePropertyChange, firePropertyChange, removePropertyChangeListener
 
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.action.IAction
addPropertyChangeListener, removePropertyChangeListener
 

Constructor Detail

AbstractXPDropAction

public AbstractXPDropAction()
Method Detail

getDesignerProject

public DesignerProject getDesignerProject()
Returns the DesignerProject that represents the current application.

Returns:
returns the current DesignerProject
See Also:
DesignerProject

getEditorPart

public org.eclipse.ui.IEditorPart getEditorPart()
Returns the editor part for the currently active editor.

Returns:
editor part associated with this command, will not be null.

getTagName

public java.lang.String getTagName()
Returns the tag name (XML local name) of the tag being dropped from the palette.

Returns:
an XML local tag name

getUri

public java.lang.String getUri()
Returns the URI that corresponds to the tag/control being dropped.

Returns:
a qualified namespace URI

setDesignerProject

public void setDesignerProject(DesignerProject designerProject)
Sets the DesignerProject for the current action.

Parameters:
designerProject - a DesignerProject representing the current Application
See Also:
DesignerProject

setEditorPart

public void setEditorPart(org.eclipse.ui.IEditorPart editor)
Sets the editor associated with this action.

Parameters:
editor, - may not be null
Throws:
java.lang.NullPointerException - throws a NullPointerException if the IEditorPart parameter is NULL

setTagName

public void setTagName(java.lang.String tagName)
Set the tag name that is to be inserted in the page.

Parameters:
tagName -

setUri

public void setUri(java.lang.String uri)
Set the URI corresponding to the tag that is to be inserted in the page.

Parameters:
uri -

disposeEditorPart

public void disposeEditorPart()
Dispose the editor reference that is held by the drop action. Remove the reference to the 'control' which is typically a GEF edit part (which in turn has a handle to the editor) Should be called after the action is complete.