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

Unified Diff: editor/tools/plugins/com.google.dart.tools.ui.web/src/com/google/dart/tools/ui/web/html/HtmlDocumentProvider.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/HtmlDocumentProvider.java
===================================================================
--- editor/tools/plugins/com.google.dart.tools.ui.web/src/com/google/dart/tools/ui/web/html/HtmlDocumentProvider.java (revision 16584)
+++ editor/tools/plugins/com.google.dart.tools.ui.web/src/com/google/dart/tools/ui/web/html/HtmlDocumentProvider.java (working copy)
@@ -32,19 +32,24 @@
@Override
protected FileInfo createFileInfo(Object element) throws CoreException {
FileInfo info = super.createFileInfo(element);
+
if (info == null) {
info = createEmptyFileInfo();
}
+
IDocument document = info.fTextFileBuffer.getDocument();
+
if (document != null) {
IDocumentPartitioner partitioner = new FastPartitioner(
- new HtmlPartitionScanner(),
+ new HtmlCustomPartitionScanner(),
new String[] {
- HtmlEditor.HTML_COMMENT_PARTITION, HtmlEditor.HTML_TEMPLATE_PARTITION,
- HtmlEditor.HTML_STYLE_PARTITION, HtmlEditor.HTML_CODE_PARTITION});
+ HtmlEditor.HTML_COMMENT_PARTITION, HtmlEditor.HTML_BRACKET_PARTITION,
+ HtmlEditor.HTML_TEMPLATE_PARTITION, HtmlEditor.HTML_STYLE_PARTITION,
+ HtmlEditor.HTML_CODE_PARTITION});
partitioner.connect(document);
document.setDocumentPartitioner(partitioner);
}
+
return info;
}

Powered by Google App Engine
This is Rietveld 408576698