Java Code Examples for org.fife.ui.rsyntaxtextarea.SyntaxConstants#SYNTAX_STYLE_XML
The following examples show how to use
org.fife.ui.rsyntaxtextarea.SyntaxConstants#SYNTAX_STYLE_XML .
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: ScriptableDataSourceEditor.java From pentaho-reporting with GNU Lesser General Public License v2.1 | 6 votes |
private String mapLanguageToSyntaxHighlighting( final String language ) { if ( "beanshell".equals( language ) ) { return SyntaxConstants.SYNTAX_STYLE_JAVA; } if ( "groovy".equals( language ) ) { return SyntaxConstants.SYNTAX_STYLE_GROOVY; } if ( "javascript".equals( language ) ) { return SyntaxConstants.SYNTAX_STYLE_JAVASCRIPT; } if ( "jython".equals( language ) ) { return SyntaxConstants.SYNTAX_STYLE_PYTHON; } if ( "xslt".equals( language ) ) { return SyntaxConstants.SYNTAX_STYLE_XML; } return SyntaxConstants.SYNTAX_STYLE_NONE; }
Example 2
Source File: BeanShellScriptingExpressionEditor.java From pentaho-reporting with GNU Lesser General Public License v2.1 | 6 votes |
private String mapLanguageToSyntaxHighlighting( final String language ) { if ( "beanshell".equals( language ) ) { return SyntaxConstants.SYNTAX_STYLE_JAVA; } if ( "groovy".equals( language ) ) { return SyntaxConstants.SYNTAX_STYLE_GROOVY; } if ( "javascript".equals( language ) ) { return SyntaxConstants.SYNTAX_STYLE_JAVASCRIPT; } if ( "jython".equals( language ) ) { return SyntaxConstants.SYNTAX_STYLE_PYTHON; } if ( "xslt".equals( language ) ) { return SyntaxConstants.SYNTAX_STYLE_XML; } return SyntaxConstants.SYNTAX_STYLE_NONE; }
Example 3
Source File: BSFScriptingExpressionEditor.java From pentaho-reporting with GNU Lesser General Public License v2.1 | 6 votes |
private String mapLanguageToSyntaxHighlighting( final String language ) { if ( "beanshell".equals( language ) ) { return SyntaxConstants.SYNTAX_STYLE_JAVA; } if ( "groovy".equals( language ) ) { return SyntaxConstants.SYNTAX_STYLE_GROOVY; } if ( "javascript".equals( language ) ) { return SyntaxConstants.SYNTAX_STYLE_JAVASCRIPT; } if ( "jython".equals( language ) ) { return SyntaxConstants.SYNTAX_STYLE_PYTHON; } if ( "xslt".equals( language ) ) { return SyntaxConstants.SYNTAX_STYLE_XML; } return SyntaxConstants.SYNTAX_STYLE_NONE; }
Example 4
Source File: JResource.java From jadx with Apache License 2.0 | 6 votes |
@Override public String getSyntaxName() { if (resFile == null) { return null; } switch (resFile.getType()) { case CODE: return super.getSyntaxName(); case MANIFEST: case XML: return SyntaxConstants.SYNTAX_STYLE_XML; default: String syntax = getSyntaxByExtension(resFile.getName()); if (syntax != null) { return syntax; } return super.getSyntaxName(); } }
Example 5
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 6
Source File: XMLEditor.java From rapidminer-studio with GNU Affero General Public License v3.0 | 5 votes |
public XMLEditor(MainFrame mainFrame) { super(new BorderLayout()); this.mainFrame = mainFrame; // create text area this.editor = new RSyntaxTextArea(new RSyntaxDocument(SyntaxConstants.SYNTAX_STYLE_XML)) { @Override public synchronized void setText(String t) { super.setText(t); } }; this.editor.setAnimateBracketMatching(true); this.editor.setAutoIndentEnabled(true); this.editor.setSelectionColor(Colors.TEXT_HIGHLIGHT_BACKGROUND); this.editor.setBorder(null); JToolBar toolBar = new ExtendedJToolBar(); toolBar.setBorder(null); toolBar.add(new ResourceAction(true, "xml_editor.apply_changes") { private static final long serialVersionUID = 1L; @Override public void loggedActionPerformed(ActionEvent e) { try { validateProcess(); } catch (IOException | XMLException e1) { LogService.getRoot().log(Level.WARNING, "com.rapidminer.gui.processeditor.XMLEditor.failed_to_parse_process"); } } }); toolBar.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Colors.TEXTFIELD_BORDER)); add(toolBar, BorderLayout.NORTH); RTextScrollPane rTextScrollPane = new RTextScrollPane(editor); rTextScrollPane.setBorder(null); add(rTextScrollPane, BorderLayout.CENTER); }
Example 7
Source File: XmlBasedFileTreeNodeFactoryProvider.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_XML; } }; }
Example 8
Source File: EjbJarXmlFilePage.java From jd-gui with GNU General Public License v3.0 | votes |
public String getSyntaxStyle() { return SyntaxConstants.SYNTAX_STYLE_XML; }
Example 9
Source File: XmlFilePage.java From jd-gui with GNU General Public License v3.0 | votes |
public String getSyntaxStyle() { return SyntaxConstants.SYNTAX_STYLE_XML; }
Example 10
Source File: WebXmlFilePage.java From jd-gui with GNU General Public License v3.0 | votes |
public String getSyntaxStyle() { return SyntaxConstants.SYNTAX_STYLE_XML; }