Author: scabanovich
Date: 2008-01-29 12:50:00 -0500 (Tue, 29 Jan 2008)
New Revision: 6016
Modified:
trunk/common/plugins/org.jboss.tools.common.model/resources/meta/filesystems.meta
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/files/handlers/CreateFolderSupport.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java
Log:
JBIDE-1705
Modified:
trunk/common/plugins/org.jboss.tools.common.model/resources/meta/filesystems.meta
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model/resources/meta/filesystems.meta 2008-01-29
17:10:22 UTC (rev 6015)
+++
trunk/common/plugins/org.jboss.tools.common.model/resources/meta/filesystems.meta 2008-01-29
17:50:00 UTC (rev 6016)
@@ -265,7 +265,7 @@
kind="list" name="CreateActions">
<XActionItem HandlerClassName="%SpecialWizard%"
ICON="action.new.file.folder"
-
PROPERTIES="validator.add=true;support=org.jboss.tools.common.model.files.handlers.CreateFolderSupport"
+
PROPERTIES="validator.add=true;support=org.jboss.tools.common.model.files.handlers.CreateFolderSupport;entity=FileFolder"
displayName="Folder..." kind="action"
name="CreateFolder">
<EntityData EntityName="NewFileWizard">
<AttributeData AttributeName="folder"/>
@@ -401,7 +401,7 @@
kind="list" name="CreateActions">
<XActionItem HandlerClassName="%SpecialWizard%"
ICON="action.new.file.folder"
-
PROPERTIES="validator.add=true;support=org.jboss.tools.common.model.files.handlers.CreateFolderSupport"
+
PROPERTIES="validator.add=true;support=org.jboss.tools.common.model.files.handlers.CreateFolderSupport;entity=FileFolder"
displayName="Folder..." kind="action"
name="CreateFolder">
<EntityData EntityName="NewFileWizard">
<AttributeData AttributeName="folder"/>
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/files/handlers/CreateFolderSupport.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/files/handlers/CreateFolderSupport.java 2008-01-29
17:10:22 UTC (rev 6015)
+++
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/files/handlers/CreateFolderSupport.java 2008-01-29
17:50:00 UTC (rev 6016)
@@ -135,6 +135,10 @@
String folder = data.getProperty("folder");
targetHolder.revalidate(folder);
message = null;
+ if(targetHolder.target == null) {
+ message = "Cannot create folder in specified folder.";
+ return;
+ }
validateFolderName();
if(message != null) return;
validateChildName(data);
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java 2008-01-29
17:10:22 UTC (rev 6015)
+++
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java 2008-01-29
17:50:00 UTC (rev 6016)
@@ -206,7 +206,7 @@
if(n == null) return null;
n = testNature(n);
if(n == null) {
- ModelPlugin.getPluginLog().logWarning("Project " + p + " has
corrupted nuture: " + natures[i]);
+ ModelPlugin.getPluginLog().logWarning("Project " + p + " has
corrupted nature: " + natures[i]);
removeNatureFromProject(p, natures[i]);
}
return n;
@@ -235,7 +235,7 @@
if(n == null) return null;
n = testNature(n);
if(n == null) {
- ModelPlugin.getPluginLog().logWarning("Project " + p + " has
corrupted nuture: " + id);
+ ModelPlugin.getPluginLog().logWarning("Project " + p + " has
corrupted nature: " + id);
removeNatureFromProject(p, id);
}
return n;
Show replies by date