Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.port80.eclipse.xml.editors
Class XMLEditor  view XMLEditor download XMLEditor.java

java.lang.Object
  extended byorg.eclipse.ui.part.WorkbenchPart
      extended byorg.eclipse.ui.part.EditorPart
          extended byorg.eclipse.ui.texteditor.AbstractTextEditor
              extended byorg.eclipse.ui.texteditor.StatusTextEditor
                  extended byorg.eclipse.ui.texteditor.AbstractDecoratedTextEditor
                      extended byorg.eclipse.ui.editors.text.TextEditor
                          extended bycom.port80.eclipse.editors.util.CustomTextEditor
                              extended bycom.port80.eclipse.xml.editors.XMLEditor
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.ui.IEditorPart, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.ui.INavigationLocationProvider, org.eclipse.ui.IReusableEditor, org.eclipse.ui.ISaveablePart, org.eclipse.ui.texteditor.ITextEditor, org.eclipse.ui.texteditor.ITextEditorExtension, org.eclipse.ui.texteditor.ITextEditorExtension2, org.eclipse.ui.texteditor.ITextEditorExtension3, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2

public class XMLEditor
extends com.port80.eclipse.editors.util.CustomTextEditor


Nested Class Summary
(package private)  class XMLEditor.AddTagAction
           
(package private)  class XMLEditor.CompactFormatAction
          For now CompactFormat is same as Format.
(package private)  class XMLEditor.DeleteTagAction
           
(package private)  class XMLEditor.FormatAction
           
(package private)  class XMLEditor.SelectTagAction
           
(package private)  class XMLEditor.ValidateAction
           
 
Nested classes inherited from class org.eclipse.ui.texteditor.AbstractDecoratedTextEditor
 
Nested classes inherited from class org.eclipse.ui.texteditor.AbstractTextEditor
org.eclipse.ui.texteditor.AbstractTextEditor.AbstractSelectionChangedListener, org.eclipse.ui.texteditor.AbstractTextEditor.LineStartAction
 
Nested classes inherited from class org.eclipse.ui.texteditor.ITextEditorExtension3
org.eclipse.ui.texteditor.ITextEditorExtension3.InsertMode
 
Field Summary
private  XMLEditorConfiguration fConfig
           
private  org.eclipse.ui.IEditorInput fInput
           
private  org.w3c.dom.Document fModel
           
private  java.util.List fOutlineAttributes
           
(package private)  XMLOutlinePage fOutlinePage
           
private  org.eclipse.jface.preference.IPreferenceStore fPrefs
           
private static java.lang.String NAME
           
 
Fields inherited from class com.port80.eclipse.editors.util.CustomTextEditor
BRACKETS, fBracketPainter, fPaintManager
 
Fields inherited from class org.eclipse.ui.editors.text.TextEditor
fEncodingSupport
 
Fields inherited from class org.eclipse.ui.texteditor.AbstractDecoratedTextEditor
fAnnotationAccess, fLineNumberRulerColumn, fOverviewRuler, fSourceViewerDecorationSupport
 
Fields inherited from class org.eclipse.ui.texteditor.StatusTextEditor
 
Fields inherited from class org.eclipse.ui.texteditor.AbstractTextEditor
ACTION_MAP, DEFAULT_EDITOR_CONTEXT_MENU_ID, DEFAULT_RULER_CONTEXT_MENU_ID, fErrorLabel, PREFERENCE_COLOR_BACKGROUND, PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT, PREFERENCE_COLOR_FIND_SCOPE, PREFERENCE_COLOR_FOREGROUND, PREFERENCE_COLOR_FOREGROUND_SYSTEM_DEFAULT, PREFERENCE_COLOR_SELECTION_BACKGROUND, PREFERENCE_COLOR_SELECTION_BACKGROUND_SYSTEM_DEFAULT, PREFERENCE_COLOR_SELECTION_FOREGROUND, PREFERENCE_COLOR_SELECTION_FOREGROUND_SYSTEM_DEFAULT, PREFERENCE_FONT, PREFERENCE_NAVIGATION_SMART_HOME_END, PREFERENCE_USE_CUSTOM_CARETS, PREFERENCE_WIDE_CARET, VERTICAL_RULER_WIDTH
 
Fields inherited from class org.eclipse.ui.part.EditorPart
 
Fields inherited from class org.eclipse.ui.part.WorkbenchPart
 
Fields inherited from interface org.eclipse.ui.IEditorPart
PROP_DIRTY, PROP_INPUT
 
Fields inherited from interface org.eclipse.ui.IWorkbenchPart
PROP_TITLE
 
Fields inherited from interface org.eclipse.ui.texteditor.ITextEditorExtension3
INSERT, SMART_INSERT
 
