View | Details | Raw Unified | Return to bug 234848
Collapse All | Expand All

(-)model/org/eclipse/jdt/internal/core/UserLibraryClasspathContainerInitializer.java (-2 / +2 lines)
Lines 54-63 Link Here
54
			if (userLibrary != null) {
54
			if (userLibrary != null) {
55
				UserLibraryClasspathContainer container = new UserLibraryClasspathContainer(userLibName);
55
				UserLibraryClasspathContainer container = new UserLibraryClasspathContainer(userLibName);
56
				JavaCore.setClasspathContainer(containerPath, new IJavaProject[] { project }, new IClasspathContainer[] { container }, null);
56
				JavaCore.setClasspathContainer(containerPath, new IJavaProject[] { project }, new IClasspathContainer[] { container }, null);
57
			} else if (JavaModelManager.CP_RESOLVE_VERBOSE) {
57
			} else if (JavaModelManager.CP_RESOLVE_VERBOSE || JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE) {
58
				verbose_no_user_library_found(project, userLibName);
58
				verbose_no_user_library_found(project, userLibName);
59
			}
59
			}
60
		} else if (JavaModelManager.CP_RESOLVE_VERBOSE) {
60
		} else if (JavaModelManager.CP_RESOLVE_VERBOSE || JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE) {
61
			verbose_not_a_user_library(project, containerPath);
61
			verbose_not_a_user_library(project, containerPath);
62
		}
62
		}
63
	}
63
	}
(-)model/org/eclipse/jdt/internal/core/UserLibraryClasspathContainer.java (-1 / +1 lines)
Lines 66-72 Link Here
66
	
66
	
67
	private UserLibrary getUserLibrary() {
67
	private UserLibrary getUserLibrary() {
68
		UserLibrary userLibrary = JavaModelManager.getUserLibraryManager().getUserLibrary(this.name);
68
		UserLibrary userLibrary = JavaModelManager.getUserLibraryManager().getUserLibrary(this.name);
69
		if (userLibrary == null && JavaModelManager.CP_RESOLVE_VERBOSE) {
69
		if (userLibrary == null && (JavaModelManager.CP_RESOLVE_VERBOSE || JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE)) {
70
			verbose_no_user_library_found(this.name);
70
			verbose_no_user_library_found(this.name);
71
		}
71
		}
72
		return userLibrary;
72
		return userLibrary;
(-)model/org/eclipse/jdt/internal/core/SetVariablesOperation.java (-1 / +1 lines)
Lines 152-158 Link Here
152
						}
152
						}
153
					}
153
					}
