aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2012-07-19 11:15:19 -0700
committerandroid code review <noreply-gerritcodereview@google.com>2012-07-19 11:15:19 -0700
commit77f67796dffd687dcbf730104fe1ddc00f91eafe (patch)
tree739e617f61880d4ad60fe68295770391358ccd9c
parent86e08822a1e435ce333dfbc5a5fea02aa7cee136 (diff)
parent75efbc0652ef0e31bb681cba1f5f824bc07daae9 (diff)
downloadsdk-77f67796dffd687dcbf730104fe1ddc00f91eafe.zip
sdk-77f67796dffd687dcbf730104fe1ddc00f91eafe.tar.gz
sdk-77f67796dffd687dcbf730104fe1ddc00f91eafe.tar.bz2
Merge "Fixed bug in creating already existing layout configs."
-rw-r--r--eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GraphicalEditorPart.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GraphicalEditorPart.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GraphicalEditorPart.java
index fcb39fb..7948652 100644
--- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GraphicalEditorPart.java
+++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/GraphicalEditorPart.java
@@ -863,15 +863,13 @@ public class GraphicalEditorPart extends EditorPart
String path = res.getLocation().toOSString();
File newLayoutFolder = new File(path + File.separator + folderName);
- if (newLayoutFolder.isFile()) {
+ if (newLayoutFolder.isDirectory()) {
// this should not happen since aapt would have complained
// before, but if one disable the automatic build, this could
// happen.
- String message = String.format("File 'res/%1$s' is in the way!",
+ String message = String.format("File 'res/%1$s' already exists!",
folderName);
- AdtPlugin.displayError("Layout Creation", message);
-
return new Status(IStatus.ERROR, AdtPlugin.PLUGIN_ID, message);
} else if (newLayoutFolder.exists() == false) {
// create it.