Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkchan2007-05-07 18:15:08 +0000
committerkchan2007-05-07 18:15:08 +0000
commit492c6ce02fda401ee96f8255aa99aa5393a98952 (patch)
treec223b91cd78a068a5b3114590ad0e2bdc782dbb9 /axis2/bundles/org.eclipse.jst.ws.axis2.creation.core
parent980f6fa1e696ea4496ce74db35129dc8427d67c4 (diff)
downloadwebtools.webservices-492c6ce02fda401ee96f8255aa99aa5393a98952.tar.gz
webtools.webservices-492c6ce02fda401ee96f8255aa99aa5393a98952.tar.xz
webtools.webservices-492c6ce02fda401ee96f8255aa99aa5393a98952.zip
[184740] TD generates into wrong project.
Diffstat (limited to 'axis2/bundles/org.eclipse.jst.ws.axis2.creation.core')
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2TDServiceCreationCommand.java4
-rw-r--r--axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/utils/PathLoadingUtil.java15
2 files changed, 15 insertions, 4 deletions
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2TDServiceCreationCommand.java b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2TDServiceCreationCommand.java
index 87378e8a0..5ff07940d 100644
--- a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2TDServiceCreationCommand.java
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/command/Axis2TDServiceCreationCommand.java
@@ -10,6 +10,7 @@
* yyyymmdd bug Email and other contact information
* -------- -------- -----------------------------------------------------------
* 20070426 183046 sandakith@wso2.com - Lahiru Sandakith
+ * 20070507 184740 sandakith@wso2.com - Lahiru Sandakith
*******************************************************************************/
package org.eclipse.jst.ws.axis2.creation.core.command;
@@ -83,6 +84,9 @@ public IStatus execute(IProgressMonitor monitor, IAdaptable info)
.addAnotherNodeToPath(currentDynamicWebProjectDir,
Axis2CreationUIMessages.DIR_RESOURCES);
File currentProjectResourcesDir = new File(currentProjectResourcesDirString);
+ if(!currentProjectResourcesDir.exists()){
+ currentProjectResourcesDir.mkdir();
+ }
FileUtils.copyDirectory(currentProjectResourcesDir, new File(metaInfDirectory));
// Copy the classes directory to the sevices directory
diff --git a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/utils/PathLoadingUtil.java b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/utils/PathLoadingUtil.java
index cdbe566da..6c24d2233 100644
--- a/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/utils/PathLoadingUtil.java
+++ b/axis2/bundles/org.eclipse.jst.ws.axis2.creation.core/src/org/eclipse/jst/ws/axis2/creation/core/utils/PathLoadingUtil.java
@@ -12,6 +12,8 @@
* 20070330 168762 sandakith@wso2.com - Lahiru Sandakith, Initial code to introduse the Axis2
* runtime to the framework for 168762
* 20070426 183046 sandakith@wso2.com - Lahiru Sandakith
+ * 20070507 184740 sandakith@wso2.com - Lahiru Sandakith
+ * 20070507 185686 sandakith@wso2.com - Lahiru Sandakith
*******************************************************************************/
package org.eclipse.jst.ws.axis2.creation.core.utils;
@@ -29,18 +31,23 @@ public class PathLoadingUtil {
private static String tempCodegenOutputLocation = null;
private static String currentDynamicWebProjectDir = null;
private static String workspaceDirectory = null;
+ private static String currentProjectWebProjectName = null;
//Already Computed
private static boolean alreadyInit = false;
private static boolean alreadyComputeTempCodegenOutputLocation = false;
private static boolean alreadyComputeCurrentDynamicWebProjectDir = false;
private static boolean alreadyComputeWorkspaceDirectory = false;
+ private static boolean requireToupdateModel = false;
public static void init(DataModel inputModel){
- if(!alreadyInit){
- model = inputModel;
+ requireToupdateModel = !alreadyInit ||
+ !currentProjectWebProjectName.equals(inputModel.getWebProjectName());
+ if(requireToupdateModel){
+ model = inputModel;
+ currentProjectWebProjectName = inputModel.getWebProjectName();
+ }
}
- }
public static String getWorkspaceDirectory() {
if (!alreadyComputeWorkspaceDirectory){
@@ -52,7 +59,7 @@ public class PathLoadingUtil {
}
public static String getCurrentDynamicWebProjectDir(){
- if (!alreadyComputeCurrentDynamicWebProjectDir){
+ if (!alreadyComputeCurrentDynamicWebProjectDir || requireToupdateModel){
currentDynamicWebProjectDir = FileUtils.addAnotherNodeToPath(
getWorkspaceDirectory(), model.getWebProjectName());
alreadyComputeCurrentDynamicWebProjectDir = true;

Back to the top