├── .gitignore ├── AUTHORS ├── .gitmodules ├── .editorconfig ├── description.txt ├── .travis.yml ├── LICENSE ├── actions.xml ├── EditorConfigPlugin.props ├── README.md ├── docs └── index.html └── src └── org └── editorconfig └── jedit └── EditorConfigPlugin.java /.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /build-support 3 | /build.properties 4 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Contributors to EditorConfig jEdit Plugin: 2 | 3 | Hong Xu 4 | jarekczek 5 | Trey Hunner 6 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "editorconfig-core-java"] 2 | path = editorconfig-core-java 3 | url = https://github.com/editorconfig/editorconfig-core-java.git 4 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | 2 | root = true 3 | 4 | [*] 5 | end_of_line = lf 6 | indent_style = space 7 | 8 | [*.java] 9 | indent_size = 4 10 | 11 | [*.xml] 12 | indent_size = 2 13 | 14 | [*.html] 15 | indent_size = 2 16 | -------------------------------------------------------------------------------- /description.txt: -------------------------------------------------------------------------------- 1 | EditorConfig helps developers define and maintain consistent coding styles 2 | between different editors and IDEs. The EditorConfig project consists of a file 3 | format for defining coding styles and a collection of text editor plugins that 4 | enable editors to read the file format and adhere to defined styles. 5 | EditorConfig files are easily readibly and they work nicely with version 6 | control systems. 7 | 8 | This is the EditorConfig plugin of jEdit. For more information, please visit 9 | < https://editorconfig.org >. 10 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: java 2 | 3 | jdk: 4 | - openjdk7 5 | - openjdk6 6 | - oraclejdk7 7 | 8 | before_install: 9 | - git submodule update --init --recursive 10 | 11 | install: 12 | - sudo apt-get install jedit subversion 13 | 14 | before_script: 15 | - svn co https://svn.code.sf.net/p/jedit/svn/build-support/trunk build-support 16 | - cp build.properties.in build.properties 17 | 18 | # Run the Build script 19 | script: 20 | - ant 21 | 22 | # Notify the mailing list 23 | notifications: 24 | email: 25 | on_success: change 26 | on_failure: always 27 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Unless otherwise stated, all files are distributed under the Simplified BSD 2 | license included below. 3 | 4 | Copyright (c) 2012 EditorConfig Team 5 | All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are met: 9 | 10 | 1. Redistributions of source code must retain the above copyright notice, 11 | this list of conditions and the following disclaimer. 12 | 2. Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 20 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | POSSIBILITY OF SUCH DAMAGE. 27 | -------------------------------------------------------------------------------- /actions.xml: -------------------------------------------------------------------------------- 1 | 26 | 27 | 28 | 29 | 30 | try 31 | { 32 | org.editorconfig.jedit.EditorConfigPlugin.getPlugin().loadEditorConfig(buffer); 33 | } catch(java.lang.NumberFormatException e) { 34 | javax.swing.JOptionPane.showMessageDialog(null, 35 | "Failed to reload EditorConfig: \n" + e.toString()); 36 | return; 37 | } catch (org.editorconfig.core.EditorConfigException e) { 38 | javax.swing.JOptionPane.showMessageDialog(null, 39 | "Failed to reload EditorConfig: \n" + e.toString()); 40 | return; 41 | } 42 | 43 | javax.swing.JOptionPane.showMessageDialog(null, "EditorConfig successfully reloaded."); 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /EditorConfigPlugin.props: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2012 EditorConfig Team 2 | # All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions are met: 6 | 7 | # 1. Redistributions of source code must retain the above copyright notice, 8 | # this list of conditions and the following disclaimer. 9 | # 2. Redistributions in binary form must reproduce the above copyright notice, 10 | # this list of conditions and the following disclaimer in the documentation 11 | # and/or other materials provided with the distribution. 12 | # 13 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 14 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 17 | # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 18 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 19 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 20 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 21 | # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | # POSSIBILITY OF SUCH DAMAGE. 24 | # 25 | 26 | # general plugin information 27 | plugin.org.editorconfig.jedit.EditorConfigPlugin.activate=startup 28 | plugin.org.editorconfig.jedit.EditorConfigPlugin.name=EditorConfig 29 | plugin.org.editorconfig.jedit.EditorConfigPlugin.author=EditorConfig Team 30 | plugin.org.editorconfig.jedit.EditorConfigPlugin.version=0.6.1 31 | plugin.org.editorconfig.jedit.EditorConfigPlugin.description=EditorConfig plugin for jEdit 32 | plugin.org.editorconfig.jedit.EditorConfigPlugin.longdescription=description.txt 33 | plugin.org.editorconfig.jedit.EditorConfigPlugin.usePluginHome=false 34 | plugin.org.editorconfig.jedit.EditorConfigPlugin.jars=editorconfig.jar 35 | plugin.org.editorconfig.jedit.EditorConfigPlugin.depend.0=jedit 04.04.99.01 36 | plugin.org.editorconfig.jedit.EditorConfigPlugin.depend.1=jdk 1.6 37 | 38 | # doc 39 | plugin.org.editorconfig.jedit.EditorConfigPlugin.docs=docs/index.html 40 | 41 | # menu 42 | plugin.org.editorconfig.jedit.EditorConfigPlugin.menu=editorconfig-plugin.reload-editorconfig 43 | editorconfig-plugin.reload-editorconfig.label=Reload EditorConfig 44 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # EditorConfig jEdit Plugin 2 | 3 | [![Build Status](https://secure.travis-ci.org/editorconfig/editorconfig-jedit.svg?branch=master)](http://travis-ci.org/editorconfig/editorconfig-jedit) 4 | 5 | This is an [EditorConfig][] plugin for [jEdit][]. 6 | 7 | ## Installation 8 | 9 | ### Install from jEdit Plugin Manager (Preferred) 10 | 11 | 1. Launch the jEdit plugin manager. It's in **Plugins** - **Plugin Manager...**. 12 | 13 | 2. Click on the **Install** tab, find **EditorConfig** in the plugin list. 14 | Check it and click on the **Install** button. 15 | 16 | If you have problem using the Plugin Manager, you can also download the binaries 17 | from [here](http://plugins.jedit.org/plugins/?EditorConfig). 18 | 19 | ### Install from Source 20 | 21 | 1. Make sure that submodules are checked out and up-to-date: 22 | 23 | git submodule update --recursive --init 24 | 25 | 2. Download [ant][] and install it. 26 | 27 | 3. In the EditorConfig jEdit Plugin project root directory, get the jEdit 28 | build-support files: 29 | 30 | svn co https://svn.code.sf.net/p/jedit/svn/build-support/trunk build-support 31 | 32 | 4. Copy `build.properties.in` to `build.properties`. Edit the 33 | `build.properties` file and modify `jedit.install.dir` to the jEdit 34 | installation directory in your system. 35 | 36 | 5. Switch to EditorConfig jEdit Plugin project root directory and run `ant`. 37 | 38 | 6. If succeeded, Plugin should be built in `build/jars/`. Copy 39 | `build/jars/EditorConfigPlugin.jar` and `build/jars/editorconfig.jar` to your 40 | jEdit plugin directory (this should be `~/.jedit/jars` on UNIX and 41 | `${JEDIT_INATALLATION_DIRECTORY}/jars` on Windows). 42 | 43 | 6. If jEdit is running, restart jEdit. 44 | 45 | For example, on Debian, the commands are like this: 46 | 47 | ```Shell 48 | $ sudo apt-get install ant git 49 | $ git clone git://github.com/editorconfig/editorconfig-jedit.git 50 | $ git submodule update --init --recursive 51 | $ cd editorconfig-jedit 52 | $ svn co https://jedit.svn.sourceforge.net/svnroot/jedit/build-support/trunk build-support 53 | $ cp build.properties.in build.properties # Copy build properties and modify jedit.install.dir as needed 54 | $ ant 55 | $ cp ./build/jars/*.jar ~/.jedit/jars 56 | ``` 57 | 58 | ## Supported properties 59 | 60 | The EditorConfig jEdit plugin supports the following EditorConfig [properties][]: 61 | 62 | * indent_style 63 | * indent_size 64 | * tab_width 65 | * end_of_line 66 | * charset 67 | * root (only used by EditorConfig core) 68 | 69 | In addition, this plugin also supports a specific property which is only valid for jEdit: 70 | 71 | * jedit_charset 72 | 73 | The usage of this property is similar to `charset`, but the value is the 74 | encoding string defined by jEdit, and is case sensitive. If both `charset` and 75 | `jedit_charset` are present, only `charset` will be used. 76 | 77 | ## Bugs and Feature Requests 78 | 79 | Feel free to submit bugs, feature requests, and other issues to the main 80 | [EditorConfig issue tracker](https://github.com/editorconfig/editorconfig/issues). 81 | 82 | 83 | [ant]: http://ant.apache.org 84 | [EditorConfig]: https://editorconfig.org 85 | [EditorConfig core]: https://github.com/editorconfig/editorconfig-core 86 | [jEdit]: http://www.jedit.org 87 | [properties]: https://editorconfig.org/#supported-properties 88 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | EditorConfig Plugin for jEdit 4 | 5 | 6 |

