| Summary: | get rid of subclasses of StructuredTextEditor | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP Source Editing | Reporter: | Amy Wu <for.work.things> | ||||||||||||||||||
| Component: | wst.sse | Assignee: | Nitin Dahyabhai <thatnitind> | ||||||||||||||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||||||||||||||
| Severity: | normal | ||||||||||||||||||||
| Priority: | P3 | ||||||||||||||||||||
| Version: | 0.7 | ||||||||||||||||||||
| Target Milestone: | 1.0 M9 | ||||||||||||||||||||
| Hardware: | PC | ||||||||||||||||||||
| OS: | Windows XP | ||||||||||||||||||||
| Whiteboard: | |||||||||||||||||||||
| Attachments: |
|
||||||||||||||||||||
|
Description
Amy Wu
Created attachment 27089 [details]
org.eclipse.jst.jsp.ui.patch
Created attachment 27090 [details]
org.eclipse.wst.css.ui.patch
Created attachment 27091 [details]
org.eclipse.wst.html.ui.patch
Created attachment 27092 [details]
org.eclipse.wst.sse.ui.patch
Created attachment 27093 [details]
org.eclipse.wst.wsdl.ui.patch
Created attachment 27094 [details]
org.eclipse.wst.xml.ui.patch
Created attachment 27095 [details]
org.eclipse.wst.xsd.ui.patch
StructuredTextEditorJSP StructuredTextEditorHTML StructuredTextEditorCSS StructuredTextEditorXML were all subclassing StructuredTextEditor to contribute actions. These actions were transformed into ActionDelegates and then contributed to the editor via editorActions extension point. These actions included, cleanup, structured selection, comments, etc. The editor definition in the plugin.xml were also modified so that the editor class is StructuredTextEditor instead of the subclass. For multipage editor parts like XML, WSDL, XSD, the multipageeditorparts were modified so that when creating the site for the source page editor, the site had an id of org.eclipse.runtime.xml.source. This basically allows the xml editor to be the nested editor inside the multipageeditorparts, and all its actions are automatically picked up. Remaining work: The following classes were deprecated, but if it looks safe to delete, please do so: StructuredTextEditorJSP JSPMoveElementAction JSPRenameElementAction JSPFindOccurrencesAction StructuredTextEditorCSS CleanupActionCSS StructureSelectCSSAction StructureSelectEnclosingCSSAction StructureSelectNextCSSAction StructureSelectPreviousCSSAction CleanupActionHTML StructureTextEditorHTML HTMLFindOccurrencesAction BasicFindOccurrencesAction FindOccurrencesActionProvider StructureSelectAction StructureSelectEnclosingAction StructureSelectNextAction StructureSelectPreviousAction AddBlockCommentActionXML CleanupActionXML CommentActionXML RemoveBlockCommentActionXML ToggleCommentActionXML UncommentActionXML StructuredTextEditorXML XMLFindOccurrencesAction The following subclasses of StructuredTextEditor still exist for now (I will probably open a new bug to investigate removing these subclasses): WSDLTextEditor XSDTextEditor Small writeup on what clients should do: If clients want to create their own source page editor, they should specify org.eclipse.wst.sse.ui.internal.StructuredTextEditor as the editor class in the editor definition in the plugin.xml. If they want to add extra actions to their editor, they can use the org.eclipse.ui.editorActions extension point. If clients want to add the StructuredTextEditor as a page in a multipage editor part, when they create the editor pages, they can create a new instance of StructuredTextEditor. Then, if they want to pick up actions for a certain type of StructuredTextEditor, in their createSite method, where they create a site for the nested StructuredTextEditor, they should make it such that their site returns the editor id of their choice. So for example, if a client wanted to embed the html editor as a source page, they would need to make multipageeditorsite.getId return "org.eclipse.wst.html.core.htmlsource.source" Nitin, please apply these patches when you have time. Please note the comment I made in coment #9 about deleting deprecated classes if it looks like no one is using them. Thanks. Created attachment 27128 [details]
org.eclipse.wst.sse.unittests.patch
found another spot where an editor subclass was being referenced
Patches applied and classes removed, thanks, Amy. verifying some obvious ones on Amy's behalf verifying some obvious ones on Amy's behalf verifying some obvious ones on Amy's behalf Closing |