Author: rob.stryker(a)jboss.com
Date: 2011-11-24 04:11:12 -0500 (Thu, 24 Nov 2011)
New Revision: 36600
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBoss7RuntimeWizardFragment.java
Log:
JBIDE-9336 - some small errors
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBoss7RuntimeWizardFragment.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBoss7RuntimeWizardFragment.java 2011-11-24
08:52:43 UTC (rev 36599)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBoss7RuntimeWizardFragment.java 2011-11-24
09:11:12 UTC (rev 36600)
@@ -105,8 +105,15 @@
}
protected void configBrowsePressed() {
- String folder = new Path(configDirText.getText()).isAbsolute() ?
- configDirText.getText() : new
Path(homeDir).append(configDirText.getText()).toString();
+ IPath f1 = null;
+ if(new Path(configDirText.getText()).isAbsolute()) {
+ f1 = new Path(configDirText.getText());
+ } else {
+ f1 = new Path(homeDir).append(IJBossRuntimeResourceConstants.AS7_STANDALONE)
+ .append(IJBossRuntimeResourceConstants.CONFIGURATION)
+ .append(configDirText.getText());
+ }
+ String folder = f1.removeLastSegments(1).toString();
File file = new File(folder);
if (!file.exists()) {
file = null;
@@ -114,8 +121,10 @@
File ffile = getFile(file, homeDirComposite.getShell());
if (ffile != null) {
- if(ffile.getAbsolutePath().startsWith(new Path(homeDir).toString())) {
- String result = ffile.getAbsolutePath().substring(homeDir.length());
+ IPath standaloneFolder = new
Path(homeDir).append(IJBossRuntimeResourceConstants.AS7_STANDALONE)
+ .append(IJBossRuntimeResourceConstants.CONFIGURATION);
+ if(ffile.getAbsolutePath().startsWith(standaloneFolder.toString())) {
+ String result =
ffile.getAbsolutePath().substring(standaloneFolder.toString().length());
configDirText.setText(new Path(result).makeRelative().toString());
} else {
configDirText.setText(ffile.getAbsolutePath());
Show replies by date