use of org.erlide.engine.model.root.ErlangProjectProperties 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);
}
use of org.erlide.engine.model.root.ErlangProjectProperties in project erlide_eclipse by erlang.
the class RebarProjectConfigurationTest method propertiesShouldFollowConfigFileChange.
@Test
public void propertiesShouldFollowConfigFileChange() throws CoreException {
project.setConfigType(ProjectConfigType.REBAR);
final String cfgFile = ProjectConfigType.REBAR.getConfigName();
final String config = getFileContent(cfgFile);
final String config1 = config + "{erl_opts, [{i, \"myinclude\"}, " + "{src_dirs, [\"src\", \"src2\"]}]}.";
setFileContent(cfgFile, config1);
final ErlangProjectProperties p2 = project.getProperties();
final Collection<IPath> actualSources = p2.getSourceDirs();
assertThat(actualSources).hasSize(2);
assertThat(actualSources).contains(new Path("src2"));
final Collection<IPath> actualIncludes = p2.getIncludeDirs();
assertThat(actualIncludes).hasSize(1);
assertThat(actualIncludes).contains(new Path("myinclude"));
}
use of org.erlide.engine.model.root.ErlangProjectProperties in project erlide_eclipse by erlang.
the class ModuleLocatorTest method checkProjectDirectories.
private void checkProjectDirectories(final IErlProject project, final Object[] expectedSources, final Object[] expectedIncludes) {
final ErlangProjectProperties properties = project.getProperties();
Truth.<Object>assertThat(properties.getSourceDirs().toArray()).isEqualTo(expectedSources);
Truth.<Object>assertThat(properties.getIncludeDirs().toArray()).isEqualTo(expectedIncludes);
}
use of org.erlide.engine.model.root.ErlangProjectProperties in project erlide_eclipse by erlang.
the class BuildersTest method setupProject.
@Before
public void setupProject() throws CoreException {
ErlideTestUtils.initProjects();
prj = ErlideTestUtils.createProject("builders");
ErlideTestUtils.createFolder(prj, "src");
ErlideTestUtils.createFile(prj, "src/mod.erl", BuildersTest.MOD);
ErlideTestUtils.createFolder(prj, "include");
ErlideTestUtils.createFile(prj, "include/hdr.hrl", BuildersTest.HDR);
ErlideTestUtils.createFile(prj, "src/builders.app.src", APP);
ErlideTestUtils.createFile(prj, "Emakefile", BuildersTest.EMAKEFILE);
ErlideTestUtils.createFile(prj, "Makefile", BuildersTest.MAKEFILE);
prj.refreshLocal(IResource.DEPTH_INFINITE, null);
final IErlProject erlPrj = ErlideTestUtils.createErlProject(prj);
final ErlangProjectProperties properties = erlPrj.getProperties();
final RuntimeVersion _runtimeVersion = new RuntimeVersion(18);
properties.setRequiredRuntimeVersion(_runtimeVersion);
erlPrj.setProperties(properties);
ExternalBuilder.DEBUG = true;
}
use of org.erlide.engine.model.root.ErlangProjectProperties in project erlide_eclipse by erlang.
the class NewProjectData method detectProjectConfig.
public String detectProjectConfig() {
String _xblockexpression = null;
{
System.out.println("ยป DETECT builder config");
String _xifexpression = null;
if (location != null) {
String _xblockexpression_1 = null;
{
System.out.println("DETECT builder config");
final String _portableString = location.toPortableString();
final File directory = new File(_portableString);
String _xifexpression_1 = null;
if (directory.isDirectory() && directory.exists()) {
String _xblockexpression_2 = null;
{
final IProjectConfigurator persister = factory.getConfig(configType, directory);
System.out.println("PERSISTER " + persister);
String _xifexpression_2 = null;
if (persister != null) {
String _xblockexpression_3 = null;
{
final ErlangProjectProperties props = persister.getConfiguration();
_xblockexpression_3 = "detected PROPS: " + props;
System.out.println(_xblockexpression_3);
}
_xifexpression_2 = _xblockexpression_3;
}
_xblockexpression_2 = _xifexpression_2;
}
_xifexpression_1 = _xblockexpression_2;
}
_xblockexpression_1 = _xifexpression_1;
}
_xifexpression = _xblockexpression_1;
}
_xblockexpression = _xifexpression;
}
return _xblockexpression;
}
Aggregations