Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 102858 Details for
Bug 234848
Need to trace classpath container initialization failures
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
234848.txt (text/plain), 15.81 KB, created by
Jerome Lanneluc
on 2008-05-30 10:00:07 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Jerome Lanneluc
Created:
2008-05-30 10:00:07 EDT
Size:
15.81 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: model/org/eclipse/jdt/internal/core/UserLibraryClasspathContainerInitializer.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/UserLibraryClasspathContainerInitializer.java,v >retrieving revision 1.9 >diff -u -r1.9 UserLibraryClasspathContainerInitializer.java >--- model/org/eclipse/jdt/internal/core/UserLibraryClasspathContainerInitializer.java 27 May 2008 23:40:18 -0000 1.9 >+++ model/org/eclipse/jdt/internal/core/UserLibraryClasspathContainerInitializer.java 30 May 2008 13:59:32 -0000 >@@ -54,10 +54,10 @@ > if (userLibrary != null) { > UserLibraryClasspathContainer container = new UserLibraryClasspathContainer(userLibName); > JavaCore.setClasspathContainer(containerPath, new IJavaProject[] { project }, new IClasspathContainer[] { container }, null); >- } else if (JavaModelManager.CP_RESOLVE_VERBOSE) { >+ } else if (JavaModelManager.CP_RESOLVE_VERBOSE || JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE) { > verbose_no_user_library_found(project, userLibName); > } >- } else if (JavaModelManager.CP_RESOLVE_VERBOSE) { >+ } else if (JavaModelManager.CP_RESOLVE_VERBOSE || JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE) { > verbose_not_a_user_library(project, containerPath); > } > } >Index: model/org/eclipse/jdt/internal/core/UserLibraryClasspathContainer.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/UserLibraryClasspathContainer.java,v >retrieving revision 1.7 >diff -u -r1.7 UserLibraryClasspathContainer.java >--- model/org/eclipse/jdt/internal/core/UserLibraryClasspathContainer.java 27 May 2008 23:40:17 -0000 1.7 >+++ model/org/eclipse/jdt/internal/core/UserLibraryClasspathContainer.java 30 May 2008 13:59:32 -0000 >@@ -66,7 +66,7 @@ > > private UserLibrary getUserLibrary() { > UserLibrary userLibrary = JavaModelManager.getUserLibraryManager().getUserLibrary(this.name); >- if (userLibrary == null && JavaModelManager.CP_RESOLVE_VERBOSE) { >+ if (userLibrary == null && (JavaModelManager.CP_RESOLVE_VERBOSE || JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE)) { > verbose_no_user_library_found(this.name); > } > return userLibrary; >Index: model/org/eclipse/jdt/internal/core/SetVariablesOperation.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SetVariablesOperation.java,v >retrieving revision 1.7 >diff -u -r1.7 SetVariablesOperation.java >--- model/org/eclipse/jdt/internal/core/SetVariablesOperation.java 27 May 2008 23:40:17 -0000 1.7 >+++ model/org/eclipse/jdt/internal/core/SetVariablesOperation.java 30 May 2008 13:59:32 -0000 >@@ -152,7 +152,7 @@ > } > } > } catch (CoreException e) { >- if (JavaModelManager.CP_RESOLVE_VERBOSE){ >+ if (JavaModelManager.CP_RESOLVE_VERBOSE || JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE){ > verbose_failure(dbgVariableNames); > e.printStackTrace(); > } >Index: model/org/eclipse/jdt/internal/core/JavaProject.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaProject.java,v >retrieving revision 1.403 >diff -u -r1.403 JavaProject.java >--- model/org/eclipse/jdt/internal/core/JavaProject.java 27 May 2008 23:40:17 -0000 1.403 >+++ model/org/eclipse/jdt/internal/core/JavaProject.java 30 May 2008 13:59:32 -0000 >@@ -2083,7 +2083,7 @@ > for (int j = 0, containerLength = containerEntries.length; j < containerLength; j++){ > IClasspathEntry resolvedEntry = containerEntries[j]; > if (resolvedEntry == null) { >- if (JavaModelManager.CP_RESOLVE_VERBOSE) { >+ if (JavaModelManager.CP_RESOLVE_VERBOSE || JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE) { > JavaModelManager.getJavaModelManager().verbose_missbehaving_container(this, rawEntry.getPath(), containerEntries); > } > return false; >@@ -2471,7 +2471,7 @@ > break; > IClasspathEntry[] containerEntries = container.getClasspathEntries(); > if (containerEntries == null) { >- if (JavaModelManager.CP_RESOLVE_VERBOSE) { >+ if (JavaModelManager.CP_RESOLVE_VERBOSE || JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE) { > JavaModelManager.getJavaModelManager().verbose_missbehaving_container_null_entries(this, rawEntry.getPath()); > } > break; >@@ -2481,7 +2481,7 @@ > for (int j = 0, containerLength = containerEntries.length; j < containerLength; j++){ > ClasspathEntry cEntry = (ClasspathEntry) containerEntries[j]; > if (cEntry == null) { >- if (JavaModelManager.CP_RESOLVE_VERBOSE) { >+ if (JavaModelManager.CP_RESOLVE_VERBOSE || JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE) { > JavaModelManager.getJavaModelManager().verbose_missbehaving_container(this, rawEntry.getPath(), containerEntries); > } > break; >@@ -2567,7 +2567,7 @@ > > IClasspathEntry[] containerEntries = container.getClasspathEntries(); > if (containerEntries == null) { >- if (JavaModelManager.CP_RESOLVE_VERBOSE) { >+ if (JavaModelManager.CP_RESOLVE_VERBOSE || JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE) { > JavaModelManager.getJavaModelManager().verbose_missbehaving_container_null_entries(this, rawEntry.getPath()); > } > break; >@@ -2577,7 +2577,7 @@ > for (int j = 0, containerLength = containerEntries.length; j < containerLength; j++){ > ClasspathEntry cEntry = (ClasspathEntry) containerEntries[j]; > if (cEntry == null) { >- if (JavaModelManager.CP_RESOLVE_VERBOSE) { >+ if (JavaModelManager.CP_RESOLVE_VERBOSE || JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE) { > JavaModelManager.getJavaModelManager().verbose_missbehaving_container(this, rawEntry.getPath(), containerEntries); > } > break; >Index: model/org/eclipse/jdt/internal/core/SetContainerOperation.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/SetContainerOperation.java,v >retrieving revision 1.9 >diff -u -r1.9 SetContainerOperation.java >--- model/org/eclipse/jdt/internal/core/SetContainerOperation.java 27 May 2008 23:40:18 -0000 1.9 >+++ model/org/eclipse/jdt/internal/core/SetContainerOperation.java 30 May 2008 13:59:32 -0000 >@@ -123,7 +123,7 @@ > } > } > } catch(CoreException e) { >- if (JavaModelManager.CP_RESOLVE_VERBOSE) >+ if (JavaModelManager.CP_RESOLVE_VERBOSE || JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE) > verbose_failure(e); > if (e instanceof JavaModelException) { > throw (JavaModelException)e; >Index: model/org/eclipse/jdt/internal/core/JavaModelManager.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaModelManager.java,v >retrieving revision 1.396 >diff -u -r1.396 JavaModelManager.java >--- model/org/eclipse/jdt/internal/core/JavaModelManager.java 27 May 2008 23:40:17 -0000 1.396 >+++ model/org/eclipse/jdt/internal/core/JavaModelManager.java 30 May 2008 13:59:31 -0000 >@@ -191,6 +191,7 @@ > private static final String JAVAMODELCACHE_DEBUG = JavaCore.PLUGIN_ID + "/debug/javamodel/cache" ; //$NON-NLS-1$ > private static final String CP_RESOLVE_DEBUG = JavaCore.PLUGIN_ID + "/debug/cpresolution" ; //$NON-NLS-1$ > private static final String CP_RESOLVE_ADVANCED_DEBUG = JavaCore.PLUGIN_ID + "/debug/cpresolution/advanced" ; //$NON-NLS-1$ >+ private static final String CP_RESOLVE_FAILURE_DEBUG = JavaCore.PLUGIN_ID + "/debug/cpresolution/failure" ; //$NON-NLS-1$ > private static final String ZIP_ACCESS_DEBUG = JavaCore.PLUGIN_ID + "/debug/zipaccess" ; //$NON-NLS-1$ > private static final String DELTA_DEBUG =JavaCore.PLUGIN_ID + "/debug/javadelta" ; //$NON-NLS-1$ > private static final String DELTA_DEBUG_VERBOSE =JavaCore.PLUGIN_ID + "/debug/javadelta/verbose" ; //$NON-NLS-1$ >@@ -565,24 +566,24 @@ > containerPut(project, containerPath, container); > return true; > } else { >- if (CP_RESOLVE_VERBOSE) >+ if (CP_RESOLVE_VERBOSE || CP_RESOLVE_VERBOSE_FAILURE) > verbose_missbehaving_container(containerPath, projects, respectiveContainers, container, newEntries, null/*no old entries*/); > return false; > } > final IClasspathEntry[] oldEntries = previousContainer.getClasspathEntries(); > if (oldEntries.length != newEntries.length) { >- if (CP_RESOLVE_VERBOSE) >+ if (CP_RESOLVE_VERBOSE || CP_RESOLVE_VERBOSE_FAILURE) > verbose_missbehaving_container(containerPath, projects, respectiveContainers, container, newEntries, oldEntries); > return false; > } > for (int i = 0, length = newEntries.length; i < length; i++) { > if (newEntries[i] == null) { >- if (CP_RESOLVE_VERBOSE) >+ if (CP_RESOLVE_VERBOSE || CP_RESOLVE_VERBOSE_FAILURE) > verbose_missbehaving_container(project, containerPath, newEntries); > return false; > } > if (!newEntries[i].equals(oldEntries[i])) { >- if (CP_RESOLVE_VERBOSE) >+ if (CP_RESOLVE_VERBOSE || CP_RESOLVE_VERBOSE_FAILURE) > verbose_missbehaving_container(containerPath, projects, respectiveContainers, container, newEntries, oldEntries); > return false; > } >@@ -1263,6 +1264,7 @@ > public static boolean VERBOSE = false; > public static boolean CP_RESOLVE_VERBOSE = false; > public static boolean CP_RESOLVE_VERBOSE_ADVANCED = false; >+ public static boolean CP_RESOLVE_VERBOSE_FAILURE = false; > public static boolean ZIP_ACCESS_VERBOSE = false; > > /** >@@ -1448,6 +1450,9 @@ > option = Platform.getDebugOption(CP_RESOLVE_ADVANCED_DEBUG); > if(option != null) JavaModelManager.CP_RESOLVE_VERBOSE_ADVANCED = option.equalsIgnoreCase(TRUE) ; > >+ option = Platform.getDebugOption(CP_RESOLVE_FAILURE_DEBUG); >+ if(option != null) JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE = option.equalsIgnoreCase(TRUE) ; >+ > option = Platform.getDebugOption(DELTA_DEBUG); > if(option != null) DeltaProcessor.DEBUG = option.equalsIgnoreCase(TRUE) ; > >@@ -2374,11 +2379,11 @@ > // initializer failed to do its job: redirect to the failure container > container = initializer.getFailureContainer(containerPath, project); > if (container == null) { >- if (CP_RESOLVE_VERBOSE) >+ if (CP_RESOLVE_VERBOSE || CP_RESOLVE_VERBOSE_FAILURE) > verbose_container_null_failure_container(project, containerPath, initializer); > return null; // break cycle > } >- if (CP_RESOLVE_VERBOSE) >+ if (CP_RESOLVE_VERBOSE || CP_RESOLVE_VERBOSE_FAILURE) > verbose_container_using_failure_container(project, containerPath, initializer); > containerPut(project, containerPath, container); > } >@@ -2390,11 +2395,11 @@ > throw new JavaModelException(e); > } > } catch (RuntimeException e) { >- if (JavaModelManager.CP_RESOLVE_VERBOSE) >+ if (JavaModelManager.CP_RESOLVE_VERBOSE || CP_RESOLVE_VERBOSE_FAILURE) > e.printStackTrace(); > throw e; > } catch (Error e) { >- if (JavaModelManager.CP_RESOLVE_VERBOSE) >+ if (JavaModelManager.CP_RESOLVE_VERBOSE || CP_RESOLVE_VERBOSE_FAILURE) > e.printStackTrace(); > throw e; > } finally { >@@ -2405,7 +2410,7 @@ > // just remove initialization in progress and keep previous session container so as to avoid a full build > // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=92588 > containerRemoveInitializationInProgress(project, containerPath); >- if (CP_RESOLVE_VERBOSE) >+ if (CP_RESOLVE_VERBOSE || CP_RESOLVE_VERBOSE_FAILURE) > verbose_container_initialization_failed(project, containerPath, container, initializer); > } > } >@@ -2418,7 +2423,7 @@ > // not used > } > }).getFailureContainer(containerPath, project); >- if (CP_RESOLVE_VERBOSE_ADVANCED) >+ if (CP_RESOLVE_VERBOSE_ADVANCED || CP_RESOLVE_VERBOSE_FAILURE) > verbose_no_container_initializer_found(project, containerPath); > } > return container; >Index: model/org/eclipse/jdt/internal/core/JavaElement.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/JavaElement.java,v >retrieving revision 1.130 >diff -u -r1.130 JavaElement.java >--- model/org/eclipse/jdt/internal/core/JavaElement.java 27 May 2008 23:40:17 -0000 1.130 >+++ model/org/eclipse/jdt/internal/core/JavaElement.java 30 May 2008 13:59:31 -0000 >@@ -670,7 +670,7 @@ > for (int i= 0; i < entries.length; i++) { > IClasspathEntry curr = entries[i]; > if (curr == null) { >- if (JavaModelManager.CP_RESOLVE_VERBOSE) { >+ if (JavaModelManager.CP_RESOLVE_VERBOSE || JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE) { > JavaModelManager.getJavaModelManager().verbose_missbehaving_container(jproject, containerPath, entries); > } > break; >Index: model/org/eclipse/jdt/core/JavaCore.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/core/JavaCore.java,v >retrieving revision 1.614 >diff -u -r1.614 JavaCore.java >--- model/org/eclipse/jdt/core/JavaCore.java 28 Apr 2008 19:45:56 -0000 1.614 >+++ model/org/eclipse/jdt/core/JavaCore.java 30 May 2008 13:59:30 -0000 >@@ -2604,7 +2604,7 @@ > } > } catch(CoreException e) { > // executable extension could not be created: ignore this initializer >- if (JavaModelManager.CP_RESOLVE_VERBOSE) { >+ if (JavaModelManager.CP_RESOLVE_VERBOSE || JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE) { > verbose_failed_to_instanciate_container_initializer(containerID, configurationElement); > e.printStackTrace(); > } >@@ -2683,18 +2683,18 @@ > manager.variablesWithInitializer.add(variableName); > ok = true; > } catch (RuntimeException e) { >- if (JavaModelManager.CP_RESOLVE_VERBOSE) >+ if (JavaModelManager.CP_RESOLVE_VERBOSE || JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE) > e.printStackTrace(); > throw e; > } catch (Error e) { >- if (JavaModelManager.CP_RESOLVE_VERBOSE) >+ if (JavaModelManager.CP_RESOLVE_VERBOSE || JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE) > e.printStackTrace(); > throw e; > } finally { > if (!ok) JavaModelManager.getJavaModelManager().variablePut(variableName, null); // flush cache > } > } else { >- if (JavaModelManager.CP_RESOLVE_VERBOSE_ADVANCED) >+ if (JavaModelManager.CP_RESOLVE_VERBOSE_ADVANCED || JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE) > verbose_no_variable_initializer_found(variableName); > } > return variablePath; >@@ -2816,7 +2816,7 @@ > } > } catch(CoreException e){ > // executable extension could not be created: ignore this initializer >- if (JavaModelManager.CP_RESOLVE_VERBOSE) { >+ if (JavaModelManager.CP_RESOLVE_VERBOSE || JavaModelManager.CP_RESOLVE_VERBOSE_FAILURE) { > verbose_failed_to_instanciate_variable_initializer(variable, configElement); > e.printStackTrace(); > } >Index: .options >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/.options,v >retrieving revision 1.30 >diff -u -r1.30 .options >--- .options 23 Apr 2008 10:13:36 -0000 1.30 >+++ .options 30 May 2008 13:59:29 -0000 >@@ -22,6 +22,9 @@ > # Reports internals of classpath variable initialization, and classpath container resolution (to be used on the JDT/Core team request only) > org.eclipse.jdt.core/debug/cpresolution/advanced=false > >+# Reports failures during classpath variable initialization, and classpath container resolution >+org.eclipse.jdt.core/debug/cpresolution/failure=false >+ > # Report type hierarchy connections, refreshes and deltas > org.eclipse.jdt.core/debug/hierarchy=false >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 234848
: 102858