Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2003-03-25 18:47:33 +0000
committerDani Megert2003-03-25 18:47:33 +0000
commit5c76086984d39d31ee34638d17a476c7535719d1 (patch)
tree481572e0d38c0a7c5cc35f854bfedd67af549cac
parent2752b48896721e5db7b721864ccb2676f238c811 (diff)
downloadeclipse.platform.text-5c76086984d39d31ee34638d17a476c7535719d1.tar.gz
eclipse.platform.text-5c76086984d39d31ee34638d17a476c7535719d1.tar.xz
eclipse.platform.text-5c76086984d39d31ee34638d17a476c7535719d1.zip
Updated Javadocv20030325
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/DefaultEncodingSupport.java8
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/EncodingActionGroup.java31
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/FileDocumentProvider.java15
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/IEncodingActionsConstants.java22
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/IEncodingActionsDefinitionIds.java22
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/IEncodingActionsHelpContextIds.java22
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/IEncodingSupport.java1
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/IStorageDocumentProvider.java10
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/ITextEditorHelpContextIds.java5
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/StorageDocumentProvider.java11
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextEditor.java88
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextEditorPreferenceConstants.java3
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/ColorEditor.java37
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/EditorsPlugin.java5
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/IEditorsStatusConstants.java12
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/OverlayPreferenceStore.java93
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/SharedTextColors.java12
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/StatusInfo.java32
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TabFolderLayout.java14
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorMessages.java6
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorPreferencePage2.java8
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/SelectMarkerRulerAction.java8
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/TaskRulerAction.java4
23 files changed, 356 insertions, 113 deletions
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/DefaultEncodingSupport.java b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/DefaultEncodingSupport.java
index b1b03b84228..f30cc558266 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/DefaultEncodingSupport.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/DefaultEncodingSupport.java
@@ -167,6 +167,7 @@ public class DefaultEncodingSupport implements IEncodingSupport {
/**
* Returns a status header for the given status.
+ *
* @param status the status
* @return a status header for the given status.
*/
@@ -183,7 +184,8 @@ public class DefaultEncodingSupport implements IEncodingSupport {
}
/**
- * Returns a banner for the given status
+ * Returns a banner for the given status.
+ *
* @param status the status
* @return a banner for the given status.
*/
@@ -201,10 +203,10 @@ public class DefaultEncodingSupport implements IEncodingSupport {
}
/**
- * Returns a status message for the given status indicating encoding problems or <code>null</code> otherwise.
+ * Returns a status message if any.
*
* @param status the status
- * @return a status message indicating encoding problems
+ * @return a status message indicating encoding problems or <code>null</code> otherwise
*/
public String getStatusMessage(IStatus status) {
Throwable t= status.getException();
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/EncodingActionGroup.java b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/EncodingActionGroup.java
index 78ab5308dc9..2a80dcff821 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/EncodingActionGroup.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/EncodingActionGroup.java
@@ -47,7 +47,7 @@ public class EncodingActionGroup extends ActionGroup {
/** The target encoding of this action. */
private String fEncoding;
- /** The action label */
+ /** The action label. */
private String fLabel;
/** Indicates whether the target encoding is the default encoding. */
private boolean fIsDefault;
@@ -85,7 +85,7 @@ public class EncodingActionGroup extends ActionGroup {
/**
* Returns the encoding support of the action's editor.
*
- * @return the encoding support of the action's editor
+ * @return the encoding support of the action's editor or <code>null</code> if none
*/
private IEncodingSupport getEncodingSupport() {
ITextEditor editor= getTextEditor();
@@ -107,7 +107,7 @@ public class EncodingActionGroup extends ActionGroup {
* Returns the encoding currently used in the given editor.
*
* @param editor the editor
- * @return the encoding currently used in the given editor
+ * @return the encoding currently used in the given editor or <code>null</code> if no encoding support is installed
*/
private String getEncoding(ITextEditor editor) {
IEncodingSupport s= getEncodingSupport();
@@ -120,7 +120,7 @@ public class EncodingActionGroup extends ActionGroup {
* Returns the default encoding for the given editor.
*
* @param editor the editor
- * @return the default encoding for the given editor
+ * @return the default encoding for the given editor or <code>null</code> if no encoding support is installed
*/
private String getDefaultEncoding(ITextEditor editor) {
IEncodingSupport s= getEncodingSupport();
@@ -187,12 +187,7 @@ public class EncodingActionGroup extends ActionGroup {
ITextEditor editor= getTextEditor();
setEnabled(editor != null && !editor.isDirty());
}
-
-
-
-
-
/*
* @see IAction#run()
*/
@@ -227,13 +222,13 @@ public class EncodingActionGroup extends ActionGroup {
};
- /** Suffix added to the default encoding action */
+ /** Suffix added to the default encoding action. */
private static final String DEFAULT_SUFFIX= " " + TextEditorMessages.getString("Editor.ConvertEncoding.default_suffix"); //$NON-NLS-1$ //$NON-NLS-2$
- /** List of predefined encodings */
+ /** List of predefined encodings. */
private static final String[][] ENCODINGS;
- /** The default encoding */
+ /** The default encoding. */
private static final String SYSTEM_ENCODING;
/**
@@ -275,7 +270,7 @@ public class EncodingActionGroup extends ActionGroup {
- /** List of encoding actions of this group */
+ /** List of encoding actions of this group. */
private List fRetargetActions= new ArrayList();
/**
@@ -295,7 +290,7 @@ public class EncodingActionGroup extends ActionGroup {
}
/*
- * @see ActionGroup#fillActionBars(IActionBars)
+ * @see ActionGroup#fillActionBars(org.eclipse.ui.IActionBars)
*/
public void fillActionBars(IActionBars actionBars) {
IMenuManager menuManager= actionBars.getMenuManager();
@@ -314,7 +309,7 @@ public class EncodingActionGroup extends ActionGroup {
/**
* Retargets this action group to the given editor.
*
- * @param editor the target editor
+ * @param editor the text editor to which the group should be retargeted
*/
public void retarget(ITextEditor editor) {
Iterator e= fRetargetActions.iterator();
@@ -328,13 +323,13 @@ public class EncodingActionGroup extends ActionGroup {
//------------------------------------------------------------------------------------------
- /** Text editor this group is associated with */
+ /** Text editor this group is associated with. */
private ITextEditor fTextEditor;
/**
- * Creates a new encoding action group for the given editor
+ * Creates a new encoding action group for the given editor.
*
- * @param editor the editor
+ * @param editor the text editor
*/
public EncodingActionGroup(ITextEditor editor) {
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/FileDocumentProvider.java b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/FileDocumentProvider.java
index 11cd748692a..501542226c2 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/FileDocumentProvider.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/FileDocumentProvider.java
@@ -56,6 +56,9 @@ import org.eclipse.ui.texteditor.ResourceMarkerAnnotationModel;
*/
public class FileDocumentProvider extends StorageDocumentProvider {
+ /**
+ * @since 2.1
+ */
private static final QualifiedName ENCODING_KEY = new QualifiedName("org.eclipse.ui.editors", "encoding"); //$NON-NLS-1$ //$NON-NLS-2$
/**
@@ -111,7 +114,10 @@ public class FileDocumentProvider extends StorageDocumentProvider {
/** The file editor input */
protected IFileEditorInput fFileEditorInput;
- /** A flag indicating whether this synchronizer is installed or not. */
+ /**
+ * A flag indicating whether this synchronizer is installed or not.
+ * @since 2.1
+ */
protected boolean fIsInstalled= false;
/**
@@ -685,6 +691,7 @@ public class FileDocumentProvider extends StorageDocumentProvider {
*
* @param file
* @throws CoreException
+ * @since 2.1
*/
protected void refreshFile(IFile file) throws CoreException {
try {
@@ -695,6 +702,9 @@ public class FileDocumentProvider extends StorageDocumentProvider {
// --------------- Encoding support ---------------
+ /**
+ * @since 2.1
+ */
protected String getPersistedEncoding(Object element) {
if (element instanceof IFileEditorInput) {
IFileEditorInput editorInput= (IFileEditorInput)element;
@@ -709,6 +719,9 @@ public class FileDocumentProvider extends StorageDocumentProvider {
return null;
}
+ /**
+ * @since 2.1
+ */
protected void persistEncoding(Object element, String encoding) throws CoreException {
if (element instanceof IFileEditorInput) {
IFileEditorInput editorInput= (IFileEditorInput)element;
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/IEncodingActionsConstants.java b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/IEncodingActionsConstants.java
index 1cd502fb5b1..9f8b0df6096 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/IEncodingActionsConstants.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/IEncodingActionsConstants.java
@@ -12,56 +12,58 @@
package org.eclipse.ui.editors.text;
/**
- * Defines the names of the encoding actions.<p>
- * This interface contains constants only; it is not intended to be implemented.
+ * Defines the names of the encoding actions.
+ * <p>
+ * This interface contains constants only; it is not intended to be implemented.</p>
+ *
* @since 2.0
*/
public interface IEncodingActionsConstants {
/**
- * Name of the action to changes the encoding into US ASCII.
+ * Name of the action to change the encoding into US ASCII.
* Value is <code>"US-ASCII"</code>.
*/
static final String US_ASCII= "US-ASCII"; //$NON-NLS-1$
/**
- * Name of the action to changes the encoding into ISO-8859-1.
+ * Name of the action to change the encoding into ISO-8859-1.
* Value is <code>"ISO-8859-1"</code>.
*/
static final String ISO_8859_1= "ISO-8859-1"; //$NON-NLS-1$
/**
- * Name of the action to changes the encoding into UTF-8.
+ * Name of the action to change the encoding into UTF-8.
* Value is <code>"UTF-8"</code>.
*/
static final String UTF_8= "UTF-8"; //$NON-NLS-1$
/**
- * Name of the action to changes the encoding into UTF-16BE.
+ * Name of the action to change the encoding into UTF-16BE.
* Value is <code>"UTF-16BE"</code>.
*/
static final String UTF_16BE= "UTF-16BE"; //$NON-NLS-1$
/**
- * Name of the action to changes the encoding into UTF-16LE.
+ * Name of the action to change the encoding into UTF-16LE.
* Value is <code>"UTF-16LE"</code>.
*/
static final String UTF_16LE= "UTF-16LE"; //$NON-NLS-1$
/**
- * Name of the action to changes the encoding into UTF-16.
+ * Name of the action to change the encoding into UTF-16.
* Value is <code>"UTF-16"</code>.
*/
static final String UTF_16= "UTF-16"; //$NON-NLS-1$
/**
- * Name of the action to changes the encoding into the system encoding.
+ * Name of the action to change the encoding into the system encoding.
* Value is <code>"System"</code>.
*/
static final String SYSTEM= "System"; //$NON-NLS-1$
/**
- * Name of the action to changes the encoding into a custom encoding.
+ * Name of the action to change the encoding into a custom encoding.
* Value is <code>"Custom"</code>.
*/
static final String CUSTOM= "Custom"; //$NON-NLS-1$
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/IEncodingActionsDefinitionIds.java b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/IEncodingActionsDefinitionIds.java
index 48dda9586e8..644a131e5c0 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/IEncodingActionsDefinitionIds.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/IEncodingActionsDefinitionIds.java
@@ -13,55 +13,57 @@ package org.eclipse.ui.editors.text;
/**
- * Defines the definition ids for the encoding actions. <p>
- * This interface contains constants only; it is not intended to be implemented.
+ * Defines the definition ids for the encoding actions.
+ * <p>
+ * This interface contains constants only; it is not intended to be implemented.</p>
+ *
* @since 2.0
*/
public interface IEncodingActionsDefinitionIds {
/**
- * Action definition id of the action to changes the encoding into US ASCII.
+ * Action definition id of the action to change the encoding into US ASCII.
* Value is <code>"org.eclipse.ui.edit.text.encoding.us-ascii"</code>.
*/
public static final String US_ASCII= "org.eclipse.ui.edit.text.encoding.us-ascii"; //$NON-NLS-1$
/**
- * Action definition id of the action to changes the encoding into ISO-8859-1.
+ * Action definition id of the action to change the encoding into ISO-8859-1.
* Value is <code>"org.eclipse.ui.edit.text.encoding.iso-8859-1"</code>.
*/
public static final String ISO_8859_1= "org.eclipse.ui.edit.text.encoding.iso-8859-1"; //$NON-NLS-1$
/**
- * Action definition id of the action to changes the encoding into UTF-8.
+ * Action definition id of the action to change the encoding into UTF-8.
* Value is <code>"org.eclipse.ui.edit.text.encoding.utf-8"</code>.
*/
public static final String UTF_8= "org.eclipse.ui.edit.text.encoding.utf-8"; //$NON-NLS-1$
/**
- * Action definition id of the action to changes the encoding into UTF-16BE.
+ * Action definition id of the action to change the encoding into UTF-16BE.
* Value is <code>"org.eclipse.ui.edit.text.encoding.utf-16be"</code>.
*/
public static final String UTF_16BE= "org.eclipse.ui.edit.text.encoding.utf-16be"; //$NON-NLS-1$
/**
- * Action definition id of the action to changes the encoding into UTF-16LE.
+ * Action definition id of the action to change the encoding into UTF-16LE.
* Value is <code>"org.eclipse.ui.edit.text.encoding.utf-16le"</code>.
*/
public static final String UTF_16LE= "org.eclipse.ui.edit.text.encoding.utf-16le"; //$NON-NLS-1$
/**
- * Action definition id of the action to changes the encoding into UTF-16.
+ * Action definition id of the action to change the encoding into UTF-16.
* Value is <code>"org.eclipse.ui.edit.text.encoding.utf-16"</code>.
*/
public static final String UTF_16= "org.eclipse.ui.edit.text.encoding.utf-16"; //$NON-NLS-1$
/**
- * Action definition id of the action to changes the encoding into the system encoding.
+ * Action definition id of the action to change the encoding into the system encoding.
* Value is <code>"org.eclipse.ui.edit.text.encoding.system"</code>.
*/
public static final String SYSTEM= "org.eclipse.ui.edit.text.encoding.system"; //$NON-NLS-1$
/**
- * Action definition id of the action to changes the encoding into a custom encoding.
+ * Action definition id of the action to change the encoding into a custom encoding.
* Value is <code>"org.eclipse.ui.edit.text.encoding.custom"</code>.
*/
public static final String CUSTOM= "org.eclipse.ui.edit.text.encoding.custom"; //$NON-NLS-1$
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/IEncodingActionsHelpContextIds.java b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/IEncodingActionsHelpContextIds.java
index 972163c4850..58cf76ea9ec 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/IEncodingActionsHelpContextIds.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/IEncodingActionsHelpContextIds.java
@@ -15,56 +15,58 @@ package org.eclipse.ui.editors.text;
import org.eclipse.ui.texteditor.IAbstractTextEditorHelpContextIds;
/**
- * Help context ids for the encoding actions. <p>
- * This interface contains constants only; it is not intended to be implemented.
+ * Help context ids for the encoding actions.
+ * <p>
+ * This interface contains constants only; it is not intended to be implemented.</p>
+ *
* @since 2.0
*/
public interface IEncodingActionsHelpContextIds {
/**
- * Help id of the action to changes the encoding into US ASCII.
+ * Help id of the action to change the encoding into US ASCII.
* Default value: <code>"org.eclipse.ui.US-ASCII_action_context"</code>
*/
public static final String US_ASCII= IAbstractTextEditorHelpContextIds.PREFIX + IEncodingActionsConstants.US_ASCII + IAbstractTextEditorHelpContextIds.ACTION_POSTFIX;
/**
- * Help id of the action to changes the encoding into ISO-8859-1.
+ * Help id of the action to change the encoding into ISO-8859-1.
* Default value: <code>"org.eclipse.ui.ISO-8859-1_action_context"</code>
*/
public static final String ISO_8859_1= IAbstractTextEditorHelpContextIds.PREFIX + IEncodingActionsConstants.ISO_8859_1 + IAbstractTextEditorHelpContextIds.ACTION_POSTFIX;
/**
- * Help id of the action to changes the encoding into UTF-8
+ * Help id of the action to change the encoding into UTF-8
* Default value: <code>"org.eclipse.ui.UTF-8_action_context"</code>
*/
public static final String UTF_8= IAbstractTextEditorHelpContextIds.PREFIX + IEncodingActionsConstants.UTF_8 + IAbstractTextEditorHelpContextIds.ACTION_POSTFIX;
/**
- * Help id of the action to changes the encoding into UTF-16BE.
+ * Help id of the action to change the encoding into UTF-16BE.
* Default value: <code>"org.eclipse.ui.UTF-16BE_action_context"</code>
*/
public static final String UTF_16BE= IAbstractTextEditorHelpContextIds.PREFIX + IEncodingActionsConstants.UTF_16BE + IAbstractTextEditorHelpContextIds.ACTION_POSTFIX;
/**
- * Help id of the action to changes the encoding into UTF-16LE.
+ * Help id of the action to change the encoding into UTF-16LE.
* Default value: <code>"org.eclipse.ui.UTF-16LE_action_context"</code>
*/
public static final String UTF_16LE= IAbstractTextEditorHelpContextIds.PREFIX + IEncodingActionsConstants.UTF_16LE + IAbstractTextEditorHelpContextIds.ACTION_POSTFIX;
/**
- * Help id of the action to changes the encoding into UTF-16.
+ * Help id of the action to change the encoding into UTF-16.
* Default value: <code>"org.eclipse.ui.UTF-16_action_context"</code>
*/
public static final String UTF_16= IAbstractTextEditorHelpContextIds.PREFIX + IEncodingActionsConstants.UTF_16 + IAbstractTextEditorHelpContextIds.ACTION_POSTFIX;
/**
- * Help id of the action to changes the encoding into the system encoding.
+ * Help id of the action to change the encoding into the system encoding.
* Default value: <code>"org.eclipse.ui.System_action_context"</code>
*/
public static final String SYSTEM= IAbstractTextEditorHelpContextIds.PREFIX + IEncodingActionsConstants.SYSTEM + IAbstractTextEditorHelpContextIds.ACTION_POSTFIX;
/**
- * Help id of the action to changes the encoding into a custom encoding.
+ * Help id of the action to change the encoding into a custom encoding.
* Default value: <code>"org.eclipse.ui.Custom_action_context"</code>
*/
public static final String CUSTOM= IAbstractTextEditorHelpContextIds.PREFIX + IEncodingActionsConstants.CUSTOM + IAbstractTextEditorHelpContextIds.ACTION_POSTFIX;
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/IEncodingSupport.java b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/IEncodingSupport.java
index 0758e8d43a5..741e0dad272 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/IEncodingSupport.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/IEncodingSupport.java
@@ -13,6 +13,7 @@ package org.eclipse.ui.editors.text;
/**
* Interface to be implemented by objects supporting character encodings.
+ *
* @since 2.0
*/
public interface IEncodingSupport{
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/IStorageDocumentProvider.java b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/IStorageDocumentProvider.java
index af6425151b7..0c0303905a0 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/IStorageDocumentProvider.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/IStorageDocumentProvider.java
@@ -21,23 +21,23 @@ package org.eclipse.ui.editors.text;
public interface IStorageDocumentProvider {
/**
- * Returns the default character encoding used by this provider for reading.
+ * Returns the default character encoding used by this provider.
*
- * @return the default character encoding used by this provider for reading
+ * @return the default character encoding used by this provider
*/
String getDefaultEncoding();
/**
- * Returns the character encoding for reading the given element, or
+ * Returns the character encoding for the given element, or
* <code>null</code> if the element is not managed by this provider.
*
* @param element the element
- * @return the encoding for reading the given element
+ * @return the encoding for the given element
*/
String getEncoding(Object element);
/**
- * Sets the encoding for reading the given element. If <code>encoding</code>
+ * Sets the encoding for the given element. If <code>encoding</code>
* is <code>null</code> the workbench's character encoding should be used.
*
* @param element the element
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/ITextEditorHelpContextIds.java b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/ITextEditorHelpContextIds.java
index 772eace2fd9..ef35fbff4df 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/ITextEditorHelpContextIds.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/ITextEditorHelpContextIds.java
@@ -14,8 +14,9 @@ package org.eclipse.ui.editors.text;
import org.eclipse.ui.texteditor.IAbstractTextEditorHelpContextIds;
/**
- * Help context ids for the text editor. <p>
- * This interface contains constants only; it is not intended to be implemented.
+ * Help context ids for the text editor.
+ * <p>
+ * This interface contains constants only; it is not intended to be implemented.</p>
*/
public interface ITextEditorHelpContextIds extends IAbstractTextEditorHelpContextIds {
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/StorageDocumentProvider.java b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/StorageDocumentProvider.java
index a78d94ccaca..f78487f8d5e 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/StorageDocumentProvider.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/StorageDocumentProvider.java
@@ -46,7 +46,11 @@ import org.eclipse.ui.texteditor.AbstractDocumentProvider;
*/
public class StorageDocumentProvider extends AbstractDocumentProvider implements IStorageDocumentProvider {
- /** Default file size. */
+ /**
+ * Default file size.
+ *
+ * @since 2.1
+ */
protected final static int DEFAULT_FILE_SIZE= 15 * 1024;
@@ -185,6 +189,7 @@ public class StorageDocumentProvider extends AbstractDocumentProvider implements
/**
* Factory method for creating empty documents.
* @return the newly created document
+ * @since 2.1
*/
protected IDocument createEmptyDocument() {
return new Document();
@@ -375,6 +380,8 @@ public class StorageDocumentProvider extends AbstractDocumentProvider implements
/**
* Gets the persited encoding.
+ *
+ * @since 2.1
*/
protected String getPersistedEncoding(Object element) {
// Default is to do use return the default encoding
@@ -383,6 +390,8 @@ public class StorageDocumentProvider extends AbstractDocumentProvider implements
/**
* Persists the current encoding.
+ *
+ * @since 2.1
*/
protected void persistEncoding(Object element, String encoding) throws CoreException {
// Default is to do nothing
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextEditor.java b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextEditor.java
index 824617dc45f..dafd729d036 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextEditor.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextEditor.java
@@ -87,46 +87,79 @@ import org.eclipse.ui.internal.editors.text.EditorsPlugin;
*/
public class TextEditor extends StatusTextEditor {
- /** Preference key for showing the line number ruler */
+ /**
+ * Preference key for showing the line number ruler.
+ * @since 2.1
+ */
private final static String LINE_NUMBER_RULER= TextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER;
- /** Preference key for the foreground color of the line numbers */
+ /**
+ * Preference key for the foreground color of the line numbers.
+ * @since 2.1
+ */
private final static String LINE_NUMBER_COLOR= TextEditorPreferenceConstants.EDITOR_LINE_NUMBER_RULER_COLOR;
- /** Preference key for showing the overview ruler */
+ /**
+ * Preference key for showing the overview ruler.
+ * @since 2.1
+ */
private final static String OVERVIEW_RULER= TextEditorPreferenceConstants.EDITOR_OVERVIEW_RULER;
- /** Preference key for unknown annotation indication in overview ruler */
+ /**
+ * Preference key for unknown annotation indication in overview ruler.
+ * @since 2.1
+ **/
private final static String UNKNOWN_INDICATION_IN_OVERVIEW_RULER= TextEditorPreferenceConstants.EDITOR_UNKNOWN_INDICATION_IN_OVERVIEW_RULER;
- /** Preference key for unknown annotation indication */
+ /**
+ * Preference key for unknown annotation indication.
+ * @since 2.1
+ **/
private final static String UNKNOWN_INDICATION= TextEditorPreferenceConstants.EDITOR_UNKNOWN_INDICATION;
- /** Preference key for unknown annotation color */
+ /**
+ * Preference key for unknown annotation color.
+ * @since 2.1
+ **/
private final static String UNKNOWN_INDICATION_COLOR= TextEditorPreferenceConstants.EDITOR_UNKNOWN_INDICATION_COLOR;
- /** Preference key for highlighting current line */
+ /**
+ * Preference key for highlighting current line.
+ * @since 2.1
+ */
private final static String CURRENT_LINE= TextEditorPreferenceConstants.EDITOR_CURRENT_LINE;
- /** Preference key for highlight color of current line */
+ /**
+ * Preference key for highlight color of current line.
+ * @since 2.1
+ */
private final static String CURRENT_LINE_COLOR= TextEditorPreferenceConstants.EDITOR_CURRENT_LINE_COLOR;
- /** Preference key for showing print marging ruler */
+ /**
+ * Preference key for showing print marging ruler.
+ * @since 2.1
+ */
private final static String PRINT_MARGIN= TextEditorPreferenceConstants.EDITOR_PRINT_MARGIN;
- /** Preference key for print margin ruler color */
+ /**
+ * Preference key for print margin ruler color.
+ * @since 2.1
+ */
private final static String PRINT_MARGIN_COLOR= TextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLOR;
- /** Preference key for print margin ruler column */
+ /**
+ * Preference key for print margin ruler column.
+ * @since 2.1
+ **/
private final static String PRINT_MARGIN_COLUMN= TextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLUMN;
/**
- * The overview ruler of this editor
+ * The overview ruler of this editor.
* @since 2.1
*/
protected IOverviewRuler fOverviewRuler;
/**
- * Helper for accessing annotation from the perspective of this editor
+ * Helper for accessing annotation from the perspective of this editor.
* @since 2.1
*/
protected IAnnotationAccess fAnnotationAccess;
/**
- * Helper for managing the decoration support of this editor's viewer
+ * Helper for managing the decoration support of this editor's viewer.
* @since 2.1
*/
protected SourceViewerDecorationSupport fSourceViewerDecorationSupport;
/**
- * The line number column
+ * The line number column.
* @since 2.1
*/
protected LineNumberRulerColumn fLineNumberRulerColumn;
@@ -165,6 +198,7 @@ public class TextEditor extends StatusTextEditor {
/**
* Initializes the key binding scopes of this editor.
+ * @since 2.1
*/
protected void initializeKeyBindingScopes() {
setKeyBindingScopes(new String[] { "org.eclipse.ui.textEditorScope" }); //$NON-NLS-1$
@@ -217,6 +251,7 @@ public class TextEditor extends StatusTextEditor {
* Subclasses may override to install their own encoding
* support or to disable the default encoding support.
* </p>
+ * @since 2.1
*/
protected void installEncodingSupport() {
fEncodingSupport= new DefaultEncodingSupport();
@@ -227,6 +262,7 @@ public class TextEditor extends StatusTextEditor {
* Asks the user if it is ok to store in non-workbench encoding.
*
* @return <true> if the user wants to continue or if no encoding support has been installed
+ * @since 2.1
*/
private boolean askIfNonWorkbenchEncodingIsOk() {
@@ -473,6 +509,7 @@ public class TextEditor extends StatusTextEditor {
/*
* @see org.eclipse.ui.texteditor.AbstractTextEditor#createSourceViewer(org.eclipse.swt.widgets.Composite, org.eclipse.jface.text.source.IVerticalRuler, int)
+ * @since 2.1
*/
protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
@@ -497,11 +534,15 @@ public class TextEditor extends StatusTextEditor {
/**
* Creates the annotation access for this editor.
* @return the created annotation access
+ * @since 2.1
*/
protected IAnnotationAccess createAnnotationAccess() {
return new DefaultMarkerAnnotationAccess(fAnnotationPreferences);
}
+ /**
+ * @since 2.1
+ */
protected void configureSourceViewerDecorationSupport() {
Iterator e= fAnnotationPreferences.getAnnotationPreferences().iterator();
@@ -514,6 +555,9 @@ public class TextEditor extends StatusTextEditor {
fSourceViewerDecorationSupport.setSymbolicFontName(getFontPropertyPreferenceKey());
}
+ /**
+ * @since 2.1
+ */
private void showOverviewRuler() {
if (getSourceViewer() instanceof ISourceViewerExtension) {
((ISourceViewerExtension) getSourceViewer()).showAnnotationsOverview(true);
@@ -521,6 +565,9 @@ public class TextEditor extends StatusTextEditor {
}
}
+ /**
+ * @since 2.1
+ */
private void hideOverviewRuler() {
if (getSourceViewer() instanceof ISourceViewerExtension) {
fSourceViewerDecorationSupport.hideAnnotationOverview();
@@ -528,6 +575,9 @@ public class TextEditor extends StatusTextEditor {
}
}
+ /**
+ * @since 2.1
+ */
protected boolean isOverviewRulerVisible() {
IPreferenceStore store= getPreferenceStore();
return store != null ? store.getBoolean(OVERVIEW_RULER) : false;
@@ -535,6 +585,7 @@ public class TextEditor extends StatusTextEditor {
/**
* Shows the line number ruler column.
+ * @since 2.1
*/
private void showLineNumberRuler() {
if (fLineNumberRulerColumn == null) {
@@ -548,6 +599,7 @@ public class TextEditor extends StatusTextEditor {
/**
* Hides the line number ruler column.
+ * @since 2.1
*/
private void hideLineNumberRuler() {
if (fLineNumberRulerColumn != null) {
@@ -564,6 +616,7 @@ public class TextEditor extends StatusTextEditor {
* Return whether the line number ruler column should be
* visible according to the preference store settings.
* @return <code>true</code> if the line numbers should be visible
+ * @since 2.1
*/
private boolean isLineNumberRulerVisible() {
IPreferenceStore store= getPreferenceStore();
@@ -573,6 +626,7 @@ public class TextEditor extends StatusTextEditor {
/**
* Initializes the given line number ruler column from the preference store.
* @param rulerColumn the ruler column to be initialized
+ * @since 2.1
*/
protected void initializeLineNumberRulerColumn(LineNumberRulerColumn rulerColumn) {
ISharedTextColors sharedColors= EditorsPlugin.getDefault().getSharedTextColors();
@@ -608,6 +662,7 @@ public class TextEditor extends StatusTextEditor {
/**
* Creates a new line number ruler column that is appropriately initialized.
+ * @since 2.1
*/
protected IVerticalRulerColumn createLineNumberRulerColumn() {
fLineNumberRulerColumn= new LineNumberRulerColumn();
@@ -617,6 +672,7 @@ public class TextEditor extends StatusTextEditor {
/*
* @see AbstractTextEditor#createVerticalRuler()
+ * @since 2.1
*/
protected IVerticalRuler createVerticalRuler() {
CompositeRuler ruler= new CompositeRuler();
@@ -628,6 +684,7 @@ public class TextEditor extends StatusTextEditor {
/*
* @see AbstractTextEditor#handlePreferenceStoreChanged(PropertyChangeEvent)
+ * @since 2.1
*/
protected void handlePreferenceStoreChanged(PropertyChangeEvent event) {
@@ -670,6 +727,7 @@ public class TextEditor extends StatusTextEditor {
/* (non-Javadoc)
* @see org.eclipse.ui.IWorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
+ * @since 2.1
*/
public void createPartControl(Composite parent) {
super.createPartControl(parent);
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextEditorPreferenceConstants.java b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextEditorPreferenceConstants.java
index 5c70acd44e3..bdd74d119e3 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextEditorPreferenceConstants.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/TextEditorPreferenceConstants.java
@@ -24,7 +24,8 @@ import org.eclipse.ui.texteditor.MarkerAnnotationPreferences;
/**
* Preference constants used in the default text editor preference store.
- */
+ * @since 2.1
+ */
public class TextEditorPreferenceConstants {
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/ColorEditor.java b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/ColorEditor.java
index a470ad0818d..f9ab94721eb 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/ColorEditor.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/ColorEditor.java
@@ -31,15 +31,27 @@ import org.eclipse.jface.resource.JFaceResources;
/**
* A "button" of a certain color determined by the color picker.
+ *
+ * @since 2.1
*/
class ColorEditor {
+ /** The extent. */
private Point fExtent;
+ /** The image for the push button. */
private Image fImage;
+ /** The current RGB color value. */
private RGB fColorValue;
+ /** The current color. */
private Color fColor;
+ /** The image push button which open the color dialog. */
private Button fButton;
+ /**
+ * Creates and returns a new color editor.
+ *
+ * @param parent the parent composite of this color editor
+ */
public ColorEditor(Composite parent) {
fButton= new Button(parent, SWT.PUSH);
@@ -78,19 +90,37 @@ class ColorEditor {
});
}
+ /**
+ * Returns the current RGB color value.
+ *
+ * @return an rgb with the current color value
+ */
public RGB getColorValue() {
return fColorValue;
}
+ /**
+ * Sets the current RGB color value.
+ *
+ * @param rgb the new value for the rgb color value
+ */
public void setColorValue(RGB rgb) {
fColorValue= rgb;
updateColorImage();
}
+ /**
+ * Returns the image push button.
+ *
+ * @return the button which shows the current color as image
+ */
public Button getButton() {
return fButton;
}
+ /**
+ * Updates the color of the button image.
+ */
protected void updateColorImage() {
Display display= fButton.getDisplay();
@@ -110,6 +140,13 @@ class ColorEditor {
fButton.setImage(fImage);
}
+
+ /**
+ * Computes the size for the image.
+ *
+ * @param window the window on which to render the image
+ * @return the point with the image size
+ */
protected Point computeImageSize(Control window) {
GC gc= new GC(window);
Font f= JFaceResources.getFontRegistry().get(JFaceResources.DEFAULT_FONT);
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/EditorsPlugin.java b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/EditorsPlugin.java
index 4ada4923430..65486ef9b64 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/EditorsPlugin.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/EditorsPlugin.java
@@ -24,7 +24,10 @@ import org.eclipse.ui.editors.text.TextEditorPreferenceConstants;
import org.eclipse.ui.plugin.AbstractUIPlugin;
/**
- * EditorsPlugin.java
+ * Represents the editors plug-in. It provides a series of convenience methods such as
+ * access to the shared text colors and the log.
+ *
+ * @since 2.1
*/
public class EditorsPlugin extends AbstractUIPlugin {
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/IEditorsStatusConstants.java b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/IEditorsStatusConstants.java
index 134889bb1ca..39442e9f70c 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/IEditorsStatusConstants.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/IEditorsStatusConstants.java
@@ -11,10 +11,18 @@
package org.eclipse.ui.internal.editors.text;
/**
- * IEditorsStatusConstants.java
- */
+ * Defines plug-in-specific status codes.
+ *
+ * @see org.eclipse.core.runtime.IStatus#getCode()
+ * @see org.eclipse.core.runtime.Status#Status(int, java.lang.String, int, java.lang.String, java.lang.Throwable)
+ * @since 2.1
+ */
interface IEditorsStatusConstants {
+ /**
+ * Status constant indicating that an internal error occurred.
+ * Value: <code>1001</code>
+ */
public static final int INTERNAL_ERROR= 10001;
}
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/OverlayPreferenceStore.java b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/OverlayPreferenceStore.java
index bbb153ba248..6ab870481d1 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/OverlayPreferenceStore.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/OverlayPreferenceStore.java
@@ -17,10 +17,15 @@ import org.eclipse.jface.util.PropertyChangeEvent;
/**
* An overlaying preference store.
+ *
+ * @since 2.1
*/
class OverlayPreferenceStore implements IPreferenceStore {
-
+
+ /**
+ * Descriptor used to denote data types.
+ */
public static final class TypeDescriptor {
private TypeDescriptor() {
}
@@ -33,6 +38,9 @@ class OverlayPreferenceStore implements IPreferenceStore {
public static final TypeDescriptor LONG= new TypeDescriptor();
public static final TypeDescriptor STRING= new TypeDescriptor();
+ /**
+ * Data structure for the overlay key.
+ */
public static class OverlayKey {
TypeDescriptor fDescriptor;
@@ -43,7 +51,10 @@ class OverlayPreferenceStore implements IPreferenceStore {
fKey= key;
}
};
-
+
+ /*
+ * @see IPropertyChangeListener
+ */
private class PropertyListener implements IPropertyChangeListener {
/*
@@ -57,19 +68,34 @@ class OverlayPreferenceStore implements IPreferenceStore {
};
+ /** The parent preference store. */
private IPreferenceStore fParent;
+ /** This store. */
private IPreferenceStore fStore;
+ /** The keys of this store. */
private OverlayKey[] fOverlayKeys;
-
+ /** The property listener. */
private PropertyListener fPropertyListener;
-
+
+ /**
+ * Creates and returns a new overlay preference store.
+ *
+ * @param parent the parent preference store
+ * @param overlayKeys the overlay keys
+ */
public OverlayPreferenceStore(IPreferenceStore parent, OverlayKey[] overlayKeys) {
fParent= parent;
fOverlayKeys= overlayKeys;
fStore= new PreferenceStore();
}
+ /**
+ * Tries to find and return the overlay key for the given preference key string.
+ *
+ * @param key the preference key string
+ * @return the overlay key or <code>null</code> if none can be found
+ */
private OverlayKey findOverlayKey(String key) {
for (int i= 0; i < fOverlayKeys.length; i++) {
if (fOverlayKeys[i].fKey.equals(key))
@@ -78,10 +104,24 @@ class OverlayPreferenceStore implements IPreferenceStore {
return null;
}
+ /**
+ * Tells whether the given preference key string is
+ * covered by this overlay store.
+ *
+ * @param key the preference key string
+ * @return <code>true</code> if this overlay store covers the given key
+ */
private boolean covers(String key) {
return (findOverlayKey(key) != null);
}
-
+
+ /**
+ * Propagates the given overlay key from the orgin to the target preference store.
+ *
+ * @param orgin the source preference store
+ * @param key the overlay key
+ * @param target the preference store to which the key is propagated
+ */
private void propagateProperty(IPreferenceStore orgin, OverlayKey key, IPreferenceStore target) {
if (orgin.isDefault(key.fKey)) {
@@ -135,12 +175,23 @@ class OverlayPreferenceStore implements IPreferenceStore {
}
}
-
+
+ /**
+ * Propagates all overlay keys from this store to the parent store.
+ */
public void propagate() {
for (int i= 0; i < fOverlayKeys.length; i++)
propagateProperty(fStore, fOverlayKeys[i], fParent);
}
+ /**
+ * Loads the given key from the orgin into the target.
+ *
+ * @param orgin the source preference store
+ * @param key the overlay key
+ * @param target the preference store to which the key is propagated
+ * @param forceInitialization if <code>true</code> the value in the target gets initialized before loading
+ */
private void loadProperty(IPreferenceStore orgin, OverlayKey key, IPreferenceStore target, boolean forceInitialization) {
TypeDescriptor d= key.fDescriptor;
if (BOOLEAN == d) {
@@ -187,17 +238,26 @@ class OverlayPreferenceStore implements IPreferenceStore {
}
}
-
+
+ /**
+ * Loads the values from the parent into this store.
+ */
public void load() {
for (int i= 0; i < fOverlayKeys.length; i++)
loadProperty(fParent, fOverlayKeys[i], fStore, true);
}
+ /**
+ * Loads the default values.
+ */
public void loadDefaults() {
for (int i= 0; i < fOverlayKeys.length; i++)
setToDefault(fOverlayKeys[i].fKey);
}
-
+
+ /**
+ * Starts to listen for changes.
+ */
public void start() {
if (fPropertyListener == null) {
fPropertyListener= new PropertyListener();
@@ -205,6 +265,9 @@ class OverlayPreferenceStore implements IPreferenceStore {
}
}
+ /**
+ * Stops to listen for changes.
+ */
public void stop() {
if (fPropertyListener != null) {
fParent.removePropertyChangeListener(fPropertyListener);
@@ -213,49 +276,49 @@ class OverlayPreferenceStore implements IPreferenceStore {
}
/*
- * @see IPreferenceStore#addPropertyChangeListener(IPropertyChangeListener)
+ * @see IPreferenceStore#addPropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener)
*/
public void addPropertyChangeListener(IPropertyChangeListener listener) {
fStore.addPropertyChangeListener(listener);
}
/*
- * @see IPreferenceStore#removePropertyChangeListener(IPropertyChangeListener)
+ * @see IPreferenceStore#removePropertyChangeListener(org.eclipse.jface.util.IPropertyChangeListener)
*/
public void removePropertyChangeListener(IPropertyChangeListener listener) {
fStore.removePropertyChangeListener(listener);
}
/*
- * @see IPreferenceStore#firePropertyChangeEvent(String, Object, Object)
+ * @see IPreferenceStore#firePropertyChangeEvent(java.lang.String, java.lang.Object, java.lang.Object)
*/
public void firePropertyChangeEvent(String name, Object oldValue, Object newValue) {
fStore.firePropertyChangeEvent(name, oldValue, newValue);
}
/*
- * @see IPreferenceStore#contains(String)
+ * @see IPreferenceStore#contains(java.lang.String)
*/
public boolean contains(String name) {
return fStore.contains(name);
}
/*
- * @see IPreferenceStore#getBoolean(String)
+ * @see IPreferenceStore#getBoolean(java.lang.String)
*/
public boolean getBoolean(String name) {
return fStore.getBoolean(name);
}
/*
- * @see IPreferenceStore#getDefaultBoolean(String)
+ * @see IPreferenceStore#getDefaultBoolean(java.lang.String)
*/
public boolean getDefaultBoolean(String name) {
return fStore.getDefaultBoolean(name);
}
/*
- * @see IPreferenceStore#getDefaultDouble(String)
+ * @see IPreferenceStore#getDefaultDouble(java.lang.String)
*/
public double getDefaultDouble(String name) {
return fStore.getDefaultDouble(name);
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/SharedTextColors.java b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/SharedTextColors.java
index d8c01a0fecb..5047227c194 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/SharedTextColors.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/SharedTextColors.java
@@ -18,14 +18,23 @@ import org.eclipse.swt.graphics.Color;
import org.eclipse.jface.text.source.ISharedTextColors;
import org.eclipse.swt.graphics.RGB;
+/*
+ * @see org.eclipse.jface.text.source.ISharedTextColors
+ * @since 2.1
+ */
class SharedTextColors implements ISharedTextColors {
+ /** The display table. */
private Map fDisplayTable;
+ /** Creates an returns a shared color manager. */
public SharedTextColors() {
super();
}
+ /*
+ * @see ISharedTextColors#getColor(RGB)
+ */
public Color getColor(RGB rgb) {
if (rgb == null)
return null;
@@ -50,6 +59,9 @@ class SharedTextColors implements ISharedTextColors {
return color;
}
+ /*
+ * @see ISharedTextColors#dispose()
+ */
public void dispose() {
if (fDisplayTable != null) {
Iterator j= fDisplayTable.values().iterator();
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/StatusInfo.java b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/StatusInfo.java
index d74723932c7..291a467913b 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/StatusInfo.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/StatusInfo.java
@@ -18,23 +18,28 @@ import org.eclipse.jface.util.Assert;
* A settable IStatus.
* Can be an error, warning, info or ok. For error, info and warning states,
* a message describes the problem.
+ *
+ * @since 2.1
*/
class StatusInfo implements IStatus {
-
+
+ /** The message of this status. */
private String fStatusMessage;
+ /** The severity of this status. */
private int fSeverity;
/**
- * Creates a status set to OK (no message)
+ * Creates a status set to OK (no message).
*/
public StatusInfo() {
this(OK, null);
}
/**
- * Creates a status .
- * @param severity The status severity: ERROR, WARNING, INFO and OK.
- * @param message The message of the status. Applies only for ERROR,
+ * Creates a status with the given severity and message.
+ *
+ * @param severity the severity of this status: ERROR, WARNING, INFO and OK.
+ * @param message the message of this status. Applies only for ERROR,
* WARNING and INFO.
*/
public StatusInfo(int severity, String message) {
@@ -70,8 +75,8 @@ class StatusInfo implements IStatus {
return fSeverity == IStatus.ERROR;
}
- /**
- * @see IStatus#getMessage
+ /*
+ * @see IStatus#getMessage()
*/
public String getMessage() {
return fStatusMessage;
@@ -79,7 +84,8 @@ class StatusInfo implements IStatus {
/**
* Sets the status to ERROR.
- * @param The error message (can be empty, but not null)
+ *
+ * @param the error message which can be an empty string, but not <code>null</code>
*/
public void setError(String errorMessage) {
Assert.isNotNull(errorMessage);
@@ -89,7 +95,8 @@ class StatusInfo implements IStatus {
/**
* Sets the status to WARNING.
- * @param The warning message (can be empty, but not null)
+ *
+ * @param the warning message which can be an empty string, but not <code>null</code>
*/
public void setWarning(String warningMessage) {
Assert.isNotNull(warningMessage);
@@ -99,7 +106,8 @@ class StatusInfo implements IStatus {
/**
* Sets the status to INFO.
- * @param The info message (can be empty, but not null)
+ *
+ * @param the info message which can be an empty string, but not <code>null</code>
*/
public void setInfo(String infoMessage) {
Assert.isNotNull(infoMessage);
@@ -124,6 +132,7 @@ class StatusInfo implements IStatus {
/**
* Returns always <code>false</code>.
+ *
* @see IStatus#isMultiStatus()
*/
public boolean isMultiStatus() {
@@ -146,6 +155,7 @@ class StatusInfo implements IStatus {
/**
* Returns always <code>null</code>.
+ *
* @see IStatus#getException()
*/
public Throwable getException() {
@@ -154,6 +164,7 @@ class StatusInfo implements IStatus {
/**
* Returns always the error severity.
+ *
* @see IStatus#getCode()
*/
public int getCode() {
@@ -162,6 +173,7 @@ class StatusInfo implements IStatus {
/**
* Returns always <code>null</code>.
+ *
* @see IStatus#getChildren()
*/
public IStatus[] getChildren() {
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TabFolderLayout.java b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TabFolderLayout.java
index fe0fc9511a3..c85d1798507 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TabFolderLayout.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TabFolderLayout.java
@@ -18,8 +18,17 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Layout;
+/**
+ * This layout controls the position and size
+ * of the children of a tab folder.
+ *
+ * @since 2.1
+ */
class TabFolderLayout extends Layout {
+ /*
+ * @see org.eclipse.swt.widgets.Layout#computeSize(org.eclipse.swt.widgets.Composite, int, int, boolean)
+ */
protected Point computeSize (Composite composite, int wHint, int hHint, boolean flushCache) {
if (wHint != SWT.DEFAULT && hHint != SWT.DEFAULT)
return new Point(wHint, hHint);
@@ -42,7 +51,10 @@ class TabFolderLayout extends Layout {
return new Point(maxWidth, maxHeight);
}
-
+
+ /*
+ * @see org.eclipse.swt.widgets.Layout#layout(org.eclipse.swt.widgets.Composite, boolean)
+ */
protected void layout (Composite composite, boolean flushCache) {
Rectangle rect= composite.getClientArea();
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorMessages.java b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorMessages.java
index a82bb58e63c..8f879cbf8a7 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorMessages.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorMessages.java
@@ -14,6 +14,12 @@ import java.text.MessageFormat;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
+/**
+ * Helper class which wraps the specified resource bundle
+ * and offers methods to access the bundle.
+ *
+ * @since 2.1
+ */
class TextEditorMessages {
private static final String RESOURCE_BUNDLE= "org.eclipse.ui.internal.editors.text.TextEditorMessages";//$NON-NLS-1$
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorPreferencePage2.java b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorPreferencePage2.java
index 6fe9ce3dc0d..4341cd67483 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorPreferencePage2.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorPreferencePage2.java
@@ -50,8 +50,12 @@ import org.eclipse.ui.texteditor.AnnotationPreference;
import org.eclipse.ui.texteditor.MarkerAnnotationPreferences;
-/*
- * The page for setting the editor options.
+/**
+ * The preference page for setting the editor options.
+ * <p>
+ * This class is internal and not intended to be used by clients.</p>
+ *
+ * @since 2.1
*/
public class TextEditorPreferencePage2 extends PreferencePage implements IWorkbenchPreferencePage {
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/SelectMarkerRulerAction.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/SelectMarkerRulerAction.java
index b176823fc14..59e95f8cd38 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/SelectMarkerRulerAction.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/SelectMarkerRulerAction.java
@@ -48,7 +48,7 @@ import org.eclipse.ui.views.tasklist.TaskList;
/**
* A ruler action which can select the textual range of a marker
- * that has a visual representation in the vertical ruler.
+ * that has a visual representation in a vertical ruler.
* <p>
* This class may be instantiated but is not intended for subclassing.
* </p>
@@ -178,7 +178,7 @@ public class SelectMarkerRulerAction extends ResourceAction implements IUpdate {
/**
* Returns the <code>AbstractMarkerAnnotationModel</code> of the editor's input.
*
- * @return the marker annotation model
+ * @return the marker annotation model or <code>null</code> if there's none
*/
protected AbstractMarkerAnnotationModel getAnnotationModel() {
IDocumentProvider provider= fTextEditor.getDocumentProvider();
@@ -224,7 +224,7 @@ public class SelectMarkerRulerAction extends ResourceAction implements IUpdate {
/**
* Handles core exceptions. This implementation logs the exceptions
- * with the workbech plugin and shows an error dialog.
+ * with the workbech plug-in and shows an error dialog.
*
* @param exception the exception to be handled
* @param message the message to be logged with the given exception
@@ -248,7 +248,7 @@ public class SelectMarkerRulerAction extends ResourceAction implements IUpdate {
/**
* Returns all markers which include the ruler's line of activity.
*
- * @return all markers which include the ruler's line of activity
+ * @return a list with all markers which include the ruler's line of activity
*/
protected List getMarkers() {
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/TaskRulerAction.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/TaskRulerAction.java
index 2e22e3526f4..2a624ace235 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/TaskRulerAction.java
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/TaskRulerAction.java
@@ -44,8 +44,8 @@ public class TaskRulerAction extends AbstractRulerActionDelegate {
* @param prefix a prefix to be prepended to the various resource keys
* (described in <code>ResourceAction</code> constructor), or
* <code>null</code> if none
- * @param editor the editor
- * @param ruler the ruler
+ * @param editor the text editor
+ * @param ruler the vertical ruler info
* @see ResourceAction#ResourceAction
*/
public TaskMarkerRulerAction(ResourceBundle bundle, String prefix, ITextEditor editor, IVerticalRulerInfo ruler) {

Back to the top