Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorteicher2004-06-23 13:53:54 +0000
committerteicher2004-06-23 13:53:54 +0000
commiteece3f7a33f5ba3fd5e7f6c2fd7d9397d6f338e6 (patch)
tree63ce60cb08066934d1828aa4349eb868b04669d5
parent507dee05cac43e62d429e0a45a56b5aae6b1ba15 (diff)
downloadeclipse.platform.text-eece3f7a33f5ba3fd5e7f6c2fd7d9397d6f338e6.tar.gz
eclipse.platform.text-eece3f7a33f5ba3fd5e7f6c2fd7d9397d6f338e6.tar.xz
eclipse.platform.text-eece3f7a33f5ba3fd5e7f6c2fd7d9397d6f338e6.zip
3.0 javadoc pass
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java2
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/contentassist/ContentAssistHandler.java3
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractDocumentProvider.java17
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractRulerActionDelegate.java1
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java300
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AnnotationPreference.java66
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/BasicTextEditorActionContributor.java26
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ConfigurationElementSorter.java4
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ConvertLineDelimitersAction.java5
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/DeleteLineAction.java4
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/FindNextAction.java7
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IAbstractTextEditorHelpContextIds.java4
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IDocumentProvider.java48
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IDocumentProviderExtension.java2
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IDocumentProviderExtension2.java2
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IDocumentProviderExtension3.java2
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IElementStateListener.java11
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IElementStateListenerExtension.java2
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IFindReplaceTargetExtension2.java6
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IStatusField.java13
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IStatusFieldExtension.java4
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditor.java37
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorActionConstants.java4
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorActionDefinitionIds.java6
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorExtension.java3
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorExtension2.java9
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorExtension3.java5
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IncrementalFindAction.java2
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/InsertLineAction.java4
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/RetargetTextEditorAction.java3
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/SourceViewerDecorationSupport.java39
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/TextEditorAction.java7
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/quickdiff/QuickDiff.java4
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplatePreferencePage.java4
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplateVariableProcessor.java4
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplateVariableProposal.java7
36 files changed, 435 insertions, 232 deletions
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java
index 438cb864f..91f604509 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditor.java
@@ -252,7 +252,7 @@ public abstract class AbstractDecoratedTextEditor extends StatusTextEditor {
}
/**
- * Configures the decoration support for this editor's the source viewer. Subclasses may override this
+ * Configures the decoration support for this editor's source viewer. Subclasses may override this
* method, but should call their superclass' implementation at some point.
*
* @param support the decoration support to configure
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/contentassist/ContentAssistHandler.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/contentassist/ContentAssistHandler.java
index 45a7ca50d..0689fe5a9 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/contentassist/ContentAssistHandler.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/contentassist/ContentAssistHandler.java
@@ -43,7 +43,8 @@ import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
/**
* A content assistant handler which handles the key binding and
- * the cue for a content assist and its subject adapter.
+ * the cue for a {@link org.eclipse.jface.text.contentassist.ContentAssistant}
+ * and its subject adapter.
*
* @since 3.0
*/
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractDocumentProvider.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractDocumentProvider.java
index 622b65a6d..7a822fad0 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractDocumentProvider.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractDocumentProvider.java
@@ -42,7 +42,7 @@ import org.eclipse.ui.internal.texteditor.TextEditorPlugin;
/**
- * An abstract implementation of a shareable document provider.
+ * An abstract implementation of a sharable document provider.
* <p>
* Subclasses must implement <code>createDocument</code>,
* <code>createAnnotationModel</code>, and <code>doSaveDocument</code>.
@@ -176,7 +176,7 @@ public abstract class AbstractDocumentProvider implements IDocumentProvider, IDo
static final protected boolean PR14469_ENABLED= false;
/**
- * Constant for representing the ok status. This is considered a value object.
+ * Constant for representing the OK status. This is considered a value object.
* @since 2.0
*/
static final protected IStatus STATUS_OK= new Status(IStatus.OK, TextEditorPlugin.PLUGIN_ID, IStatus.OK, EditorMessages.getString("AbstractDocumentProvider.ok"), null); //$NON-NLS-1$
@@ -217,8 +217,9 @@ public abstract class AbstractDocumentProvider implements IDocumentProvider, IDo
protected abstract IDocument createDocument(Object element) throws CoreException;
/**
- * Creates an annotation model for the given element. <p>
- * Subclasses must implement this method.
+ * Creates an annotation model for the given element.
+ * <p>
+ * Subclasses must implement this method.</p>
*
* @param element the element
* @return the annotation model
@@ -595,7 +596,7 @@ public abstract class AbstractDocumentProvider implements IDocumentProvider, IDo
/*
* @see org.eclipse.ui.texteditor.AbstractDocumentProvider.DocumentProviderOperation#execute(org.eclipse.core.runtime.IProgressMonitor)
*/
- protected void execute(IProgressMonitor monitor) throws CoreException {
+ protected void execute(IProgressMonitor pm) throws CoreException {
ElementInfo info= (ElementInfo) fElementInfoMap.get(element);
if (info != null) {
if (info.fDocument != document) {
@@ -603,9 +604,9 @@ public abstract class AbstractDocumentProvider implements IDocumentProvider, IDo
throw new CoreException(status);
}
- doSaveDocument(monitor, element, document, overwrite);
+ doSaveDocument(pm, element, document, overwrite);
- if (monitor != null && monitor.isCanceled())
+ if (pm != null && pm.isCanceled())
return;
info.fCanBeSaved= false;
@@ -613,7 +614,7 @@ public abstract class AbstractDocumentProvider implements IDocumentProvider, IDo
fireElementDirtyStateChanged(element, false);
} else {
- doSaveDocument(monitor, element, document, overwrite);
+ doSaveDocument(pm, element, document, overwrite);
}
}
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractRulerActionDelegate.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractRulerActionDelegate.java
index 188f9f3c0..ea3445222 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractRulerActionDelegate.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractRulerActionDelegate.java
@@ -33,6 +33,7 @@ import org.eclipse.ui.IEditorPart;
* adapter (inner) action on menu and mouse action on the vertical ruler.<p>
* Extending classes must implement the factory method
* <code>createAction(ITextEditor editor, IVerticalRulerInfo)</code>.
+ *
* @since 2.0
*/
public abstract class AbstractRulerActionDelegate implements IEditorActionDelegate, MouseListener, IMenuListener {
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java
index deb8d66fc..9909f1c88 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AbstractTextEditor.java
@@ -1453,7 +1453,8 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
protected final static int VERTICAL_RULER_WIDTH= 12;
/**
- * The complete mapping between action definition ids used by eclipse and StyledText actions.
+ * The complete mapping between action definition IDs used by eclipse and StyledText actions.
+ *
* @since 2.0
*/
protected final static IdMapEntry[] ACTION_MAP= new IdMapEntry[] {
@@ -1776,72 +1777,80 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
}
/**
- * Returns the editor's range indicator.
+ * Returns the editor's range indicator. May return <code>null</code> if no
+ * range indicator is installed.
*
- * @return the editor's range indicator
+ * @return the editor's range indicator which may be <code>null</code>
*/
protected final Annotation getRangeIndicator() {
return fRangeIndicator;
}
/**
- * Returns the editor's source viewer configuration.
+ * Returns the editor's source viewer configuration. May return <code>null</code>
+ * before the editor's part has been created and after disposal.
*
- * @return the editor's source viewer configuration
+ * @return the editor's source viewer configuration which may be <code>null</code>
*/
protected final SourceViewerConfiguration getSourceViewerConfiguration() {
return fConfiguration;
}
/**
- * Returns the editor's source viewer.
+ * Returns the editor's source viewer. May return <code>null</code> before
+ * the editor's part has been created and after disposal.
*
- * @return the editor's source viewer
+ * @return the editor's source viewer which may be <code>null</code>
*/
protected final ISourceViewer getSourceViewer() {
return fSourceViewer;
}
/**
- * Returns the editor's vertical ruler.
+ * Returns the editor's vertical ruler. May return <code>null</code> before
+ * the editor's part has been created and after disposal.
*
- * @return the editor's vertical ruler
+ * @return the editor's vertical ruler which may be <code>null</code>
*/
protected final IVerticalRuler getVerticalRuler() {
return fVerticalRuler;
}
/**
- * Returns the editor's context menu id.
+ * Returns the editor's context menu id. May return <code>null</code> before
+ * the editor's part has been created.
*
- * @return the editor's context menu id
+ * @return the editor's context menu id which may be <code>null</code>
*/
protected final String getEditorContextMenuId() {
return fEditorContextMenuId;
}
/**
- * Returns the ruler's context menu id.
+ * Returns the ruler's context menu id. May return <code>null</code> before
+ * the editor's part has been created.
*
- * @return the ruler's context menu id
+ * @return the ruler's context menu id which may be <code>null</code>
*/
protected final String getRulerContextMenuId() {
return fRulerContextMenuId;
}
/**
- * Returns the editor's help context id.
+ * Returns the editor's help context id or <code>null</code> if none has
+ * been set.
*
- * @return the editor's help context id
+ * @return the editor's help context id which may be <code>null</code>
*/
protected final String getHelpContextId() {
return fHelpContextId;
}
/**
- * Returns this editor's preference store.
+ * Returns this editor's preference store or <code>null</code> if none has
+ * been set.
*
- * @return this editor's preference store
+ * @return this editor's preference store which may be <code>null</code>
*/
protected final IPreferenceStore getPreferenceStore() {
return fPreferenceStore;
@@ -1873,7 +1882,7 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
/**
* Sets the annotation which this editor uses to represent the highlight
* range if the editor is configured to show the entire document. If the
- * range indicator is not set, this editor uses a <code>DefaultRangeIndicator</code>.
+ * range indicator is not set, this editor will not show a range indication.
*
* @param rangeIndicator the annotation
*/
@@ -1926,7 +1935,7 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
/**
* Sets the keybinding scopes for this editor.
*
- * @param scopes the scopes
+ * @param scopes a non-empty array of keybinding scope identifiers
* @since 2.1
*/
protected void setKeyBindingScopes(String[] scopes) {
@@ -1938,7 +1947,8 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
* Sets this editor's preference store. This method must be
* called before the editor's control is created.
*
- * @param store the preference store
+ * @param store the preference store or <code>null</code> to unset the
+ * preference store
*/
protected void setPreferenceStore(IPreferenceStore store) {
if (fPreferenceStore != null)
@@ -1962,8 +1972,14 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
return false;
}
- /*
- * @see ITextEditor#getSelectionProvider()
+ /**
+ * {@inheritDoc}
+ * <p>
+ * Returns <code>null</code> after disposal.
+ * </p>
+ *
+ * @return the selection provider or <code>null</code> if the editor has
+ * been disposed
*/
public ISelectionProvider getSelectionProvider() {
return fSelectionProvider;
@@ -2189,8 +2205,17 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
return fCursorListener;
}
- /*
- * @see IEditorPart#init(org.eclipse.ui.IEditorSite, org.eclipse.ui.IEditorInput)
+ /**
+ * Implements the <code>init</code> method of <code>IEditorPart</code>.
+ * Subclasses replacing <code>init</code> may choose to call this method in
+ * their implementation.
+ *
+ * @param window the site's workbench window
+ * @param site the editor's site
+ * @param input the editor input for the editor being created
+ * @throws PartInitException if {@link #doSetInput(IEditorInput)} fails or gets canceled
+ *
+ * @see org.eclipse.ui.IEditorPart#init(org.eclipse.ui.IEditorSite, org.eclipse.ui.IEditorInput)
* @since 2.1
*/
protected final void internalInit(IWorkbenchWindow window, final IEditorSite site, final IEditorInput input) throws PartInitException {
@@ -2289,10 +2314,55 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
}
/**
- * The <code>AbstractTextEditor</code> implementation of this
+ * The <code>AbstractTextEditor</code> implementation of this
* <code>IWorkbenchPart</code> method creates the vertical ruler and
* source viewer.
- * Subclasses may extend.
+ * <p>
+ * Subclasses may extend this method. Besides extending this method, the
+ * behavior of <code>createPartControl</code> may be customized by
+ * calling, extending or replacing the following methods: <br>
+ * Subclasses may supply customized implementations for some members using
+ * the following methods before <code>createPartControl</code> is invoked:
+ * <ul>
+ * <li>
+ * {@linkplain #setSourceViewerConfiguration(SourceViewerConfiguration) setSourceViewerConfiguration}
+ * to supply a custom source viewer configuration,</li>
+ * <li>{@linkplain #setRangeIndicator(Annotation) setRangeIndicator} to
+ * provide a range indicator,</li>
+ * <li>{@linkplain #setHelpContextId(String) setHelpContextId} to provide a
+ * help context id,</li>
+ * <li>{@linkplain #setEditorContextMenuId(String) setEditorContextMenuId}
+ * to set a custom context menu id,</li>
+ * <li>{@linkplain #setRulerContextMenuId(String) setRulerContextMenuId} to
+ * set a custom ruler context menu id.</li>
+ * </ul>
+ * <br>
+ * Subclasses may replace the following methods called from within
+ * <code>createPartControl</code>:
+ * <ul>
+ * <li>{@linkplain #createVerticalRuler() createVerticalRuler} to supply a
+ * custom vertical ruler,</li>
+ * <li>{@linkplain #createSourceViewer(Composite, IVerticalRuler, int) createSourceViewer}
+ * to supply a custom source viewer,</li>
+ * <li>{@linkplain #getSelectionProvider() getSelectionProvider} to supply
+ * a custom selection provider.</li>
+ * </ul>
+ * <br>
+ * Subclasses may extend the following methods called from within
+ * <code>createPartControl</code>:
+ * <ul>
+ * <li>
+ * {@linkplain #initializeViewerColors(ISourceViewer) initializeViewerColors}
+ * to customize the viewer color scheme (may also be replaced),</li>
+ * <li>
+ * {@linkplain #initializeDragAndDrop(ISourceViewer) initializeDragAndDrop}
+ * to customize drag and drop (may also be replaced),</li>
+ * <li>{@linkplain #createNavigationActions() createNavigationActions} to
+ * add navigation actions,</li>
+ * <li>{@linkplain #createActions() createActions} to add text editor
+ * actions.</li>
+ * </ul>
+ * </p>
*
* @param parent the parent composite
*/
@@ -2442,6 +2512,8 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
}
/**
+ * Initializes the activation code trigger.
+ *
* @since 2.1
*/
private void initializeActivationCodeTrigger() {
@@ -2569,7 +2641,8 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
}
/**
- * Initializes the given viewer's colors.
+ * Initializes the fore- and background colors of the given viewer for both
+ * normal and selected text.
*
* @param viewer the viewer to be initialized
* @since 2.0
@@ -2630,6 +2703,7 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
/**
* Initializes the background color used for highlighting the document ranges
* defining search scopes.
+ *
* @param viewer the viewer to initialize
* @since 2.0
*/
@@ -2756,10 +2830,18 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
}
/**
- * Internal <code>setInput</code> method.
- *
+ * Called directly from <code>setInput</code> and from within a workspace
+ * runnable from <code>init</code>, this method does the actual setting
+ * of the editor input. Closes the editor if <code>input</code> is
+ * <code>null</code>. Disconnects from any previous editor input and its
+ * document provider and connects to the new one.
+ * <p>
+ * Subclasses may extend.
+ * </p>
+ *
* @param input the input to be set
- * @exception CoreException if input cannot be connected to the document provider
+ * @exception CoreException if input cannot be connected to the document
+ * provider
*/
protected void doSetInput(IEditorInput input) throws CoreException {
@@ -2841,6 +2923,10 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
* The <code>AbstractTextEditor</code> implementation of this
* <code>IWorkbenchPart</code> method may be extended by subclasses.
* Subclasses must call <code>super.dispose()</code>.
+ * <p>
+ * Note that many methods may return <code>null</code> after the editor is
+ * disposed.
+ * </p>
*/
public void dispose() {
@@ -2981,7 +3067,7 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
}
/**
- * Disposes the connection with the document provider. Subclasses
+ * Disposes of the connection with the document provider. Subclasses
* may extend.
*
* @since 3.0
@@ -3017,10 +3103,10 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
}
/**
- * Returns the symbolic font name for this
- * editor as defined in XML.
+ * Returns the symbolic font name for this editor as defined in XML.
*
- * @return a String with the symbolic font name or <code>null</code> if none is defined
+ * @return a String with the symbolic font name or <code>null</code> if
+ * none is defined
* @since 2.1
*/
private String getSymbolicFontName() {
@@ -3031,7 +3117,8 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
}
/**
- * Returns the property preference key for the editor font.
+ * Returns the property preference key for the editor font. Subclasses may
+ * replace this method.
*
* @return a String with the key
* @since 2.1
@@ -3046,9 +3133,11 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
}
/**
- * Handles a property change event describing a change
- * of the editor's preference store and updates the preference
- * related editor properties.
+ * Handles a property change event describing a change of the editor's
+ * preference store and updates the preference related editor properties.
+ * <p>
+ * Subclasses may extend.
+ * </p>
*
* @param event the property change event
*/
@@ -3081,7 +3170,8 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
}
/**
- * Returns the progress monitor related to this editor.
+ * Returns the progress monitor related to this editor. It should not be
+ * necessary to extend this method.
*
* @return the progress monitor related to this editor
* @since 2.1
@@ -3097,80 +3187,81 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
return pm != null ? pm : new NullProgressMonitor();
}
- /**
- * Handles an external change of the editor's input element.
- */
- protected void handleEditorInputChanged() {
-
- String title;
- String msg;
- Shell shell= getSite().getShell();
-
- final IDocumentProvider provider= getDocumentProvider();
- if (provider == null) {
- // fix for http://dev.eclipse.org/bugs/show_bug.cgi?id=15066
- close(false);
- return;
- }
+ /**
+ * Handles an external change of the editor's input element. Subclasses may
+ * extend.
+ */
+ protected void handleEditorInputChanged() {
+
+ String title;
+ String msg;
+ Shell shell= getSite().getShell();
+
+ final IDocumentProvider provider= getDocumentProvider();
+ if (provider == null) {
+ // fix for http://dev.eclipse.org/bugs/show_bug.cgi?id=15066
+ close(false);
+ return;
+ }
+
+ final IEditorInput input= getEditorInput();
+ if (provider.isDeleted(input)) {
- final IEditorInput input= getEditorInput();
- if (provider.isDeleted(input)) {
+ if (isSaveAsAllowed()) {
- if (isSaveAsAllowed()) {
+ title= EditorMessages.getString("Editor.error.activated.deleted.save.title"); //$NON-NLS-1$
+ msg= EditorMessages.getString("Editor.error.activated.deleted.save.message"); //$NON-NLS-1$
- title= EditorMessages.getString("Editor.error.activated.deleted.save.title"); //$NON-NLS-1$
- msg= EditorMessages.getString("Editor.error.activated.deleted.save.message"); //$NON-NLS-1$
-
- String[] buttons= {
+ String[] buttons= {
EditorMessages.getString("Editor.error.activated.deleted.save.button.save"), //$NON-NLS-1$
EditorMessages.getString("Editor.error.activated.deleted.save.button.close"), //$NON-NLS-1$
- };
-
- MessageDialog dialog= new MessageDialog(shell, title, null, msg, MessageDialog.QUESTION, buttons, 0);
-
- if (dialog.open() == 0) {
- IProgressMonitor pm= getProgressMonitor();
- performSaveAs(pm);
- if (pm.isCanceled())
- handleEditorInputChanged();
- } else {
- close(false);
- }
-
+ };
+
+ MessageDialog dialog= new MessageDialog(shell, title, null, msg, MessageDialog.QUESTION, buttons, 0);
+
+ if (dialog.open() == 0) {
+ IProgressMonitor pm= getProgressMonitor();
+ performSaveAs(pm);
+ if (pm.isCanceled())
+ handleEditorInputChanged();
} else {
-
- title= EditorMessages.getString("Editor.error.activated.deleted.close.title"); //$NON-NLS-1$
- msg= EditorMessages.getString("Editor.error.activated.deleted.close.message"); //$NON-NLS-1$
- if (MessageDialog.openConfirm(shell, title, msg))
- close(false);
+ close(false);
}
} else {
- title= EditorMessages.getString("Editor.error.activated.outofsync.title"); //$NON-NLS-1$
- msg= EditorMessages.getString("Editor.error.activated.outofsync.message"); //$NON-NLS-1$
+ title= EditorMessages.getString("Editor.error.activated.deleted.close.title"); //$NON-NLS-1$
+ msg= EditorMessages.getString("Editor.error.activated.deleted.close.message"); //$NON-NLS-1$
+ if (MessageDialog.openConfirm(shell, title, msg))
+ close(false);
+ }
+
+ } else {
+
+ title= EditorMessages.getString("Editor.error.activated.outofsync.title"); //$NON-NLS-1$
+ msg= EditorMessages.getString("Editor.error.activated.outofsync.message"); //$NON-NLS-1$
+
+ if (MessageDialog.openQuestion(shell, title, msg)) {
- if (MessageDialog.openQuestion(shell, title, msg)) {
-
-
- try {
- if (provider instanceof IDocumentProviderExtension) {
- IDocumentProviderExtension extension= (IDocumentProviderExtension) provider;
- extension.synchronize(input);
- } else {
- doSetInput(input);
- }
- } catch (CoreException x) {
- IStatus status= x.getStatus();
- if (status == null || status.getSeverity() != IStatus.CANCEL) {
- title= EditorMessages.getString("Editor.error.refresh.outofsync.title"); //$NON-NLS-1$
- msg= EditorMessages.getString("Editor.error.refresh.outofsync.message"); //$NON-NLS-1$
- ErrorDialog.openError(shell, title, msg, x.getStatus());
- }
+
+ try {
+ if (provider instanceof IDocumentProviderExtension) {
+ IDocumentProviderExtension extension= (IDocumentProviderExtension) provider;
+ extension.synchronize(input);
+ } else {
+ doSetInput(input);
+ }
+ } catch (CoreException x) {
+ IStatus status= x.getStatus();
+ if (status == null || status.getSeverity() != IStatus.CANCEL) {
+ title= EditorMessages.getString("Editor.error.refresh.outofsync.title"); //$NON-NLS-1$
+ msg= EditorMessages.getString("Editor.error.refresh.outofsync.message"); //$NON-NLS-1$
+ ErrorDialog.openError(shell, title, msg, x.getStatus());
}
}
}
}
+ }
/**
* The <code>AbstractTextEditor</code> implementation of this
@@ -3557,6 +3648,9 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
/**
* Performs revert and handles errors appropriately.
+ * <p>
+ * Subclasses may extend.
+ * </p>
*
* @since 3.0
*/
@@ -3586,9 +3680,9 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
}
/**
- * Performs any additional action necessary to perform after
- * the input document's content has been replaced.
- * <p>
+ * Performs any additional action necessary to perform after the input
+ * document's content has been replaced.
+ * <p>
* Clients may extended this method.
*
* @since 3.0
@@ -4652,6 +4746,10 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit
}
/**
+ * Sets the overwrite mode enablement.
+ *
+ * @param enable <code>true</code> to enable new overwrite mode,
+ * <code>false</code> to disable
* @since 3.0
*/
protected void enableOverwriteMode(boolean enable) {
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AnnotationPreference.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AnnotationPreference.java
index caf2584ca..74bd58c53 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AnnotationPreference.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AnnotationPreference.java
@@ -27,28 +27,50 @@ import org.eclipse.ui.internal.texteditor.TextEditorPlugin;
/**
- * An annotation preference provides all the information required for handing the preferences for the presentation of annotations of a specified type.
- * The provided information covers:
+ * An annotation preference provides all the information required for handing
+ * the preferences for the presentation of annotations of a specified type. The
+ * type can be changed and retrieved using the <code>getAnnotationType</code>
+ * and <code>setAnnotationType</code> methods. For each preference, getter and
+ * setter methods are provided.
+ * <p>
+ * Preferences that may be changed by the user also have a corresponding key
+ * that can be used to obtain the currently set value from an
+ * <code>IPreferenceStore</code>.
+ * </p>
+ * <h3>The following annotation preferences are covered:</h4>
+ * <h4>Display Preferences controlling how and where annotations are shown</h4>
* <ul>
- * <li> the preference key for the presentation color
- * <li> the default presentation color
- * <li> the preference key for the visibility of annotations inside text
- * <li> the default visibility of annotations inside text
- * <li> the preference key for the visibility of annotations inside the overview ruler
- * <li> the default visibility of annotations inside the overview ruler
- * <li> the presentation layer
- * <li> how the annotation type should be presented on a preference page
- * <li> whether the annotation type should be presented in the header of the overview ruler
- * <li> the marker type if the annotation type is derived from an <code>IMarker</code>
- * <li> the severity of the marker if the annotation type is derived from an <code>IMarker</code>
- * <li> the preference key for the visibility in the next/previous navigation toolbar drop down action
- * <li> the default value for the visibility in the next/previous navigation toolbar drop down action
- * <li> the preference key for go to next navigation enablement
- * <li> the default value for go to next navigation enablement
- * <li> the preference key for got to previous navigation enablement
- * <li> the default value for got to previous navigation enablement
- * <li> the image descriptor
- * <li> the symbolic image name
+ * <li>as text background highlighting (and respective preference key),</li>
+ * <li>as text decorations (and respective preference key),</li>
+ * <li>on the overview ruler (and respective preference key),</li>
+ * <li>on the overview ruler header,</li>
+ * <li>on the vertical ruler (and respective preference key),</li>
+ * </li>
+ * </ul>
+ * <h4>Additional Display Preferences</h4>
+ * <ul>
+ * <li>the base color for annotations of this type (and respective preference key),
+ * <li>the style of text decorations that are drawn (and respective preference
+ * key),</li>
+ * <li>the annotation image provider,</li>
+ * <li>the image descriptor,</li>
+ * <li>the symbolic image name,</li>
+ * <li>the presentation layer.</li>
+ * </ul>
+ * <h4>Navigation Preferences</h4>
+ * <ul>
+ * <li>whether included in the "Go to Next Annotation" navigation action (and
+ * respective preference key),</li>
+ * <li>whether included in the "Go to Previous Annotation" navigation action
+ * (and respective preference key),</li>
+ * <li>whether to be shown in the "Go to Next/Previous Annotation" navigation
+ * toolbar dropdown (and respective preference key).</li>
+ * </ul>
+ * <h4>Preference Page Preferences</h4>
+ * <ul>
+ * <li>whether the annotation type should be included on the generic annotation
+ * preference page,</li>
+ * <li>preference label.</li>
* </ul>
*
* @since 2.1
@@ -975,7 +997,7 @@ public class AnnotationPreference {
* Sets the data needed to create the annotation image provider.
*
* @param configurationElement the configuration element
- * @param annotationImageProviderAttribute the atrribute of the
+ * @param annotationImageProviderAttribute the attribute of the
* configuration element
* @since 3.0
*/
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/BasicTextEditorActionContributor.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/BasicTextEditorActionContributor.java
index f137d8136..09059f68a 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/BasicTextEditorActionContributor.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/BasicTextEditorActionContributor.java
@@ -30,7 +30,7 @@ import org.eclipse.ui.part.EditorActionBarContributor;
/**
- * Manages the installation and deinstallation of global actions for
+ * Manages the installation and uninstallation of global actions for
* the same type of editors.
* <p>
* If instantiated and used as-is, this contributor connects to all of the workbench defined
@@ -270,28 +270,4 @@ public class BasicTextEditorActionContributor extends EditorActionBarContributor
doSetActiveEditor(null);
super.dispose();
}
-
-
-// /* (non-Javadoc)
-// * @see org.eclipse.ui.IEditorActionBarContributor#init(org.eclipse.ui.IActionBars, org.eclipse.ui.IWorkbenchPage)
-// */
-// public void init(IActionBars bars, IWorkbenchPage page) {
-//
-// if (page != null) {
-// IWorkbenchWindow window= page.getWorkbenchWindow();
-// if (window instanceof WorkbenchWindow) {
-// WorkbenchWindow wWindow= (WorkbenchWindow) window;
-// WWinKeyBindingService service= wWindow.getKeyBindingService();
-// if (service != null) {
-// service.registerGlobalAction(fFindNext);
-// service.registerGlobalAction(fFindPrevious);
-// service.registerGlobalAction(fIncrementalFind);
-// service.registerGlobalAction(fIncrementalFindReverse);
-// service.registerGlobalAction(fGotoLine);
-// }
-// }
-// }
-// super.init(bars, page);
-// }
-
}
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ConfigurationElementSorter.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ConfigurationElementSorter.java
index 6f23bdb0b..5515e5668 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ConfigurationElementSorter.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ConfigurationElementSorter.java
@@ -34,7 +34,7 @@ import org.osgi.framework.Constants;
* Allows to sort an array based on their elements' configuration elements
* according to the prerequisite relation of their defining plug-ins.
* <p>
- * This class can directly be used or subclassed.
+ * This class may be subclassed.
* </p>
*
* @since 3.0
@@ -114,7 +114,7 @@ public abstract class ConfigurationElementSorter {
}
/**
- * Initialize this comarator.
+ * Initialize this comparator.
*
* @param elements an array of Java editor hover descriptors
*/
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ConvertLineDelimitersAction.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ConvertLineDelimitersAction.java
index 439e2ae67..4566a80b4 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ConvertLineDelimitersAction.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ConvertLineDelimitersAction.java
@@ -33,8 +33,9 @@ import org.eclipse.jface.text.TextUtilities;
/**
- * An action to convert line delimiters of a text editor document to a particular line
- * delimiter.
+ * An action to convert line delimiters of a text editor document to a
+ * particular line delimiter.
+ *
* @since 2.0
*/
public class ConvertLineDelimitersAction extends TextEditorAction {
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/DeleteLineAction.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/DeleteLineAction.java
index da8419bd3..17fde0152 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/DeleteLineAction.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/DeleteLineAction.java
@@ -58,7 +58,7 @@ public class DeleteLineAction extends TextEditorAction {
/**
* Creates a line delimiter conversion action.
*
- * @param bundle the resource bundle for ui strings
+ * @param bundle the resource bundle for UI strings
* @param prefix the prefix for the property keys into <code>bundle</code>
* @param editor the editor
* @param type the line deletion type, must be one of
@@ -71,7 +71,7 @@ public class DeleteLineAction extends TextEditorAction {
/**
* Creates a line deletion action.
*
- * @param bundle the resource bundle for ui strings
+ * @param bundle the resource bundle for UI strings
* @param prefix the prefix for the property keys into <code>bundle</code>
* @param editor the editor
* @param type the line deletion type, must be one of
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/FindNextAction.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/FindNextAction.java
index 6afa19389..77c512424 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/FindNextAction.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/FindNextAction.java
@@ -36,11 +36,12 @@ import org.eclipse.ui.part.EditorActionBarContributor;
/**
- * An action which finds the next/previous occurrence of the last search or
- * the current selection if present.
+ * An action which finds the next/previous occurrence of the last search or the
+ * current selection if present.
* <p>
* This class may be instantiated; it is not intended to be subclassed.
* </p>
+ *
* @since 2.0
*/
public class FindNextAction extends ResourceAction implements IUpdate {
@@ -382,7 +383,7 @@ public class FindNextAction extends ResourceAction implements IUpdate {
/*
* 1GF86V3: ITPUI:WINNT - Internal errors using Find/Replace Dialog
- * Now uses TextUtilities rather than focussing on '\n'
+ * Now uses TextUtilities rather than focusing on '\n'
*/
String selection= fTarget.getSelectionText();
if (selection != null && selection.length() > 0) {
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IAbstractTextEditorHelpContextIds.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IAbstractTextEditorHelpContextIds.java
index 54e1a33ef..488f1fbbe 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IAbstractTextEditorHelpContextIds.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IAbstractTextEditorHelpContextIds.java
@@ -35,10 +35,6 @@ public interface IAbstractTextEditorHelpContextIds {
*/
public static final String ACTION_POSTFIX= "_action_context"; //$NON-NLS-1$
-
-
-
-
/**
* Help context id for the action.
* Value: <code>"org.eclipse.ui.undo_action_context"</code>
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IDocumentProvider.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IDocumentProvider.java
index 35de8b770..baca61b06 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IDocumentProvider.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IDocumentProvider.java
@@ -22,28 +22,44 @@ import org.eclipse.core.runtime.IProgressMonitor;
/**
- * A document provider maps between domain elements and documents.
- * A document provider has the following responsibilities:
+ * A document provider maps between domain elements and documents. A document provider has the
+ * following responsibilities:
* <ul>
- * <li> create an annotation model of a domain model element
- * <li> create and manage a textual representation, i.e., a document, of a domain model element
- * <li> create and save the content of domain model elements based on given documents
- * <li> update the documents this document provider manages for domain model elements
- * to changes directly applied to those domain model elements
- * <li> notify all element state listeners about changes directly applied to domain model
- * elements this document provider manages a document for, i.e. the document
- * provider must know which changes of a domain model element are to be interpreted
- * as element moves, deletes, etc.
+ * <li>create an annotation model of a domain model element
+ * <li>create and manage a textual representation, i.e., a document, of a domain model element
+ * <li>create and save the content of domain model elements based on given documents
+ * <li>update the documents this document provider manages for domain model elements to changes
+ * directly applied to those domain model elements
+ * <li>notify all element state listeners about changes directly applied to domain model elements
+ * this document provider manages a document for, i.e. the document provider must know which changes
+ * of a domain model element are to be interpreted as element moves, deletes, etc.
* </ul>
* Text editors use document providers to bridge the gap between their input elements and the
- * documents they work on. A single document provider may be shared between multiple editors;
- * the methods take the editors' input elements as a parameter.
+ * documents they work on. A single document provider may be shared between multiple editors; the
+ * methods take the editors' input elements as a parameter.
* <p>
- * This interface may be implemented by clients; or subclass the standard
- * abstract base class <code>AbstractDocumentProvider</code>.</p>
- *
+ * This interface may be implemented by clients; or subclass the standard abstract base class
+ * <code>AbstractDocumentProvider</code>.
+ * </p>
+ * <p>
+ * In order to provided backward compatibility for clients of <code>IDocumentProvider</code>,
+ * extension interfaces are used to provide a means of evolution. The following extension interfaces
+ * exist:
+ * <ul>
+ * <li>{@link org.eclipse.ui.texteditor.IDocumentProviderExtension} since version 2.0 introducing
+ * state validation, extended read-only handling and synchronization.</li>
+ * <li>{@link org.eclipse.ui.texteditor.IDocumentProviderExtension2} since version 2.1 introducing
+ * adding support for a global progress monitor.</li>
+ * <li>{@link org.eclipse.ui.texteditor.IDocumentProviderExtension3} since version 3.0 adding
+ * a predicate for querying synchronization state.</li>
+ * </ul>
+ * </p>
+ *
* @see org.eclipse.jface.text.IDocument
* @see org.eclipse.ui.texteditor.AbstractDocumentProvider
+ * @see org.eclipse.ui.texteditor.IDocumentProviderExtension
+ * @see org.eclipse.ui.texteditor.IDocumentProviderExtension2
+ * @see org.eclipse.ui.texteditor.IDocumentProviderExtension3
*/
public interface IDocumentProvider {
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IDocumentProviderExtension.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IDocumentProviderExtension.java
index bc28f1d88..42a306e6d 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IDocumentProviderExtension.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IDocumentProviderExtension.java
@@ -17,7 +17,7 @@ import org.eclipse.core.runtime.IStatus;
/**
- * Extension interface for <code>IDocumentProvider</code>. It adds the following
+ * Extension interface for {@link IDocumentProvider}. It adds the following
* functions:
* <ul>
* <li> dealing with immutable domain elements
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IDocumentProviderExtension2.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IDocumentProviderExtension2.java
index ee971782e..58167eb52 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IDocumentProviderExtension2.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IDocumentProviderExtension2.java
@@ -15,7 +15,7 @@ package org.eclipse.ui.texteditor;
import org.eclipse.core.runtime.IProgressMonitor;
/**
- * Extension interface for <code>IDocumentProvider</code>. It adds the following
+ * Extension interface for {@link org.eclipse.ui.texteditor.IDocumentProvider}. It adds the following
* functions:
* <ul>
* <li> global temporary progress monitor
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IDocumentProviderExtension3.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IDocumentProviderExtension3.java
index bed360227..11e698a2f 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IDocumentProviderExtension3.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IDocumentProviderExtension3.java
@@ -12,7 +12,7 @@ package org.eclipse.ui.texteditor;
/**
- * Extension interface to <code>IDocumentProvider</code>. The method
+ * Extension interface for {@link org.eclipse.ui.texteditor.IDocumentProvider}. The method
* <code>isSynchronized</code> replaces the original <code>getSynchronizationStamp</code> method.
*
* @since 3.0
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IElementStateListener.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IElementStateListener.java
index f9cb3adf5..f1482dcac 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IElementStateListener.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IElementStateListener.java
@@ -23,6 +23,17 @@ package org.eclipse.ui.texteditor;
* The notifications sent to the element state listeners inform about those standardized,
* abstract changes. The concrete change applied might differ from the one the listeners
* are notified about, but should be interpreted as the one the listeners receive.
+ * <p>
+ * In order to provided backward compatibility for clients of <code>IElementStateListener</code>,
+ * extension interfaces are used to provide a means of evolution. The following extension interface
+ * exists:
+ * <ul>
+ * <li>{@link org.eclipse.ui.texteditor.IElementStateListenerExtension} since version 2.0 introducing
+ * state validation events.</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.ui.texteditor.IElementStateListenerExtension
*/
public interface IElementStateListener {
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IElementStateListenerExtension.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IElementStateListenerExtension.java
index 7724b5062..367510689 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IElementStateListenerExtension.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IElementStateListenerExtension.java
@@ -12,7 +12,7 @@
package org.eclipse.ui.texteditor;
/**
- * Extension interface for <code>IElementStateListener</code>.
+ * Extension interface for {@link org.eclipse.ui.texteditor.IElementStateListener}.
* It adds
* <ul>
* <li> state validation notification
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IFindReplaceTargetExtension2.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IFindReplaceTargetExtension2.java
index db53a4dea..21b229111 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IFindReplaceTargetExtension2.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IFindReplaceTargetExtension2.java
@@ -11,8 +11,8 @@
package org.eclipse.ui.texteditor;
/**
- * Extension interface for <code>IFindReplaceTarget</code>. Extends the find replace target with
- * the concept of state validation.
+ * Extension interface for {@link org.eclipse.jface.text.IFindReplaceTarget}.
+ * Extends the find replace target with the concept of state validation.
*
* @since 2.1
*/
@@ -20,7 +20,7 @@ public interface IFindReplaceTargetExtension2 {
/**
* Validates the state of this target. The predominate intent of this method
- * is to take any action propably necessary to ensure that the target can
+ * is to take any action probably necessary to ensure that the target can
* persistently be changed.
*
* @return <code>true</code> if the target was validated, <code>false</code> otherwise
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IStatusField.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IStatusField.java
index 3696a620e..d59a968b9 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IStatusField.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IStatusField.java
@@ -16,8 +16,19 @@ import org.eclipse.swt.graphics.Image;
/**
- * Interface of a status field of a text editor. The field that shows up in the
+ * Interface of a status field of a text editor. The field that shows up in the
* workbench's status line if the contributing editor is active.
+ * <p>
+ * In order to provided backward compatibility for clients of
+ * <code>IStatusField</code>, extension interfaces are used to provide a
+ * means of evolution. The following extension interface exists:
+ * <ul>
+ * <li>{@link org.eclipse.ui.texteditor.IStatusFieldExtension} since
+ * version 3.0 introducing error text, tooltips and visibility control.</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.ui.texteditor.IStatusFieldExtension
* @since 2.0
*/
public interface IStatusField {
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IStatusFieldExtension.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IStatusFieldExtension.java
index 51dfd45ba..47469c553 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IStatusFieldExtension.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IStatusFieldExtension.java
@@ -14,14 +14,14 @@ package org.eclipse.ui.texteditor;
import org.eclipse.swt.graphics.Image;
/**
- * Extends <code>IStatusField</code> with the following concepts:
+ * Extends {@link org.eclipse.ui.texteditor.IStatusField} with the following
+ * concepts:
* <ul>
* <li>set error text and image</li>
* <li>set tool tip</li>
* <li>control visibility</li>
* </ul>
*
- * @see org.eclipse.ui.texteditor.IStatusField
* @since 3.0
*/
public interface IStatusFieldExtension {
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditor.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditor.java
index c016f288f..ce98f7692 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditor.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditor.java
@@ -21,20 +21,41 @@ import org.eclipse.ui.IEditorPart;
/**
* Interface to a text editor. This interface defines functional extensions to
- * <code>IEditorPart</code> as well as the configuration capabilities of a text editor.
+ * <code>IEditorPart</code> as well as the configuration capabilities of a
+ * text editor.
* <p>
- * Text editors are configured with an <code>IDocumentProvider</code> which
- * delivers a textual presentation (<code>IDocument</code>) of the editor's input.
- * The editor works on the document and forwards all input element related calls,
- * such as <code>save</code>, to the document provider. The provider also delivers
- * the input's annotation model which is used to control the editor's vertical ruler.</p>
+ * Text editors are configured with an <code>IDocumentProvider</code> which
+ * delivers a textual presentation (<code>IDocument</code>) of the editor's
+ * input. The editor works on the document and forwards all input element
+ * related calls, such as <code>save</code>, to the document provider. The
+ * provider also delivers the input's annotation model which is used to control
+ * the editor's vertical ruler.
+ * </p>
+ * <p>
+ * Clients may implement this interface from scratch, but the recommended way is
+ * to subclass the abstract base class <code>AbstractTextEditor</code>.
+ * </p>
* <p>
- * Clients may implement this interface from scratch, but the recommended way is to
- * subclass the abstract base class <code>AbstractTextEditor</code>.
+ * In order to provided backward compatibility for clients of
+ * <code>ITextEditor</code>, extension interfaces are used to provide a means
+ * of evolution. The following extension interfaces exist:
+ * <ul>
+ * <li>{@link org.eclipse.ui.texteditor.ITextEditorExtension} since version 2.0
+ * introducing status fields, read-only state and ruler context menu
+ * listeners.</li>
+ * <li>{@link org.eclipse.ui.texteditor.ITextEditorExtension2} since version 2.1
+ * introducing modifiable state for the editor input and validate state
+ * handling.</li>
+ * <li>{@link org.eclipse.ui.texteditor.ITextEditorExtension3} since version 3.0
+ * adding input state and change information control.</li>
+ * </ul>
* </p>
*
* @see org.eclipse.ui.texteditor.IDocumentProvider
* @see org.eclipse.jface.text.source.IAnnotationModel
+ * @see org.eclipse.ui.texteditor.ITextEditorExtension
+ * @see org.eclipse.ui.texteditor.ITextEditorExtension2
+ * @see org.eclipse.ui.texteditor.ITextEditorExtension3
*/
public interface ITextEditor extends IEditorPart {
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorActionConstants.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorActionConstants.java
index 4ebbdbf48..7a4edea9a 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorActionConstants.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorActionConstants.java
@@ -260,8 +260,6 @@ public interface ITextEditorActionConstants extends IWorkbenchActionConstants {
*/
static final String CONVERT_LINE_DELIMITERS_TO_MAC= "ConvertLineDelimitersToMAC"; //$NON-NLS-1$
-
-
/**
* Name of the ruler action performed when double clicking the editor's vertical ruler.
* Value: <code>"RulerDoubleClick"</code>
@@ -311,7 +309,7 @@ public interface ITextEditorActionConstants extends IWorkbenchActionConstants {
/**
* Status line category "findField".
- * Value: <code>"FindField"</code>
+ * Value: <code>"findField"</code>
* @since 3.0
*/
static final String STATUS_CATEGORY_FIND_FIELD= "findField"; //$NON-NLS-1$
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorActionDefinitionIds.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorActionDefinitionIds.java
index 9b32e9bb2..2a09e2ec8 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorActionDefinitionIds.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorActionDefinitionIds.java
@@ -329,7 +329,7 @@ public interface ITextEditorActionDefinitionIds extends IWorkbenchActionDefiniti
// modification
/**
- * Action definition id of the edit delet previous character action.
+ * Action definition id of the edit delete previous character action.
* Value: <code>"org.eclipse.ui.edit.text.deletePrevious"</code>
*/
public static final String DELETE_PREVIOUS= "org.eclipse.ui.edit.text.deletePrevious"; //$NON-NLS-1$
@@ -373,13 +373,13 @@ public interface ITextEditorActionDefinitionIds extends IWorkbenchActionDefiniti
public static final String CONVERT_LINE_DELIMITERS_TO_WINDOWS= "org.eclipse.ui.edit.text.convert.lineDelimiters.toWindows"; //$NON-NLS-1$
/**
- * Action definition id of the edit convert to unix' line delimiter action.
+ * Action definition id of the edit convert to unix line delimiter action.
* Value: <code>"org.eclipse.ui.edit.text.convert.lineDelimiters.toUNIX"</code>
*/
public static final String CONVERT_LINE_DELIMITERS_TO_UNIX= "org.eclipse.ui.edit.text.convert.lineDelimiters.toUNIX"; //$NON-NLS-1$
/**
- * Action definition id of the edit convert to mac' line delimiter action.
+ * Action definition id of the edit convert to mac line delimiter action.
* Value: <code>"org.eclipse.ui.edit.text.convert.lineDelimiters.toMac"</code>
*/
public static final String CONVERT_LINE_DELIMITERS_TO_MAC= "org.eclipse.ui.edit.text.convert.lineDelimiters.toMac"; //$NON-NLS-1$
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorExtension.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorExtension.java
index b362f6aa2..4ca0722a4 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorExtension.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorExtension.java
@@ -16,7 +16,8 @@ import org.eclipse.jface.action.IMenuListener;
/**
- * Extension interface for <code>ITextEditor</code>. Adds the following functions:
+ * Extension interface for {@link org.eclipse.ui.texteditor.ITextEditor}. Adds
+ * the following functions:
* <ul>
* <li> status fields
* <li> read-only state of the editor's input
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorExtension2.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorExtension2.java
index 8f86e7d4f..1f7eedd30 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorExtension2.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorExtension2.java
@@ -12,10 +12,11 @@
package org.eclipse.ui.texteditor;
/**
- * Extension interface for <code>ITextEditor</code>. Adds the following functions:
+ * Extension interface for {@link org.eclipse.ui.texteditor.ITextEditor}. Adds
+ * the following functions:
* <ul>
- * <li> modifiable state of the editor's input
- * <li> validate state of editor input
+ * <li>modifiable state of the editor's input
+ * <li>validate state of editor input
* </ul>
*
* @since 2.1
@@ -36,7 +37,7 @@ public interface ITextEditorExtension2 {
/**
* Validates the state of the given editor input. The predominate intent
- * of this method is to take any action propably necessary to ensure that
+ * of this method is to take any action probably necessary to ensure that
* the input can persistently be changed.
*
* @return <code>true</code> if the input was validated, <code>false</code> otherwise
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorExtension3.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorExtension3.java
index 68ee6624e..a780cd2e8 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorExtension3.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/ITextEditorExtension3.java
@@ -12,9 +12,10 @@
package org.eclipse.ui.texteditor;
/**
- * Extension interface for <code>ITextEditor</code>. Adds the following functions:
+ * Extension interface for {@link org.eclipse.ui.texteditor.ITextEditor}. Adds
+ * the following functions:
* <ul>
- * <li> insert mode management
+ * <li>insert mode management
* </ul>
* <p>
*
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IncrementalFindAction.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IncrementalFindAction.java
index 5325e518e..7dbcd0141 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IncrementalFindAction.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IncrementalFindAction.java
@@ -21,7 +21,7 @@ import org.eclipse.ui.IWorkbenchWindow;
/**
- * An action which enters the incremental find mode la emacs.
+ * An action which enters the incremental find mode a la emacs.
* <p>
* This class may be instantiated; it is not intended to be subclassed.
* </p>
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/InsertLineAction.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/InsertLineAction.java
index 5b07a6ec1..f5f2e512b 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/InsertLineAction.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/InsertLineAction.java
@@ -33,7 +33,7 @@ import org.eclipse.swt.custom.StyledText;
* <li> if the caret is on a line containing any non-whitespace, we insert a line above the
* current one and move the caret to it (i.e. it stays at the same offset in the widget),</li>
* <li> if the caret is on a whitespace-only line, a line is inserted above the current line,
- * but the caret stays in its logical position (i.e., it gets shiftet one line down in the
+ * but the caret stays in its logical position (i.e., it gets shifted one line down in the
* document, but keeps its position relative to the content following the caret).</li>
* </ul>
* </p>
@@ -143,7 +143,7 @@ public class InsertLineAction extends TextEditorAction {
} else {
lineLength= st.getOffsetAtLine(lineNumber + 1); // next line offset
lineLength -= lineOffset;
- lineLength -= st.getLineDelimiter().length(); // subtract line delim
+ lineLength -= st.getLineDelimiter().length(); // subtract line delimiter
}
return lineLength;
}
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/RetargetTextEditorAction.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/RetargetTextEditorAction.java
index 242b6ecf0..8e56aefc5 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/RetargetTextEditorAction.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/RetargetTextEditorAction.java
@@ -30,9 +30,6 @@ import org.eclipse.jface.util.PropertyChangeEvent;
* the "wrapped" action sends out property change events in response to state
* changes. It uses these change notifications to adapt its enabling state and
* its visual presentation.
- * <p>
- * This class may be instantiated; it is not intended to be subclassed.
- * </p>
*/
public final class RetargetTextEditorAction extends ResourceAction {
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/SourceViewerDecorationSupport.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/SourceViewerDecorationSupport.java
index bcc870e2a..bd659e997 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/SourceViewerDecorationSupport.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/SourceViewerDecorationSupport.java
@@ -43,8 +43,41 @@ import org.eclipse.jface.text.source.MatchingCharacterPainter;
import org.eclipse.jface.text.source.AnnotationPainter.IDrawingStrategy;
/**
- * Support for source viewer decoration.
+ * Support class used by text editors to draw and update decorations on the
+ * source viewer and its rulers. An instance of this class is independent of a
+ * certain editor and must be configured with the needed preference keys and
+ * helper objects before it can be used.
+ * <p>
+ * Once configured, an instance may be installed (see
+ * {@link #install(IPreferenceStore) install}) on a preference store, from then
+ * on monitoring the configured preference settings and changing the respective
+ * decorations. Calling {@link #uninstall() uninstall} will unregister the
+ * listeners with the preferences store and must be called before changing the
+ * preference store by another call to <code>install</code>.<br>
+ * {@link #dispose() dispose} will uninstall the support and remove any
+ * decorations from the viewer. It is okay to reuse a
+ * <code>SourceViewerDecorationSupport</code> instance after disposing it.
+ * </p>
+ * <p>
+ * <code>SourceViewerDecorationSupport</code> can draw the following
+ * decorations:
+ * <ul>
+ * <li>matching character highlighting,</li>
+ * <li>current line highlighting,</li>
+ * <li>print margin, and</li>
+ * <li>annotations.</li>
+ * </ul>
+ * Annotations are managed for the overview ruler and also drawn onto the text
+ * widget by an
+ * {@link org.eclipse.jface.text.source.AnnotationPainter AnnotationPainter}
+ * instance.
+ * </p>
+ * <p>
+ * Subclasses may add decorations but should adhere to the lifecyle described
+ * above.
+ * </p>
*
+ * @see org.eclipse.jface.text.source.AnnotationPainter
* @since 2.1
*/
public class SourceViewerDecorationSupport {
@@ -896,7 +929,7 @@ public class SourceViewerDecorationSupport {
* Enable annotation overview for the given annotation type.
*
* @param annotationType the annotation type
- * @param update <code>true</code> iff the overview should be updated
+ * @param update <code>true</code> if the overview should be updated
*/
private void showAnnotationOverview(Object annotationType, boolean update) {
if (fOverviewRuler != null) {
@@ -911,7 +944,7 @@ public class SourceViewerDecorationSupport {
/**
* Hides the annotation overview for the given type.
* @param annotationType the annotation type
- * @param update <code>true</code> iff the overview should be updated
+ * @param update <code>true</code> if the overview should be updated
*/
private void hideAnnotationOverview(Object annotationType, boolean update) {
if (fOverviewRuler != null) {
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/TextEditorAction.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/TextEditorAction.java
index 446d2cf11..9d165c90a 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/TextEditorAction.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/TextEditorAction.java
@@ -19,6 +19,13 @@ import java.util.ResourceBundle;
* but can subsequently be changed using <code>setEditor</code>.
* Subclasses must implement the <code>run</code> method and if
* required override the <code>update</code> method.
+ * <p>
+ * Subclasses that may modify the editor content should use {@link #canModifyEditor()}
+ * in their <code>update</code> code to check whether updating the editor is most
+ * likely possible (even if it is read-only - this may change for editor contents
+ * that are under version control) and {@link #validateEditorInputState()} before
+ * actually modifying the editor contents.
+ * </p>
*/
public abstract class TextEditorAction extends ResourceAction implements IUpdate {
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/quickdiff/QuickDiff.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/quickdiff/QuickDiff.java
index c06ba7428..c9c0e6ef5 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/quickdiff/QuickDiff.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/quickdiff/QuickDiff.java
@@ -24,7 +24,9 @@ import org.eclipse.ui.texteditor.ITextEditor;
/**
* Access class for the quick diff reference provider extension point.
- *
+ * <p>
+ * This class may be instantiated, it is not intended to be subclassed.
+ * </p>
* @since 3.0
*/
public class QuickDiff {
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplatePreferencePage.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplatePreferencePage.java
index 03c53f356..89a56eb94 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplatePreferencePage.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplatePreferencePage.java
@@ -144,7 +144,7 @@ public abstract class TemplatePreferencePage extends PreferencePage implements I
/** The viewer displays the pattern of selected template. */
private SourceViewer fPatternViewer;
- /** Format checkbox. This gets conditionaly added. */
+ /** Format checkbox. This gets conditionally added. */
private Button fFormatButton;
/** The store for our templates. */
private TemplateStore fTemplateStore;
@@ -153,7 +153,7 @@ public abstract class TemplatePreferencePage extends PreferencePage implements I
/**
- * Creates a new template preferenc page.
+ * Creates a new template preference page.
*/
protected TemplatePreferencePage() {
super();
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplateVariableProcessor.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplateVariableProcessor.java
index 94022123b..ba242a5fa 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplateVariableProcessor.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplateVariableProcessor.java
@@ -28,6 +28,10 @@ import org.eclipse.jface.text.templates.TemplateVariableResolver;
/**
* A content assist processor for template variables.
+ * <p>
+ * This class should not be used by clients and may become package visible in
+ * the future.
+ * </p>
*
* @since 3.0
*/
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplateVariableProposal.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplateVariableProposal.java
index 1a7e59b6e..1e867832f 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplateVariableProposal.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/templates/TemplateVariableProposal.java
@@ -24,8 +24,11 @@ import org.eclipse.jface.text.contentassist.IContextInformation;
import org.eclipse.jface.text.templates.TemplateVariableResolver;
/**
- * A proposal for insertion of template variables. Clients ususally do not have
- * to instantiate this class.
+ * A proposal for insertion of template variables.
+ * <p>
+ * This class should not be used by clients and may become package visible in
+ * the future.
+ * </p>
*
* @since 3.0
*/

Back to the top