From eece3f7a33f5ba3fd5e7f6c2fd7d9397d6f338e6 Mon Sep 17 00:00:00 2001 From: teicher Date: Wed, 23 Jun 2004 13:53:54 +0000 Subject: 3.0 javadoc pass --- .../ui/texteditor/AbstractDecoratedTextEditor.java | 2 +- .../ui/contentassist/ContentAssistHandler.java | 3 +- .../ui/texteditor/AbstractDocumentProvider.java | 17 +- .../ui/texteditor/AbstractRulerActionDelegate.java | 1 + .../eclipse/ui/texteditor/AbstractTextEditor.java | 300 ++++++++++++++------- .../ui/texteditor/AnnotationPreference.java | 66 +++-- .../BasicTextEditorActionContributor.java | 26 +- .../ui/texteditor/ConfigurationElementSorter.java | 4 +- .../ui/texteditor/ConvertLineDelimitersAction.java | 5 +- .../eclipse/ui/texteditor/DeleteLineAction.java | 4 +- .../org/eclipse/ui/texteditor/FindNextAction.java | 7 +- .../IAbstractTextEditorHelpContextIds.java | 4 - .../eclipse/ui/texteditor/IDocumentProvider.java | 48 ++-- .../ui/texteditor/IDocumentProviderExtension.java | 2 +- .../ui/texteditor/IDocumentProviderExtension2.java | 2 +- .../ui/texteditor/IDocumentProviderExtension3.java | 2 +- .../ui/texteditor/IElementStateListener.java | 11 + .../texteditor/IElementStateListenerExtension.java | 2 +- .../texteditor/IFindReplaceTargetExtension2.java | 6 +- .../org/eclipse/ui/texteditor/IStatusField.java | 13 +- .../ui/texteditor/IStatusFieldExtension.java | 4 +- .../src/org/eclipse/ui/texteditor/ITextEditor.java | 37 ++- .../ui/texteditor/ITextEditorActionConstants.java | 4 +- .../texteditor/ITextEditorActionDefinitionIds.java | 6 +- .../ui/texteditor/ITextEditorExtension.java | 3 +- .../ui/texteditor/ITextEditorExtension2.java | 9 +- .../ui/texteditor/ITextEditorExtension3.java | 5 +- .../ui/texteditor/IncrementalFindAction.java | 2 +- .../eclipse/ui/texteditor/InsertLineAction.java | 4 +- .../ui/texteditor/RetargetTextEditorAction.java | 3 - .../texteditor/SourceViewerDecorationSupport.java | 39 ++- .../eclipse/ui/texteditor/TextEditorAction.java | 7 + .../eclipse/ui/texteditor/quickdiff/QuickDiff.java | 4 +- .../templates/TemplatePreferencePage.java | 4 +- .../templates/TemplateVariableProcessor.java | 4 + .../templates/TemplateVariableProposal.java | 7 +- 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 438cb864fd4..91f604509ba 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 45a7ca50d9b..0689fe5a9de 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 622b65a6d31..7a822fad0bd 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. *

* Subclasses must implement createDocument, * createAnnotationModel, and doSaveDocument. @@ -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.

- * Subclasses must implement this method. + * Creates an annotation model for the given element. + *

+ * Subclasses must implement this method.

* * @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 188f9f3c061..ea34452220f 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.