Constructor Summary
XMLEditor()
          Constructor for SampleEditor.
 
Method Summary
private  void addPositions(org.w3c.dom.Node node, org.eclipse.jface.text.IDocument doc, int tabwidth)
           
private  boolean canDoCreateTag()
           
private  boolean canDoDeleteTag()
           
private  boolean canDoSelectTag()
           
protected  void createActions()
          Creates this editor's standard actions and connects them with the global workbench actions.
 void createModel()
           
 void createModel(boolean quiet)
           
 void dispose()
          The AbstractTextEditor implementation of this IWorkbenchPart method may be extended by subclasses.
protected  void editorContextMenuAboutToShow(org.eclipse.jface.action.IMenuManager menu)
          Sets up this editor's context menu before it is made visible.
(package private)  void error(java.lang.String message, java.lang.Exception e)
           
 java.lang.Object getAdapter(java.lang.Class adapter)
          Returns an object which is an instance of the given class associated with this object.
 XMLEditorConfiguration getConfiguration()
           
 org.w3c.dom.Node getModel()
           
(package private)  org.eclipse.jface.text.source.SourceViewer getViewer()
           
protected  void handlePreferenceStoreChanged(org.eclipse.jface.util.PropertyChangeEvent event)
          Handles a property change event describing a change of the editor's preference store and updates the preference related editor properties.
protected  void initBackground()
           
protected  void initFont()
           
protected  void initializeEditor()
          null This method configures the editor but does not define a SourceViewerConfiguration.
private  void initOutlinePreferences()
           
 void outlinePageDisposed()
           
 void refreshOutlineView()
           
 void updatePartControl(org.eclipse.ui.IEditorInput input)
          Checks if the status of the given input is OK.
 
Methods inherited from class com.port80.eclipse.editors.util.CustomTextEditor
createPartControl, doSetInput, initFont, isBracketHighlightingEnabled
 
Methods inherited from class org.eclipse.ui.editors.text.TextEditor
getStatusBanner, getStatusHeader, getStatusMessage, installEncodingSupport, isSaveAsAllowed, performSaveAs, updatePropertyDependentActions
 
Methods inherited from class org.eclipse.ui.texteditor.AbstractDecoratedTextEditor
configureSourceViewerDecorationSupport, createAnnotationAccess, createChangeHover, createChangeRulerColumn, createCompositeRuler, createLineNumberRulerColumn, createOverviewRuler, createSourceViewer, createVerticalRuler, disposeDocumentProvider, getAnnotationAccess, getAnnotationPreferenceLookup, getAnnotationPreferences, getDocumentProvider, getOverviewRuler, getSharedColors, getSourceViewerDecorationSupport, gotoMarker, hideOverviewRuler, initializeKeyBindingScopes, initializeLineNumberRulerColumn, isChangeInformationShowing, isErrorStatus, isLineNumberRulerVisible, isOverviewRulerVisible, isPrefQuickDiffAlwaysOn, setDocumentProvider, showChangeInformation, showOverviewRuler
 
Methods inherited from class org.eclipse.ui.texteditor.StatusTextEditor
createStatusControl, doRevertToSaved, sanityCheckState, updateStatusField
 
Methods inherited from class org.eclipse.ui.texteditor.AbstractTextEditor
addAction, addAction, addGroup, addRulerContextMenuListener, adjustHighlightRange, affectsTextPresentation, canHandleMove, close, configureInsertMode, createEmptyNavigationLocation, createNavigationActions, createNavigationLocation, doGetSelection, doSave, doSaveAs, doSetSelection, editorSaved, enableOverwriteMode, enableSanityChecking, enableStateValidation, firePropertyChange, getAction, getContextMenuListener, getCoverage, getCursorListener, getCursorPosition, getEditorContextMenuId, getFontPropertyPreferenceKey, getHelpContextId, getHighlightRange, getInsertMode, getLegalInsertModes, getPreferenceStore, getProgressMonitor, getRangeIndicator, getRulerContextMenuId, getRulerMouseListener, getSelectionChangedListener, getSelectionProvider, getSourceViewer, getSourceViewerConfiguration, getStatusField, getVerticalRuler, handleCursorPositionChanged, handleEditorInputChanged, handleElementContentReplaced, handleExceptionOnSave, handleInsertModeChanged, init, initializeDragAndDrop, initializeViewerColors, internalInit, isDirty, isEditable, isEditorInputModifiable, isEditorInputReadOnly, isInInsertMode, isSaveOnCloseNeeded, isVisible, markAsContentDependentAction, markAsPropertyDependentAction, markAsSelectionDependentAction, markAsStateDependentAction, markInNavigationHistory, modelOffset2WidgetOffset, performRevert, performSave, rememberSelection, removeActionActivationCode, removeRulerContextMenuListener, resetHighlightRange, restoreSelection, rulerContextMenuAboutToShow, safelySanityCheckState, selectAndReveal, selectAndReveal, setAction, setActionActivationCode, setCompatibilityMode, setDocumentProvider, setEditorContextMenuId, setFocus, setHelpContextId, setHighlightRange, setInput, setInsertMode, setKeyBindingScopes, setPreferenceStore, setRangeIndicator, setRulerContextMenuId, setSourceViewerConfiguration, setStatusField, showHighlightRangeOnly, showsHighlightRangeOnly, updateContentDependentActions, updateSelectionDependentActions, updateState, updateStateDependentActions, updateStatusFields, validateEditorInputState, validateState, widgetOffset2ModelOffset
 
