문제

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:

enter image description here

How can I do it?

도움이 되었습니까?

해결책

There is a variant of JavaCore.newSourceEntry that supports this:

public static IClasspathEntry newSourceEntry(IPath path, IPath[] inclusionPatterns,
       IPath[] exclusionPatterns, IPath specificOutputLocation, 
       IClasspathAttribute[] extraAttributes)
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top