Search in sources :

Example 1 with IProjectConfigurator

use of org.erlide.engine.model.root.IProjectConfigurator in project erlide_eclipse by erlang.

the class RebarProjectConfigurationTest method configCanBeParsed.

@Override
@Test
public void configCanBeParsed() throws CoreException {
    project.setConfigType(ProjectConfigType.REBAR);
    project.storeAllProperties();
    setFileContent(ProjectConfigType.REBAR.getConfigName(), "");
    final IProjectConfigurator persister = ProjectConfiguratorFactory.getDefault().getConfig(project.getConfigType(), project);
    final ProjectConfigurationSerializer configurator = ((FileProjectConfigurator) persister).getSerializer();
    final ErlangProjectProperties expected = new ErlangProjectProperties();
    expected.setOutputDir(new Path("ebin"));
    final ErlangProjectProperties actual = configurator.decodeConfig("");
    assertThat(actual).isEqualTo(expected);
}
Also used : IPath(org.eclipse.core.runtime.IPath) Path(org.eclipse.core.runtime.Path) ProjectConfigurationSerializer(org.erlide.engine.model.root.ProjectConfigurationSerializer) IProjectConfigurator(org.erlide.engine.model.root.IProjectConfigurator) ErlangProjectProperties(org.erlide.engine.model.root.ErlangProjectProperties) FileProjectConfigurator(org.erlide.engine.model.root.FileProjectConfigurator) Test(org.junit.Test)

Example 2 with IProjectConfigurator

use of org.erlide.engine.model.root.IProjectConfigurator in project erlide_eclipse by erlang.

the class ErlProject method storeProperties.

private void storeProperties() {
    if (properties != null) {
        final IProjectConfigurator builderConfig = getConfig();
        builderConfig.setConfiguration(properties);
    }
}
Also used : IProjectConfigurator(org.erlide.engine.model.root.IProjectConfigurator)

Example 3 with IProjectConfigurator

use of org.erlide.engine.model.root.IProjectConfigurator in project erlide_eclipse by erlang.

the class EmakeProjectConfigurationTest method configuratorExists.

@Test
public void configuratorExists() {
    project.setConfigType(ProjectConfigType.EMAKE);
    final IProjectConfigurator config = ProjectConfiguratorFactory.getDefault().getConfig(project.getConfigType(), project);
    assertThat(config).isNotNull();
// final ProjectConfigurator configurator = config.getConfigurator();
// assertThat(configurator).isEqualTo(notNullValue()));
}
Also used : IProjectConfigurator(org.erlide.engine.model.root.IProjectConfigurator) Test(org.junit.Test)

Example 4 with IProjectConfigurator

use of org.erlide.engine.model.root.IProjectConfigurator in project erlide_eclipse by erlang.

the class EmakeProjectConfigurationTest method configCanBeParsed.

@Override
@Test
public void configCanBeParsed() throws CoreException {
    project.setConfigType(ProjectConfigType.EMAKE);
    final IProjectConfigurator config = ProjectConfiguratorFactory.getDefault().getConfig(project.getConfigType(), project);
    final ErlangProjectProperties expected = ErlangProjectProperties.DEFAULT;
    final ErlangProjectProperties actual = config.getConfiguration();
    assertThat(actual).isEqualTo(expected);
}
Also used : IProjectConfigurator(org.erlide.engine.model.root.IProjectConfigurator) ErlangProjectProperties(org.erlide.engine.model.root.ErlangProjectProperties) Test(org.junit.Test)

Aggregations

IProjectConfigurator (org.erlide.engine.model.root.IProjectConfigurator)4 Test (org.junit.Test)3 ErlangProjectProperties (org.erlide.engine.model.root.ErlangProjectProperties)2 IPath (org.eclipse.core.runtime.IPath)1 Path (org.eclipse.core.runtime.Path)1 FileProjectConfigurator (org.erlide.engine.model.root.FileProjectConfigurator)1 ProjectConfigurationSerializer (org.erlide.engine.model.root.ProjectConfigurationSerializer)1