org.eclipse.wst.sse.ui
Class StructuredTextEditor

java.lang.Object
  extended byTextEditor
      extended byorg.eclipse.wst.sse.ui.StructuredTextEditor

public class StructuredTextEditor
extends TextEditor

A Text Editor for editing structured models and structured documents.

This class is not meant to be subclassed.
New content types may associate source viewer, content outline, and property sheet configurations to extend the existing functionality.

Since:
1.0
See Also:
StructuredTextViewerConfiguration, ContentOutlineConfiguration, PropertySheetConfiguration, Serialized Form

Field Summary
static java.lang.String GROUP_NAME_ADDITIONS
          Not API.
static java.lang.String GROUP_NAME_FORMAT
          Not API.
static java.lang.String GROUP_NAME_FORMAT_EXT
          Not API.
 
Constructor Summary
StructuredTextEditor()
          Creates a new Structured Text Editor.
 
Method Summary
 void close(boolean save)
           
 void createPartControl(Composite parent)
          {@inheritDoc} Use StructuredTextViewerConfiguration if a viewerconfiguration has not already been set.
 void dispose()
           
 void doRevertToSaved()
           
 void doSave(IProgressMonitor progressMonitor)
           
 void editorContextMenuAboutToShow(IMenuManager menu)
          Sets up this editor's context menu before it is made visible.
 java.lang.Object getAdapter(java.lang.Class required)
           
 IEditorPart getEditorPart()
          Returns this editor part.
 org.eclipse.wst.sse.core.internal.provisional.IStructuredModel getModel()
          Deprecated. - This method allowed for uncontrolled access to the model instance and will be removed in the future. It is recommended that the current document provider be asked for the current document and the IModelManager then asked for the corresponding model with getExistingModelFor*(IDocument).
 int getOrientation()
           
 ISelectionProvider getSelectionProvider()
           
 org.eclipse.wst.sse.ui.internal.StructuredTextViewer getTextViewer()
          Returns the editor's source viewer.
 void init(IEditorSite site, IEditorInput input)
           
 void initializeDocumentProvider(IDocumentProvider documentProvider)
          Set the document provider for this editor.
 void rememberSelection()
          {@inheritDoc} Not API.
 void restoreSelection()
          {@inheritDoc} Not API.
 void safelySanityCheckState(IEditorInput input)
          {@inheritDoc} Overridden to expose part activation handling for multi-page editors.
 void setEditorPart(IEditorPart editorPart)
          Set editor part associated with this editor.
 void showBusy(boolean busy)
           
 void update()
          Update should be called whenever the model is set or changed (as in swapped) Not API.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GROUP_NAME_ADDITIONS

public static final java.lang.String GROUP_NAME_ADDITIONS
Not API. May be removed in the future.

See Also:
Constant Field Values

GROUP_NAME_FORMAT

public static final java.lang.String GROUP_NAME_FORMAT
Not API. May be removed in the future.

See Also:
Constant Field Values

GROUP_NAME_FORMAT_EXT

public static final java.lang.String GROUP_NAME_FORMAT_EXT
Not API. May be removed in the future.

See Also:
Constant Field Values
Constructor Detail

StructuredTextEditor

public StructuredTextEditor()
Creates a new Structured Text Editor.

Method Detail

close

public void close(boolean save)

createPartControl

public void createPartControl(Composite parent)
{@inheritDoc}

Use StructuredTextViewerConfiguration if a viewerconfiguration has not already been set. Also initialize StructuredTextViewer.

See Also:
org.eclipse.ui.texteditor.AbstractDecoratedTextEditor#createPartControl(org.eclipse.swt.widgets.Composite)

dispose

public void dispose()

doRevertToSaved

public void doRevertToSaved()

doSave

public void doSave(IProgressMonitor progressMonitor)

editorContextMenuAboutToShow

public void editorContextMenuAboutToShow(IMenuManager menu)
Sets up this editor's context menu before it is made visible.

Not API. May be reduced to protected method in the future.

Parameters:
menu - the menu

getAdapter

public java.lang.Object getAdapter(java.lang.Class required)

getEditorPart

public IEditorPart getEditorPart()
Returns this editor part.

Not API. May be removed in the future.

Returns:
this editor part

getModel

public org.eclipse.wst.sse.core.internal.provisional.IStructuredModel getModel()
Deprecated. - This method allowed for uncontrolled access to the model instance and will be removed in the future. It is recommended that the current document provider be asked for the current document and the IModelManager then asked for the corresponding model with getExistingModelFor*(IDocument).

Returns this editor's StructuredModel.

Not API. Will be removed in the future.

Returns:
returns this editor's IStructuredModel

getOrientation

public int getOrientation()

getSelectionProvider

public ISelectionProvider getSelectionProvider()

getTextViewer

public org.eclipse.wst.sse.ui.internal.StructuredTextViewer getTextViewer()
Returns the editor's source viewer. This method was created to expose the protected final getSourceViewer() method.

Not API. May be removed in the future.

Returns:
the editor's source viewer

init

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

initializeDocumentProvider

public void initializeDocumentProvider(IDocumentProvider documentProvider)
Set the document provider for this editor.

Not API. May be removed in the future.

Parameters:
documentProvider - documentProvider to initialize

rememberSelection

public void rememberSelection()
{@inheritDoc}

Not API. May be reduced to protected method in the future.


restoreSelection

public void restoreSelection()
{@inheritDoc}

Not API. May be reduced to protected method in the future.


safelySanityCheckState

public void safelySanityCheckState(IEditorInput input)
{@inheritDoc}

Overridden to expose part activation handling for multi-page editors.

Not API. May be reduced to protected method in the future.

See Also:
org.eclipse.ui.texteditor.AbstractTextEditor#safelySanityCheckState(org.eclipse.ui.IEditorInput)

setEditorPart

public void setEditorPart(IEditorPart editorPart)
Set editor part associated with this editor.

Not API. May be removed in the future.

Parameters:
editorPart - editor part associated with this editor

showBusy

public void showBusy(boolean busy)

update

public void update()
Update should be called whenever the model is set or changed (as in swapped)

Not API. May be removed in the future.