Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDani Megert2003-10-23 10:32:55 +0000
committerDani Megert2003-10-23 10:32:55 +0000
commite495fde65de38e16fac2f1d059a47cb45880685e (patch)
treed2be6e9177b2e6b75b3037b9a13ef836bf430609
parentf2470019a5e72e3658342e661485c2c535b9aea5 (diff)
downloadeclipse.platform.text-e495fde65de38e16fac2f1d059a47cb45880685e.tar.gz
eclipse.platform.text-e495fde65de38e16fac2f1d059a47cb45880685e.tar.xz
eclipse.platform.text-e495fde65de38e16fac2f1d059a47cb45880685e.zip
Added feature 45089: Background highlight painterRoot_editorWork
-rw-r--r--org.eclipse.search/plugin.xml2
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorMessages.properties1
-rw-r--r--org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorPreferencePage2.java33
-rw-r--r--org.eclipse.ui.workbench.texteditor/schema/markerAnnotationSpecification.exsd38
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/AnnotationPreference.java58
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/Copy of EditorMessages.properties511
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/MarkerAnnotationPreferences.java17
-rw-r--r--org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/SourceViewerDecorationSupport.java56
8 files changed, 693 insertions, 23 deletions
diff --git a/org.eclipse.search/plugin.xml b/org.eclipse.search/plugin.xml
index 6e1246d1e..32310d611 100644
--- a/org.eclipse.search/plugin.xml
+++ b/org.eclipse.search/plugin.xml
@@ -184,6 +184,8 @@
markerType="org.eclipse.search.searchmarker"
textPreferenceKey="searchResultIndication"
textPreferenceValue="true"
+ highlightPreferenceKey="searchResultHighlighting"
+ highlightPreferenceValue="false"
overviewRulerPreferenceKey="searchResultIndicationInOverviewRuler"
overviewRulerPreferenceValue="true"
colorPreferenceKey="searchResultIndicationColor"
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorMessages.properties b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorMessages.properties
index 10b69200e..c4af8b565 100644
--- a/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorMessages.properties
+++ b/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorMessages.properties
@@ -23,6 +23,7 @@ TextEditorPreferencePage.annotations.infos= Infos
TextEditorPreferencePage.annotations.tasks= Tasks
TextEditorPreferencePage.annotations.others= Others
TextEditorPreferencePage.annotations.showInText= Show in &text
+TextEditorPreferencePage.annotations.highlightInText= &Highlight in text
TextEditorPreferencePage.annotations.showInOverviewRuler= Show in overview &ruler
TextEditorPreferencePage.annotations.color= C&olor:
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 9502ca4f8..bdfed4cae 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
@@ -107,6 +107,7 @@ public class TextEditorPreferencePage2 extends PreferencePage implements IWorkbe
private ColorEditor fAppearanceColorEditor;
private ColorEditor fAnnotationForegroundColorEditor;
private Button fShowInTextCheckBox;
+ private Button fHighlightInTextCheckBox;
private Button fShowInOverviewRulerCheckBox;
private String[][] fQuickDiffProviderListModel;
@@ -130,6 +131,8 @@ public class TextEditorPreferencePage2 extends PreferencePage implements IWorkbe
AnnotationPreference info= (AnnotationPreference) e.next();
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.STRING, info.getColorPreferenceKey()));
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, info.getTextPreferenceKey()));
+ if (info.getHighlightPreferenceKey() != null)
+ overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, info.getHighlightPreferenceKey()));
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, info.getOverviewRulerPreferenceKey()));
}
@@ -158,7 +161,7 @@ public class TextEditorPreferencePage2 extends PreferencePage implements IWorkbe
Iterator e= preferences.getAnnotationPreferences().iterator();
while (e.hasNext()) {
AnnotationPreference info= (AnnotationPreference) e.next();
- listModelItems.add(new String[] { info.getPreferenceLabel(), info.getColorPreferenceKey(), info.getTextPreferenceKey(), info.getOverviewRulerPreferenceKey()});
+ listModelItems.add(new String[] { info.getPreferenceLabel(), info.getColorPreferenceKey(), info.getTextPreferenceKey(), info.getOverviewRulerPreferenceKey(), info.getHighlightPreferenceKey()});
}
String[][] items= new String[listModelItems.size()][];
listModelItems.toArray(items);
@@ -218,7 +221,14 @@ public class TextEditorPreferencePage2 extends PreferencePage implements IWorkbe
fShowInTextCheckBox.setSelection(fOverlayStore.getBoolean(key));
key= fAnnotationColorListModel[i][3];
- fShowInOverviewRulerCheckBox.setSelection(fOverlayStore.getBoolean(key));
+ fShowInOverviewRulerCheckBox.setSelection(fOverlayStore.getBoolean(key));
+
+ key= fAnnotationColorListModel[i][4];
+ if (key != null) {
+ fHighlightInTextCheckBox.setSelection(fOverlayStore.getBoolean(key));
+ fHighlightInTextCheckBox.setEnabled(true);
+ } else
+ fHighlightInTextCheckBox.setEnabled(false);
}
private void handleProviderListSelection() {
@@ -454,6 +464,13 @@ public class TextEditorPreferencePage2 extends PreferencePage implements IWorkbe
gd.horizontalSpan= 2;
fShowInTextCheckBox.setLayoutData(gd);
+ fHighlightInTextCheckBox= new Button(optionsComposite, SWT.CHECK);
+ fHighlightInTextCheckBox.setText(TextEditorMessages.getString("TextEditorPreferencePage.annotations.highlightInText")); //$NON-NLS-1$
+ gd= new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalAlignment= GridData.BEGINNING;
+ gd.horizontalSpan= 2;
+ fHighlightInTextCheckBox.setLayoutData(gd);
+
fShowInOverviewRulerCheckBox= new Button(optionsComposite, SWT.CHECK);
fShowInOverviewRulerCheckBox.setText(TextEditorMessages.getString("TextEditorPreferencePage.annotations.showInOverviewRuler")); //$NON-NLS-1$
gd= new GridData(GridData.FILL_HORIZONTAL);
@@ -495,6 +512,18 @@ public class TextEditorPreferencePage2 extends PreferencePage implements IWorkbe
}
});
+ fHighlightInTextCheckBox.addSelectionListener(new SelectionListener() {
+ public void widgetDefaultSelected(SelectionEvent e) {
+ // do nothing
+ }
+
+ public void widgetSelected(SelectionEvent e) {
+ int i= fAnnotationList.getSelectionIndex();
+ String key= fAnnotationColorListModel[i][4];
+ fOverlayStore.setValue(key, fHighlightInTextCheckBox.getSelection());
+ }
+ });
+
fShowInOverviewRulerCheckBox.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
// do nothing
diff --git a/org.eclipse.ui.workbench.texteditor/schema/markerAnnotationSpecification.exsd b/org.eclipse.ui.workbench.texteditor/schema/markerAnnotationSpecification.exsd
index 38c423d26..5134465fb 100644
--- a/org.eclipse.ui.workbench.texteditor/schema/markerAnnotationSpecification.exsd
+++ b/org.eclipse.ui.workbench.texteditor/schema/markerAnnotationSpecification.exsd
@@ -72,6 +72,15 @@
<attribute name="label" type="string" use="required">
<annotation>
<documentation>
+
+ <attribute name="highlightPreferenceKey" type="string">
+ <annotation>
+ <documentation>
+ The preference key for highlighting in text.
+since: 3.0
+ </documentation>
+ </annotation>
+ </attribute>
</documentation>
</annotation>
@@ -121,6 +130,16 @@
</documentation>
</annotation>
</attribute>
+
+ <attribute name="highlightPreferenceValue" type="boolean">
+ <annotation>
+ <documentation>
+ The default value for highlighting in text.
+since: 3.0
+ </documentation>
+ </annotation>
+ </attribute>
+
<attribute name="annotationType" type="string" use="required">
<annotation>
<documentation>
@@ -128,6 +147,7 @@
</documentation>
</annotation>
</attribute>
+
<attribute name="contributesToHeader" type="boolean">
<annotation>
<documentation>
@@ -135,51 +155,57 @@
</documentation>
</annotation>
</attribute>
+
<attribute name="showInNextPrevDropdownToolbarActionKey" type="string">
<annotation>
<documentation>
The preference key for the visibility in the next/previous drop down toolbar action.
-Since: 3.0
+since: 3.0
</documentation>
</annotation>
</attribute>
+
<attribute name="showInNextPrevDropdownToolbarAction" type="boolean">
<annotation>
<documentation>
The default value for the visibility in the next/previous drop down toolbar action.
-Since: 3.0
+since: 3.0
</documentation>
</annotation>
</attribute>
+
<attribute name="isGoToNextNavigationTargetKey" type="string">
<annotation>
<documentation>
The preference key for go to next navigation enablement.
-Since: 3.0
+since: 3.0
</documentation>
</annotation>
</attribute>
+
<attribute name="isGoToNextNavigationTarget" type="boolean">
<annotation>
<documentation>
The default value for go to next navigation enablement.
-Since: 3.0
+since: 3.0
</documentation>
</annotation>
</attribute>
+
<attribute name="isGoToPreviousNavigationTargetKey" type="string">
<annotation>
<documentation>
The preference key for go to previous navigation enablement.
-Since: 3.0
+since: 3.0
</documentation>
</annotation>
</attribute>
+
<attribute name="isGoToPreviousNavigationTarget" type="boolean">
<annotation>
<documentation>
The default value for go to previous navigation enablement.
-Since: 3.0
+since: 3.0
</documentation>
</annotation>
</attribute>
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 718eed861..0924fc870 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
@@ -56,6 +56,16 @@ public class AnnotationPreference {
private String fTextKey;
/** The default visibility inside text */
private boolean fTextValue;
+ /**
+ * The preference key for highlighting inside text.
+ * @since 3.0
+ */
+ private String fHighlightKey;
+ /**
+ * The default value for highlighting inside text.
+ * @since 3.0
+ */
+ private boolean fHighlightValue;
/** The preference key for the visibility in the overview ruler */
private String fOverviewRulerKey;
/** The default visibility in the overview ruler */
@@ -128,7 +138,7 @@ public class AnnotationPreference {
public boolean isPreferenceKey(String key) {
if (key == null)
return false;
- return key.equals(fColorKey) || key.equals(fOverviewRulerKey) || key.equals(fTextKey);
+ return key.equals(fColorKey) || key.equals(fOverviewRulerKey) || key.equals(fTextKey) || key.equals(fHighlightKey);
}
/**
@@ -231,6 +241,26 @@ public class AnnotationPreference {
}
/**
+ * Returns the preference key for highlighting inside text.
+ *
+ * @return the preference key for highlighting inside text
+ * @since 3.0
+ */
+ public String getHighlightPreferenceKey() {
+ return fHighlightKey;
+ }
+
+ /**
+ * Returns the default value for highlighting inside text.
+ *
+ * @return the default value for highlighting inside text
+ * @since 3.0
+ */
+ public boolean getHighlightPreferenceValue() {
+ return fHighlightValue;
+ }
+
+ /**
* Returns whether the annotation type contributes to the header of the overview ruler.
*
* @return <code>true</code> if the annotation type contributes to the header of the overview ruler
@@ -321,9 +351,9 @@ public class AnnotationPreference {
}
/**
- * Sets the preference key for the visibility inside text.
+ * Sets the preference key for the visibility of squiggles inside text.
*
- * @param overviewRulerKey the preference key
+ * @param textKey the preference key
*/
public void setTextPreferenceKey(String textKey) {
fTextKey= textKey;
@@ -332,13 +362,33 @@ public class AnnotationPreference {
/**
* Sets the default visibility inside text.
*
- * @param overviewRulerValue <code>true</code> if visible by default, <code>false</code> otherwise
+ * @param textValue <code>true</code> if visible by default, <code>false</code> otherwise
*/
public void setTextPreferenceValue(boolean textValue) {
fTextValue= textValue;
}
/**
+ * Sets the preference key for highlighting inside text.
+ *
+ * @param highlightKey the preference key
+ * @since 3.0
+ */
+ public void setHighlightPreferenceKey(String highlightKey) {
+ fHighlightKey= highlightKey;
+ }
+
+ /**
+ * Sets the default value for highlighting inside text.
+ *
+ * @param highlightValue <code>true</code> if highlighted in text by default, <code>false</code> otherwise
+ * @since 3.0
+ */
+ public void setHighlightPreferenceValue(boolean highlightValue) {
+ fHighlightValue= highlightValue;
+ }
+
+ /**
* Sets whether the annotation type contributes to the overview ruler's header.
*
* @param contributesToHeader <code>true</code> if in header, <code>false</code> otherwise
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/Copy of EditorMessages.properties b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/Copy of EditorMessages.properties
new file mode 100644
index 000000000..f721f4732
--- /dev/null
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/Copy of EditorMessages.properties
@@ -0,0 +1,511 @@
+###############################################################################
+# Copyright (c) 2000, 2003 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Common Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/cpl-v10.html
+#
+# Contributors:
+# IBM Corporation - initial API and implementation
+###############################################################################
+
+
+## Errors ##
+
+Editor.error.no_provider=Text editor does not have a document provider
+
+Editor.error.save.title=Save problems
+Editor.error.save.message=Save could not be completed.
+
+Editor.error.save.deleted.title=Cannot Save
+Editor.error.save.deleted.message=The file has been deleted.
+
+Editor.error.init= Editor could not be initialized.
+
+Editor.error.save.outofsync.title=Update conflict
+Editor.error.save.outofsync.message=The file has been changed on the file system. Do you want to overwrite the changes?
+
+Editor.error.activated.outofsync.title=File Changed
+Editor.error.activated.outofsync.message=The file has been changed on the file system. Do you want to load the changes?
+
+Editor.error.activated.deleted.save.title=File Deleted
+Editor.error.activated.deleted.save.message=The file has been deleted from the file system. Do you want to save your changes or close the editor without saving?
+Editor.error.activated.deleted.save.button.save=Save
+Editor.error.activated.deleted.save.button.close=Close
+Editor.error.activated.deleted.close.title=File Deleted
+Editor.error.activated.deleted.close.message=The file has been deleted from the file system. This editor will be closed.
+
+Editor.error.refresh.outofsync.title=Problems loading File
+Editor.error.refresh.outofsync.message=The file could not be loaded from the file system.
+
+Editor.error.revert.title=Problems while reverting to saved state
+Editor.error.revert.message=Could not revert to saved state.
+Editor.error.setinput.title=Problem while opening
+Editor.error.setinput.message=Cannot open input element:
+Editor.error.no_input=Unable to read text editor input
+Editor.error.invalid_input=Invalid text editor input
+
+Editor.error.validateEdit.title= Problems editing file
+Editor.error.validateEdit.message= The file cannot be edited.
+
+AbstractDocumentProvider.error.save.inuse=File is either open in another editor or in use by an operation.
+
+DocumentProviderRegistry.error.extension_point_not_found=Extension point: {0}.documentProviders not found
+
+
+
+## Actions ##
+
+Editor.Undo.label=&Undo
+Editor.Undo.tooltip=Undo
+Editor.Undo.image=
+Editor.Undo.description=Undo
+
+Editor.Redo.label=&Redo
+Editor.Redo.tooltip=Redo
+Editor.Redo.image=
+Editor.Redo.description=Redo
+
+Editor.Cut.label=Cu&t
+Editor.Cut.tooltip=Cut
+Editor.Cut.image=
+Editor.Cut.description=Cut
+
+Editor.Copy.label=&Copy
+Editor.Copy.tooltip=Copy
+Editor.Copy.image=
+Editor.Copy.description=Copy
+
+Editor.Paste.label=&Paste
+Editor.Paste.tooltip=Paste
+Editor.Paste.image=
+Editor.Paste.description=Paste
+
+Editor.Delete.label=&Delete
+Editor.Delete.tooltip=Delete
+Editor.Delete.image=
+Editor.Delete.description=Delete
+
+Editor.Print.label=&Print
+Editor.Print.tooltip=Print
+Editor.Print.image=
+Editor.Print.description=Print
+
+Editor.SelectAll.label=Select &All
+Editor.SelectAll.tooltip=Select All
+Editor.SelectAll.image=
+Editor.SelectAll.description=Select All
+
+Editor.ShiftRight.label=Sh&ift Right
+Editor.ShiftRight.tooltip=Shift Right
+Editor.ShiftRight.image=
+Editor.ShiftRight.description=Shift Right
+
+Editor.ShiftLeft.label=S&hift Left
+Editor.ShiftLeft.tooltip=Shift Left
+Editor.ShiftLeft.image=
+Editor.ShiftLeft.description=Shift Left
+
+Editor.delete.line.submenu.label=D&elete Line
+
+Editor.DeleteLine.label=&Whole
+Editor.DeleteLine.tooltip=Delete Line
+Editor.DeleteLine.image=
+Editor.DeleteLine.description=Delete Line
+
+Editor.CutLine.label=&Whole
+Editor.CutLine.tooltip=Cut Line
+Editor.CutLine.image=
+Editor.CutLine.description=Cut Line
+
+Editor.DeleteLineToBeginning.label=To &Beginning
+Editor.DeleteLineToBeginning.tooltip=Delete Line to Beginning
+Editor.DeleteLineToBeginning.image=
+Editor.DeleteLineToBeginning.description=Delete Line to Beginning
+
+Editor.CutLineToBeginning.label=To &Beginning
+Editor.CutLineToBeginning.tooltip=Cut Line to Beginning
+Editor.CutLineToBeginning.image=
+Editor.CutLineToBeginning.description=Cut Line to Beginning
+
+Editor.DeleteLineToEnd.label=To &End
+Editor.DeleteLineToEnd.tooltip=Delete Line to End
+Editor.DeleteLineToEnd.image=
+Editor.DeleteLineToEnd.description=Delete Line to End
+
+Editor.CutLineToEnd.label=To &End
+Editor.CutLineToEnd.tooltip=Cut Line to End
+Editor.CutLineToEnd.image=
+Editor.CutLineToEnd.description=Cut Line to End
+
+Editor.mark.status.message.mark.set=Mark set
+Editor.mark.status.message.mark.cleared=Mark cleared
+Editor.mark.status.message.mark.swapped=Mark swapped
+Editor.mark.status.error.message.mark.not.set=Mark not set
+Editor.mark.status.error.message.mark.not.visible=Mark not in visible region
+
+Editor.mark.submenu.label=&Mark
+
+Editor.SetMark.label=&Set
+Editor.SetMark.tooltip=Set Mark
+Editor.SetMark=
+Editor.SetMark.description=Set Mark
+
+Editor.ClearMark.label=&Clear
+Editor.ClearMark.tooltip=Clear Mark
+Editor.ClearMark=
+Editor.ClearMark.description=Clear Mark
+
+Editor.SwapMark.label=S&wap
+Editor.SwapMark.tooltip=Swap Mark
+Editor.SwapMark=
+Editor.SwapMark.description=Swap Mark
+
+Editor.FindReplace.label=&Find/Replace...
+Editor.FindReplace.tooltip=Find/Replace
+Editor.FindReplace.image=
+Editor.FindReplace.description=Find/Replace
+
+Editor.FindNext.label=Find &Next
+Editor.FindNext.tooltip=Find Next
+Editor.FindNext.image=
+Editor.FindNext.description=Find Next
+
+Editor.FindPrevious.label=Find Pre&vious
+Editor.FindPrevious.tooltip=Find Previous
+Editor.FindPrevious.image=
+Editor.FindPrevious.description=Find Previous
+
+Editor.FindIncremental.label=&Incremental Find Next
+Editor.FindIncremental.tooltip=Incremental Find Next
+Editor.FindIncremental.image=
+Editor.FindIncremental.description=Incremental Find Next
+Editor.FindIncremental.not_found.pattern={0}{1}Incremental Find: {2} not found
+Editor.FindIncremental.found.pattern={0}{1}Incremental Find: {2}
+Editor.FindIncremental.render.tab=<TAB>
+# The following two properties must end in a space
+Editor.FindIncremental.wrapped=Wrapped
+Editor.FindIncremental.reverse=Reverse
+
+Editor.FindIncrementalReverse.label=Incre&mental Find Previous
+Editor.FindIncrementalReverse.tooltip=Incremental Find Previous
+Editor.FindIncrementalReverse.image=
+Editor.FindIncrementalReverse.description=Incremental Find Previous
+
+Editor.AddBookmark.label=Boo&kmark...
+Editor.AddBookmark.tooltip=Add Bookmark
+Editor.AddBookmark.image=
+Editor.AddBookmark.description=Add Bookmark
+Editor.AddBookmark.dialog.title=Add Bookmark
+Editor.AddBookmark.dialog.message=Enter Bookmark name:
+Editor.AddBookmark.error.dialog.title=Add Bookmark
+Editor.AddBookmark.error.dialog.message=Problems adding new bookmark
+
+Editor.Save.label=&Save
+Editor.Save.tooltip=Save
+Editor.Save.image=
+Editor.Save.description=Save
+
+Editor.Revert.label=Re&vert File
+Editor.Revert.tooltip=Revert File to Saved Version
+Editor.Revert.image=
+Editor.Revert.description=Reverts file contents to version on disk
+
+Editor.GotoLine.label=&Go to Line...
+Editor.GotoLine.tooltip=Go to Line
+Editor.GotoLine.image=
+Editor.GotoLine.description=Go to Line
+Editor.GotoLine.dialog.title=Go to Line
+Editor.GotoLine.dialog.message=Enter line number (1..{0}):
+Editor.GotoLine.dialog.invalid_input=Not a number
+Editor.GotoLine.dialog.invalid_range=Line number out of range
+
+Editor.ManageBookmarks.tooltip=Adds and Removes Bookmarks
+Editor.ManageBookmarks.image=
+Editor.ManageBookmarks.description=Adds and removes Bookmarks
+Editor.ManageBookmarks.add.label=Add Boo&kmark...
+Editor.ManageBookmarks.remove.label=Remove Boo&kmark
+Editor.ManageBookmarks.add.dialog.title=Add Bookmark
+Editor.ManageBookmarks.add.dialog.message=Enter Bookmark name:
+Editor.ManageBookmarks.error.dialog.title=Managing Bookmarks
+Editor.ManageBookmarks.error.dialog.message=Problems managing bookmarks
+
+Editor.ManageTasks.tooltip=Adds and Removes Tasks
+Editor.ManageTasks.image=
+Editor.ManageTasks.description=Adds and removes Tasks
+Editor.ManageTasks.add.label=Add &Task...
+Editor.ManageTasks.remove.label=Remove &Task
+Editor.ManageTasks.add.dialog.title=Add Task
+Editor.ManageTasks.add.dialog.message=Enter Task description:
+Editor.ManageTasks.error.dialog.title=Managing Tasks
+Editor.ManageTasks.error.dialog.message=Problems managing tasks
+
+Editor.SelectMarker.tooltip=Selects the marker's range
+Editor.SelectMarker.image=
+Editor.SelectMarker.description=Selects the Marker's Range
+Editor.SelectMarker.label=Select &Marker Range
+Editor.SelectMarker.error.dialog.title=Selecting Marker Range
+Editor.SelectMarker.error.dialog.message=Problems selecting marker range
+
+Editor.ConvertLineDelimiter.title=Converting line delimiters...
+Editor.ConvertLineDelimiter.toWindows.label=CRLF (&Windows)
+Editor.ConvertLineDelimiter.toWindows.default.label=CRLF (&Windows) [default]
+Editor.ConvertLineDelimiter.toUNIX.label=LF (&UNIX, MacOS X)
+Editor.ConvertLineDelimiter.toUNIX.default.label=LF (&UNIX, MacOS X) [default]
+Editor.ConvertLineDelimiter.toMac.label=CR (Classic &MacOS)
+Editor.ConvertLineDelimiter.toMac.default.label=CR (Classic &MacOS) [default]
+
+Editor.MoveLines.IllegalMove.status= Move not possible - Uncheck "Show Source of Selected Element Only" to see the entire document
+
+Editor.SmartEnter.label=Insert line below current line
+Editor.SmartEnter.tooltip=Adds a new line below the current one
+Editor.SmartEnter.image=
+Editor.SmartEnter.description=Adds a new line below the current one
+
+Editor.SmartEnterInverse.label=Insert line above current line
+Editor.SmartEnterInverse.tooltip=Adds a new line above the current one
+Editor.SmartEnterInverse.image=
+Editor.SmartEnterInverse.description=Adds a new line above the current one
+
+Editor.MoveLinesUp.label=Move Lines Up
+Editor.MoveLinesUp.tooltip=Moves the selected lines upwards
+Editor.MoveLinesUp.image=
+Editor.MoveLinesUp.description=Moves the selected lines upwards
+
+Editor.MoveLinesDown.label=Move Lines Down
+Editor.MoveLinesDown.tooltip=Moves the selected lines downwards
+Editor.MoveLinesDown.image=
+Editor.MoveLinesDown.description=Moves the selected lines downwards
+
+Editor.UpperCase.label=To Upper Case
+Editor.UpperCase.tooltip=Changes the selection to upper case
+Editor.UpperCase.image=
+Editor.UpperCase.description=Changes the selection to upper case
+
+Editor.LowerCase.label=To Lower Case
+Editor.LowerCase.tooltip=Changes the selection to lower case
+Editor.LowerCase.image=
+Editor.LowerCase.description=Changes the selection to lower case
+
+
+## Status line ##
+
+Editor.statusline.state.readonly.label=Read Only
+Editor.statusline.state.writable.label=Writable
+Editor.statusline.mode.insert.label=Insert
+Editor.statusline.mode.overwrite.label=Overwrite
+Editor.statusline.mode.smartinsert.label=Smart Insert
+Editor.statusline.position.pattern={0} : {1}
+Editor.statusline.error.label=?
+
+## Others ##
+
+AbstractMarkerAnnotationModel.connected=AbstractMarkerAnnotationModel.connected
+AbstractMarkerAnnotationModel.createMarkerUpdater=AbstractMarkerAnnotationModel.createMarkerUpdater
+AbstractMarkerAnnotationModel.removeAnnotations=AbstractMarkerAnnotationModel.removeAnnotations
+ResourceMarkerAnnotationModel.resourceChanged=ResourceMarkerAnnotationModel.resourceChanged
+
+WorkbenchChainedTextFontFieldEditor.defaultWorkbenchTextFont=<Using Workbench Text Font>
+
+FindReplace.title= Find/Replace
+FindReplace.Find.label=&Find:
+FindReplace.Replace.label=R&eplace With:
+FindReplace.Direction=Direction
+FindReplace.ForwardRadioButton.label=F&orward
+FindReplace.BackwardRadioButton.label=&Backward
+FindReplace.Scope=Scope
+FindReplace.GlobalRadioButton.label=A&ll
+FindReplace.SelectedRangeRadioButton.label=Selec&ted Lines
+FindReplace.Options=Options
+FindReplace.CaseCheckBox.label=&Case Sensitive
+FindReplace.WrapCheckBox.label=Wra&p Search
+FindReplace.WholeWordCheckBox.label=&Whole Word
+FindReplace.IncrementalCheckBox.label=&Incremental
+FindReplace.RegExCheckbox.label= Regular e&xpressions
+FindReplace.FindNextButton.label=Fi&nd
+FindReplace.ReplaceFindButton.label=Replace/Fin&d
+FindReplace.ReplaceSelectionButton.label=&Replace
+FindReplace.ReplaceAllButton.label=Replace &All
+FindReplace.CloseButton.label=Close
+FindReplace.Status.noMatch.label=String Not Found
+FindReplace.Status.replacement.label=1 Match replaced
+FindReplace.Status.replacements.label={0} matches replaced
+
+FindNext.Status.noMatch.label=String Not Found
+
+MarkerRulerAction.addMarker=MarkerRulerAction.addMarker
+MarkerRulerAction.getMarker=MarkerRulerAction.getMarker
+MarkerRulerAction.removeMarkers=MarkerRulerAction.removeMarkers
+
+SelectMarkerRulerAction.getMarker=SelectMarkerRulerAction.getMarker
+SelectMarkerRulerInfoAction.getMarker=SelectMarkerRulerInfoAction.getMarker
+AbstractDocumentProvider.ok=OK
+AbstractDocumentProvider.error=ERROR
+FindReplaceDialog.read_only=Replace can not be performed because of read only state.
+MarkRegionTarget.markNotSet=mark not set
+MarkRegionTarget.markNotVisible=mark not in visible region
+
+## Content Assist for regular expressions ##
+
+FindReplace.regExContentAssist.displayString.\\\\= Backslash
+FindReplace.regExContentAssist.additionalInfo.\\\\= \\\\
+FindReplace.regExContentAssist.displayString.\\0= Octal charcter code
+FindReplace.regExContentAssist.additionalInfo.\\0= \\0
+FindReplace.regExContentAssist.displayString.\\x= Hex character code
+FindReplace.regExContentAssist.additionalInfo.\\x= \\x
+FindReplace.regExContentAssist.displayString.\\u= Hex code of double-byte character
+FindReplace.regExContentAssist.additionalInfo.\\u= \\u
+FindReplace.regExContentAssist.displayString.\\t= Tab
+FindReplace.regExContentAssist.additionalInfo.\\t= \\t
+FindReplace.regExContentAssist.displayString.\\n= Newline
+FindReplace.regExContentAssist.additionalInfo.\\n= \\n
+FindReplace.regExContentAssist.displayString.\\r= CR
+FindReplace.regExContentAssist.additionalInfo.\\r= \\r
+FindReplace.regExContentAssist.displayString.\\f= LF
+FindReplace.regExContentAssist.additionalInfo.\\f= \\f
+FindReplace.regExContentAssist.displayString.\\a= Beep
+FindReplace.regExContentAssist.additionalInfo.\\a= \\a
+FindReplace.regExContentAssist.displayString.\\e= Esc
+FindReplace.regExContentAssist.additionalInfo.\\e= \\e
+FindReplace.regExContentAssist.displayString.\\c= Control character
+FindReplace.regExContentAssist.additionalInfo.\\c= \\c
+FindReplace.regExContentAssist.displayString..= Any character
+FindReplace.regExContentAssist.additionalInfo..= .
+FindReplace.regExContentAssist.displayString.\\d= A digit
+FindReplace.regExContentAssist.additionalInfo.\\d= \\d
+FindReplace.regExContentAssist.displayString.\\D= Not a digit
+FindReplace.regExContentAssist.additionalInfo.\\D= \\D
+FindReplace.regExContentAssist.displayString.\\s= A whitespace
+FindReplace.regExContentAssist.additionalInfo.\\s= \\s
+FindReplace.regExContentAssist.displayString.\\S= Not a whitespace
+FindReplace.regExContentAssist.additionalInfo.\\S= \\S
+FindReplace.regExContentAssist.displayString.\\w= Alphanumeric
+FindReplace.regExContentAssist.additionalInfo.\\w= \\w
+FindReplace.regExContentAssist.displayString.\\W= Not an alphanumeric
+FindReplace.regExContentAssist.additionalInfo.\\W= \\W
+FindReplace.regExContentAssist.displayString.?= Greedy match 0 or 1 times
+FindReplace.regExContentAssist.additionalInfo.?= ?
+FindReplace.regExContentAssist.displayString.*= Greedy match 0 or more times
+FindReplace.regExContentAssist.additionalInfo.*= *
+FindReplace.regExContentAssist.displayString.+= Greedy match 1 or more times
+FindReplace.regExContentAssist.additionalInfo.+= +
+FindReplace.regExContentAssist.displayString.{n}= Greedy match exactly n times
+FindReplace.regExContentAssist.additionalInfo.{n}= {n}
+FindReplace.regExContentAssist.displayString.{n,}= Greedy match >= n times
+FindReplace.regExContentAssist.additionalInfo.{n,}= {n,}
+FindReplace.regExContentAssist.displayString.{n,m}= Greedy match >= n times but <= m times
+FindReplace.regExContentAssist.additionalInfo.{n,m}= {n,m}
+FindReplace.regExContentAssist.displayString.??= Match 0 or 1 times (left to right)
+FindReplace.regExContentAssist.additionalInfo.??= ??
+FindReplace.regExContentAssist.displayString.*?= Match 0 or more times (left to right)
+FindReplace.regExContentAssist.additionalInfo.*?= *?
+FindReplace.regExContentAssist.displayString.+?= Match 1 or more times (left to right)
+FindReplace.regExContentAssist.additionalInfo.+?= +?
+FindReplace.regExContentAssist.displayString.{n}?= Match exactly n times (left to right)
+FindReplace.regExContentAssist.additionalInfo.{n}?= {n}?
+FindReplace.regExContentAssist.displayString.{n,}?= Match >= n times (left to right)
+FindReplace.regExContentAssist.additionalInfo.{n,}?= {n,}?
+FindReplace.regExContentAssist.displayString.{n,m}?= Match >= n times but <= m times (left to right)
+FindReplace.regExContentAssist.additionalInfo.{n,m}?= {n,m}?
+FindReplace.regExContentAssist.displayString.?+= Match 0 or 1 times compared to full text
+FindReplace.regExContentAssist.additionalInfo.?+= ?+
+FindReplace.regExContentAssist.displayString.*+= Match 0 or more times compared to full text
+FindReplace.regExContentAssist.additionalInfo.*+= *+
+FindReplace.regExContentAssist.displayString.++= Match 1 or more times compared to full text
+FindReplace.regExContentAssist.additionalInfo.++= ++
+FindReplace.regExContentAssist.displayString.{n}+= Match exactly n times compared to full text
+FindReplace.regExContentAssist.additionalInfo.{n}+= {n}+
+FindReplace.regExContentAssist.displayString.{n,}+= Match exactly n times compared to to full text
+FindReplace.regExContentAssist.additionalInfo.{n,}+= {n,}+
+FindReplace.regExContentAssist.displayString.{n,m}+= Match >= n times but <= m times compared to to full text
+FindReplace.regExContentAssist.additionalInfo.{n,m}+= {n,m}+
+FindReplace.regExContentAssist.displayString.UV= U and V
+FindReplace.regExContentAssist.additionalInfo.UV= UV
+FindReplace.regExContentAssist.displayString.U|V= U or V
+FindReplace.regExContentAssist.additionalInfo.U|V= U|V
+FindReplace.regExContentAssist.displayString.(U)= Mark U as capturing group
+FindReplace.regExContentAssist.additionalInfo.(U)= (U)
+FindReplace.regExContentAssist.displayString.\\n= Match of the capturing group n
+FindReplace.regExContentAssist.additionalInfo.\\n= \\n
+FindReplace.regExContentAssist.displayString.\\= Quote next character
+FindReplace.regExContentAssist.additionalInfo.\\= \\
+FindReplace.regExContentAssist.displayString.\\Q= Start quoting
+FindReplace.regExContentAssist.additionalInfo.\\Q= \\Q
+FindReplace.regExContentAssist.displayString.\\E= End quoting
+FindReplace.regExContentAssist.additionalInfo.\\E= \\E
+FindReplace.regExContentAssist.displayString.[ecq]= Character set
+FindReplace.regExContentAssist.additionalInfo.[ecq]= Example: [ecq]
+FindReplace.regExContentAssist.displayString.[^ecq]= Excluded character set
+FindReplace.regExContentAssist.additionalInfo.[^ecq]= Example: [^ecq]
+FindReplace.regExContentAssist.displayString.[e-q]= Character range
+FindReplace.regExContentAssist.additionalInfo.[e-q]= Example: [e-q]
+FindReplace.regExContentAssist.displayString.&&= Intersection of character sets
+FindReplace.regExContentAssist.additionalInfo.&&= Example: [e-q&&[def]]
+FindReplace.regExContentAssist.displayString.\\p{Lower}= \\p{Lower}
+FindReplace.regExContentAssist.additionalInfo.\\p{Lower}= \\p{Lower}
+FindReplace.regExContentAssist.displayString.\\p{Upper}= \\p{Upper}
+FindReplace.regExContentAssist.additionalInfo.\\p{Upper}= \\p{Upper}
+FindReplace.regExContentAssist.displayString.\\p{ASCII}= \\p{ASCII}
+FindReplace.regExContentAssist.additionalInfo.\\p{ASCII}= \\p{ASCII}
+FindReplace.regExContentAssist.displayString.\\p{Alpha}= \\p{Alpha}
+FindReplace.regExContentAssist.additionalInfo.\\p{Alpha}= \\p{Alpha}
+FindReplace.regExContentAssist.displayString.\\p{Digit}= \\p{Digit}
+FindReplace.regExContentAssist.additionalInfo.\\p{Digit}= \\p{Digit}
+FindReplace.regExContentAssist.displayString.\\p{Alnum}= \\p{Alnum}
+FindReplace.regExContentAssist.additionalInfo.\\p{Alnum}= \\p{Alnum}
+FindReplace.regExContentAssist.displayString.\\p{Punct}= \\p{Punct}
+FindReplace.regExContentAssist.additionalInfo.\\p{Punct}= \\p{Punct}
+FindReplace.regExContentAssist.displayString.\\p{Graph}= \\p{Graph}
+FindReplace.regExContentAssist.additionalInfo.\\p{Graph}= \\p{Graph}
+FindReplace.regExContentAssist.displayString.\\p{Print}= \\p{Print}
+FindReplace.regExContentAssist.additionalInfo.\\p{Print}= \\p{Print}
+FindReplace.regExContentAssist.displayString.\\p{Blank}= \\p{Blank}
+FindReplace.regExContentAssist.additionalInfo.\\p{Blank}= \\p{Blank}
+FindReplace.regExContentAssist.displayString.\\p{XDigit}= \\p{XDigit}
+FindReplace.regExContentAssist.additionalInfo.\\p{XDigit}= \\p{XDigit}
+FindReplace.regExContentAssist.displayString.\\p{Cntrl}= \\p{Cntrl}
+FindReplace.regExContentAssist.additionalInfo.\\p{Cntrl}= \\p{Cntrl}
+FindReplace.regExContentAssist.displayString.\\p{Space}= \\p{Space}
+FindReplace.regExContentAssist.additionalInfo.\\p{Space}= \\p{Space}
+FindReplace.regExContentAssist.displayString.\\p{InGreek}= \\p{InGreek}
+FindReplace.regExContentAssist.additionalInfo.\\p{InGreek}= \\p{InGreek}
+FindReplace.regExContentAssist.displayString.\\p{Lu}= \\p{Lu}
+FindReplace.regExContentAssist.additionalInfo.\\p{Lu}= \\p{Lu}
+FindReplace.regExContentAssist.displayString.\\p{Sc}= \\p{Sc}
+FindReplace.regExContentAssist.additionalInfo.\\p{Sc}= \\p{Sc}
+FindReplace.regExContentAssist.displayString.\\P{InGreek}= \\P{InGreek}
+FindReplace.regExContentAssist.additionalInfo.\\P{InGreek}= \\P{InGreek}
+FindReplace.regExContentAssist.displayString.[\\p{L}&&[^\\p{Lu}]= [\\p{L}&&[^\\p{Lu}]
+FindReplace.regExContentAssist.additionalInfo.[\\p{L}&&[^\\p{Lu}]= [\\p{L}&&[^\\p{Lu}]
+FindReplace.regExContentAssist.displayString.^= Line start
+FindReplace.regExContentAssist.additionalInfo.^= ^
+FindReplace.regExContentAssist.displayString.$= Line end
+FindReplace.regExContentAssist.additionalInfo.$= $
+FindReplace.regExContentAssist.displayString.\\b= Word beginning or end
+FindReplace.regExContentAssist.additionalInfo.\\b= \\b
+FindReplace.regExContentAssist.displayString.\\B= Not a word beginning or end
+FindReplace.regExContentAssist.additionalInfo.\\B= \\B
+FindReplace.regExContentAssist.displayString.\\A= Start of input
+FindReplace.regExContentAssist.additionalInfo.\\A= \\A
+FindReplace.regExContentAssist.displayString.\\G= Previous match's end
+FindReplace.regExContentAssist.additionalInfo.\\G= \\G
+FindReplace.regExContentAssist.displayString.\\Z= \\Z
+FindReplace.regExContentAssist.additionalInfo.\\Z= \\Z
+FindReplace.regExContentAssist.displayString.\\z= End of input
+FindReplace.regExContentAssist.additionalInfo.\\z= \\z
+FindReplace.regExContentAssist.displayString.(?\:U)= (?\:U)
+FindReplace.regExContentAssist.additionalInfo.(?\:U)= (?\:U)
+FindReplace.regExContentAssist.displayString.(?idmsux-idmsux)= (?idmsux-idmsux)
+FindReplace.regExContentAssist.additionalInfo.(?idmsux-idmsux)= (?idmsux-idmsux)
+FindReplace.regExContentAssist.displayString.(?idmsux-idmsux\:U)= (?idmsux-idmsux\:U)
+FindReplace.regExContentAssist.additionalInfo.(?idmsux-idmsux\:U)= (?idmsux-idmsux\:U)
+FindReplace.regExContentAssist.displayString.(?\=U)= (?\=U)
+FindReplace.regExContentAssist.additionalInfo.(?\=U)= (?\=U)
+FindReplace.regExContentAssist.displayString.(?!U)= (?!U)
+FindReplace.regExContentAssist.additionalInfo.(?!U)= (?!U)
+FindReplace.regExContentAssist.displayString.(?<\=U)= (?<\=U)
+FindReplace.regExContentAssist.additionalInfo.(?<\=U)= (?<\=U)
+FindReplace.regExContentAssist.displayString.(?<!U)= (?<!U)
+FindReplace.regExContentAssist.additionalInfo.(?<!U)= (?<!U)
+FindReplace.regExContentAssist.displayString.(?>U)= (?>U)
+FindReplace.regExContentAssist.additionalInfo.(?>U)= (?>U)
diff --git a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/MarkerAnnotationPreferences.java b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/MarkerAnnotationPreferences.java
index 174e3ebc5..8884f8195 100644
--- a/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/MarkerAnnotationPreferences.java
+++ b/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/MarkerAnnotationPreferences.java
@@ -146,13 +146,24 @@ public class MarkerAnnotationPreferences {
s= element.getAttribute("textPreferenceKey"); //$NON-NLS-1$
if (s == null || s.trim().length() == 0) return null;
info.setTextPreferenceKey(s);
-
+
b= false;
s= element.getAttribute("textPreferenceValue"); //$NON-NLS-1$
if (s != null && s.trim().length() > 0)
b= StringConverter.asBoolean(s, false);
info.setTextPreferenceValue(b);
+ s= element.getAttribute("highlightPreferenceKey"); //$NON-NLS-1$
+ if (s == null || s.trim().length() == 0)
+ s= null;
+ info.setHighlightPreferenceKey(s);
+
+ b= false;
+ s= element.getAttribute("highlightPreferenceValue"); //$NON-NLS-1$
+ if (s != null && s.trim().length() > 0)
+ b= StringConverter.asBoolean(s, false);
+ info.setHighlightPreferenceValue(b);
+
s= element.getAttribute("overviewRulerPreferenceKey"); //$NON-NLS-1$
if (s == null || s.trim().length() == 0) return null;
info.setOverviewRulerPreferenceKey(s);
@@ -240,7 +251,9 @@ public class MarkerAnnotationPreferences {
if (info.getIsGoToNextNavigationTargetKey() != null)
store.setDefault(info.getIsGoToNextNavigationTargetKey(), info.isGoToNextNavigationTarget());
if (info.getIsGoToPreviousNavigationTargetKey() != null)
- store.setDefault(info.getIsGoToPreviousNavigationTargetKey(), info.isGoToPreviousNavigationTarget());
+ store.setDefault(info.getIsGoToPreviousNavigationTargetKey(), info.isGoToPreviousNavigationTarget());
+ if (info.getHighlightPreferenceKey() != null)
+ store.setDefault(info.getHighlightPreferenceKey(), info.getHighlightPreferenceValue());
}
}
}
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 26332075d..267f853e8 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
@@ -170,9 +170,13 @@ public class SourceViewerDecorationSupport {
while (e.hasNext()) {
Object type= e.next();
if (areAnnotationsShown(type))
- showAnnotations(type);
+ showAnnotations(type, false);
else
- hideAnnotations(type);
+ hideAnnotations(type, false);
+ if (areAnnotationsHighlighted(type))
+ showAnnotations(type, true);
+ else
+ hideAnnotations(type, true);
}
}
@@ -388,9 +392,17 @@ public class SourceViewerDecorationSupport {
if (info.getTextPreferenceKey().equals(p)) {
if (areAnnotationsShown(info.getAnnotationType()))
- showAnnotations(info.getAnnotationType());
+ showAnnotations(info.getAnnotationType(), false);
+ else
+ hideAnnotations(info.getAnnotationType(), false);
+ return;
+ }
+
+ if (info.getHighlightPreferenceKey() != null && info.getHighlightPreferenceKey().equals(p)) {
+ if (areAnnotationsHighlighted(info.getAnnotationType()))
+ showAnnotations(info.getAnnotationType(), true);
else
- hideAnnotations(info.getAnnotationType());
+ hideAnnotations(info.getAnnotationType(), true);
return;
}
@@ -587,8 +599,9 @@ public class SourceViewerDecorationSupport {
* Enables annotations in the source viewer for the given annotation type.
*
* @param annotationType the annotation type
+ * @param highlighting <code>true</code> if highlighting <code>false</code> if painting squiggles
*/
- private void showAnnotations(Object annotationType) {
+ private void showAnnotations(Object annotationType, boolean highlighting) {
if (fSourceViewer instanceof ITextViewerExtension2) {
if (fAnnotationPainter == null) {
fAnnotationPainter= new AnnotationPainter(fSourceViewer, fAnnotationAccess);
@@ -596,7 +609,10 @@ public class SourceViewerDecorationSupport {
extension.addPainter(fAnnotationPainter);
}
fAnnotationPainter.setAnnotationTypeColor(annotationType, getAnnotationTypeColor(annotationType));
- fAnnotationPainter.addAnnotationType(annotationType);
+ if (highlighting)
+ fAnnotationPainter.addHighlightAnnotationType(annotationType);
+ else
+ fAnnotationPainter.addAnnotationType(annotationType);
fAnnotationPainter.paint(IPainter.CONFIGURATION);
}
}
@@ -622,10 +638,16 @@ public class SourceViewerDecorationSupport {
* Hides annotations in the source viewer for the given annotation type.
*
* @param annotationType the annotation type
+ * @param highlighting <code>true</code> if highlighting <code>false</code> if painting squiggles
+ * @since 3.0
*/
- private void hideAnnotations(Object annotationType) {
+ private void hideAnnotations(Object annotationType, boolean highlighting) {
if (fAnnotationPainter != null) {
- fAnnotationPainter.removeAnnotationType(annotationType);
+ if (highlighting)
+ fAnnotationPainter.removeHighlightAnnotationType(annotationType);
+ else
+ fAnnotationPainter.removeAnnotationType(annotationType);
+ fAnnotationPainter.paint(IPainter.CONFIGURATION);
shutdownAnnotationPainter();
}
}
@@ -644,7 +666,23 @@ public class SourceViewerDecorationSupport {
}
return false;
}
-
+
+ /**
+ * Tells whether annotations are highlighted in the source viewer for the given type.
+ *
+ * @param annotationType the annotation type
+ * @return <code>true</code> if the annotations are highlighted
+ * @since 3.0
+ */
+ private boolean areAnnotationsHighlighted(Object annotationType) {
+ if (fPreferenceStore != null) {
+ AnnotationPreference info= (AnnotationPreference)fAnnotationTypeKeyMap.get(annotationType);
+ if (info != null)
+ return info.getHighlightPreferenceKey() != null && fPreferenceStore.getBoolean(info.getHighlightPreferenceKey());
+ }
+ return false;
+ }
+
/**
* Tells whether annotation overview is enabled for the given type.
*

Back to the top