Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Keller2012-12-19 15:10:44 +0000
committerMarkus Keller2013-01-07 16:58:34 +0000
commit41847ed0d7c8e05c5db320255499b65c82f006ad (patch)
treeb74a70900472cd22cf917bfdb2947c7172d39430
parentef23d153d5df13d2e48e2f80d6f496fbb3b35247 (diff)
downloadeclipse.jdt.ui-41847ed0d7c8e05c5db320255499b65c82f006ad.tar.gz
eclipse.jdt.ui-41847ed0d7c8e05c5db320255499b65c82f006ad.tar.xz
eclipse.jdt.ui-41847ed0d7c8e05c5db320255499b65c82f006ad.zip
(symlink in project location path)
-rw-r--r--org.eclipse.jdt.ui/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.jdt.ui/pom.xml2
-rw-r--r--org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewJavaProjectWizardPageTwo.java21
3 files changed, 21 insertions, 4 deletions
diff --git a/org.eclipse.jdt.ui/META-INF/MANIFEST.MF b/org.eclipse.jdt.ui/META-INF/MANIFEST.MF
index fc859bb4bd..2d250ca195 100644
--- a/org.eclipse.jdt.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.jdt.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.jdt.ui; singleton:=true
-Bundle-Version: 3.8.1.qualifier
+Bundle-Version: 3.8.2.qualifier
Bundle-Activator: org.eclipse.jdt.internal.ui.JavaPlugin
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %providerName
diff --git a/org.eclipse.jdt.ui/pom.xml b/org.eclipse.jdt.ui/pom.xml
index 46bb19e069..747e4059fd 100644
--- a/org.eclipse.jdt.ui/pom.xml
+++ b/org.eclipse.jdt.ui/pom.xml
@@ -20,6 +20,6 @@
</parent>
<groupId>eclipse.jdt.ui</groupId>
<artifactId>org.eclipse.jdt.ui</artifactId>
- <version>3.8.1-SNAPSHOT</version>
+ <version>3.8.2-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewJavaProjectWizardPageTwo.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewJavaProjectWizardPageTwo.java
index ddff49a220..0d51b382ba 100644
--- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewJavaProjectWizardPageTwo.java
+++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/wizards/NewJavaProjectWizardPageTwo.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
@@ -349,12 +349,29 @@ public class NewJavaProjectWizardPageTwo extends JavaCapabilityConfigurationPage
}
private void restoreExistingFolders(URI projectLocation) {
+ HashSet<IFileStore> foldersToKeep= new HashSet<IFileStore>(fOrginalFolders);
+ // workaround for bug 319054: Eclipse deletes all files when I cancel a project creation (symlink in project location path)
+ for (IFileStore originalFileStore : fOrginalFolders) {
+ try {
+ File localFile= originalFileStore.toLocalFile(EFS.NONE, null);
+ if (localFile != null) {
+ File canonicalFile= localFile.getCanonicalFile();
+ IFileStore canonicalFileStore= originalFileStore.getFileSystem().fromLocalFile(canonicalFile);
+ if (! originalFileStore.equals(canonicalFileStore)) {
+ foldersToKeep.add(canonicalFileStore);
+ }
+ }
+ } catch (IOException e) {
+ } catch (CoreException e) {
+ }
+ }
+
try {
IFileStore[] children= EFS.getStore(projectLocation).childStores(EFS.NONE, null);
for (int i= 0; i < children.length; i++) {
IFileStore child= children[i];
IFileInfo info= child.fetchInfo();
- if (info.isDirectory() && info.exists() && !fOrginalFolders.contains(child)) {
+ if (info.isDirectory() && info.exists() && !foldersToKeep.contains(child)) {
child.delete(EFS.NONE, null);
fOrginalFolders.remove(child);
}

Back to the top