Author: koen.aers(a)jboss.com
Date: 2012-01-17 17:37:31 -0500 (Tue, 17 Jan 2012)
New Revision: 37920
Modified:
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/console/NewProjectPostProcessor.java
Log:
JBIDE-8911: Forge should not swallow errors (fix the Windows case)
Modified:
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/console/NewProjectPostProcessor.java
===================================================================
---
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/console/NewProjectPostProcessor.java 2012-01-17
22:02:31 UTC (rev 37919)
+++
trunk/forge/plugins/org.jboss.tools.forge.ui/src/org/jboss/tools/forge/ui/console/NewProjectPostProcessor.java 2012-01-17
22:37:31 UTC (rev 37920)
@@ -14,12 +14,17 @@
public class NewProjectPostProcessor implements ForgeCommandPostProcessor {
+
+ private String makePlatformIndependent(String path) {
+ int index = path.indexOf('/');
+ return (index != -1) ? path.substring(index) : path;
+ }
@Override
public void postProcess(Map<String, String> commandDetails) {
- String projectPath = commandDetails.get("cpn");
+ String projectPath = makePlatformIndependent(commandDetails.get("cpn"));
IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
- String workspacePath = workspaceRoot.getLocation().toOSString();
+ String workspacePath =
makePlatformIndependent(workspaceRoot.getLocation().toString());
if (workspacePath.equals(projectPath)) {
if (MessageDialog.open(
MessageDialog.QUESTION,
Show replies by date