[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.jdt] Re: createCompilationUnit() -- new class is created in default package...?

Michael Megliola a écrit :
this directory is designated as a source entry (using JavaCore.newSourceEntry)... that all seems fine, but:

1. I get a target package fragment using IJavaProject.findPackageFragment(new Path("/project/structures"));

2. then I create an ICompilationUnit myNewClass that includes the declaration "packages structures;" within that package fragment,
How do you create it?
Are you using this method org.eclipse.jdt.core.IPackageFragment.createCompilationUnit(String, String, boolean, IProgressMonitor) ?
If not, I believe this is the one you should use.
Let me know if it works.
--
Olivier