EditorConfig jEdit Plugin

7 | 8 |

EditorConfig Logo

9 | 10 |

This is an EditorConfig plugin for jEdit.

11 | 12 |

Installation

13 | 14 |

Install from jEdit Plugin Manager (Preferred)

15 | 16 |
    17 |
  1. Launch the jEdit plugin manager. It’s in Plugins - Plugin Manager….

  2. 18 |
  3. Click on the Install tab, find EditorConfig in the plugin list. 19 | Check it and click on the Install button.

  4. 20 |
21 | 22 | 23 |

If you have problem using the Plugin Manager, you can also download the binaries 24 | from here.

25 | 26 |

Install from Source

27 | 28 |
    29 |
  1. Make sure that submodules are checked out and up-to-date:

    30 | 31 |
    git submodule update --recursive --init
    32 | 
  2. 33 |
  3. Download ant and install it.

  4. 34 |
  5. In the EditorConfig jEdit Plugin project root directory, get the jEdit 35 | build-support files:

    36 | 37 |
    svn co https://jedit.svn.sourceforge.net/svnroot/jedit/build-support/trunk build-support
    38 | 
  6. 39 |
  7. Copy build.properties.in to build.properties. Edit the 40 | build.properties file and modify jedit.install.dir to the jEdit 41 | installation directory in your system.

  8. 42 |
  9. Switch to EditorConfig jEdit Plugin project root directory and run ant.

  10. 43 |
  11. If succeeded, Plugin should be built in build/jars/. Copy 44 | build/jars/EditorConfigPlugin.jar and build/jars/editorconfig.jar to your 45 | jEdit plugin directory (this should be ~/.jedit/jars on UNIX and 46 | ${JEDIT_INATALLATION_DIRECTORY}/jars on Windows).

  12. 47 |
  13. If jEdit is running, restart jEdit.

  14. 48 |
