Search in sources :

Example 6 with JscsSettings

use of com.jscs.cli.JscsSettings in project jscs-plugin by idok.

the class JscsSettingsPage method getVersion.

private void getVersion() {
    if (settings != null && areEqual(nodeInterpreterField, settings.node) && areEqual(jscsBinField, settings.jscsExecutablePath) && settings.cwd.equals(project.getBasePath())) {
        return;
    }
    settings = new JscsSettings();
    settings.node = nodeInterpreterField.getChildComponent().getText();
    settings.jscsExecutablePath = jscsBinField.getChildComponent().getText();
    settings.cwd = project.getBasePath();
    try {
        String version = JscsRunner.version(settings);
        versionLabel.setText(version.trim());
    } catch (ExecutionException e) {
        e.printStackTrace();
    }
}
Also used : JscsSettings(com.jscs.cli.JscsSettings) ExecutionException(com.intellij.execution.ExecutionException)

Aggregations

JscsSettings (com.jscs.cli.JscsSettings)6 Test (org.junit.Test)4 JscsLint (com.jscs.cli.data.JscsLint)3 LintResult (com.jscs.cli.data.LintResult)3 ExecutionException (com.intellij.execution.ExecutionException)2