Author: scabanovich
Date: 2009-12-22 06:54:46 -0500 (Tue, 22 Dec 2009)
New Revision: 19532
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/files/handlers/CreateFileSupport.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5486
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/files/handlers/CreateFileSupport.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/files/handlers/CreateFileSupport.java 2009-12-22
11:45:57 UTC (rev 19531)
+++
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/files/handlers/CreateFileSupport.java 2009-12-22
11:54:46 UTC (rev 19532)
@@ -31,6 +31,9 @@
import org.jboss.tools.common.util.FileUtil;
public class CreateFileSupport extends SpecialWizardSupport {
+ public static String INITIAL_FOLDER_PROPERTY = "initialFolder"; //$NON-NLS-1$
+ public static String INITIAL_FILE_PROPERTY = "initialFile"; //$NON-NLS-1$
+
static final String ATTR_TEMPLATE = "template"; //$NON-NLS-1$
static final String ATTR_FOLDER = "folder"; //$NON-NLS-1$
@@ -67,6 +70,14 @@
targetHolder.revalidate(r.getFullPath().toString());
setAttributeValue(0, ATTR_FOLDER, "" + targetHolder.path); //$NON-NLS-1$
}
+ String initialFolder = p.getProperty(INITIAL_FOLDER_PROPERTY);
+ if(initialFolder != null && initialFolder.length() > 0) {
+ setAttributeValue(0, ATTR_FOLDER, initialFolder);
+ }
+ String initialFile = p.getProperty(INITIAL_FILE_PROPERTY);
+ if(initialFile != null && initialFile.length() > 0) {
+ setAttributeValue(0, XModelObjectConstants.ATTR_NAME, initialFile);
+ }
initVersions();
}