oracle.ide
Class IdeContext
java.lang.Object
|
+--oracle.ide.addin.DefaultContext
|
+--oracle.ide.IdeContext
- All Implemented Interfaces:
- Context
- public class IdeContext
- extends DefaultContext
IdeContext provides information about the state of the IDE at the
time of Context creation. From this interface, Wizards and other classes
receiving IDE actions can determine the Workspace
,
Project
and any selected Element
s upon which they
are expected to act.
Methods inherited from class oracle.ide.addin.DefaultContext |
areMultipleDocumentsSelected, getDocument, getElement, getEvent, getExtraData, getProject, getSelection, getView, getWorkspace, setDocument, setElement, setEvent, setExtraData, setProject, setSelection, setView, setWorkspace |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IdeContext
public IdeContext()
- Default constructor. Initializes the state to the active Workspace, its
active Project, the MainWindow's last active View, and the selection of
Element held by that View.
IdeContext
public IdeContext(Context context)
- Copy constructor. Peforms a shallow copy of the given Context. If the
context passed in is null, it creates an empty context. Caller is
responsible for initializing the newly created context.
IdeContext
public IdeContext(Element element)
- Constructor. Calls the default constructor, then substitutes the Element
provided as the selection.
- See Also:
DefaultContext.getSelection()
,
Node
IdeContext
public IdeContext(Document document)
- Constructor. Calls the default constructor, then substitutes the Document
provided as the selection.
- See Also:
DefaultContext.getSelection()
,
Node
IdeContext
public IdeContext(View view)
- Constructor. Calls the default constructor, then substitutes the View
provided as the active View for this Context. In addition, it will
substitute the Element selection of the View as the selection.
- See Also:
DefaultContext.getSelection()
,
DefaultContext.getView()
,
View
,
Element
IdeContext
public IdeContext(View view,
java.util.EventObject event)
- Constructor. Calls the constructor which takes a View as argument, then
sets the EventObject to the value received as argument.
- See Also:
IdeContext(View)
,
DefaultContext.getEvent()
findOwner
public final Folder findOwner(Element element)
- Overrides:
findOwner
in class DefaultContext
- Parameters:
element
- the Element being checked for removal from this folder- Returns:
- the Folder that owns the specified element. In general a folder
owns an element when that folder has veto power to remove a child element.
This method will be called when
the IDE needs to determine the container on whom to call the remove,
canRemove, add, and canAdd methods.