Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 62810 Details for
Bug 167366
WSDM Tooling: Additional jars and Initial instances are not reflected in generated touchpoint
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
When one patch isn't enough
167366-2.patch (text/plain), 11.56 KB, created by
Andrew Eberbach
on 2007-04-03 14:15:29 EDT
(
hide
)
Description:
When one patch isn't enough
Filename:
MIME Type:
Creator:
Andrew Eberbach
Created:
2007-04-03 14:15:29 EDT
Size:
11.56 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.tptp.wsdm.tooling.codegeneration >Index: src/org/eclipse/tptp/wsdm/tooling/internal/projectizer/EclipseOsgiProjectizer.java >=================================================================== >RCS file: /cvsroot/ganges/org.eclipse.tptp.wsdm.tooling.codegeneration/src/org/eclipse/tptp/wsdm/tooling/internal/projectizer/EclipseOsgiProjectizer.java,v >retrieving revision 1.9 >diff -u -r1.9 EclipseOsgiProjectizer.java >--- src/org/eclipse/tptp/wsdm/tooling/internal/projectizer/EclipseOsgiProjectizer.java 2 Apr 2007 21:03:14 -0000 1.9 >+++ src/org/eclipse/tptp/wsdm/tooling/internal/projectizer/EclipseOsgiProjectizer.java 3 Apr 2007 18:09:22 -0000 >@@ -78,7 +78,13 @@ > MetadataDescriptor rmd = _metadatas[i]; > createRMDFile(rmd, wsdl, wsdldir); > createWSDLFile(wsdl, wsdldir); >- createRouterEntries(routerEntriesDir, WsdlUtils.getServiceName(wsdl.getDocumentElement()), _capabilitiesList[i]); >+ if(_instances == null) { >+ createRouterEntries(routerEntriesDir, WsdlUtils.getServiceName(wsdl.getDocumentElement()), _capabilitiesList[i]); >+ } >+ } >+ >+ if(_instances != null) { >+ createRouterEntries(routerEntriesDir, _instances); > } > > createBuildProperties(_targetDirectory, EclipseOsgiProjectizerConstants.BUILD_PROPERTIES_FILE_RESOURCE, EclipseOsgiProjectizerConstants.BUILD_PROPERTIES_FILE); >@@ -86,32 +92,28 @@ > helper.refreshProject(); > } > >- protected void createRouterEntries(File routerEntriesDir, String serviceName, Map capabilitiesMap) >+ protected void createRouterEntries(File routerEntriesDir, Object[][] instances) > throws Exception { > >- if(_instances == null) { >- super.createRouterEntries(routerEntriesDir, serviceName, capabilitiesMap); >- } else { >+ routerEntriesDir.mkdirs(); >+ >+ for(int i=0; i < _instances.length; i++) { >+ Object[] instancePair = _instances[i]; > >- for(int i=0; i < _instances.length; i++) { >- Object[] instancePair = _instances[i]; >- >- // >- //This is really tacky, but it's the only real way to do this >- // since there are no pairs. The File use is to get the last element >- // of the path in a nice, non-hack way. >- // >- String path = (String) instancePair[0]; >- String resourcePathName = new File(path).getName(); >- >- Element instanceElement = (Element) instancePair[1]; >- >- File serviceDir = new File(routerEntriesDir, resourcePathName); >- File routerEntryFile = new File(serviceDir, getResourceFileName()); >- >- writeToFileCheck(instanceElement, routerEntryFile); >- } >- >+ // >+ //This is really tacky, but it's the only real way to do this >+ // since there are no pairs. The File use is to get the last element >+ // of the path in a nice, non-hack way. >+ // >+ String path = (String) instancePair[0]; >+ String resourcePathName = new File(path).getName(); >+ >+ Element instanceElement = (Element) instancePair[1]; >+ >+ File serviceDir = new File(routerEntriesDir, resourcePathName); >+ File routerEntryFile = new File(serviceDir, getResourceFileName()); >+ >+ writeToFileCheck(instanceElement, routerEntryFile); > } > } > >@@ -160,9 +162,11 @@ > throw new RuntimeException(); > } > } >- for(int i=0; i < _additionalJars.length; i++) { >- bundleClassPath = bundleClassPath + "," + EclipseOsgiProjectizerConstants.LIB_DIR + "/" + _additionalJars[i].getName(); >- FileUtils.copy(_additionalJars[i], libDirectory); >+ if(_additionalJars != null) { >+ for(int i=0; i < _additionalJars.length; i++) { >+ bundleClassPath = bundleClassPath + "," + EclipseOsgiProjectizerConstants.LIB_DIR + "/" + _additionalJars[i].getName(); >+ FileUtils.copy(_additionalJars[i], libDirectory); >+ } > } > > Attributes.Name name = new Attributes.Name(BUNDLE_CLASSPATH_ATTR); >#P org.eclipse.tptp.wsdm.editor >Index: src/org/eclipse/tptp/wsdm/tooling/codegen/mrt/provisional/DescriptorHelper.java >=================================================================== >RCS file: /cvsroot/ganges/org.eclipse.tptp.wsdm.editor/src/org/eclipse/tptp/wsdm/tooling/codegen/mrt/provisional/DescriptorHelper.java,v >retrieving revision 1.8 >diff -u -r1.8 DescriptorHelper.java >--- src/org/eclipse/tptp/wsdm/tooling/codegen/mrt/provisional/DescriptorHelper.java 30 Mar 2007 14:30:13 -0000 1.8 >+++ src/org/eclipse/tptp/wsdm/tooling/codegen/mrt/provisional/DescriptorHelper.java 3 Apr 2007 18:09:23 -0000 >@@ -25,6 +25,7 @@ > > import org.apache.muse.core.descriptor.DescriptorConstants; > import org.apache.muse.util.xml.XmlUtils; >+import org.apache.muse.ws.addressing.WsaConstants; > import org.apache.muse.ws.resource.metadata.MetadataDescriptor; > import org.apache.muse.ws.resource.metadata.OpenMetadataDescriptor; > import org.eclipse.core.resources.IFile; >@@ -155,7 +156,7 @@ > * @param mrtObjectMap - The map of MRTLocation-MRTObject pair, can be null. > * @throws Exception - If anything goes wrong. > */ >- public DescriptorHelper(CodeGenerationDelegate codeGenerationDelegate, InputStream inputStream, Map mrtObjectMap) throws Exception >+ public DescriptorHelper(CodeGenerationDelegate codeGenerationDelegate, InputStream inputStream, Map mrtObjectMap, boolean extractExtraInfo) throws Exception > { > if(mrtObjectMap!=null) > _mrtObjectMap = mrtObjectMap; >@@ -164,8 +165,18 @@ > Document rootDocument = XmlUtils.createDocument(inputStream); > > _descriptorDocument = extractDescriptorDocument(rootDocument); >- _instances = extractInstances(rootDocument); >- _jarFiles = extractJarFiles(rootDocument); >+ >+ if(extractExtraInfo) { >+ _instances = extractInstances(rootDocument); >+ _jarFiles = extractJarFiles(rootDocument); >+ } else { >+ _instances = null; >+ _jarFiles = null; >+ } >+ } >+ >+ public DescriptorHelper(CodeGenerationDelegate codeGenerationDelegate, InputStream inputStream, Map mrtObjectMap) throws Exception { >+ this(codeGenerationDelegate, inputStream, mrtObjectMap, true); > } > > /** >@@ -195,8 +206,17 @@ > initialInstancesElements[i], > DescriptorConstants.CONTEXT_PATH_QNAME); > instances[i][0] = XmlUtils.extractText(contextElement); >- instances[i][1] = XmlUtils.findFirstInSubTree( >+ Element instancesElement = XmlUtils.findFirstInSubTree( > initialInstancesElements[i], REFERENCE_PARAMETERS_QNAME); >+ >+ Element referenceParametersElement = XmlUtils.createElement(WsaConstants.PARAMETERS_QNAME); >+ >+ Element[] referenceParameters = XmlUtils.getAllElements(instancesElement); >+ Document owner = referenceParametersElement.getOwnerDocument(); >+ for(int j=0; j < referenceParameters.length; j++) { >+ referenceParametersElement.appendChild(owner.importNode(referenceParameters[j], true)); >+ } >+ instances[i][1] = referenceParametersElement; > } > > return instances; >Index: src/org/eclipse/tptp/wsdm/tooling/codegen/mrt/provisional/MRTCodeGenerationDelegate.java >=================================================================== >RCS file: /cvsroot/ganges/org.eclipse.tptp.wsdm.editor/src/org/eclipse/tptp/wsdm/tooling/codegen/mrt/provisional/MRTCodeGenerationDelegate.java,v >retrieving revision 1.6 >diff -u -r1.6 MRTCodeGenerationDelegate.java >--- src/org/eclipse/tptp/wsdm/tooling/codegen/mrt/provisional/MRTCodeGenerationDelegate.java 30 Mar 2007 14:30:13 -0000 1.6 >+++ src/org/eclipse/tptp/wsdm/tooling/codegen/mrt/provisional/MRTCodeGenerationDelegate.java 3 Apr 2007 18:09:23 -0000 >@@ -79,7 +79,7 @@ > { > byte[] serializedDD = createDD(); > Map mrtObjectMap = _mrtPreProcessor.getMrtObjectMap(); >- return new DescriptorHelper(this, new ByteArrayInputStream(serializedDD), mrtObjectMap); >+ return new DescriptorHelper(this, new ByteArrayInputStream(serializedDD), mrtObjectMap, false); > } > > private byte[] createDD() >#P org.eclipse.tptp.wsdm.tooling.codegeneration.j2ee >Index: src/org/eclipse/tptp/wsdm/tooling/internal/projectizer/EclipseAxis2Projectizer.java >=================================================================== >RCS file: /cvsroot/ganges/org.eclipse.tptp.wsdm.tooling.codegeneration.j2ee/src/org/eclipse/tptp/wsdm/tooling/internal/projectizer/EclipseAxis2Projectizer.java,v >retrieving revision 1.4 >diff -u -r1.4 EclipseAxis2Projectizer.java >--- src/org/eclipse/tptp/wsdm/tooling/internal/projectizer/EclipseAxis2Projectizer.java 2 Apr 2007 21:03:17 -0000 1.4 >+++ src/org/eclipse/tptp/wsdm/tooling/internal/projectizer/EclipseAxis2Projectizer.java 3 Apr 2007 18:09:24 -0000 >@@ -106,9 +106,15 @@ > MetadataDescriptor rmd = _metadatas[i]; > createRMDFile(rmd, wsdl, wsdldir); > createWSDLFile(wsdl, wsdldir); >- createRouterEntries(routerEntriesDir, WsdlUtils.getServiceName(wsdl.getDocumentElement()), capabilities); >+ if(_instances == null) { >+ createRouterEntries(routerEntriesDir, WsdlUtils.getServiceName(wsdl.getDocumentElement()), _capabilitiesList[i]); >+ } > updateServicesDescriptor(servicesHelper, wsdl, capabilities); >- } >+ } >+ >+ if(_instances != null) { >+ createRouterEntries(routerEntriesDir, _instances); >+ } > recordProgress(_progressMonitor, 4); > > File servicesFile = new File(webContentDir, Axis2ProjectizerConstants.SERVICES_FILE); >@@ -157,28 +163,26 @@ > return helper; > } > >- protected void createRouterEntries(File routerEntriesDir, String serviceName, Map capabilitiesMap) throws Exception { >- if(_instances == null) { >- super.createRouterEntries(routerEntriesDir, serviceName, capabilitiesMap); >- } else { >- for(int i=0; i < _instances.length; i++) { >- Object[] instancePair = _instances[i]; >- >- // >- //This is really tacky, but it's the only real way to do this >- // since there are no pairs. The File use is to get the last element >- // of the path in a nice, non-hack way. >- // >- String path = (String) instancePair[0]; >- String resourcePathName = new File(path).getName(); >- >- Element instanceElement = (Element) instancePair[1]; >- >- File serviceDir = new File(routerEntriesDir, resourcePathName); >- File routerEntryFile = new File(serviceDir, getResourceFileName()); >- >- writeToFileCheck(instanceElement, routerEntryFile); >- } >+ protected void createRouterEntries(File routerEntriesDir,Object[][] instances) throws Exception { >+ routerEntriesDir.mkdirs(); >+ >+ for (int i = 0; i < _instances.length; i++) { >+ Object[] instancePair = _instances[i]; >+ >+ // >+ // This is really tacky, but it's the only real way to do this >+ // since there are no pairs. The File use is to get the last element >+ // of the path in a nice, non-hack way. >+ // >+ String path = (String) instancePair[0]; >+ String resourcePathName = new File(path).getName(); >+ >+ Element instanceElement = (Element) instancePair[1]; >+ >+ File serviceDir = new File(routerEntriesDir, resourcePathName); >+ File routerEntryFile = new File(serviceDir, getResourceFileName()); >+ >+ writeToFileCheck(instanceElement, routerEntryFile); > } > } > >@@ -225,13 +229,14 @@ > > File libDestination = new File(webContentDestination, "lib"); > >- >- for (int i=0; i < _additionalJars.length; i++) { >- if(!_additionalJars[i].exists()) { >- throw new FileNotFoundException(_additionalJars[i].getAbsolutePath()); >+ if(_additionalJars != null) { >+ for (int i=0; i < _additionalJars.length; i++) { >+ if(!_additionalJars[i].exists()) { >+ throw new FileNotFoundException(_additionalJars[i].getAbsolutePath()); >+ } >+ >+ FileUtils.copyFile(_additionalJars[i], libDestination); > } >- >- FileUtils.copyFile(_additionalJars[i], libDestination); > } > > for (int i=0; i < _filesToCopy.length; i++) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 167366
:
62718
| 62810