154
				} catch (CoreException e) {
154
				} catch (CoreException e) {
155
					if (JavaModelManager.CP_RESOLVE_VERBOSE){
155
					if (JavaModelManager.CP_RESOLVE_VERBOSE || JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE){
156
						verbose_failure(dbgVariableNames); 
156
						verbose_failure(dbgVariableNames); 
157
						e.printStackTrace();
157
						e.printStackTrace();
158
					}
158
					}
(-)model/org/eclipse/jdt/internal/core/JavaProject.java (-5 / +5 lines)
Lines 2083-2089 Link Here
2083
					for (int j = 0, containerLength = containerEntries.length; j < containerLength; j++){
2083
					for (int j = 0, containerLength = containerEntries.length; j < containerLength; j++){
2084
						IClasspathEntry resolvedEntry = containerEntries[j];
2084
						IClasspathEntry resolvedEntry = containerEntries[j];
2085
						if (resolvedEntry == null) {
2085
						if (resolvedEntry == null) {
2086
							if (JavaModelManager.CP_RESOLVE_VERBOSE) {
2086
							if (JavaModelManager.CP_RESOLVE_VERBOSE || JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE) {
2087
								JavaModelManager.getJavaModelManager().verbose_missbehaving_container(this, rawEntry.getPath(), containerEntries);
2087
								JavaModelManager.getJavaModelManager().verbose_missbehaving_container(this, rawEntry.getPath(), containerEntries);
2088
							}
2088
							}
2089
							return false;
2089
							return false;
Lines 2471-2477 Link Here
2471
						break;
2471
						break;
2472
					IClasspathEntry[] containerEntries = container.getClasspathEntries();
2472
					IClasspathEntry[] containerEntries = container.getClasspathEntries();
2473
					if (containerEntries == null) {
2473
					if (containerEntries == null) {
2474
						if (JavaModelManager.CP_RESOLVE_VERBOSE) {
2474
						if (JavaModelManager.CP_RESOLVE_VERBOSE || JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE) {
2475
							JavaModelManager.getJavaModelManager().verbose_missbehaving_container_null_entries(this, rawEntry.getPath());
2475
							JavaModelManager.getJavaModelManager().verbose_missbehaving_container_null_entries(this, rawEntry.getPath());
2476
						}
2476
						}
2477
						break;
2477
						break;
Lines 2481-2487 Link Here
2481
					for (int j = 0, containerLength = containerEntries.length; j < containerLength; j++){
2481
					for (int j = 0, containerLength = containerEntries.length; j < containerLength; j++){
2482
						ClasspathEntry cEntry = (ClasspathEntry) containerEntries[j];
2482
						ClasspathEntry cEntry = (ClasspathEntry) containerEntries[j];
2483
						if (cEntry == null) {
2483
						if (cEntry == null) {
2484
							if (JavaModelManager.CP_RESOLVE_VERBOSE) {
2484
							if (JavaModelManager.CP_RESOLVE_VERBOSE || JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE) {
2485
								JavaModelManager.getJavaModelManager().verbose_missbehaving_container(this, rawEntry.getPath(), containerEntries);
2485
								JavaModelManager.getJavaModelManager().verbose_missbehaving_container(this, rawEntry.getPath(), containerEntries);
2486
							}
2486
							}
2487
							break;
2487
							break;
Lines 2567-2573 Link Here
2567
	
2567
	
2568
						IClasspathEntry[] containerEntries = container.getClasspathEntries();
2568
						IClasspathEntry[] containerEntries = container.getClasspathEntries();
2569
						if (containerEntries == null) {
2569
						if (containerEntries == null) {
2570
							if (JavaModelManager.CP_RESOLVE_VERBOSE) {
2570
							if (JavaModelManager.CP_RESOLVE_VERBOSE || JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE) {
2571
								JavaModelManager.getJavaModelManager().verbose_missbehaving_container_null_entries(this, rawEntry.getPath());
2571
								JavaModelManager.getJavaModelManager().verbose_missbehaving_container_null_entries(this, rawEntry.getPath());
2572
							}
2572
							}
2573
							break;
2573
							break;
Lines 2577-2583 Link Here
2577
						for (int j = 0, containerLength = containerEntries.length; j < containerLength; j++){
2577
						for (int j = 0, containerLength = containerEntries.length; j < containerLength; j++){
2578
							ClasspathEntry cEntry = (ClasspathEntry) containerEntries[j];
2578
							ClasspathEntry cEntry = (ClasspathEntry) containerEntries[j];
2579
							if (cEntry == null) {
2579
							if (cEntry == null) {
2580
								if (JavaModelManager.CP_RESOLVE_VERBOSE) {
2580
								if (JavaModelManager.CP_RESOLVE_VERBOSE || JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE) {
2581
									JavaModelManager.getJavaModelManager().verbose_missbehaving_container(this, rawEntry.getPath(), containerEntries);
2581
									JavaModelManager.getJavaModelManager().verbose_missbehaving_container(this, rawEntry.getPath(), containerEntries);
2582
								}
2582
								}
2583
								break;
2583
								break;
(-)model/org/eclipse/jdt/internal/core/SetContainerOperation.java (-1 / +1 lines)
Lines 123-129 Link Here
123
					}
123
					}
124
				}
124
				}
125
			} catch(CoreException e) {
125
			} catch(CoreException e) {
126
				if (JavaModelManager.CP_RESOLVE_VERBOSE)
126
				if (JavaModelManager.CP_RESOLVE_VERBOSE || JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE)
127
					verbose_failure(e);
127
					verbose_failure(e);
128
				if (e instanceof JavaModelException) {
128
				if (e instanceof JavaModelException) {
129
					throw (JavaModelException)e;
129
					throw (JavaModelException)e;
(-)model/org/eclipse/jdt/internal/core/JavaModelManager.java (-10 / +15 lines)
Lines 191-196 Link Here
191
	private static final String JAVAMODELCACHE_DEBUG = JavaCore.PLUGIN_ID + "/debug/javamodel/cache" ; //$NON-NLS-1$
191
	private static final String JAVAMODELCACHE_DEBUG = JavaCore.PLUGIN_ID + "/debug/javamodel/cache" ; //$NON-NLS-1$
192
	private static final String CP_RESOLVE_DEBUG = JavaCore.PLUGIN_ID + "/debug/cpresolution" ; //$NON-NLS-1$
192
	private static final String CP_RESOLVE_DEBUG = JavaCore.PLUGIN_ID + "/debug/cpresolution" ; //$NON-NLS-1$
193
	private static final String CP_RESOLVE_ADVANCED_DEBUG = JavaCore.PLUGIN_ID + "/debug/cpresolution/advanced" ; //$NON-NLS-1$
193
	private static final String CP_RESOLVE_ADVANCED_DEBUG = JavaCore.PLUGIN_ID + "/debug/cpresolution/advanced" ; //$NON-NLS-1$
194
	private static final String CP_RESOLVE_FAILURE_DEBUG = JavaCore.PLUGIN_ID + "/debug/cpresolution/failure" ; //$NON-NLS-1$
194
	private static final String ZIP_ACCESS_DEBUG = JavaCore.PLUGIN_ID + "/debug/zipaccess" ; //$NON-NLS-1$
195
	private static final String ZIP_ACCESS_DEBUG = JavaCore.PLUGIN_ID + "/debug/zipaccess" ; //$NON-NLS-1$
195
	private static final String DELTA_DEBUG =JavaCore.PLUGIN_ID + "/debug/javadelta" ; //$NON-NLS-1$
196
	private static final String DELTA_DEBUG =JavaCore.PLUGIN_ID + "/debug/javadelta" ; //$NON-NLS-1$
196
	private static final String DELTA_DEBUG_VERBOSE =JavaCore.PLUGIN_ID + "/debug/javadelta/verbose" ; //$NON-NLS-1$
197
	private static final String DELTA_DEBUG_VERBOSE =JavaCore.PLUGIN_ID + "/debug/javadelta/verbose" ; //$NON-NLS-1$
Lines 565-588 Link Here
565
				containerPut(project, containerPath, container);
566
				containerPut(project, containerPath, container);
566
				return true;
567
				return true;
567
			} else {
568
			} else {
568
				if (CP_RESOLVE_VERBOSE)
569
				if (CP_RESOLVE_VERBOSE || CP_RESOLVE_VERBOSE_FAILURE)
569
					verbose_missbehaving_container(containerPath, projects, respectiveContainers, container, newEntries, null/*no old entries*/);
570
					verbose_missbehaving_container(containerPath, projects, respectiveContainers, container, newEntries, null/*no old entries*/);
570
				return false;
571
				return false;
571
			}
572
			}
572
		final IClasspathEntry[] oldEntries = previousContainer.getClasspathEntries();
573
		final IClasspathEntry[] oldEntries = previousContainer.getClasspathEntries();
573
		if (oldEntries.length != newEntries.length) {
574
		if (oldEntries.length != newEntries.length) {
574
			if (CP_RESOLVE_VERBOSE)
575
			if (CP_RESOLVE_VERBOSE || CP_RESOLVE_VERBOSE_FAILURE)
575
				verbose_missbehaving_container(containerPath, projects, respectiveContainers, container, newEntries, oldEntries);
576
				verbose_missbehaving_container(containerPath, projects, respectiveContainers, container, newEntries, oldEntries);
576
			return false;
577
			return false;
577
		}
578
		}
578
		for (int i = 0, length = newEntries.length; i < length; i++) {
579
		for (int i = 0, length = newEntries.length; i < length; i++) {
579
			if (newEntries[i] == null) {
580
			if (newEntries[i] == null) {
580
				if (CP_RESOLVE_VERBOSE)
581
				if (CP_RESOLVE_VERBOSE || CP_RESOLVE_VERBOSE_FAILURE)
581
					verbose_missbehaving_container(project, containerPath, newEntries);
582
					verbose_missbehaving_container(project, containerPath, newEntries);
582
				return false;
583
				return false;
583
			}
584
			}
584
			if (!newEntries[i].equals(oldEntries[i])) {
585
			if (!newEntries[i].equals(oldEntries[i])) {
585
				if (CP_RESOLVE_VERBOSE)
586
				if (CP_RESOLVE_VERBOSE || CP_RESOLVE_VERBOSE_FAILURE)
586
					verbose_missbehaving_container(containerPath, projects, respectiveContainers, container, newEntries, oldEntries);
587
					verbose_missbehaving_container(containerPath, projects, respectiveContainers, container, newEntries, oldEntries);
587
				return false;
588
				return false;
588
			}
589
			}
Lines 1263-1268 Link Here
1263
	public static boolean VERBOSE = false;
1264
	public static boolean VERBOSE = false;
1264
	public static boolean CP_RESOLVE_VERBOSE = false;
1265
	public static boolean CP_RESOLVE_VERBOSE = false;
1265
	public static boolean CP_RESOLVE_VERBOSE_ADVANCED = false;
1266
	public static boolean CP_RESOLVE_VERBOSE_ADVANCED = false;
1267
	public static boolean CP_RESOLVE_VERBOSE_FAILURE = false;
1266
	public static boolean ZIP_ACCESS_VERBOSE = false;
1268
	public static boolean ZIP_ACCESS_VERBOSE = false;
1267
	
1269
	
1268
	/**
1270
	/**
Lines 1448-1453 Link Here
1448
			option = Platform.getDebugOption(CP_RESOLVE_ADVANCED_DEBUG);
1450
			option = Platform.getDebugOption(CP_RESOLVE_ADVANCED_DEBUG);
1449
			if(option != null) JavaModelManager.CP_RESOLVE_VERBOSE_ADVANCED = option.equalsIgnoreCase(TRUE) ;
1451
			if(option != null) JavaModelManager.CP_RESOLVE_VERBOSE_ADVANCED = option.equalsIgnoreCase(TRUE) ;
1450
1452
1453
			option = Platform.getDebugOption(CP_RESOLVE_FAILURE_DEBUG);
1454
			if(option != null) JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE = option.equalsIgnoreCase(TRUE) ;
1455
1451
			option = Platform.getDebugOption(DELTA_DEBUG);
1456
			option = Platform.getDebugOption(DELTA_DEBUG);
1452
			if(option != null) DeltaProcessor.DEBUG = option.equalsIgnoreCase(TRUE) ;
1457
			if(option != null) DeltaProcessor.DEBUG = option.equalsIgnoreCase(TRUE) ;
1453
1458
Lines 2374-2384 Link Here
2374
					// initializer failed to do its job: redirect to the failure container
2379
					// initializer failed to do its job: redirect to the failure container
2375
					container = initializer.getFailureContainer(containerPath, project);
2380
					container = initializer.getFailureContainer(containerPath, project);
2376
					if (container == null) {
2381
					if (container == null) {
2377
						if (CP_RESOLVE_VERBOSE)
2382
						if (CP_RESOLVE_VERBOSE || CP_RESOLVE_VERBOSE_FAILURE)
2378
							verbose_container_null_failure_container(project, containerPath, initializer);
2383
							verbose_container_null_failure_container(project, containerPath, initializer);
2379
						return null; // break cycle
2384
						return null; // break cycle
2380
					}
2385
					}
2381
					if (CP_RESOLVE_VERBOSE)
2386
					if (CP_RESOLVE_VERBOSE || CP_RESOLVE_VERBOSE_FAILURE)
2382
						verbose_container_using_failure_container(project, containerPath, initializer);
2387
						verbose_container_using_failure_container(project, containerPath, initializer);
2383
					containerPut(project, containerPath, container);
2388
					containerPut(project, containerPath, container);
2384
				}
2389
				}
Lines 2390-2400 Link Here
2390
					throw new JavaModelException(e);
2395
					throw new JavaModelException(e);
2391
				}
2396
				}
2392
			} catch (RuntimeException e) {
2397
			} catch (RuntimeException e) {
2393
				if (JavaModelManager.CP_RESOLVE_VERBOSE)
2398
				if (JavaModelManager.CP_RESOLVE_VERBOSE || CP_RESOLVE_VERBOSE_FAILURE)
2394
					e.printStackTrace();
2399
					e.printStackTrace();
2395
				throw e;
2400
				throw e;
2396
			} catch (Error e) {
2401
			} catch (Error e) {
2397
				if (JavaModelManager.CP_RESOLVE_VERBOSE)
2402
				if (JavaModelManager.CP_RESOLVE_VERBOSE || CP_RESOLVE_VERBOSE_FAILURE)
2398
					e.printStackTrace();
2403
					e.printStackTrace();
2399
				throw e;
2404
				throw e;
2400
			} finally {
2405
			} finally {
Lines 2405-2411 Link Here
2405
					// just remove initialization in progress and keep previous session container so as to avoid a full build
2410
					// just remove initialization in progress and keep previous session container so as to avoid a full build
2406
					// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=92588
2411
					// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=92588
2407
					containerRemoveInitializationInProgress(project, containerPath); 
2412
					containerRemoveInitializationInProgress(project, containerPath); 
2408
					if (CP_RESOLVE_VERBOSE) 
2413
					if (CP_RESOLVE_VERBOSE || CP_RESOLVE_VERBOSE_FAILURE) 
2409
						verbose_container_initialization_failed(project, containerPath, container, initializer);
2414
						verbose_container_initialization_failed(project, containerPath, container, initializer);
2410
				}
2415
				}
2411
			}
2416
			}
Lines 2418-2424 Link Here
2418
					// not used
2423
					// not used
2419
				}
2424
				}
2420
			}).getFailureContainer(containerPath, project);
2425
			}).getFailureContainer(containerPath, project);
2421
			if (CP_RESOLVE_VERBOSE_ADVANCED)
2426
			if (CP_RESOLVE_VERBOSE_ADVANCED || CP_RESOLVE_VERBOSE_FAILURE)
2422
				verbose_no_container_initializer_found(project, containerPath);
2427
				verbose_no_container_initializer_found(project, containerPath);
2423
		}
2428
		}
2424
		return container;
2429
		return container;
(-)model/org/eclipse/jdt/internal/core/JavaElement.java (-1 / +1 lines)
Lines 670-676 Link Here
670
			for (int i= 0; i < entries.length; i++) {
670
			for (int i= 0; i < entries.length; i++) {
671
				IClasspathEntry curr = entries[i];
671
				IClasspathEntry curr = entries[i];
672
				if (curr == null) {
672
				if (curr == null) {
673
					if (JavaModelManager.CP_RESOLVE_VERBOSE) {
673
					if (JavaModelManager.CP_RESOLVE_VERBOSE || JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE) {
674
						JavaModelManager.getJavaModelManager().verbose_missbehaving_container(jproject, containerPath, entries);
674
						JavaModelManager.getJavaModelManager().verbose_missbehaving_container(jproject, containerPath, entries);
675
					}
675
					}
676
					break;
676
					break;
(-)model/org/eclipse/jdt/core/JavaCore.java (-5 / +5 lines)
Lines 2604-2610 Link Here
2604
							}
2604
							}
2605
						} catch(CoreException e) {
2605
						} catch(CoreException e) {
2606
							// executable extension could not be created: ignore this initializer
2606
							// executable extension could not be created: ignore this initializer
2607
							if (JavaModelManager.CP_RESOLVE_VERBOSE) {
2607
							if (JavaModelManager.CP_RESOLVE_VERBOSE || JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE) {
2608
								verbose_failed_to_instanciate_container_initializer(containerID, configurationElement);
2608
								verbose_failed_to_instanciate_container_initializer(containerID, configurationElement);
2609
								e.printStackTrace();
2609
								e.printStackTrace();
2610
							}
2610
							}
Lines 2683-2700 Link Here
2683
				manager.variablesWithInitializer.add(variableName);
2683
				manager.variablesWithInitializer.add(variableName);
2684
				ok = true;
2684
				ok = true;
2685
			} catch (RuntimeException e) {
2685
			} catch (RuntimeException e) {
2686
				if (JavaModelManager.CP_RESOLVE_VERBOSE)
2686
				if (JavaModelManager.CP_RESOLVE_VERBOSE || JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE)
2687
					e.printStackTrace();
2687
					e.printStackTrace();
2688
				throw e;
2688
				throw e;
2689
			} catch (Error e) {
2689
			} catch (Error e) {
2690
				if (JavaModelManager.CP_RESOLVE_VERBOSE)
2690
				if (JavaModelManager.CP_RESOLVE_VERBOSE || JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE)
2691
					e.printStackTrace();
2691
					e.printStackTrace();
2692
				throw e;
2692
				throw e;
2693
			} finally {
2693
			} finally {
2694
				if (!ok) JavaModelManager.getJavaModelManager().variablePut(variableName, null); // flush cache
2694
				if (!ok) JavaModelManager.getJavaModelManager().variablePut(variableName, null); // flush cache
2695
			}
2695
			}
2696
		} else {
2696
		} else {
2697
			if (JavaModelManager.CP_RESOLVE_VERBOSE_ADVANCED)
2697
			if (JavaModelManager.CP_RESOLVE_VERBOSE_ADVANCED || JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE)
2698
				verbose_no_variable_initializer_found(variableName);
2698
				verbose_no_variable_initializer_found(variableName);
2699
		}
2699
		}
2700
		return variablePath;
2700
		return variablePath;
Lines 2816-2822 Link Here
2816
						}
2816
						}
2817
					} catch(CoreException e){
2817
					} catch(CoreException e){
2818
						// executable extension could not be created: ignore this initializer
2818
						// executable extension could not be created: ignore this initializer
2819
						if (JavaModelManager.CP_RESOLVE_VERBOSE) {
2819
						if (JavaModelManager.CP_RESOLVE_VERBOSE || JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE) {
2820
							verbose_failed_to_instanciate_variable_initializer(variable, configElement);
2820
							verbose_failed_to_instanciate_variable_initializer(variable, configElement);
2821
							e.printStackTrace();
2821
							e.printStackTrace();
2822
						}
2822
						}
(-).options (+3 lines)
Lines 22-27 Link Here
22
# Reports internals of classpath variable initialization, and classpath container resolution (to be used on the JDT/Core team request only)
22
# Reports internals of classpath variable initialization, and classpath container resolution (to be used on the JDT/Core team request only)
23
org.eclipse.jdt.core/debug/cpresolution/advanced=false
23
org.eclipse.jdt.core/debug/cpresolution/advanced=false
24
24
25
# Reports failures during classpath variable initialization, and classpath container resolution
26
org.eclipse.jdt.core/debug/cpresolution/failure=false
27
25
# Report type hierarchy connections, refreshes and deltas
28
# Report type hierarchy connections, refreshes and deltas
26
org.eclipse.jdt.core/debug/hierarchy=false
29
org.eclipse.jdt.core/debug/hierarchy=false
27
30

Return to bug 234848