Methods inherited from class org.eclipse.ui.part.EditorPart
getEditorInput, getEditorSite, getTitleToolTip, setContentDescription, setInitializationData, setPartName
 
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPropertyListener, getConfigurationElement, getContentDescription, getDefaultImage, getPartName, getSite, getTitle, getTitleImage, removePropertyListener, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.ui.IEditorPart
getEditorInput, getEditorSite
 
Methods inherited from interface org.eclipse.ui.IWorkbenchPart
addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener
 

Field Detail

NAME

private static final java.lang.String NAME
See Also:
Constant Field Values

fConfig

private XMLEditorConfiguration fConfig

fInput

private org.eclipse.ui.IEditorInput fInput

fPrefs

private org.eclipse.jface.preference.IPreferenceStore fPrefs

fModel

private org.w3c.dom.Document fModel

fOutlineAttributes

private java.util.List fOutlineAttributes

fOutlinePage

XMLOutlinePage fOutlinePage
Constructor Detail

XMLEditor

public XMLEditor()
Constructor for SampleEditor.

Method Detail

initOutlinePreferences

private void initOutlinePreferences()

updatePartControl

public void updatePartControl(org.eclipse.ui.IEditorInput input)
Description copied from class: org.eclipse.ui.texteditor.StatusTextEditor
Checks if the status of the given input is OK. If not the status control is shown rather than the default control.


dispose

public void dispose()
Description copied from class: org.eclipse.ui.texteditor.AbstractTextEditor
The AbstractTextEditor implementation of this IWorkbenchPart method may be extended by subclasses. Subclasses must call super.dispose().

Note that many methods may return null after the editor is disposed.


getConfiguration

public XMLEditorConfiguration getConfiguration()

getViewer

org.eclipse.jface.text.source.SourceViewer getViewer()

getModel

public org.w3c.dom.Node getModel()

createModel

public void createModel()

createModel

public void createModel(boolean quiet)

refreshOutlineView

public void refreshOutlineView()

outlinePageDisposed

public void outlinePageDisposed()

getAdapter

public java.lang.Object getAdapter(java.lang.Class adapter)
Description copied from interface: org.eclipse.core.runtime.IAdaptable
Returns an object which is an instance of the given class associated with this object. Returns null if no such object can be found.


addPositions

private void addPositions(org.w3c.dom.Node node,
                          org.eclipse.jface.text.IDocument doc,
                          int tabwidth)

initBackground

protected void initBackground()

initFont

protected void initFont()

handlePreferenceStoreChanged

protected void handlePreferenceStoreChanged(org.eclipse.jface.util.PropertyChangeEvent event)
Description copied from class: org.eclipse.ui.texteditor.AbstractTextEditor
Handles a property change event describing a change of the editor's preference store and updates the preference related editor properties.

Subclasses may extend.


initializeEditor

protected void initializeEditor()
Description copied from class: org.eclipse.ui.editors.text.TextEditor
null This method configures the editor but does not define a SourceViewerConfiguration. When only interested in providing a custom source viewer configuration, subclasses may extend this method.


editorContextMenuAboutToShow

protected void editorContextMenuAboutToShow(org.eclipse.jface.action.IMenuManager menu)
Description copied from class: org.eclipse.ui.texteditor.AbstractTextEditor
Sets up this editor's context menu before it is made visible.

Subclasses may extend to add other actions.


createActions

protected void createActions()
Description copied from class: org.eclipse.ui.texteditor.AbstractTextEditor
Creates this editor's standard actions and connects them with the global workbench actions.

Subclasses may extend.


error

void error(java.lang.String message,
           java.lang.Exception e)

canDoSelectTag

private boolean canDoSelectTag()

canDoDeleteTag

private boolean canDoDeleteTag()

canDoCreateTag

private boolean canDoCreateTag()