Java Code Examples for org.fife.ui.rsyntaxtextarea.SyntaxConstants#SYNTAX_STYLE_HTML
The following examples show how to use
org.fife.ui.rsyntaxtextarea.SyntaxConstants#SYNTAX_STYLE_HTML .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DesktopSourceCodeEditor.java From cuba with Apache License 2.0 | 5 votes |
@Override public void setMode(HighlightMode mode) { Preconditions.checkNotNullArgument(mode, "HighlightMode of SourceCodeEditor cannot be null"); this.mode = mode; String modeId = "text/" + mode.getId(); switch (modeId) { case SyntaxConstants.SYNTAX_STYLE_GROOVY: case SyntaxConstants.SYNTAX_STYLE_HTML: case SyntaxConstants.SYNTAX_STYLE_JAVA: case SyntaxConstants.SYNTAX_STYLE_JAVASCRIPT: case SyntaxConstants.SYNTAX_STYLE_PROPERTIES_FILE: case SyntaxConstants.SYNTAX_STYLE_SQL: case SyntaxConstants.SYNTAX_STYLE_XML: case SyntaxConstants.SYNTAX_STYLE_CSS: impl.setSyntaxEditingStyle(modeId); break; default: if (mode.getId().equals(HighlightMode.SCSS.getId())) { impl.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_CSS); } else { impl.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_NONE); } break; } }
Example 2
Source File: ConsolePanel.java From zap-extensions with Apache License 2.0 | 5 votes |
private static String getSyntaxForExtension(String name) { String nameLc = name.toLowerCase(Locale.ROOT); if (nameLc.endsWith(".js")) { return SyntaxConstants.SYNTAX_STYLE_JAVASCRIPT; } else if (nameLc.endsWith(".html")) { return SyntaxConstants.SYNTAX_STYLE_HTML; } else if (nameLc.endsWith(".css")) { return SyntaxConstants.SYNTAX_STYLE_CSS; } else { return SyntaxConstants.SYNTAX_STYLE_NONE; } }
Example 3
Source File: HtmlFileTreeNodeFactoryProvider.java From jd-gui with GNU General Public License v3.0 | 5 votes |
@Override @SuppressWarnings("unchecked") public <T extends JComponent & UriGettable> T createPage(API api) { return (T)new TextFileTreeNodeFactoryProvider.Page(entry) { @Override public String getSyntaxStyle() { return SyntaxConstants.SYNTAX_STYLE_HTML; } }; }