Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(329)

Unified Diff: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/SemanticHighlightingManager.java

Issue 11362002: Option to disable syntax highlighter and use mostly semantic highlighter. Tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/SemanticHighlightingManager.java
diff --git a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/SemanticHighlightingManager.java b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/SemanticHighlightingManager.java
index 3b4734f13b9f2136fdd151f415a4df6475ff73a0..eb305a55093791e79e3bb56f3b43694824efce35 100644
--- a/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/SemanticHighlightingManager.java
+++ b/editor/tools/plugins/com.google.dart.tools.ui/src/com/google/dart/tools/ui/internal/text/editor/SemanticHighlightingManager.java
@@ -40,50 +40,9 @@ import java.util.List;
public class SemanticHighlightingManager implements IPropertyChangeListener {
/**
- * Highlighted ranges.
- */
- public static class HighlightedRange extends Region {
- /**
- * The highlighting key as returned by {@link SemanticHighlighting#getPreferenceKey()}.
- */
- private String fKey;
-
- /**
- * Initialize with the given offset, length and highlighting key.
- *
- * @param offset
- * @param length
- * @param key the highlighting key as returned by
- * {@link SemanticHighlighting#getPreferenceKey()}
- */
- public HighlightedRange(int offset, int length, String key) {
- super(offset, length);
- fKey = key;
- }
-
- @Override
- public boolean equals(Object o) {
- return super.equals(o) && o instanceof HighlightedRange
- && fKey.equals(((HighlightedRange) o).getKey());
- }
-
- /**
- * @return the highlighting key as returned by {@link SemanticHighlighting#getPreferenceKey()}
- */
- public String getKey() {
- return fKey;
- }
-
- @Override
- public int hashCode() {
- return super.hashCode() | fKey.hashCode();
- }
- }
-
- /**
* Highlighted Positions.
*/
- static class HighlightedPosition extends Position {
+ public static class HighlightedPosition extends Position {
/** Highlighting of the position */
private Highlighting fStyle;
@@ -201,9 +160,50 @@ public class SemanticHighlightingManager implements IPropertyChangeListener {
}
/**
+ * Highlighted ranges.
+ */
+ public static class HighlightedRange extends Region {
+ /**
+ * The highlighting key as returned by {@link SemanticHighlighting#getPreferenceKey()}.
+ */
+ private String fKey;
+
+ /**
+ * Initialize with the given offset, length and highlighting key.
+ *
+ * @param offset
+ * @param length
+ * @param key the highlighting key as returned by
+ * {@link SemanticHighlighting#getPreferenceKey()}
+ */
+ public HighlightedRange(int offset, int length, String key) {
+ super(offset, length);
+ fKey = key;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ return super.equals(o) && o instanceof HighlightedRange
+ && fKey.equals(((HighlightedRange) o).getKey());
+ }
+
+ /**
+ * @return the highlighting key as returned by {@link SemanticHighlighting#getPreferenceKey()}
+ */
+ public String getKey() {
+ return fKey;
+ }
+
+ @Override
+ public int hashCode() {
+ return super.hashCode() | fKey.hashCode();
+ }
+ }
+
+ /**
* Highlighting.
*/
- static class Highlighting { // TODO: rename to HighlightingStyle
+ public static class Highlighting { // TODO: rename to HighlightingStyle
/** Text attribute */
private TextAttribute fTextAttribute;

Powered by Google App Engine
This is Rietveld 408576698