49 | 50 | 51 |

For example, on Debian, the commands are like this:

52 | 53 |

54 | $ sudo apt-get install ant git
55 | $ git clone git://github.com/editorconfig/editorconfig-jedit.git
56 | $ git submodule update --init --recursive
57 | $ cd editorconfig-jedit
58 | $ svn co https://jedit.svn.sourceforge.net/svnroot/jedit/build-support/trunk build-support
59 | $ cp build.properties.in build.properties # Copy build properties and modify jedit.install.dir as needed
60 | $ ant
61 | $ cp ./build/jars/*.jar ~/.jedit/jars
62 | 

63 | 64 |

Supported properties

65 | 66 |

The EditorConfig jEdit plugin supports the following EditorConfig properties:

67 | 68 | 76 | 77 | 78 |

In addition, this plugin also supports a specific property which is only valid for jEdit:

79 | 80 | 83 | 84 | 85 |

The usage of this property is similar to charset, but the value is the 86 | encoding string defined by jEdit, and is case sensitive. If both charset and 87 | jedit_charset are present, only charset will be used.

88 | 89 |

Bugs and Feature Requests

90 | 91 |

Feel free to submit bugs, feature requests, and other issues to the main 92 | EditorConfig issue tracker.

93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /src/org/editorconfig/jedit/EditorConfigPlugin.java: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 EditorConfig Team 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are met: 6 | // 7 | // 1. Redistributions of source code must retain the above copyright notice, 8 | // this list of conditions and the following disclaimer. 9 | // 2. Redistributions in binary form must reproduce the above copyright notice, 10 | // this list of conditions and the following disclaimer in the documentation 11 | // and/or other materials provided with the distribution. 12 | // 13 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 14 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 17 | // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 18 | // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 19 | // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 20 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 21 | // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | // POSSIBILITY OF SUCH DAMAGE. 24 | // 25 | 26 | package org.editorconfig.jedit; 27 | 28 | import java.io.File; 29 | import java.util.Arrays; 30 | import java.util.LinkedList; 31 | import java.util.List; 32 | import java.util.Properties; 33 | import org.editorconfig.core.*; 34 | import org.gjt.sp.jedit.Buffer; 35 | import org.gjt.sp.jedit.EBComponent; 36 | import org.gjt.sp.jedit.EBMessage; 37 | import org.gjt.sp.jedit.EditBus; 38 | import org.gjt.sp.jedit.EditPlugin; 39 | import org.gjt.sp.jedit.buffer.JEditBuffer; 40 | import org.gjt.sp.jedit.io.EncodingServer; 41 | import org.gjt.sp.jedit.msg.BufferUpdate; 42 | import org.gjt.sp.util.Log; 43 | 44 | public class EditorConfigPlugin extends EditPlugin implements EBComponent 45 | { 46 | static private EditorConfigPlugin plugin; 47 | static private EditorConfig ec; 48 | 49 | // get the plugin instance 50 | static public EditorConfigPlugin getPlugin() 51 | { 52 | return plugin; 53 | } 54 | 55 | public EditorConfigPlugin() 56 | { 57 | plugin = this; 58 | } 59 | 60 | @Override 61 | public void start() 62 | { 63 | EditBus.addToBus(this); 64 | } 65 | 66 | @Override 67 | public void stop() 68 | { 69 | EditBus.removeFromBus(this); 70 | ec = null; 71 | } 72 | 73 | // an inner class that stores EditorConfig configuration info 74 | private class EditorConfigConf 75 | { 76 | String indentStyle = null; 77 | int indentSize = 0; 78 | int tabWidth = 0; 79 | String endOfLine = null; 80 | String charset = null; 81 | String jeditCharset = null; 82 | 83 | // indentStyle will be set to this value if indent_size = tab 84 | static final int INDENT_SIZE_TAB = -1000; 85 | } 86 | 87 | public void loadEditorConfig(Buffer buf) 88 | throws NumberFormatException, EditorConfigException 89 | { 90 | // Get the possible paths of editorconfig.jar. In jedit, 91 | // editorconfig.jar cannot locate itself, thus if we don't point them 92 | // out explicitly, python modules may not be found. 93 | if (ec == null) 94 | ec = new EditorConfig(); 95 | 96 | // EditorConfig confs 97 | EditorConfigConf ecConf = new EditorConfigConf(); 98 | 99 | List outPairs = ec.getProperties(buf.getPath()); 100 | 101 | for (EditorConfig.OutPair pair : outPairs) 102 | { 103 | String key = pair.getKey(); 104 | String value = pair.getVal(); 105 | 106 | if (key.equals("indent_style")) // soft or hard tabs? 107 | ecConf.indentStyle = value; 108 | else if (key.equals("tab_width")) // the width of tab 109 | ecConf.tabWidth = Integer.parseInt(value); 110 | else if (key.equals("indent_size")) // the size of indent 111 | { 112 | int indent_size = 0; 113 | 114 | if (value.equals("tab")) 115 | ecConf.indentSize = EditorConfigConf.INDENT_SIZE_TAB; 116 | else 117 | { 118 | indent_size = Integer.parseInt(value); 119 | 120 | if (indent_size > 0) 121 | ecConf.indentSize = indent_size; 122 | } 123 | } 124 | else if (key.equals("end_of_line")) // eof 125 | ecConf.endOfLine = value; 126 | else if (key.equals("charset")) // charset 127 | ecConf.charset = value; 128 | else if (key.equals("jedit_charset")) // jedit_charset 129 | ecConf.jeditCharset = value; 130 | } 131 | 132 | // set buffer after reading the stdin 133 | 134 | if (ecConf.indentStyle != null) // indent_style 135 | { 136 | if (ecConf.indentStyle.equals("tab")) 137 | buf.setBooleanProperty("noTabs", false); 138 | else if (ecConf.indentStyle.equals("space")) 139 | buf.setBooleanProperty("noTabs", true); 140 | } 141 | 142 | if (ecConf.indentSize > 0) // indent_size > 0 143 | { 144 | buf.setIntegerProperty("indentSize", ecConf.indentSize); 145 | 146 | // set tabSize here, so this could be overwritten if 147 | // ecConf.tabWidth > 0 148 | buf.setIntegerProperty("tabSize", ecConf.indentSize); 149 | } 150 | 151 | if (ecConf.tabWidth > 0) // tab_width 152 | buf.setIntegerProperty("tabSize", ecConf.tabWidth); 153 | 154 | // indent_size = tab 155 | if (ecConf.indentSize == EditorConfigConf.INDENT_SIZE_TAB) 156 | buf.setIntegerProperty("indentSize", buf.getTabSize()); 157 | 158 | if (ecConf.endOfLine != null) // eof 159 | { 160 | if (ecConf.endOfLine.equals("lf")) 161 | buf.setStringProperty(JEditBuffer.LINESEP, "\n"); 162 | else if (ecConf.endOfLine.equals("crlf")) 163 | buf.setStringProperty(JEditBuffer.LINESEP, "\r\n"); 164 | else if (ecConf.endOfLine.equals("cr")) 165 | buf.setStringProperty(JEditBuffer.LINESEP, "\r"); 166 | } 167 | 168 | String charset = null; 169 | // charset. Never use jedit_charset if charset is present 170 | if (ecConf.charset != null) 171 | { 172 | if (ecConf.charset.equals("utf-8") || 173 | ecConf.charset.equals("utf-16be") || 174 | ecConf.charset.equals("utf-16le")) 175 | charset = ecConf.charset.toUpperCase(); 176 | else if (ecConf.charset.equals("latin1")) 177 | charset = "US-ASCII"; 178 | else if (ecConf.charset.equals("utf-8-bom")) 179 | charset = "UTF-8Y"; 180 | else // Other unknown charset 181 | Log.log(Log.ERROR, this, 182 | "Unrecognized charset: charset=" + ecConf.charset); 183 | } 184 | else if (ecConf.jeditCharset != null) 185 | if(EncodingServer.hasEncoding(ecConf.jeditCharset)) 186 | charset = ecConf.jeditCharset; 187 | else 188 | Log.log(Log.ERROR, this, 189 | "Unrecognized charset jedit_charset=" + ecConf.jeditCharset); 190 | 191 | // if we have a valid charset and the charset is different from the 192 | // current one, we set it and disable the encoding auto detection 193 | if (charset != null && 194 | !charset.equals( 195 | buf.getStringProperty(JEditBuffer.ENCODING))) 196 | { 197 | buf.setStringProperty(JEditBuffer.ENCODING, charset); 198 | buf.setBooleanProperty(Buffer.ENCODING_AUTODETECT, false); 199 | } 200 | } 201 | public void handleMessage(EBMessage msg) 202 | { 203 | if (msg instanceof BufferUpdate) 204 | { 205 | BufferUpdate bu_msg = (BufferUpdate) msg; 206 | Buffer buf = bu_msg.getBuffer(); 207 | 208 | if (bu_msg.getWhat() == BufferUpdate.LOADED) 209 | { 210 | try 211 | { 212 | loadEditorConfig(buf); 213 | } catch (NumberFormatException e) { 214 | Log.log(Log.ERROR, this, 215 | "Failed to load EditorConfig: " + e.toString()); 216 | e.printStackTrace(); 217 | } catch (EditorConfigException e) { 218 | Log.log(Log.ERROR, this, 219 | "Failed to load EditorConfig: " + e.toString()); 220 | e.printStackTrace(); 221 | } 222 | } 223 | } 224 | } 225 | } 226 | --------------------------------------------------------------------------------