com.bbn.swede.editor
Class OWLVisualEditor

java.lang.Object
  extended byEditorPart
      extended bycom.bbn.swede.editor.OWLVisualEditor
All Implemented Interfaces:
IOASTChangeListener
Direct Known Subclasses:
DumpOnt, RestrictionEditor

public abstract class OWLVisualEditor
extends EditorPart
implements IOASTChangeListener

Abstract base class for OWL visual editors. All extenders of com.bbn.swede.editors.visualEditor must provide an implementation of this class. Visual editors appear as tabs in the OWL editor and are automatically registered for change notifications with the document's OAST.

Author:
jlerner
See Also:
Serialized Form

Constructor Summary
OWLVisualEditor()
           
 
Method Summary
 void addSelectionChangedListener(ISelectionChangedListener listener)
           
 void doSave(IProgressMonitor monitor)
           
 void doSaveAs()
           
 IOWLAbstractSyntaxTree getOAST()
          Retrieves the OAST for the editor's document.
 ISelection getSelection()
           
 void init(IEditorSite site, IEditorInput input)
           
protected  boolean isActivePage()
          Indicates whether this editor is the currently active page.
 boolean isDirty()
           
 boolean isSaveAsAllowed()
           
 void removeSelectionChangedListener(ISelectionChangedListener listener)
           
 void setFocus()
           
 void setSelection(ISelection selection)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.bbn.swede.core.dom.IOASTChangeListener
oastChanged
 

Constructor Detail

OWLVisualEditor

public OWLVisualEditor()
Method Detail

doSave

public void doSave(IProgressMonitor monitor)

doSaveAs

public void doSaveAs()

init

public void init(IEditorSite site,
                 IEditorInput input)
          throws PartInitException
Throws:
PartInitException

isDirty

public boolean isDirty()

isSaveAsAllowed

public boolean isSaveAsAllowed()

getOAST

public IOWLAbstractSyntaxTree getOAST()
Retrieves the OAST for the editor's document.

Returns:
The document's OAST

setFocus

public void setFocus()

getSelection

public ISelection getSelection()

addSelectionChangedListener

public void addSelectionChangedListener(ISelectionChangedListener listener)

removeSelectionChangedListener

public void removeSelectionChangedListener(ISelectionChangedListener listener)

setSelection

public void setSelection(ISelection selection)

isActivePage

protected boolean isActivePage()
Indicates whether this editor is the currently active page. Visual editors with expensive processing can use this check to suppress updates while they are not visible.

Returns:
true if this is the active page, false if not.


Copyright © 2004-2005 BBN Technologies. All Rights Reserved.