Reputation: 1583
I created a source folder with following code:
Folder folder = proj.getFolder("resources");
folder.create(false, true, null);
IPackageFragmentRoot root = jproject.getPackageFragmentRoot(folder);
IClasspathEntry[] oldEntries = jproject.getRawClasspath();
IClasspathEntry[] newEntries = new IClasspathEntry[oldEntries.length + 1];
System.arraycopy(oldEntries, 0, newEntries, 0, oldEntries.length);
newEntries[oldEntries.length] = JavaCore.newSourceEntry(root.getPath());
jproject.setRawClasspath(newEntries, null);
i18Resource = folder;
Now I'd like to add **
to its exclusion path like in this dialog:
How can I do it?
Upvotes: 0
Views: 59
Reputation: 111218
There is a variant of JavaCore.newSourceEntry
that supports this:
public static IClasspathEntry newSourceEntry(IPath path, IPath[] inclusionPatterns,
IPath[] exclusionPatterns, IPath specificOutputLocation,
IClasspathAttribute[] extraAttributes)
Upvotes: 1