Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Hochstein2013-06-27 13:58:32 +0000
committerDani Megert2013-06-27 13:58:32 +0000
commit7482f74653c7df762431dab80ad7bb6adbcd1984 (patch)
tree9453ff78b274e26fa6fa5eb9c526b1b261950ea2
parentb621703f7449edcb92ee6021a0db7b5bebc1fc86 (diff)
downloadeclipse.platform.resources-7482f74653c7df762431dab80ad7bb6adbcd1984.tar.gz
eclipse.platform.resources-7482f74653c7df762431dab80ad7bb6adbcd1984.tar.xz
eclipse.platform.resources-7482f74653c7df762431dab80ad7bb6adbcd1984.zip
Fixed bug 409996: 'Restore Defaults' does not work properly on Project
Properties > Resource tab
-rw-r--r--bundles/org.eclipse.core.resources/META-INF/MANIFEST.MF2
-rw-r--r--bundles/org.eclipse.core.resources/pom.xml2
-rw-r--r--bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/CharsetManager.java11
-rw-r--r--bundles/org.eclipse.core.resources/src/org/eclipse/core/resources/ResourcesPlugin.java10
4 files changed, 17 insertions, 8 deletions
diff --git a/bundles/org.eclipse.core.resources/META-INF/MANIFEST.MF b/bundles/org.eclipse.core.resources/META-INF/MANIFEST.MF
index 1d246e3c8..79a4029a7 100644
--- a/bundles/org.eclipse.core.resources/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.core.resources/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.core.resources; singleton:=true
-Bundle-Version: 3.8.100.qualifier
+Bundle-Version: 3.9.0.qualifier
Bundle-Activator: org.eclipse.core.resources.ResourcesPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.core.resources/pom.xml b/bundles/org.eclipse.core.resources/pom.xml
index 3bd20837f..619d6bf08 100644
--- a/bundles/org.eclipse.core.resources/pom.xml
+++ b/bundles/org.eclipse.core.resources/pom.xml
@@ -19,6 +19,6 @@
</parent>
<groupId>org.eclipse.core</groupId>
<artifactId>org.eclipse.core.resources</artifactId>
- <version>3.8.100-SNAPSHOT</version>
+ <version>3.9.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/CharsetManager.java b/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/CharsetManager.java
index e277ddddc..70aa1ab86 100644
--- a/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/CharsetManager.java
+++ b/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/CharsetManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2012 IBM Corporation and others.
+ * Copyright (c) 2004, 2013 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
@@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* James Blackburn (Broadcom Corp.) - ongoing development
+ * Tom Hochstein (Freescale) - Bug 409996 - 'Restore Defaults' does not work properly on Project Properties > Resource tab
*******************************************************************************/
package org.eclipse.core.internal.resources;
@@ -362,17 +363,17 @@ public class CharsetManager implements IManager {
// return node.nodeExists(path) ? node.node(path).getBoolean(ResourcesPlugin.PREF_SEPARATE_DERIVED_ENCODINGS, false) : false;
// for now, take the long way
if (!node.nodeExists(project.getName()))
- return false;
+ return ResourcesPlugin.DEFAULT_PREF_SEPARATE_DERIVED_ENCODINGS;
node = node.node(project.getName());
if (!node.nodeExists(ResourcesPlugin.PI_RESOURCES))
- return false;
+ return ResourcesPlugin.DEFAULT_PREF_SEPARATE_DERIVED_ENCODINGS;
node = node.node(ResourcesPlugin.PI_RESOURCES);
- return node.getBoolean(ResourcesPlugin.PREF_SEPARATE_DERIVED_ENCODINGS, false);
+ return node.getBoolean(ResourcesPlugin.PREF_SEPARATE_DERIVED_ENCODINGS, ResourcesPlugin.DEFAULT_PREF_SEPARATE_DERIVED_ENCODINGS);
} catch (BackingStoreException e) {
// nodeExists failed
String message = Messages.resources_readingEncoding;
Policy.log(new ResourceStatus(IResourceStatus.FAILED_GETTING_CHARSET, project.getFullPath(), message, e));
- return false;
+ return ResourcesPlugin.DEFAULT_PREF_SEPARATE_DERIVED_ENCODINGS;
}
}
diff --git a/bundles/org.eclipse.core.resources/src/org/eclipse/core/resources/ResourcesPlugin.java b/bundles/org.eclipse.core.resources/src/org/eclipse/core/resources/ResourcesPlugin.java
index 3c3761d1c..f5bf8cdba 100644
--- a/bundles/org.eclipse.core.resources/src/org/eclipse/core/resources/ResourcesPlugin.java
+++ b/bundles/org.eclipse.core.resources/src/org/eclipse/core/resources/ResourcesPlugin.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 IBM Corporation and others.
+ * Copyright (c) 2000, 2013 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
@@ -10,6 +10,7 @@
* Serge Beauchamp (Freescale Semiconductor) - [252996] add PT_FILTER_PROVIDERS
* Serge Beauchamp (Freescale Semiconductor) - [229633] add PT_VARIABLE_PROVIDERS
* James Blackburn (Broadcom Corp.) - ongoing development
+ * Tom Hochstein (Freescale) - Bug 409996 - 'Restore Defaults' does not work properly on Project Properties > Resource tab
*******************************************************************************/
package org.eclipse.core.resources;
@@ -315,6 +316,13 @@ public final class ResourcesPlugin extends Plugin {
public static final String PREF_SEPARATE_DERIVED_ENCODINGS = "separateDerivedEncodings"; //$NON-NLS-1$
/**
+ * Default setting for {@value #PREF_SEPARATE_DERIVED_ENCODINGS}.
+ *
+ * @since 3.9
+ */
+ public static final boolean DEFAULT_PREF_SEPARATE_DERIVED_ENCODINGS = false;
+
+ /**
* The single instance of this plug-in runtime class.
*/
private static ResourcesPlugin plugin;

Back to the top