[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.webtools] Re: XML editor deployment...

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