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 185134 Details for
Bug 202384
can not reload text file encoding prefs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch v.0.2
patch202384.txt (text/plain), 5.95 KB, created by
Szymon Ptaszkiewicz
on 2010-12-14 09:50:09 EST
(
hide
)
Description:
Patch v.0.2
Filename:
MIME Type:
Creator:
Szymon Ptaszkiewicz
Created:
2010-12-14 09:50:09 EST
Size:
5.95 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.core.resources >Index: src/org/eclipse/core/internal/resources/Project.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Project.java,v >retrieving revision 1.177 >diff -u -r1.177 Project.java >--- src/org/eclipse/core/internal/resources/Project.java 29 Nov 2010 12:10:40 -0000 1.177 >+++ src/org/eclipse/core/internal/resources/Project.java 14 Dec 2010 14:45:56 -0000 >@@ -15,8 +15,6 @@ > *******************************************************************************/ > package org.eclipse.core.internal.resources; > >-import java.util.LinkedHashSet; >- > import java.net.URI; > import java.util.*; > import org.eclipse.core.filesystem.*; >@@ -1169,6 +1167,7 @@ > } finally { > monitor.done(); > } >+ ((ProjectPreferences) Platform.getPreferencesService().getRootNode().node(ProjectScope.SCOPE).node(getName())).initialize(); > } > > /* (non-Javadoc) >Index: src/org/eclipse/core/internal/resources/ProjectPreferences.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ProjectPreferences.java,v >retrieving revision 1.59 >diff -u -r1.59 ProjectPreferences.java >--- src/org/eclipse/core/internal/resources/ProjectPreferences.java 3 Dec 2010 09:48:42 -0000 1.59 >+++ src/org/eclipse/core/internal/resources/ProjectPreferences.java 14 Dec 2010 14:45:56 -0000 >@@ -70,7 +70,6 @@ > */ > protected static Set loadedNodes = Collections.synchronizedSet(new HashSet()); > private IFile file; >- private boolean initialized = false; > /** > * Flag indicating that this node is currently reading values from disk, > * to avoid flushing during a read. >@@ -341,21 +340,7 @@ > if (segmentCount > 2) > qualifier = getSegment(path, 2); > >- if (segmentCount != 2) >- return; >- >- // else segmentCount == 2 so we initialize the children >- if (initialized) >- return; >- try { >- synchronized (this) { >- String[] names = computeChildren(); >- for (int i = 0; i < names.length; i++) >- addChild(names[i], null); >- } >- } finally { >- initialized = true; >- } >+ initialize(); > } > > /* >@@ -440,6 +425,17 @@ > return new ProjectPreferences(nodeParent, nodeName); > } > >+ protected void initialize() { >+ if (segmentCount == 2) { >+ // segmentCount == 2 so we initialize the children >+ synchronized (this) { >+ String[] names = computeChildren(); >+ for (int i = 0; i < names.length; i++) >+ addChild(names[i], null); >+ } >+ } >+ } >+ > protected boolean isAlreadyLoaded(IEclipsePreferences node) { > return loadedNodes.contains(node.absolutePath()); > } >Index: src/org/eclipse/core/resources/ProjectScope.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.core.resources/src/org/eclipse/core/resources/ProjectScope.java,v >retrieving revision 1.14 >diff -u -r1.14 ProjectScope.java >--- src/org/eclipse/core/resources/ProjectScope.java 19 Jan 2006 19:20:51 -0000 1.14 >+++ src/org/eclipse/core/resources/ProjectScope.java 14 Dec 2010 14:45:56 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2004, 2006 IBM Corporation and others. >+ * Copyright (c) 2004, 2010 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -15,6 +15,8 @@ > import org.eclipse.core.runtime.Platform; > import org.eclipse.core.runtime.preferences.IEclipsePreferences; > import org.eclipse.core.runtime.preferences.IScopeContext; >+import org.osgi.service.prefs.BackingStoreException; >+import org.osgi.service.prefs.Preferences; > > /** > * Object representing the project scope in the Eclipse preferences >@@ -64,7 +66,19 @@ > public IEclipsePreferences getNode(String qualifier) { > if (qualifier == null) > throw new IllegalArgumentException(); >- return (IEclipsePreferences) Platform.getPreferencesService().getRootNode().node(SCOPE).node(context.getName()).node(qualifier); >+ // be careful looking up for our node so not to create any nodes as side effect >+ Preferences prefs = Platform.getPreferencesService().getRootNode().node(SCOPE); >+ try { >+ if (!prefs.nodeExists(context.getName())) >+ return null; >+ prefs = prefs.node(context.getName()); >+ if (!prefs.nodeExists(qualifier)) >+ return null; >+ return (IEclipsePreferences) prefs.node(qualifier); >+ } catch (BackingStoreException e) { >+ //ignore >+ } >+ return null; > } > > /* >#P org.eclipse.ui.ide >Index: src/org/eclipse/ui/internal/ide/LineDelimiterEditor.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/LineDelimiterEditor.java,v >retrieving revision 1.8 >diff -u -r1.8 LineDelimiterEditor.java >--- src/org/eclipse/ui/internal/ide/LineDelimiterEditor.java 11 Apr 2007 15:09:35 -0000 1.8 >+++ src/org/eclipse/ui/internal/ide/LineDelimiterEditor.java 14 Dec 2010 14:45:57 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2005, 2007 IBM Corporation and others. >+ * Copyright (c) 2005, 2010 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -164,6 +164,8 @@ > public String getStoredValue() { > IScopeContext[] scopeContext = new IScopeContext[] { getScopeContext() }; > IEclipsePreferences node = scopeContext[0].getNode(Platform.PI_RUNTIME); >+ if (node == null) >+ return null; > return node.get(Platform.PREF_LINE_SEPARATOR, null); > } >
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 202384
:
185125
|
185134
|
185139
|
185424
|
185543
|
185703
|
185720
|
186377