Lines 1745-1751
Link Here
|
1745 |
* @return a java model status describing the problem related to this classpath entry if any, a status object with code <code>IStatus.OK</code> if the entry is fine |
1745 |
* @return a java model status describing the problem related to this classpath entry if any, a status object with code <code>IStatus.OK</code> if the entry is fine |
1746 |
*/ |
1746 |
*/ |
1747 |
public static IJavaModelStatus validateClasspathEntry(IJavaProject project, IClasspathEntry entry, boolean checkSourceAttachment, boolean referredByContainer){ |
1747 |
public static IJavaModelStatus validateClasspathEntry(IJavaProject project, IClasspathEntry entry, boolean checkSourceAttachment, boolean referredByContainer){ |
1748 |
return validateClasspathEntry(project, entry, null, checkSourceAttachment, referredByContainer); |
1748 |
IJavaModelStatus status = validateClasspathEntry(project, entry, null, checkSourceAttachment, referredByContainer); |
|
|
1749 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=171136, ignore class path errors from optional entries. |
1750 |
if (status.getCode() == IJavaModelStatusConstants.INVALID_CLASSPATH && ((ClasspathEntry) entry).isOptional()) |
1751 |
return JavaModelStatus.VERIFIED_OK; |
1752 |
return status; |
1749 |
} |
1753 |
} |
1750 |
|
1754 |
|
1751 |
private static IJavaModelStatus validateClasspathEntry(IJavaProject project, IClasspathEntry entry, IClasspathContainer entryContainer, boolean checkSourceAttachment, boolean referredByContainer){ |
1755 |
private static IJavaModelStatus validateClasspathEntry(IJavaProject project, IClasspathEntry entry, IClasspathContainer entryContainer, boolean checkSourceAttachment, boolean referredByContainer){ |
Lines 1860-1865
Link Here
|
1860 |
} |
1864 |
} |
1861 |
} |
1865 |
} |
1862 |
IJavaModelStatus status = validateLibraryEntry(path, project, containerInfo, checkSourceAttachment ? entry.getSourceAttachmentPath() : null, entryPathMsg); |
1866 |
IJavaModelStatus status = validateLibraryEntry(path, project, containerInfo, checkSourceAttachment ? entry.getSourceAttachmentPath() : null, entryPathMsg); |
|
|
1867 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=171136, ignore class path errors from optional entries |
1868 |
if (status.getCode() == IJavaModelStatusConstants.INVALID_CLASSPATH && ((ClasspathEntry) entry).isOptional()) |
1869 |
status = JavaModelStatus.VERIFIED_OK; |
1863 |
if (!status.isOK()) |
1870 |
if (!status.isOK()) |
1864 |
return status; |
1871 |
return status; |
1865 |
break; |
1872 |
break; |