View | Details | Raw Unified | Return to bug 417869 | Differences between
and this patch

Collapse All | Expand All

(-)a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/ClasspathHelper.java (-3 / +7 lines)
Lines 167-173 Link Here
167
	}
167
	}
168
168
169
	// creates a map whose key is a Path to the source directory/jar and the value is a Path output directory or jar.
169
	// creates a map whose key is a Path to the source directory/jar and the value is a Path output directory or jar.
170
	private static Map<IPath, ArrayList<IPath>> getClasspathMap(IProject project, boolean checkExcluded, boolean absolutePaths) throws JavaModelException {
170
	private static Map<IPath, ArrayList<IPath>> getClasspathMap(IProject project, boolean checkExcluded,
171
			boolean onlyJarsIfLinked, boolean absolutePaths) throws JavaModelException {
171
		List<Path> excluded = getFoldersToExclude(project, checkExcluded);
172
		List<Path> excluded = getFoldersToExclude(project, checkExcluded);
172
		IJavaProject jProject = JavaCore.create(project);
173
		IJavaProject jProject = JavaCore.create(project);
173
		HashMap<IPath, ArrayList<IPath>> map = new HashMap<>();
174
		HashMap<IPath, ArrayList<IPath>> map = new HashMap<>();
Lines 192-197 Link Here
192
				// make the path either relative or absolute
193
				// make the path either relative or absolute
193
				if (file != null) {
194
				if (file != null) {
194
					boolean isLinked = file.isLinked(IResource.CHECK_ANCESTORS);
195
					boolean isLinked = file.isLinked(IResource.CHECK_ANCESTORS);
196
					if (entry.getEntryKind() != IClasspathEntry.CPE_SOURCE && !isLinked && onlyJarsIfLinked)
197
						continue;
195
					if (isLinked || absolutePaths) {
198
					if (isLinked || absolutePaths) {
196
						IPath location = file.getLocation();
199
						IPath location = file.getLocation();
197
						if (location != null) {
200
						if (location != null) {
Lines 280-286 Link Here
280
		IPluginLibrary[] libraries = base.getLibraries();
283
		IPluginLibrary[] libraries = base.getLibraries();
281
		try {
284
		try {
282
			if (project.hasNature(JavaCore.NATURE_ID)) {
285
			if (project.hasNature(JavaCore.NATURE_ID)) {
283
				Map<IPath, ArrayList<IPath>> classpathMap = getClasspathMap(project, checkExcluded, false);
286
				Map<IPath, ArrayList<IPath>> classpathMap = getClasspathMap(project, checkExcluded,
287
						!base.getId().equals(PDECore.getDefault().getModelManager().getSystemBundleId()), false);
284
				IFile file = PDEProject.getBuildProperties(project);
288
				IFile file = PDEProject.getBuildProperties(project);
285
				IPath filePath = file.getLocation();
289
				IPath filePath = file.getLocation();
286
				boolean searchBuild = filePath != null && filePath.toFile().exists();
290
				boolean searchBuild = filePath != null && filePath.toFile().exists();
Lines 349-355 Link Here
349
			if (frags[i].getUnderlyingResource() != null) {
353
			if (frags[i].getUnderlyingResource() != null) {
350
				try {
354
				try {
351
					IProject project = frags[i].getUnderlyingResource().getProject();
355
					IProject project = frags[i].getUnderlyingResource().getProject();
352
					Map<IPath, ArrayList<IPath>> classpathMap = getClasspathMap(project, checkExcluded, true);
356
					Map<IPath, ArrayList<IPath>> classpathMap = getClasspathMap(project, checkExcluded, false, true);
353
					IFile file = PDEProject.getBuildProperties(project);
357
					IFile file = PDEProject.getBuildProperties(project);
354
					IBuild build = null;
358
					IBuild build = null;
355
					if (file.exists()) {
359
					if (file.exists()) {

Return to bug 417869