Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.wst.server.ui.editor
Class ServerEditorPart

    java.lang.Object
      EditorPart
          org.eclipse.wst.server.ui.editor.ServerEditorPart

    public abstract class ServerEditorPart

extends EditorPart

An abstract server editor which implements the most common methods from IEditorPart. This class also provides each editor page with an error message which will be displayed on the status bar of the editor.

Since:
  1.0

Field Summary
`static int` | `PROP_ERROR` Property change id for the error message.

Constructor Summary
`ServerEditorPart()` Create a new server editor part.

Method Summary
`void` | `dispose()` Dispose of the editor.
`void` | `doSave(IProgressMonitor monitor)`
`void` | `doSaveAs()`
`void` | `execute(IUndoableOperation operation)` Executes the given operation and adds it to the operation history with the correct context.
`java.lang.String` | `getErrorMessage()` Return the error message for this page.
`IStatus[]` | `getSaveStatus()` Returns error or status messages that will be displayed when the server resource is saved.
`IServerWorkingCopy` | `getServer()` Return the server that is being edited.
`void` | `init(IEditorSite site, IEditorInput input)`
`void` | `insertSections(Composite parent, java.lang.String id)` Inserts editor sections into the given composite.
`boolean` | `isDirty()`
`boolean` | `isSaveAsAllowed()`
`void` | `setErrorMessage(java.lang.String error)` Set an error message for this page.
`void` | `updateErrorMessage()` Updates the error message shown in the editor.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### PROP_ERROR

    public static final int PROP_ERROR

  Property change id for the error message.

  See Also:
    Constant Field Values

Constructor Detail

### ServerEditorPart

    public ServerEditorPart()

  Create a new server editor part.

Method Detail

### doSave

    public void doSave(IProgressMonitor monitor)

  See Also:
    `org.eclipse.ui.IEditorPart#doSave(IProgressMonitor)`

### doSaveAs

    public void doSaveAs()

  See Also:
    `org.eclipse.ui.IEditorPart#doSaveAs()`

### isDirty

    public boolean isDirty()

  See Also:
    `org.eclipse.ui.IEditorPart#isDirty()`

### isSaveAsAllowed

    public boolean isSaveAsAllowed()

  See Also:
    `org.eclipse.ui.IEditorPart#isSaveAsAllowed()`

### setErrorMessage

    public void setErrorMessage(java.lang.String error)

  Set an error message for this page.

  Parameters:
    `error` - the error message
  See Also:
    `Use forms UI based for errors via {@link org.eclipse.ui.forms.IMessageManager} on the message form instead of this method`

### updateErrorMessage

    public void updateErrorMessage()

  Updates the error message shown in the editor.

  See Also:
    `Use forms UI based for errors via {@link org.eclipse.ui.forms.IMessageManager} on the message form instead of this method`

### getErrorMessage

    public java.lang.String getErrorMessage()

  Return the error message for this page.

  Returns:
    the error message
  See Also:
    `Use forms UI based for errors via {@link org.eclipse.ui.forms.IMessageManager} on the message form instead of this method`

### getSaveStatus

    public IStatus[] getSaveStatus()

  Returns error or status messages that will be displayed when the server resource is saved. If there are any error messages, the user will be unable to save the editor.

  Returns:
    a set of status
  See Also:
    `Use forms UI based for errors via {@link org.eclipse.ui.forms.IMessageManager} on the message form instead of this method`

### init

    public void init(IEditorSite site,
                     IEditorInput input)

  See Also:
    `org.eclipse.ui.IEditorPart#init(org.eclipse.ui.IEditorSite, org.eclipse.ui.IEditorInput)`

### execute

    public void execute(IUndoableOperation operation)

  Executes the given operation and adds it to the operation history with the correct context.

  Parameters:
    `operation` - an operation ready to be executed

### getServer

    public IServerWorkingCopy getServer()

  Return the server that is being edited.

  Returns:
    a server working copy

### insertSections

    public void insertSections(Composite parent,
                               java.lang.String id)

  Inserts editor sections into the given composite.

  Parameters:
    `parent` - the composite to add the section(s) to
    `id` - the section insertion id

### dispose

    public void dispose()

  Dispose of the editor.

Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD