| Summary: | WSDL and XSD editors throw exception opening external file | ||
|---|---|---|---|
| Product: | [WebTools] WTP Webservices | Reporter: | Dave Carlson <dcarlson> |
| Component: | wst.wsdl | Assignee: | Nitin Dahyabhai <thatnitind> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | P2 | CC: | a_markevich, david_williams |
| Version: | 0.7 | ||
| Target Milestone: | 1.0 M6 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Dave Carlson
Nitin, you are familiar with these issues, will you please make sure WSDL Editor is as graceful as it can be for external files (and those from IStorageInput, such as CVS). Thanks, The editor class was using the old setModel(IFileEditorInput) call on StructuredTextEditor inside of its addSourcePage() method. Removing it makes it all work fine as far as I can tell, both from CVS and as an external file--the source page already receives and handles the IEditorInput when the page is created just like any other editor. released for RC1 This bug is being moved to the "closed" state since it has been in the fixed state for a so long it is being assumed fixed, without explicit verification from the originator. If there is still a problem, in the most recent 1.5.x builds, please reopen or open another bug. Bug is NOT fixed in wtp-all-in-one-sdk-R-1.5.2-200610261841-win32.zip: java.lang.ClassCastException: org.eclipse.ui.internal.editors.text.JavaFileEditorInput org.eclipse.wst.wsdl.ui.internal.asd.ASDMultiPageEditor.buildAndSetModel(ASDMultiPageEditor.java:172) org.eclipse.wst.wsdl.ui.internal.asd.ASDMultiPageEditor.createPages(ASDMultiPageEditor.java:148) org.eclipse.wst.wsdl.ui.internal.InternalWSDLMultiPageEditor.createPages(InternalWSDLMultiPageEditor.java:383) org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:276) org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:596) 2 ways to reproduce this exception:
1) wsdl-based format, described as follows:
<extension point="org.eclipse.core.runtime.contentTypes">
<content-type priority="high"
name="sdx"
id="sdx"
base-type="org.eclipse.wst.wsdl.wsdlsource"
default-charset="UTF-8"
file-extensions="sdx" />
</extension>
2) Extension of org.eclipse.wst.wsdl.ui.internal.InternalWSDLMultiPageEditor:
<!-- editor -->
<extension point="org.eclipse.ui.editors">
<editor
name="%opdxEditorName"
icon="icons/opdx.gif"
contributorClass="org.eclipse.wst.wsdl.ui.internal.WSDLActionBarContributor"
class="org.eclipse.stp.policy.wtp.editor.OperationPolicyMultiPageEditor"
id="org.eclipse.stp.policy.wtp.editor.OperationPolicyMultiPageEditor"
>
<contentTypeBinding
contentTypeId="org.eclipse.stp.policy" />
</editor>
</extension>
<!-- content type -->
<extension point="org.eclipse.core.runtime.contentTypes">
<content-type
name="%opdxFileContentType.name"
id="org.eclipse.stp.policy"
base-type="org.eclipse.core.runtime.xml"
default-charset="UTF-8"
file-extensions="opdx"
/>
</extension>
Workaround for both cases like WSDL editor - open external files using XML editor: 1) <extension point="org.eclipse.core.runtime.contentTypes"> <content-type name="sdx" id="sdx" base-type="org.eclipse.wst.wsdl.wsdlsource" default-charset="UTF-8" file-extensions="sdx" priority="high" /> <file-association content-type="org.eclipse.core.runtime.xml" file-extensions="sdx" /> </extension> 2) <!-- editor --> <extension point="org.eclipse.ui.editors"> <editor name="%opdxEditorName" icon="icons/opdx.gif" contributorClass="org.eclipse.wst.wsdl.ui.internal.WSDLActionBarContributor" class="org.eclipse.stp.policy.wtp.editor.OperationPolicyMultiPageEditor" id="org.eclipse.stp.policy.wtp.editor.OperationPolicyMultiPageEditor" default="true" > <contentTypeBinding contentTypeId="org.eclipse.stp.policy" /> </editor> </extension> <!-- content type --> <extension point="org.eclipse.core.runtime.contentTypes"> <content-type name="%opdxFileContentType.name" id="org.eclipse.stp.policy" base-type="org.eclipse.core.runtime.xml" default-charset="UTF-8" file-extensions="opdx" priority="high" /> <file-association content-type="org.eclipse.core.runtime.xml" file-extensions="opdx" /> </extension> |