use of org.erlide.engine.internal.model.root.ErlProject in project erlide_eclipse by erlang.
the class IErlProjectTest method getExternalModulesString.
// String getExternalModulesString();
@Test
public void getExternalModulesString() throws Exception {
final IErlProject aProject = ErlModelTestBase.projects[0];
final String externalIncludesString = aProject.getProperties().getExternalIncludes();
try {
final String s = "/hej";
((ErlProject) aProject).setExternalModulesFile(s);
assertEquals(s, aProject.getProperties().getExternalModules());
} finally {
((ErlProject) aProject).setExternalModulesFile(externalIncludesString);
}
}
use of org.erlide.engine.internal.model.root.ErlProject in project erlide_eclipse by erlang.
the class AbstractProjectConfigurationTest method setUp.
@Before
public void setUp() throws Exception {
ErlideTestUtils.initProjects();
final String name = "testproject3";
project = ErlideTestUtils.createErlProject(name);
final ErlProject p = (ErlProject) project;
p.configurationChanged();
}
use of org.erlide.engine.internal.model.root.ErlProject in project erlide_eclipse by erlang.
the class IErlElementTest method isStructureKnown.
// boolean isReadOnly();
// Empty method
// boolean isStructureKnown() throws ErlModelException;
@Test
public void isStructureKnown() throws Exception {
((ErlProject) project).setSourceDirs(project.getProperties().getSourceDirs());
// this sets structureKnown to false
final boolean structureKnown = project.isStructureKnown();
project.open(null);
final boolean structureKnown2 = project.isStructureKnown();
final boolean structureKnown3 = module.isStructureKnown();
module.open(null);
final boolean structureKnown4 = module.isStructureKnown();
final IErlElementLocator model = ErlangEngine.getInstance().getModel();
final IErlModule otpFile = model.findModuleFromProject(project, "file.erl", null, IErlElementLocator.Scope.PROJECT_ONLY);
final IErlExternal external = (IErlExternal) otpFile.getParent();
final boolean structureKnown5 = external.isStructureKnown();
final IErlModule module2 = ErlideTestUtils.createModule(project, "yy.erl", "-module(yy).\n% comment\n% same\nf(x) -> y.\n% last");
final boolean structureKnown6 = module2.isStructureKnown();
module2.open(null);
final boolean structureKnown7 = module2.isStructureKnown();
assertFalse(structureKnown);
assertTrue(structureKnown2);
assertFalse(structureKnown3);
assertTrue(structureKnown4);
assertTrue(structureKnown5);
assertFalse(structureKnown6);
assertTrue(structureKnown7);
}
Aggregations