* Extending classes must implement the factory method * createAction(ITextEditor editor, IVerticalRulerInfo). + * * @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 deb8d66fcb9..9909f1c888d 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 null if no + * range indicator is installed. * - * @return the editor's range indicator + * @return the editor's range indicator which may be null */ protected final Annotation getRangeIndicator() { return fRangeIndicator; } /** - * Returns the editor's source viewer configuration. + * Returns the editor's source viewer configuration. May return null + * 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 null */ protected final SourceViewerConfiguration getSourceViewerConfiguration() { return fConfiguration; } /** - * Returns the editor's source viewer. + * Returns the editor's source viewer. May return null 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 null */ protected final ISourceViewer getSourceViewer() { return fSourceViewer; } /** - * Returns the editor's vertical ruler. + * Returns the editor's vertical ruler. May return null 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 null */ protected final IVerticalRuler getVerticalRuler() { return fVerticalRuler; } /** - * Returns the editor's context menu id. + * Returns the editor's context menu id. May return null 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 null */ protected final String getEditorContextMenuId() { return fEditorContextMenuId; } /** - * Returns the ruler's context menu id. + * Returns the ruler's context menu id. May return null 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 null */ protected final String getRulerContextMenuId() { return fRulerContextMenuId; } /** - * Returns the editor's help context id. + * Returns the editor's help context id or null if none has + * been set. * - * @return the editor's help context id + * @return the editor's help context id which may be null */ protected final String getHelpContextId() { return fHelpContextId; } /** - * Returns this editor's preference store. + * Returns this editor's preference store or null if none has + * been set. * - * @return this editor's preference store + * @return this editor's preference store which may be null */ 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 DefaultRangeIndicator. + * 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 null 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} + *

+ * Returns null after disposal. + *

+ * + * @return the selection provider or null 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 init method of IEditorPart. + * Subclasses replacing init 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 AbstractTextEditor implementation of this + * The AbstractTextEditor implementation of this * IWorkbenchPart method creates the vertical ruler and * source viewer. - * Subclasses may extend. + *

+ * Subclasses may extend this method. Besides extending this method, the + * behavior of createPartControl may be customized by + * calling, extending or replacing the following methods:
+ * Subclasses may supply customized implementations for some members using + * the following methods before createPartControl is invoked: + *

+ *
+ * Subclasses may replace the following methods called from within + * createPartControl: + * + *
+ * Subclasses may extend the following methods called from within + * createPartControl: + * + *

* * @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 setInput method. - * + * Called directly from setInput and from within a workspace + * runnable from init, this method does the actual setting + * of the editor input. Closes the editor if input is + * null. Disconnects from any previous editor input and its + * document provider and connects to the new one. + *

+ * Subclasses may extend. + *

+ * * @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 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. + *

*/ 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 null if none is defined + * @return a String with the symbolic font name or null 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. + *

+ * Subclasses may extend. + *

* * @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 AbstractTextEditor implementation of this @@ -3557,6 +3648,9 @@ public abstract class AbstractTextEditor extends EditorPart implements ITextEdit /** * Performs revert and handles errors appropriately. + *

+ * Subclasses may extend. + *

* * @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. - *

+ * Performs any additional action necessary to perform after the input + * document's content has been replaced. + *

* 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 true to enable new overwrite mode, + * false 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 caf2584cadb..74bd58c5387 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 getAnnotationType + * and setAnnotationType methods. For each preference, getter and + * setter methods are provided. + *

+ * 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 + * IPreferenceStore. + *

+ *

The following annotation preferences are covered:

+ *

Display Preferences controlling how and where annotations are shown

* + *

Additional Display Preferences

+ * + *

Navigation Preferences

+ * + *

Preference Page Preferences

+ * * * @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 f137d813667..09059f68a65 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. *

* 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 6f23bdb0bba..5515e5668b8 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. *

- * This class can directly be used or subclassed. + * This class may be subclassed. *

* * @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 439e2ae671a..4566a80b456 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 da8419bd36a..17fde01528f 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 bundle * @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 bundle * @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 6afa1938990..77c51242405 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. *

* This class may be instantiated; it is not intended to be subclassed. *

+ * * @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 54e1a33ef50..488f1fbbe1a 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: "org.eclipse.ui.undo_action_context" 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 35de8b77042..baca61b061d 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: * * 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. *

- * This interface may be implemented by clients; or subclass the standard - * abstract base class AbstractDocumentProvider.

- * + * This interface may be implemented by clients; or subclass the standard abstract base class + * AbstractDocumentProvider. + *

+ *

+ * In order to provided backward compatibility for clients of IDocumentProvider, + * extension interfaces are used to provide a means of evolution. The following extension interfaces + * exist: + *

+ *

+ * * @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 bc28f1d8893..42a306e6dba 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 IDocumentProvider. It adds the following + * Extension interface for {@link IDocumentProvider}. It adds the following * functions: *