Library Provider Framework [message #484822] |
Wed, 09 September 2009 08:56  |
Eclipse User |
|
|
|
Hi,
I want to be able to listen to selection events on InstallLibraryPanel's "Include libraries with this application" option as well as have the ability to disable the action associated with this option.
I am looking to integrate a WTP 3.0 based facet to Library Provider Framework in WTP 3.2 (similar to what was done for JPA & JSF facet- e.g. https://bugs.eclipse.org/bugs/show_bug.cgi?id=250208). One of the requirements of the WTP 3.2 facet is to provide shared library support- if the user selects "User Library" as the facets Implementation library, user is able to define options to both "Include libraries with this application", as well as a related option provided by our facet to add the library as a "Shared Library" (if the projects targeted EAR/server supports shared libraries). So, our facet needs to detect if option "Include libraries with this application" has been selected/deselected and enable the "User Library" option appropriately. Idealy the new option would appear as part of the InstallLibraryPanel right below (and indented) "Include libraries with this application" option, but we may be able to live with the new option just below the InstallLibraryPanel if we can listen for selection/deselection events. Further, we would like to disable the actions of "Include libraries with this application" option when "Shared Library" is also selected (the alternative would be to remove the classpath entries added by the action which is not as nice).
Can I get this working in WTP 3.2? Can you please point me to API I can use?
I looked at API's and classes below and did not see anything useful (I was looking at WTP 3.1 but WTP 3.2 would be fine). -org.eclipse.jst.common.project.facet.ui.libprov.LibraryProv iderFrameworkUi.createInstallLibraryPanel(Composite, LibraryInstallDelegate, String)
-org.eclipse.jst.common.project.facet.core.libprov.LibraryPr oviderFramework
-org.eclipse.jst.common.project.facet.core.libprov.ILibraryP rovider
|
|
|
|
|
|
|
Re: Library Provider Framework [message #523523 is a reply to message #484956] |
Fri, 26 March 2010 13:03  |
Eclipse User |
|
|
|
Hi Konstantin,
Thanks for your help thus far!
I was trying to get a define complex enablement expression like below with 2 facet requirements , but seemed only the first requirement was being recognized. It is entirely possible my enablement expression is not correctly formed.
What we actually want though is support for e.g. a Project PropertyTester and associated class in our enablement expression , so the class would get called with a handle to the project to glean information like what runtime is it targeting, does that runtime support our library (having some logic in the class to determine that.
So, can you tell me if the extension point supports more or less an arbitrarily complex enablement expression with property testers etc like we are looking for?
Thanks in advance for your help,
<extension point="org.eclipse.jst.common.project.facet.core.libraryProviders ">
<provider id="com.library.id">
<enablement>
<and>
<with variable="requestingProjectFacet">
<test property="org.eclipse.wst.common.project.facet.core.projectFacet " value="jst.jaxrs:1.0" forcePluginActivation="true" />
</with>
<with variable="requestingProjectFacet">
<test property="org.eclipse.wst.common.project.facet.core.projectFacet " value="jst.jsf:" forcePluginActivation="true" />
</with>
</and>
</enablement>
<action type="INSTALL">
<config class="someclass"/>
<operation class="someclass"/>
</action>
<label>a library</label>
<priority>10000</priority>
</provider>
</extension>
org.eclipse.jst.common.project.facet.core.libprov.user.UserL ibraryProviderInstallOperationConfig
|
|
|
Re: Library Provider Framework [message #572069 is a reply to message #485120] |
Thu, 10 September 2009 15:07  |
Eclipse User |
|
|
|
>> 1. Providers are enabled typically on per-facet basis. There are no
>> providers (at least that ship out of the box) that are enabled globally.
>
> except runtime-library-provider that will appear for every facet if
> there is a classpath entry in Target Runtime.
> I am creating Maven Library provider for the JBoss Portlet feature
> and would like to exclude this provider when the Runtime doesn't
> have any portlet component. As far as I could see, that is
> impossible.
You are quite right. The runtime-library-provider is global, but it only turns on when the runtime declares that it can provide classpath for a particular facet.
It sounds to me like there is a bug in JBoss plugin in that the runtime responds as capable of supplying classpath for the portal facet when the runtime in fact does not have the portal component.
- Konstantin
|
|
|
Powered by
FUDForum. Page generated in 0.03708 seconds