EditorConfig Core

EditorConfig core library ported to Java

Лицензия

Лицензия

Категории

Категории

config Библиотеки уровня приложения Configuration
Группа

Группа

org.standardout.org.editorconfig
Идентификатор

Идентификатор

editorconfig-core
Последняя версия

Последняя версия

0.12.1.Final
Дата

Дата

Тип

Тип

jar
Описание

Описание

EditorConfig Core
EditorConfig core library ported to Java
Ссылка на сайт

Ссылка на сайт

http://editorconfig.org
Система контроля версий

Система контроля версий

https://github.com/editorconfig/editorconfig-core-java

Скачать editorconfig-core

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.standardout.org.editorconfig/editorconfig-core/ -->
<dependency>
    <groupId>org.standardout.org.editorconfig</groupId>
    <artifactId>editorconfig-core</artifactId>
    <version>0.12.1.Final</version>
</dependency>
// https://jarcasting.com/artifacts/org.standardout.org.editorconfig/editorconfig-core/
implementation 'org.standardout.org.editorconfig:editorconfig-core:0.12.1.Final'
// https://jarcasting.com/artifacts/org.standardout.org.editorconfig/editorconfig-core/
implementation ("org.standardout.org.editorconfig:editorconfig-core:0.12.1.Final")
'org.standardout.org.editorconfig:editorconfig-core:jar:0.12.1.Final'
<dependency org="org.standardout.org.editorconfig" name="editorconfig-core" rev="0.12.1.Final">
  <artifact name="editorconfig-core" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.standardout.org.editorconfig', module='editorconfig-core', version='0.12.1.Final')
)
libraryDependencies += "org.standardout.org.editorconfig" % "editorconfig-core" % "0.12.1.Final"
[org.standardout.org.editorconfig/editorconfig-core "0.12.1.Final"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

EditorConfig Java Binding

This directory is for EditorConfig Core Java Binding.

EditorConfig Project

EditorConfig makes it easy to maintain the correct coding style when switching between different text editors and between different projects. The EditorConfig project maintains a file format and plugins for various text editors which allow this file format to be read and used by those editors. For information on the file format and supported text editors, see the EditorConfig website.

How to use EditorConfig Core in Java

Add the editorconfig-core dependency to your pom.xml file:

  ...
  <dependencies>
    <dependency>
      <groupId>org.editorconfig</groupId>
      <artifactId>editorconfig-core</artifactId>
      <version><!-- lookup the newest version on http://mvnrepository.com/artifact/org.editorconfig/editorconfig-core --></version>
    </dependency>
  </dependencies>

A basic example:

EditorConfig ec = new EditorConfig();
List<EditorConfig.OutPair> l = null;
try {
    l = ec.getProperties("/home/user/src/editorconfig-core-py/a.py");
} catch(EditorConfigException e) {
    System.out.println(e);
    System.exit(1);
}

for(int i = 0; i < l.size(); ++i) {
    System.out.println(l.get(i).getKey() + "=" + l.get(i).getVal());
}

There is an online documentation for API details.

Build EditorConfig Core Java librarary

Prerequisistes: Java 6, Maven, Git, cmake 2.6+ (optional for tests)

Checkout the code

git clone https://github.com/editorconfig/editorconfig-core-java.git

Build the library with Maven:

cd editorconfig-core-java
mvn clean install

The built jar file is in the target directory.

Run the testsuite

First make sure that the submodule is initialized:

cd /path/to/editorconfig-core-java
git submodule init
git submodule update

Then prepare and run the tests using cmake:

cmake .
ctest .

How to Contribute

Pull requests are welcome on GitHub.

License

All source files of the Java binding are distributed under the Apache license. See LICENSE for details.

Copyright (C) 2012-2013, EditorConfig Team

org.standardout.org.editorconfig

EditorConfig

Версии библиотеки

Версия
0.12.1.Final