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 61320 Details for
Bug 154984
Jars in library not recognized sometimes.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
simpler fix
154984.txt (text/plain), 3.60 KB, created by
Jerome Lanneluc
on 2007-03-19 14:17:16 EDT
(
hide
)
Description:
simpler fix
Filename:
MIME Type:
Creator:
Jerome Lanneluc
Created:
2007-03-19 14:17:16 EDT
Size:
3.60 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: model/org/eclipse/jdt/internal/core/UserLibraryManager.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/UserLibraryManager.java,v >retrieving revision 1.11 >diff -u -r1.11 UserLibraryManager.java >--- model/org/eclipse/jdt/internal/core/UserLibraryManager.java 16 Mar 2007 18:28:58 -0000 1.11 >+++ model/org/eclipse/jdt/internal/core/UserLibraryManager.java 19 Mar 2007 17:22:59 -0000 >@@ -41,7 +41,8 @@ > public final static String CP_USERLIBRARY_PREFERENCES_PREFIX = JavaCore.PLUGIN_ID+".userLibrary."; //$NON-NLS-1$ > public final static String CP_ENTRY_IGNORE = "##<cp entry ignore>##"; //$NON-NLS-1$ > >- private static Map userLibraries; >+ private static Map UserLibraries; >+ private static ThreadLocal InitializingLibraries = new ThreadLocal(); > private static final boolean logProblems= false; > private static IEclipsePreferences.IPreferenceChangeListener listener= new IEclipsePreferences.IPreferenceChangeListener() { > >@@ -122,32 +123,40 @@ > } > > static Map getLibraryMap() { >- if (userLibraries == null) { >- userLibraries= new HashMap(); >- // load variables and containers from preferences into cache >- IEclipsePreferences instancePreferences = JavaModelManager.getJavaModelManager().getInstancePreferences(); >- instancePreferences.addPreferenceChangeListener(listener); >- >- // only get variable from preferences not set to their default >+ if (UserLibraries == null) { >+ HashMap libraries = (HashMap) InitializingLibraries.get(); >+ if (libraries != null) >+ return libraries; > try { >- String[] propertyNames = instancePreferences.keys(); >- for (int i = 0; i < propertyNames.length; i++) { >- String propertyName = propertyNames[i]; >- if (propertyName.startsWith(CP_USERLIBRARY_PREFERENCES_PREFIX)) { >- try { >- String propertyValue = instancePreferences.get(propertyName, null); >- if (propertyValue != null) >- recreatePersistedUserLibraryEntry(propertyName,propertyValue, false, false); >- } catch (JavaModelException e) { >- // won't happen: no rebinding >+ InitializingLibraries.set(libraries = new HashMap()); >+ // load variables and containers from preferences into cache >+ IEclipsePreferences instancePreferences = JavaModelManager.getJavaModelManager().getInstancePreferences(); >+ instancePreferences.addPreferenceChangeListener(listener); >+ >+ // only get variable from preferences not set to their default >+ try { >+ String[] propertyNames = instancePreferences.keys(); >+ for (int i = 0; i < propertyNames.length; i++) { >+ String propertyName = propertyNames[i]; >+ if (propertyName.startsWith(CP_USERLIBRARY_PREFERENCES_PREFIX)) { >+ try { >+ String propertyValue = instancePreferences.get(propertyName, null); >+ if (propertyValue != null) >+ recreatePersistedUserLibraryEntry(propertyName,propertyValue, false, false); >+ } catch (JavaModelException e) { >+ // won't happen: no rebinding >+ } > } > } >+ } catch (BackingStoreException e) { >+ // nothing to do in this case > } >- } catch (BackingStoreException e) { >- // nothing to do in this case >+ UserLibraries = libraries; >+ } finally { >+ InitializingLibraries.set(null); > } > } >- return userLibraries; >+ return UserLibraries; > } > > static void recreatePersistedUserLibraryEntry(String propertyName, String savedString, boolean save, boolean rebind) throws JavaModelException {
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 154984
:
60918
|
60919
|
60934
|
60943
|
60948
|
60952
|
60961
|
60963
|
60965
|
61063
|
61068
|
61069
|
61070
|
61253
| 61320