[Issue 97601] BPEL project should validate if multiple bpel files have the same duplicate endpoint: continue
1.1 --- a/bpel.project/antsrc/org/netbeans/modules/bpel/project/anttasks/IDEValidateBPELProject.java Tue May 15 13:28:22 2007 +0000
1.2 +++ b/bpel.project/antsrc/org/netbeans/modules/bpel/project/anttasks/IDEValidateBPELProject.java Tue May 15 13:35:48 2007 +0000
1.3 @@ -234,7 +234,6 @@
1.4 }
1.5
1.6 private void processBpelFile(File file) throws BuildException {
1.7 -//System.out.println("See !!!!!!!!!!!!!!!!!!!!!: " + file);
1.8 // vlv
1.9 BpelModel model = null;
1.10
1.11 @@ -251,13 +250,8 @@
1.12 if (bpel.getTargetNamespace().equals(targetNamespace)) {
1.13 throw new BuildException(
1.14 " \n" +
1.15 - "BPEL files\n" +
1.16 - bpel.getName() + "\n" +
1.17 - "and\n" +
1.18 - current.getName() + "\n" +
1.19 - "have the same target name space:\n" +
1.20 - targetNamespace +
1.21 - " \n \n"
1.22 + "BPEL files " + bpel.getName() + " and " + current.getName() + "\n" +
1.23 + "have the same target name space: " + targetNamespace + " \n \n"
1.24 );
1.25 }
1.26 }
1.27 @@ -288,7 +282,7 @@
1.28 model = IDEBPELCatalogModel.getDefault().getBPELModel(bpel);
1.29 }
1.30 catch (Exception ex) {
1.31 - throw new RuntimeException(" Error while trying to create BPEL Model ",ex);
1.32 + throw new RuntimeException("Error while trying to create BPEL Model ",ex);
1.33 }
1.34 Validation validation = new Validation();
1.35 validation.validate((org.netbeans.modules.xml.xam.Model)model, ValidationType.COMPLETE);
1.36 @@ -398,7 +392,13 @@
1.37 }
1.38
1.39 public String getName() {
1.40 - return myFile.toString();
1.41 + String file = myFile.toString();
1.42 + String path = myProject.toString();
1.43 +
1.44 + if (file.startsWith(path)) {
1.45 + return file.substring(path.length() + 1);
1.46 + }
1.47 + return file;
1.48 }
1.49
1.50 private File myFile;