Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Extending WTP XSD editor(How to avoid using internal packages?)
icon5.gif  Extending WTP XSD editor [message #1277701] Wed, 26 March 2014 10:42 Go to next message
Horia Alungulesei is currently offline Horia AlunguleseiFriend
Messages: 4
Registered: July 2009
Junior Member
I am interested in extending the WTP XSD Editor in my RCP app but I notice that the InternalXSDMultiPageEditor class itself is marked as 'internal' as the entire org.eclipse.wst.xsd.ui plugin is. So what is the recommended way of reusing/extending the WTP XSD editor?

Quote:
Discouraged access: The type InternalXSDMultiPageEditor is not accessible due to restriction on required library [...]\org.eclipse.wst.xsd.ui_1.2.500.v201203081826.jar


Regards / Horia

[Updated on: Wed, 26 March 2014 12:38]

Report message to a moderator

Re: Extending WTP XSD editor [message #1281102 is a reply to message #1277701] Mon, 31 March 2014 11:08 Go to previous messageGo to next message
Horia Alungulesei is currently offline Horia AlunguleseiFriend
Messages: 4
Registered: July 2009
Junior Member
[bump]
Re: Extending WTP XSD editor [message #1282736 is a reply to message #1281102] Wed, 02 April 2014 18:28 Go to previous messageGo to next message
Nitin Dahyabhai is currently online Nitin DahyabhaiFriend
Messages: 4430
Registered: July 2009
Senior Member

There is no recommended way; it was not designed for reuse. Are the changes you had in mind applicable to XSDs in general?

_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Extending WTP XSD editor [message #1283313 is a reply to message #1282736] Thu, 03 April 2014 09:23 Go to previous messageGo to next message
Horia Alungulesei is currently offline Horia AlunguleseiFriend
Messages: 4
Registered: July 2009
Junior Member
Thanks Nitin.

For my app, XSD files are archived along other file types. I need to add support for XSD viewing and editing using the WTP XSD editor but I need to overwrite some methods (such as doSave and doSaveAs) in order to allow users to save/export the XSD file to/from the archive.

This is possible using 'org.eclipse.xsd.presentation.XSDEditor' which has a public API, but it is nowhere near as nice as the WTP XSD Editor...


Regards / Horia
Re: Extending WTP XSD editor [message #1284530 is a reply to message #1283313] Fri, 04 April 2014 15:31 Go to previous messageGo to next message
Nitin Dahyabhai is currently online Nitin DahyabhaiFriend
Messages: 4430
Registered: July 2009
Senior Member

Editors always open and save their contents through a document provider, and the Platform provides mechanisms to deal with things that aren't actually files. That sounds like something for which a custom IEditorInput, or EFS provider should be implemented (assuming one's not out there). Then you wouldn't be limited to just the XML Schema Editor being used for resources in the archive. To put it another way, editing itself isn't where you have a limitation, you have a limitation reading contents into the editor and writing them back out.

_
Nitin Dahyabhai
Eclipse Web Tools Platform

[Updated on: Fri, 04 April 2014 15:32]

Report message to a moderator

Re: Extending WTP XSD editor [message #1287137 is a reply to message #1284530] Mon, 07 April 2014 12:51 Go to previous message
Horia Alungulesei is currently offline Horia AlunguleseiFriend
Messages: 4
Registered: July 2009
Junior Member
There is indeed a EFS used in our code and we use org.eclipse.ui.ide.FileStoreEditorInput. Basically it all boils down to a call to org.eclipse.ui.IWorkbenchPage.openEditor(IEditorInput editorInput, String editorID), where editorID would be declared in an extension:

<editor class="org.eclipse.wst.xsd.ui.internal.editor.InternalXSDMultiPageEditor"
	extensions="xsd"
	id="com.foo.MyXSDEditorID"
	[...]
</editor>

So I could get away without overwriting any functionality.

But I'm still not sure how I'd use the WTP XSD editor without placing call internal APIs (either by extending the editor or by using some extension point).
So what would be the appropriate way to include the WTP XSD editor in my RCP app, if any?


Regards / Horia
Previous Topic:Trying to nest a static web project in eclipse
Next Topic:Cleanup Document
Goto Forum:
  


Current Time: Thu Mar 28 20:21:53 GMT 2024

Powered by FUDForum. Page generated in 0.03026 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top