Search in sources :

Example 1 with CompilerOptions

use of org.erlide.core.builder.CompilerOptions in project erlide_eclipse by erlang.

the class CompilerOptionsTest method test_9.

@Test
public void test_9() {
    final CompilerOptions prefs = new CompilerOptions();
    prefs.setBooleanOption(CompilerOptions.WARN_EXPORT_ALL, false);
    final String actual = prefs.export().toString();
    final String expect = "[" + CompilerOptionsTest.DEF_VALUES + "]";
    Assert.assertEquals(expect, actual);
}
Also used : CompilerOptions(org.erlide.core.builder.CompilerOptions) Test(org.junit.Test)

Example 2 with CompilerOptions

use of org.erlide.core.builder.CompilerOptions in project erlide_eclipse by erlang.

the class CompilerOptionsTest method test_3.

@SuppressWarnings("unchecked")
@Test
public void test_3() {
    final CompilerOptions prefs = new CompilerOptions();
    prefs.setListOption(CompilerOptions.DEFINE, new Pair<String, String>("Macro", null));
    final String actual = prefs.export().toString();
    final String expect = "[{d,'Macro'}," + CompilerOptionsTest.DEF_VALUES + "]";
    Assert.assertEquals(expect, actual);
}
Also used : CompilerOptions(org.erlide.core.builder.CompilerOptions) Test(org.junit.Test)

Example 3 with CompilerOptions

use of org.erlide.core.builder.CompilerOptions in project erlide_eclipse by erlang.

the class CompilerOptionsTest method test_12.

@Test
public void test_12() {
    final CompilerOptions prefs = new CompilerOptions();
    prefs.setPathOption(CompilerOptions.INCLUDE_DIRS, parseIncludes("/tmp/x,/tmp/y"));
    final String actual = prefs.export().toString();
    final String expect = "[{i,\"/tmp/x\"},{i,\"/tmp/y\"}," + CompilerOptionsTest.DEF_VALUES + "]";
    Assert.assertEquals(expect, actual);
}
Also used : CompilerOptions(org.erlide.core.builder.CompilerOptions) Test(org.junit.Test)

Example 4 with CompilerOptions

use of org.erlide.core.builder.CompilerOptions in project erlide_eclipse by erlang.

the class CompilerPreferencePage method performDefaults.

@Override
protected void performDefaults() {
    if (fProject == null) {
        prefs = new CompilerOptions();
    } else {
        prefs = new CompilerOptions(fProject);
    }
    updateUI();
    super.performDefaults();
}
Also used : CompilerOptions(org.erlide.core.builder.CompilerOptions)

Example 5 with CompilerOptions

use of org.erlide.core.builder.CompilerOptions in project erlide_eclipse by erlang.

the class CompilerPreferencePage method initPrefs.

private void initPrefs() {
    if (fProject == null) {
        prefs = new CompilerOptions();
    } else {
        prefs = new CompilerOptions(fProject);
    }
    prefs.load();
    updateUI();
}
Also used : CompilerOptions(org.erlide.core.builder.CompilerOptions)

Aggregations

CompilerOptions (org.erlide.core.builder.CompilerOptions)16 Test (org.junit.Test)13 OtpErlangList (com.ericsson.otp.erlang.OtpErlangList)1 IProject (org.eclipse.core.resources.IProject)1 IResource (org.eclipse.core.resources.IResource)1 BuildResource (org.erlide.core.builder.BuildResource)1 IErlModule (org.erlide.engine.model.root.IErlModule)1 IErlProject (org.erlide.engine.model.root.IErlProject)1 IOtpRpc (org.erlide.runtime.rpc.IOtpRpc)1 AbstractErlangEditor (org.erlide.ui.editors.erl.AbstractErlangEditor)1 ErlEditorActionBarContributor (org.erlide.ui.editors.erl.ErlEditorActionBarContributor)1