public class EditorConfig extends Object
Modifier and Type | Class and Description |
---|---|
static class |
EditorConfig.OutPair
String-String pair to store the parsing result.
|
Constructor and Description |
---|
EditorConfig()
Creates EditorConfig handler with default configuration filename (.editorconfig) and
version
VERSION |
EditorConfig(String configFilename,
String version)
Creates EditorConfig handler with specified configuration filename and version.
|
Modifier and Type | Method and Description |
---|---|
List<EditorConfig.OutPair> |
getProperties(String filePath)
Parse editorconfig files corresponding to the file path given by filename, and return the parsing result.
|
public EditorConfig()
VERSION
public EditorConfig(String configFilename, String version)
configFilename
- configuration file name to be searched for instead of .editorconfigversion
- required versionpublic List<EditorConfig.OutPair> getProperties(String filePath) throws EditorConfigException
filePath
- The full path to be parsed. The path is usually the path of the file which is currently edited
by the editor.EditorConfig.OutPair
.ParsingException
- If an .editorconfig
file could not be parsedVersionException
- If version greater than actual is specified in constructorEditorConfigException
- If an EditorConfig exception occurs. Usually one of
ParsingException
or VersionException