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 62718 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]
A patch for the problem described
167366.patch (text/plain), 5.21 KB, created by
Andrew Eberbach
on 2007-04-02 17:03:37 EDT
(
hide
)
Description:
A patch for the problem described
Filename:
MIME Type:
Creator:
Andrew Eberbach
Created:
2007-04-02 17:03:37 EDT
Size:
5.21 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.8 >diff -u -r1.8 EclipseOsgiProjectizer.java >--- src/org/eclipse/tptp/wsdm/tooling/internal/projectizer/EclipseOsgiProjectizer.java 30 Mar 2007 14:29:58 -0000 1.8 >+++ src/org/eclipse/tptp/wsdm/tooling/internal/projectizer/EclipseOsgiProjectizer.java 2 Apr 2007 21:03:05 -0000 >@@ -32,6 +32,7 @@ > import org.eclipse.tptp.wsdm.tooling.codegen.mrt.provisional.EclipseConfigurationData; > import org.eclipse.tptp.wsdm.tooling.internal.util.PluginProjectHelper; > import org.w3c.dom.Document; >+import org.w3c.dom.Element; > > public class EclipseOsgiProjectizer extends OsgiAxis2Projectizer { > >@@ -47,6 +48,8 @@ > }; > private File[] _additionalJars; > private Object[][] _instances; >+ >+ private int _resourceCounter = 0; > > public void projectize(ConfigurationData data) throws Exception { > ConfigurationData.checkConfiguration(this, data); >@@ -82,7 +85,40 @@ > > helper.refreshProject(); > } >+ >+ 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 String getResourceFileName() { >+ return Axis2ProjectizerConstants.RESOURCE_FILE.replaceFirst(PLACE_HOLDER, String.valueOf(_resourceCounter++)); >+ } >+ > protected void loadParameters(ConfigurationData data) { > super.loadParameters(data); > _additionalJars = (File[])data.getParameter(EclipseConfigurationData.ADDITIONAL_JARS); >#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.3 >diff -u -r1.3 EclipseAxis2Projectizer.java >--- src/org/eclipse/tptp/wsdm/tooling/internal/projectizer/EclipseAxis2Projectizer.java 30 Mar 2007 14:30:02 -0000 1.3 >+++ src/org/eclipse/tptp/wsdm/tooling/internal/projectizer/EclipseAxis2Projectizer.java 2 Apr 2007 21:03:06 -0000 >@@ -33,6 +33,7 @@ > import org.eclipse.tptp.wsdm.tooling.internal.codegeneration.Activator; > import org.eclipse.tptp.wsdm.tooling.internal.util.WebProjectHelper; > import org.w3c.dom.Document; >+import org.w3c.dom.Element; > > /** > * Construct the projectizer for code generation >@@ -55,6 +56,8 @@ > private Object[][] _instances; > private IProgressMonitor _progressMonitor; > private TargetedFileList[] _filesToCopy; >+ >+ private int _resourceCounter = 0; > > public void projectize(ConfigurationData configuration) throws Exception { > >@@ -154,6 +157,35 @@ > 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 String getResourceFileName() { >+ return Axis2ProjectizerConstants.RESOURCE_FILE.replaceFirst(PLACE_HOLDER, String.valueOf(_resourceCounter++)); >+ } >+ > protected File copyTemplate(File destination) throws Exception { > URL url = Platform.getBundle(Activator.PLUGIN_ID).getEntry(EclipseAxis2ProjectizerConstants.WEBCONTENT_DIR_RESOURCE); > url = FileLocator.toFileURL(url);
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