Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » XML editor deployment...
XML editor deployment... [message #231517] Mon, 18 May 2009 13:06 Go to next message
Eclipse UserFriend
Originally posted by: mike.xmos.com

Hi,

I'd like to use the XML editor from WTP in my product, but the
org.eclipse.wst.xml.ui plugin has, for example, project wizards for
validating XML files etc which I don't want... Is the only way to hide
this stuff by editing the WTP code myself?

Thanks,
Mike
Re: XML editor deployment... [message #231534 is a reply to message #231517] Mon, 18 May 2009 15:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dcarver.starstandard.org

Mike Wrighton wrote:
> Hi,
>
> I'd like to use the XML editor from WTP in my product, but the
> org.eclipse.wst.xml.ui plugin has, for example, project wizards for
> validating XML files etc which I don't want... Is the only way to hide
> this stuff by editing the WTP code myself?

If all you want is the XML Editor, you may want to create your own XML
Editor based on the code from the WTP Editor. You can check the
following PPT tutorial on how to do this:

http://www.eclipsecon.org/2008/sub/attachments/Extending_the _XML_and_SSE_editors_from_the_WTP_Project_.ppt

Dave
Re: XML editor deployment... [message #231575 is a reply to message #231534] Tue, 19 May 2009 12:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mike.xmos.com

Thanks. By the looks of it though, in order to get a full Design/Source
multi-page XML editor you still need to use the one in the xml.ui plugin
or else write a fair bit of code...

Mike

David Carver wrote:
> Mike Wrighton wrote:
>> Hi,
>>
>> I'd like to use the XML editor from WTP in my product, but the
>> org.eclipse.wst.xml.ui plugin has, for example, project wizards for
>> validating XML files etc which I don't want... Is the only way to hide
>> this stuff by editing the WTP code myself?
>
> If all you want is the XML Editor, you may want to create your own XML
> Editor based on the code from the WTP Editor. You can check the
> following PPT tutorial on how to do this:
>
> http://www.eclipsecon.org/2008/sub/attachments/Extending_the _XML_and_SSE_editors_from_the_WTP_Project_.ppt
>
>
> Dave
Re: XML editor deployment... [message #231596 is a reply to message #231575] Tue, 19 May 2009 15:10 Go to previous messageGo to next message
Martin Oberhuber is currently offline Martin OberhuberFriend
Messages: 985
Registered: July 2009
Senior Member
Hi all,

we have a similar problem: In our product we use CDT and an XML editor
only, but we get several WTP menu contributions that we'd rather not
have. For instance:

* "Validate" item on *.txt or *.c files
* Generate> submenu on plain projects without any WTP/XML facet
* "Add to Snippets" (disabled) on *.txt editors
* New > Project > Faceted Project (wizard exists but is unusable
since no facets are declared in any plugin)
* New > DTD, New > XML, New > XML Schema shortcuts

I tracked down some of the issues, e.g. the "Validate" one to the fact
that some WTP framework depends on validator extensions and/or
programmatic propertyTesters which are not loaded by default; and while
the propertyTester is not yet loaded, the menu item gets displayed even
if it makes no sense.

Some of the measures that we were planning to take are:

* Get rid of some plugins, e.g. org.eclipse.wst.project.facets.ui
(and only keep facets.core, which is required by XML Editor).
Other candidates to remove are
* org.eclipse.wst.common.snippets
* org.eclipse.wst.dtd.core
* org.eclipse.wst.dtd.ui.infopop
* org.eclipse.wst.dtd.ui
* org.eclipse.wst.dtdeditor.doc.user
getting rid of those plugins only is on a granularity below the
WTP feature level, which I'm not exactly sure is allowed although
p2 should support it, I think.

* Define a Capability, e.g. "XML Editing", have items such as
"Validate" bound to that Capability such that they are hidden
by default. Enable the Capability by Triggerpoint only when an XML
Editor is first loaded. At the time the XML Editor is loaded,
Property Tester and Validator Extensions should be loaded such
that menu enablement works properly.

Would these approaches make sense? Are there any side effects that we'd
need to be aware of? Is there any easier way for getting rid of the
unwanted menu items? Should we log bugs against WTP to improve menu
enablement in the cases mentioned, or are some of these issues already
known?

Thanks,
--
Martin Oberhuber, Senior Member of Technical Staff, Wind River
Target Management Project Lead, DSDP PMC Member
http://www.eclipse.org/dsdp/tm




Mike Wrighton wrote:
> Thanks. By the looks of it though, in order to get a full Design/Source
> multi-page XML editor you still need to use the one in the xml.ui plugin
> or else write a fair bit of code...
>
> Mike
>
> David Carver wrote:
>> Mike Wrighton wrote:
>>> Hi,
>>>
>>> I'd like to use the XML editor from WTP in my product, but the
>>> org.eclipse.wst.xml.ui plugin has, for example, project wizards for
>>> validating XML files etc which I don't want... Is the only way to
>>> hide this stuff by editing the WTP code myself?
>>
>> If all you want is the XML Editor, you may want to create your own XML
>> Editor based on the code from the WTP Editor. You can check the
>> following PPT tutorial on how to do this:
>>
>> http://www.eclipsecon.org/2008/sub/attachments/Extending_the _XML_and_SSE_editors_from_the_WTP_Project_.ppt
>>
>>
>> Dave
Re: XML editor deployment... [message #231604 is a reply to message #231596] Tue, 19 May 2009 16:02 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dcarver.starstandard.org

Martin,

Please open an enhancement request for a refactoring of the plugins.
Some of this you can handle by creating your own feature, and only
including certain plugins. Others will need to be refactored out into
separate plugins in order to make it more plug and playable by adopters.

Please open this against the various WTP source editing components that
you have having problems with and post the bug number back here.

Dave

Martin Oberhuber wrote:
> Hi all,
>
> we have a similar problem: In our product we use CDT and an XML editor
> only, but we get several WTP menu contributions that we'd rather not
> have. For instance:
>
> * "Validate" item on *.txt or *.c files
> * Generate> submenu on plain projects without any WTP/XML facet
> * "Add to Snippets" (disabled) on *.txt editors
> * New > Project > Faceted Project (wizard exists but is unusable
> since no facets are declared in any plugin)
> * New > DTD, New > XML, New > XML Schema shortcuts
>
> I tracked down some of the issues, e.g. the "Validate" one to the fact
> that some WTP framework depends on validator extensions and/or
> programmatic propertyTesters which are not loaded by default; and while
> the propertyTester is not yet loaded, the menu item gets displayed even
> if it makes no sense.
>
> Some of the measures that we were planning to take are:
>
> * Get rid of some plugins, e.g. org.eclipse.wst.project.facets.ui
> (and only keep facets.core, which is required by XML Editor).
> Other candidates to remove are
> * org.eclipse.wst.common.snippets
> * org.eclipse.wst.dtd.core
> * org.eclipse.wst.dtd.ui.infopop
> * org.eclipse.wst.dtd.ui
> * org.eclipse.wst.dtdeditor.doc.user
> getting rid of those plugins only is on a granularity below the
> WTP feature level, which I'm not exactly sure is allowed although
> p2 should support it, I think.
>
> * Define a Capability, e.g. "XML Editing", have items such as
> "Validate" bound to that Capability such that they are hidden
> by default. Enable the Capability by Triggerpoint only when an XML
> Editor is first loaded. At the time the XML Editor is loaded,
> Property Tester and Validator Extensions should be loaded such
> that menu enablement works properly.
>
> Would these approaches make sense? Are there any side effects that we'd
> need to be aware of? Is there any easier way for getting rid of the
> unwanted menu items? Should we log bugs against WTP to improve menu
> enablement in the cases mentioned, or are some of these issues already
> known?
>
> Thanks,
> --
> Martin Oberhuber, Senior Member of Technical Staff, Wind River
> Target Management Project Lead, DSDP PMC Member
> http://www.eclipse.org/dsdp/tm
>
>
>
>
> Mike Wrighton wrote:
>> Thanks. By the looks of it though, in order to get a full
>> Design/Source multi-page XML editor you still need to use the one in
>> the xml.ui plugin or else write a fair bit of code...
>>
>> Mike
>>
>> David Carver wrote:
>>> Mike Wrighton wrote:
>>>> Hi,
>>>>
>>>> I'd like to use the XML editor from WTP in my product, but the
>>>> org.eclipse.wst.xml.ui plugin has, for example, project wizards for
>>>> validating XML files etc which I don't want... Is the only way to
>>>> hide this stuff by editing the WTP code myself?
>>>
>>> If all you want is the XML Editor, you may want to create your own
>>> XML Editor based on the code from the WTP Editor. You can check the
>>> following PPT tutorial on how to do this:
>>>
>>> http://www.eclipsecon.org/2008/sub/attachments/Extending_the _XML_and_SSE_editors_from_the_WTP_Project_.ppt
>>>
>>>
>>> Dave
Re: XML editor deployment... [message #231612 is a reply to message #231604] Tue, 19 May 2009 16:21 Go to previous messageGo to next message
Martin Oberhuber is currently offline Martin OberhuberFriend
Messages: 985
Registered: July 2009
Senior Member
Thanks Dave,

well I surely can log some enhancement requests, but we need a
solution for Eclipse 3.5 (Galileo)...

so any comments, ideas or suggestions are highly appreciated.

Thanks,
--
Martin Oberhuber, Senior Member of Technical Staff, Wind River
Target Management Project Lead, DSDP PMC Member
http://www.eclipse.org/dsdp/tm




David Carver wrote:
> Martin,
>
> Please open an enhancement request for a refactoring of the plugins.
> Some of this you can handle by creating your own feature, and only
> including certain plugins. Others will need to be refactored out into
> separate plugins in order to make it more plug and playable by adopters.
>
> Please open this against the various WTP source editing components that
> you have having problems with and post the bug number back here.
>
> Dave
>
> Martin Oberhuber wrote:
>> Hi all,
>>
>> we have a similar problem: In our product we use CDT and an XML editor
>> only, but we get several WTP menu contributions that we'd rather not
>> have. For instance:
>>
>> * "Validate" item on *.txt or *.c files
>> * Generate> submenu on plain projects without any WTP/XML facet
>> * "Add to Snippets" (disabled) on *.txt editors
>> * New > Project > Faceted Project (wizard exists but is unusable
>> since no facets are declared in any plugin)
>> * New > DTD, New > XML, New > XML Schema shortcuts
>>
>> I tracked down some of the issues, e.g. the "Validate" one to the fact
>> that some WTP framework depends on validator extensions and/or
>> programmatic propertyTesters which are not loaded by default; and
>> while the propertyTester is not yet loaded, the menu item gets
>> displayed even if it makes no sense.
>>
>> Some of the measures that we were planning to take are:
>>
>> * Get rid of some plugins, e.g. org.eclipse.wst.project.facets.ui
>> (and only keep facets.core, which is required by XML Editor).
>> Other candidates to remove are
>> * org.eclipse.wst.common.snippets
>> * org.eclipse.wst.dtd.core
>> * org.eclipse.wst.dtd.ui.infopop
>> * org.eclipse.wst.dtd.ui
>> * org.eclipse.wst.dtdeditor.doc.user
>> getting rid of those plugins only is on a granularity below the
>> WTP feature level, which I'm not exactly sure is allowed although
>> p2 should support it, I think.
>>
>> * Define a Capability, e.g. "XML Editing", have items such as
>> "Validate" bound to that Capability such that they are hidden
>> by default. Enable the Capability by Triggerpoint only when an XML
>> Editor is first loaded. At the time the XML Editor is loaded,
>> Property Tester and Validator Extensions should be loaded such
>> that menu enablement works properly.
>>
>> Would these approaches make sense? Are there any side effects that
>> we'd need to be aware of? Is there any easier way for getting rid of
>> the unwanted menu items? Should we log bugs against WTP to improve
>> menu enablement in the cases mentioned, or are some of these issues
>> already known?
>>
>> Thanks,
>> --
>> Martin Oberhuber, Senior Member of Technical Staff, Wind River
>> Target Management Project Lead, DSDP PMC Member
>> http://www.eclipse.org/dsdp/tm
>>
>>
>>
>>
>> Mike Wrighton wrote:
>>> Thanks. By the looks of it though, in order to get a full
>>> Design/Source multi-page XML editor you still need to use the one in
>>> the xml.ui plugin or else write a fair bit of code...
>>>
>>> Mike
>>>
>>> David Carver wrote:
>>>> Mike Wrighton wrote:
>>>>> Hi,
>>>>>
>>>>> I'd like to use the XML editor from WTP in my product, but the
>>>>> org.eclipse.wst.xml.ui plugin has, for example, project wizards for
>>>>> validating XML files etc which I don't want... Is the only way to
>>>>> hide this stuff by editing the WTP code myself?
>>>>
>>>> If all you want is the XML Editor, you may want to create your own
>>>> XML Editor based on the code from the WTP Editor. You can check the
>>>> following PPT tutorial on how to do this:
>>>>
>>>> http://www.eclipsecon.org/2008/sub/attachments/Extending_the _XML_and_SSE_editors_from_the_WTP_Project_.ppt
>>>>
>>>>
>>>> Dave
Re: XML editor deployment... [message #231620 is a reply to message #231612] Tue, 19 May 2009 17:50 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 2330
Registered: July 2009
Senior Member
Another possibility is to use the Product Customization
(http://wiki.eclipse.org/index.php/Product_Customization) features.
I'm not at all familiar with implementing the transformations, but
the gist of it is to allow on-the-fly adjustments to the plugin.xml
files we provide to better suit your product's needs.
Unfortunately, if you're not delivering a discrete product, I don't
think this option is open to you--Oracle's run into this as well
without a clean solution so far.

With the exception of JSDT, most of the components in Source Editing
are as agnostic to project metadata as possible (even the JSP
component). The dependency on Facets is optional at runtime where
possible in Source Editing, but dependencies from WTP Common may
themselves have hard requirements on Facets. Our linkage to
wst.validation should loosen up in 3.2 and in turn remove the
transitive dependency on Facets. In general I'm still intending to
keep the functionality in org.eclipse.wst.xml.ui in the one plug-in
for simplicity.

As for the specific items mentioned:
* Bug reports and fixes for the validation property tester would be
most useful in correcting its over-visibility on file types it
doesn't support.
* The Faceted Project wizard's not one that I know of, but
Konstantin's focus is for new features to be worked on in the
Technology project Incubator, http://www.eclipse.org/fproj/ . It's
unclear to me what practical purpose it serves other than as a testbed.
* Shortcuts should be limited to WTP's perspectives, if not, bug.
The only exception should be shortcuts to our perspectives from others.
* I'd suggest you keep org.eclipse.wst.dtd.*, as it provides the DTD
model used by the XML Editor's content assist. Unless you're 100%
certain your users will only ever use XML Schemas, and if you are
certain, I'd still disagree with you :)

--
---
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational


---
Nitin Dahyabhai
Eclipse WTP, IBM
Previous Topic:source code location for WTP plugins?
Next Topic:Tomcat and Eclipse for my RCP
Goto Forum:
  


Current Time: Sat Nov 22 18:07:10 GMT 2014

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

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