use of org.erlide.engine.model.root.IErlProject in project erlide_eclipse by erlang.
the class ContentAssistTest method includeCompletionTest.
// http://www.assembla.com/spaces/erlide/tickets/947
// completion of include and include_lib
@Test
public void includeCompletionTest() throws Exception {
ErlideTestUtils.initProjects();
final String name1 = "testproject1";
final IErlProject project = ErlideTestUtils.createErlProject(name1);
try {
ErlideTestUtils.createInclude(project, "a.hrl", "-define(A, a).\n");
// check that quotes are added if needed
completionTest(project, "a.erl", "-include().\n", 9, Lists.newArrayList("\"a.hrl\""), false);
// check that completion works in strings
completionTest(project, "b.erl", "-include(\"\").\n", 10, Lists.newArrayList("a.hrl"), true);
} finally {
ErlideTestUtils.deleteProjects();
}
}
use of org.erlide.engine.model.root.IErlProject in project erlide_eclipse by erlang.
the class ContentAssistTest method moduleCompletion2Test.
@Test
public void moduleCompletion2Test() throws Exception {
ErlideTestUtils.initProjects();
final String name1 = "testproject1";
final IErlProject project = ErlideTestUtils.createErlProject(name1);
try {
completionTest(project, "a.erl", "'CosEventChannelAdmin_A", 23, Lists.newArrayList("'CosEventChannelAdmin_AlreadyConnected':"), false);
} finally {
ErlideTestUtils.deleteProjects();
}
}
use of org.erlide.engine.model.root.IErlProject in project erlide_eclipse by erlang.
the class ContentAssistTest method recordCompletionSingleQuoteTest.
@Test
public void recordCompletionSingleQuoteTest() throws Exception {
ErlideTestUtils.initProjects();
final String name1 = "testproject1";
final IErlProject project = ErlideTestUtils.createErlProject(name1);
try {
final String initialText = "-record('AA', {a, b}).\n-record('B', {a, b}).\n" + "-record(ab, {a, b}).\nf() ->\n#'A";
final int len = initialText.length();
completionTest(project, "a1.erl", initialText, len - 2, Lists.newArrayList("'AA'", "'B'", "ab"), false);
completionTest(project, "a2.erl", initialText, len - 1, Lists.newArrayList("'AA'", "'B'"), false);
completionTest(project, "a3.erl", initialText, len, Lists.newArrayList("'AA'"), false);
} finally {
ErlideTestUtils.deleteProjects();
}
}
use of org.erlide.engine.model.root.IErlProject in project erlide_eclipse by erlang.
the class ContentAssistTest method caseInsensitiveProposalsTest.
@Test
public void caseInsensitiveProposalsTest() throws Exception {
ErlideTestUtils.initProjects();
final String name1 = "testproject1";
final IErlProject project = ErlideTestUtils.createErlProject(name1);
try {
final String initialText1 = "-define(abc,abc).\n-define(aBc, aBc).\nf()->?ab";
completionTest(project, "w.erl", initialText1, initialText1.length() - 1, Lists.newArrayList("aBc", "abc"), false);
final String initialText2 = "-define(abc,abc).\n-define(aBc, aBc).\nf()->?aB";
completionTest(project, "w2.erl", initialText2, initialText2.length(), Lists.newArrayList("aBc", "abc"), false);
} finally {
ErlideTestUtils.deleteProjects();
}
}
use of org.erlide.engine.model.root.IErlProject in project erlide_eclipse by erlang.
the class ContentAssistTest method moduleCompletionTest.
@Test
public void moduleCompletionTest() throws Exception {
ErlideTestUtils.initProjects();
final String name1 = "testproject1";
final IErlProject project = ErlideTestUtils.createErlProject(name1);
try {
final String initialText = "application_";
completionTest(project, "z.erl", initialText, initialText.length(), Lists.newArrayList("application_controller:", "application_master:", "application_starter:"), false);
} finally {
ErlideTestUtils.deleteProjects();
}
}
Aggregations