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. This construtors of this class are not thread safe except for the copy constructor IdeContext(Context)
. If you are looking for a thread safe context, please use DefaultContext.DefaultContext(oracle.ide.addin.View, oracle.ide.model.Workspace, oracle.ide.model.Project, oracle.ide.model.Element[], oracle.ide.model.Document, oracle.ide.model.Element)
instead.
Methods inherited from class oracle.ide.addin.DefaultContext |
areMultipleDocumentsSelected, getDocument, getElement, getEvent, getExtraData, getProject, getSelection, getView, getWorkspace, makeCopy, 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)
-
- Specified by:
findOwner
in interface Context
- 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.
Copyright © 1997, 2004, Oracle. All rights reserved.