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 56198 Details for
Bug 161932
Use of internal packages in wsdm tooling tech preview
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]
Patch for Capability Plugin
patch.txt (text/plain), 10.18 KB, created by
Saurabh Dravid
on 2006-12-27 06:20:17 EST
(
hide
)
Description:
Patch for Capability Plugin
Filename:
MIME Type:
Creator:
Saurabh Dravid
Created:
2006-12-27 06:20:17 EST
Size:
10.18 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.tptp.wsdm.tooling.editor.capability >Index: src/org/eclipse/tptp/wsdm/tooling/wizard/capability/internal/NewCapabilityWizard.java >=================================================================== >RCS file: /cvsroot/tptp/monitoring/org.eclipse.tptp.wsdm.tooling.editor.capability/src/org/eclipse/tptp/wsdm/tooling/wizard/capability/internal/NewCapabilityWizard.java,v >retrieving revision 1.5 >diff -u -r1.5 NewCapabilityWizard.java >--- src/org/eclipse/tptp/wsdm/tooling/wizard/capability/internal/NewCapabilityWizard.java 27 Sep 2006 14:51:00 -0000 1.5 >+++ src/org/eclipse/tptp/wsdm/tooling/wizard/capability/internal/NewCapabilityWizard.java 27 Dec 2006 11:14:39 -0000 >@@ -66,8 +66,6 @@ > import org.eclipse.wst.wsdl.PortType; > import org.eclipse.wst.wsdl.Types; > import org.eclipse.wst.wsdl.WSDLFactory; >-import org.eclipse.wst.wsdl.internal.impl.InputImpl; >-import org.eclipse.wst.wsdl.internal.impl.OutputImpl; > import org.eclipse.wst.wsdl.util.WSDLConstants; > import org.eclipse.xsd.XSDAnnotation; > import org.eclipse.xsd.XSDComplexTypeDefinition; >@@ -608,33 +606,31 @@ > List importFaults = importOp.getEFaults(); > > if (importInput != null) { >- InputImpl newInput = (InputImpl) WSDLFactory.eINSTANCE.createInput(); >- newInput.setEnclosingDefinition(_wsdlCapDefinition); >- Element element = newInput.createElement(); >- if(importInput.getName()!=null) >- newInput.setName(importInput.getName()); >- newInput.setEMessage(importInput.getEMessage()); >- WsdlUtils.createOrFindPrefix(_wsdlCapDefinition, WsdmConstants.WSA_URI, WsdmConstants.WSA_PREFIX); >- String opName = importOp.getName(); >- opName = opName.substring(0, 1).toUpperCase() + opName.substring(1); >- String action = capNS+opName+"Request"; >- newInput.getElement().setAttributeNS(WsdmConstants.WSA_URI, WsdmConstants.WSA_ACTION_NAME, action); >- newOperation.setEInput(newInput); >- } >- >- if (importOutput != null) { >- OutputImpl newOutput = (OutputImpl) WSDLFactory.eINSTANCE.createOutput(); >- newOutput.setEnclosingDefinition(_wsdlCapDefinition); >- Element element = newOutput.createElement(); >- if(importOutput.getName()!=null) >- newOutput.setName(importOutput.getName()); >- newOutput.setEMessage(importOutput.getEMessage()); >- WsdlUtils.createOrFindPrefix(_wsdlCapDefinition, WsdmConstants.WSA_URI, WsdmConstants.WSA_PREFIX); >+ Input newInput = WSDLFactory.eINSTANCE.createInput(); >+ newInput.setEnclosingDefinition(_wsdlCapDefinition); >+ if(importInput.getName()!=null) >+ newInput.setName(importInput.getName()); >+ newInput.setEMessage(importInput.getEMessage()); >+ newOperation.setEInput(newInput); >+ WsdlUtils.createOrFindPrefix(_wsdlCapDefinition, WsdmConstants.WSA_URI, WsdmConstants.WSA_PREFIX); >+ String opName = importOp.getName(); >+ opName = opName.substring(0, 1).toUpperCase() + opName.substring(1); >+ String action = capNS+opName+"Request"; >+ newInput.getElement().setAttributeNS(WsdmConstants.WSA_URI, WsdmConstants.WSA_ACTION_NAME, action); >+ } >+ >+ if (importOutput != null) { >+ Output newOutput = WSDLFactory.eINSTANCE.createOutput(); >+ newOutput.setEnclosingDefinition(_wsdlCapDefinition); >+ if(importOutput.getName()!=null) >+ newOutput.setName(importOutput.getName()); >+ newOutput.setEMessage(importOutput.getEMessage()); >+ newOperation.setEOutput(newOutput); >+ WsdlUtils.createOrFindPrefix(_wsdlCapDefinition, WsdmConstants.WSA_URI, WsdmConstants.WSA_PREFIX); > String opName = importOp.getName(); > opName = opName.substring(0, 1).toUpperCase() + opName.substring(1); > String action = capNS+opName+"Response"; >- newOutput.getElement().setAttributeNS(WsdmConstants.WSA_URI, WsdmConstants.WSA_ACTION_NAME, action); >- newOperation.setEOutput(newOutput); >+ newOutput.getElement().setAttributeNS(WsdmConstants.WSA_URI, WsdmConstants.WSA_ACTION_NAME, action); > } > > for (int i = 0; i < importFaults.size(); i++) { >Index: src/org/eclipse/tptp/wsdm/tooling/dialog/provisional/IFileBrowserDialog.java >=================================================================== >RCS file: /cvsroot/tptp/monitoring/org.eclipse.tptp.wsdm.tooling.editor.capability/src/org/eclipse/tptp/wsdm/tooling/dialog/provisional/IFileBrowserDialog.java,v >retrieving revision 1.2 >diff -u -r1.2 IFileBrowserDialog.java >--- src/org/eclipse/tptp/wsdm/tooling/dialog/provisional/IFileBrowserDialog.java 13 Sep 2006 12:03:43 -0000 1.2 >+++ src/org/eclipse/tptp/wsdm/tooling/dialog/provisional/IFileBrowserDialog.java 27 Dec 2006 11:14:37 -0000 >@@ -21,10 +21,10 @@ > import org.eclipse.core.resources.ResourcesPlugin; > import org.eclipse.core.runtime.CoreException; > import org.eclipse.core.runtime.IStatus; >-import org.eclipse.jdt.internal.ui.dialogs.StatusInfo; > import org.eclipse.jface.viewers.Viewer; > import org.eclipse.jface.viewers.ViewerFilter; > import org.eclipse.swt.widgets.Shell; >+import org.eclipse.tptp.wsdm.tooling.editor.capability.internal.CapabilityEditorPlugin; > import org.eclipse.tptp.wsdm.tooling.nls.messages.capability.internal.Messages; > import org.eclipse.ui.dialogs.ElementTreeSelectionDialog; > import org.eclipse.ui.dialogs.ISelectionStatusValidator; >@@ -166,9 +166,9 @@ > class IFileSelectionStatusValidator implements ISelectionStatusValidator > { > >- private IStatus ErrorStatus = new StatusInfo(IStatus.ERROR, ""); >+ private IStatus ErrorStatus = new Status(IStatus.ERROR, ""); > >- private IStatus OKStatus = new StatusInfo(); >+ private IStatus OKStatus = new Status(IStatus.OK, ""); > > public IStatus validate(Object[] selection) > { >@@ -193,3 +193,52 @@ > } > > } >+ >+ >+ >+class Status implements IStatus >+{ >+ private int _severity; >+ private String _message; >+ >+ Status(int severity, String message){ >+ _severity = severity; >+ _message = message; >+ } >+ >+ public IStatus[] getChildren() { >+ return new IStatus[0]; >+ } >+ >+ public int getCode() { >+ return _severity; >+ } >+ >+ public Throwable getException() { >+ return null; >+ } >+ >+ public String getMessage() { >+ return _message; >+ } >+ >+ public String getPlugin() { >+ return CapabilityEditorPlugin.PLUGIN_ID; >+ } >+ >+ public int getSeverity() { >+ return _severity; >+ } >+ >+ public boolean isMultiStatus() { >+ return false; >+ } >+ >+ public boolean isOK() { >+ return _severity == IStatus.OK; >+ } >+ >+ public boolean matches(int severityMask) { >+ return (_severity & severityMask) != 0; >+ } >+} >Index: src/org/eclipse/tptp/wsdm/tooling/editor/capability/pages/overview/internal/DetailsSection.java >=================================================================== >RCS file: /cvsroot/tptp/monitoring/org.eclipse.tptp.wsdm.tooling.editor.capability/src/org/eclipse/tptp/wsdm/tooling/editor/capability/pages/overview/internal/DetailsSection.java,v >retrieving revision 1.5 >diff -u -r1.5 DetailsSection.java >--- src/org/eclipse/tptp/wsdm/tooling/editor/capability/pages/overview/internal/DetailsSection.java 19 Dec 2006 14:20:40 -0000 1.5 >+++ src/org/eclipse/tptp/wsdm/tooling/editor/capability/pages/overview/internal/DetailsSection.java 27 Dec 2006 11:14:37 -0000 >@@ -40,7 +40,6 @@ > import org.eclipse.ui.forms.widgets.FormToolkit; > import org.eclipse.ui.forms.widgets.ScrolledForm; > import org.eclipse.wst.wsdl.Definition; >-import org.eclipse.wst.wsdl.internal.impl.DefinitionImpl; > > /** > * >@@ -182,8 +181,7 @@ > { > if (!_dialogThrown) > { >- DefinitionImpl definition = (DefinitionImpl) _editor >- .getCapabilityDomain().getDefinition(); >+ Definition definition = _editor.getCapabilityDomain().getDefinition(); > List importsWsdl = definition.getImports(definition > .getTargetNamespace()); > if (importsWsdl.size() > 0) >#P org.eclipse.tptp.wsdm.tooling.validation >Index: src/org/eclipse/tptp/wsdm/tooling/util/internal/WsdlUtils.java >=================================================================== >RCS file: /cvsroot/tptp/monitoring/org.eclipse.tptp.wsdm.tooling.validation/src/org/eclipse/tptp/wsdm/tooling/util/internal/WsdlUtils.java,v >retrieving revision 1.7 >diff -u -r1.7 WsdlUtils.java >--- src/org/eclipse/tptp/wsdm/tooling/util/internal/WsdlUtils.java 14 Dec 2006 12:44:41 -0000 1.7 >+++ src/org/eclipse/tptp/wsdm/tooling/util/internal/WsdlUtils.java 27 Dec 2006 11:14:43 -0000 >@@ -32,6 +32,7 @@ > import org.eclipse.emf.common.util.URI; > import org.eclipse.emf.ecore.resource.Resource; > import org.eclipse.emf.ecore.resource.ResourceSet; >+import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl; > import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; > import org.eclipse.osgi.util.NLS; > import org.eclipse.tptp.wsdm.tooling.nls.messages.capability.internal.Messages; >@@ -45,7 +46,6 @@ > import org.eclipse.wst.wsdl.Types; > import org.eclipse.wst.wsdl.WSDLFactory; > import org.eclipse.wst.wsdl.XSDSchemaExtensibilityElement; >-import org.eclipse.wst.wsdl.internal.util.WSDLResourceFactoryImpl; > import org.eclipse.wst.wsdl.util.WSDLResourceImpl; > import org.eclipse.xsd.XSDComplexTypeDefinition; > import org.eclipse.xsd.XSDDerivationMethod; >@@ -108,7 +108,7 @@ > { > ResourceSet resourceSet = new ResourceSetImpl(); > resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap() >- .put("*.wsdl", new WSDLResourceFactoryImpl()); >+ .put("*.wsdl", new CustomWSDLResourceFactoryImpl()); > WSDLResourceImpl wsdlMainResource = (WSDLResourceImpl) resourceSet > .createResource(URI.createURI("*.wsdl")); > wsdlMainResource.setURI(wsdlURI); >@@ -311,7 +311,7 @@ > } > resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap() > .put(Resource.Factory.Registry.DEFAULT_EXTENSION, >- new WSDLResourceFactoryImpl()); >+ new CustomWSDLResourceFactoryImpl()); > URI wsdlFileURI = URI.createPlatformResourceURI(fileURI); > Resource resource = resourceSet.createResource(wsdlFileURI); > resource.getContents().add(definition); >@@ -1046,3 +1046,19 @@ > return wsdlLocation; > } > } >+ >+ >+class CustomWSDLResourceFactoryImpl extends ResourceFactoryImpl >+{ >+ public CustomWSDLResourceFactoryImpl() >+ { >+ } >+ >+ public Resource createResource(URI uri) >+ { >+ Resource result = new WSDLResourceImpl(uri); >+ return result; >+ } >+} >+ >+
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 161932
:
52511
| 56198 |
57069
|
57084
|
57207
|
57493