Author: scabanovich
Date: 2009-03-12 11:56:40 -0400 (Thu, 12 Mar 2009)
New Revision: 14192
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebNatureOperation.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectAdoptOperation.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebProjectWizardPage.java
Log:
JBIDE-3987
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebNatureOperation.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebNatureOperation.java 2009-03-12
15:48:20 UTC (rev 14191)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebNatureOperation.java 2009-03-12
15:56:40 UTC (rev 14192)
@@ -473,7 +473,8 @@
private boolean isDefaultLocation(String projectLocation) {
String root =
ModelPlugin.getWorkspace().getRoot().getLocation().toString().replace('\\',
'/');
- return (projectLocation.replace('\\','/') +
"/").startsWith(root + "/" + getProject().getName() + "/");
+ return (projectLocation.replace('\\','/') + "/").equals(root
+ "/" + getProject().getName() + "/");
+// return (projectLocation.replace('\\','/') +
"/").startsWith(root + "/" + getProject().getName() + "/");
}
private String createLinks(String projectLocation) throws CoreException {
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectAdoptOperation.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectAdoptOperation.java 2009-03-12
15:48:20 UTC (rev 14191)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectAdoptOperation.java 2009-03-12
15:56:40 UTC (rev 14192)
@@ -168,7 +168,7 @@
String location = getProperty(PROJECT_LOCATION_ID).replace('\\', '/');
String root =
ModelPlugin.getWorkspace().getRoot().getLocation().toString().replace('\\',
'/');
String wsProjectLocation = (root + "/" +
getProject().getName()).replace('\\', '/');;
- if(location.equals(wsProjectLocation)) return true;
+ if(location.equals(wsProjectLocation) || location.startsWith(wsProjectLocation +
"/")) return true;
File wsf = new File(wsProjectLocation);
if(!wsf.isDirectory()) return true;
File[] cs = wsf.listFiles();
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebProjectWizardPage.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebProjectWizardPage.java 2009-03-12
15:48:20 UTC (rev 14191)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebProjectWizardPage.java 2009-03-12
15:56:40 UTC (rev 14192)
@@ -178,6 +178,9 @@
getContainer().updateButtons();
if(linkAdapter != null) {
support.getFieldEditorByName(ImportWebDirProjectContext.ATTR_LINK).setEnabled(mayNeedLink(),
(Composite)getControl());
+ if(!mayNeedLink() && linkAdapter != null) {
+ linkAdapter.setValue("false");
+ }
}
}
};
@@ -191,6 +194,9 @@
if(linkAdapter != null) {
support.getFieldEditorByName(ImportWebDirProjectContext.ATTR_LINK).setEnabled(mayNeedLink(),
(Composite)getControl());
}
+ if(!mayNeedLink() && linkAdapter != null) {
+ linkAdapter.setValue("false");
+ }
}
}
);
@@ -198,7 +204,7 @@
new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent evt) {
String v = linkAdapter.getStringValue(false);
- context.setLinkingToProjectOutsideWorkspace(!"false".equals(v));
+ context.setLinkingToProjectOutsideWorkspace(!"false".equals(v) &&
mayNeedLink());
}
}
);
Show replies by date