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

Unified Diff: editor/tools/plugins/com.google.dart.tools.ui.web/src/com/google/dart/tools/ui/web/html/HtmlEditor.java

Issue 11673007: Improve our html editor; add syntax highlighting for script tags; hyperlink detection and navigatio… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 12 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.web/src/com/google/dart/tools/ui/web/html/HtmlEditor.java
===================================================================
--- editor/tools/plugins/com.google.dart.tools.ui.web/src/com/google/dart/tools/ui/web/html/HtmlEditor.java (revision 16584)
+++ editor/tools/plugins/com.google.dart.tools.ui.web/src/com/google/dart/tools/ui/web/html/HtmlEditor.java (working copy)
@@ -27,6 +27,7 @@
*/
public class HtmlEditor extends WebEditor {
public final static String HTML_COMMENT_PARTITION = "__html_comment";
+ public final static String HTML_BRACKET_PARTITION = "__html_bracket";
public final static String HTML_TEMPLATE_PARTITION = "__template";
public final static String HTML_STYLE_PARTITION = "__css_style";
public final static String HTML_CODE_PARTITION = "__code";
@@ -61,15 +62,7 @@
}
public void selectAndReveal(XmlNode node) {
- if (node.getEndToken() != null) {
- int length = node.getEndToken().getLocation() - node.getStartToken().getLocation();
-
- length += node.getEndToken().getValue().length();
-
- selectAndReveal(node.getStartToken().getLocation(), length);
- } else {
- selectAndReveal(node.getStartToken().getLocation(), 0);
- }
+ selectAndReveal(node.getStartOffset(), node.getEndOffset() - node.getStartOffset());
}
protected XmlDocument getModel() {

Powered by Google App Engine
This is Rietveld 408576698