[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.jdt] Problem: Class after creation not found in model

Hello,
we are working on some Tests for our Plugin.
There we need to build some classes from scratch:

IPackageFragmentRoot packageFragmentRoot = javaProject.getPackageFragmentRoot(javaProject.getResource());
IPackageFragment packageFragment = packageFragmentRoot.createPackageFragment("de.unikassel.janus.tests.autocompletion", true, null);
ICompilationUnit compilationUnit = packageFragment.createCompilationUnit("Simple.java",
                "class Simple {" +
                "}",
                true, null);

After creation, the .java and .class files are found where expected and with right content,
but if try to find the class via SearchEngine.searchAllTypeNames i dont find it?

What did we miss? And what do we need to do, to get the new created classes into the model?
We experimented with getProject().build(IncrementalProjectBuilder.FULL_BUILD,..
and Platform.getJobManager().join(ResourcesPlugin.FAMILY_MANUAL_BUILD,...
but no results.


Kind regards,

Dennis Keßler