Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [wtp-dev] RE: XDoclet Facet, and a tutorial

Naci,

There are a several problems that I spotted:

1. You need to remove <conflicts group="modules"/> and <group-member
id="modules"/> from your definitions. As it stands right now, you are
defining this facet to both conflict with and depend on jst.web.

2. You are missing this:

<extension point="org.eclipse.wst.common.project.facet.core.runtimes">

  <supported>
    <runtime-component any="true"/>
    <facet id="jst.web.xdoclet"/>
  </supported>
</extension>

This tells the framework that this facet does not place any constraints
on which runtimes it will run on, beyond what's placed by its dependency
(the jst.web facet). If that's not true (that is, if this facet is not
supported by all runtimes that support jst.web), then you need to
enumerate those runtimes that do support it.

3. You should not add jst.web.xdoclet as a fixed facet to the template.
Doing so will force its selection. Where you trying to make it selected
by default instead of fixed?

4. You don't need to add a wizard page unless you have some input to
gather from the user. If the only input is whether this facet should be
enabled or not then you don't need a wizard page.

- Konstantin


-----Original Message-----
From: wtp-dev-bounces@xxxxxxxxxxx [mailto:wtp-dev-bounces@xxxxxxxxxxx]
On Behalf Of Naci Dai
Sent: Tuesday, November 15, 2005 1:32 AM
To: General discussion of project-wide or architectural issues.
Cc: Ted Bashor; Chuck Bridgham
Subject: Re: [wtp-dev] RE: XDoclet Facet, and a tutorial

Kosta
 I tried a simple facet, but I cannot add it via the UI.  I attached the

plugin.xml .  I am trying to add it to the list of available facets for 
a dynamic web project...

Any ideas pointer?


---


 <extension point="org.eclipse.wst.common.project.facet.core.facets">

    <project-facet id="jst.web.xdoclet">
      <label>WebDoclet facet (XDoclet)</label>
      <description>Enables the project to run webdoclet post processing 
on annotated servlets.</description>
      <icon>icons/xdoclet.gif</icon>
    </project-facet>

 

    <project-facet-version facet="jst.web.xdoclet" version="1.2.3">
      <constraint>
        <and>
          <requires facet="jst.web" version="2.2" allow-newer="true"/>
          <conflicts group="modules"/>
        </and>
      </constraint>
      <group-member id="modules"/>
    </project-facet-version>
   
   <project-facet-version facet="jst.web.xdoclet" version="1.3.0">
      <constraint>
        <and>
          <requires facet="jst.web" version="2.2" allow-newer="true"/>
          <conflicts group="modules"/>
        </and>
      </constraint>
      <group-member id="modules"/>
    </project-facet-version>

   
    <action type="install" facet="jst.web.xdoclet" 
version="&gt;=1.2.3,&lt;=1.3.0">
      <delegate 
class="org.eclipse.jst.j2ee.ejb.annotations.internal.xdoclet.facet.XDocl
etWebFacetInstallDelegate"/>
      <config-factory 
class="org.eclipse.jst.j2ee.ejb.annotations.internal.xdoclet.facet.XDocl
etWebFacetInstallDataModelProvider"/>
    </action>

   
    <action type="runtime-changed" facet="jst.web.xdoclet" 
version="&gt;=1.2.1,&lt;=1.3.0">
      <delegate 
class="org.eclipse.jst.j2ee.ejb.annotations.internal.xdoclet.facet.XDocl
etWebFacetRuntimeChangedDelegate"/>
    </action>


   <!--  I AMNOT SURE ABOUT THIS ???? -->
    <template id="template.jst.web">
      <label>Dynamic Web Project with XDoclet</label>
      <fixed facet="jst.java"/>
      <fixed facet="jst.web"/>
      <fixed facet="jst.web.xdoclet" />
    </template>

  </extension>
 
   <!--  I AMNOT SURE ABOUT THIS ???? -->
  <extension point="org.eclipse.wst.common.project.facet.ui.wizard">
 
    <wizard-pages facet="jst.web.xdoclet" version="2.2">
      <install>
        <page class="??????"/>  <!-- What wizard page WEB?-->
      </install>
    </wizard-pages>
  </extension>
     

>Naci,
>
>The facet api can be found in:
>
>org.eclipse.wst.common.project.facet.core
>org.eclipse.jst.common.project.facet.core
>
>You could probably use the web facet as an example:
>
>org.eclipse.jst.j2ee.web
>  plugin.xml
>  project.facet.IWebFacetInstallDataModelProperties
>  project.facet.WebFacetInstallDataModelProvider
>  project.facet.WebFacetInstallDelegate
>  project.facet.WebFacetRuntimeChangedDelegate
>  project.facet.WebFacetVersionChangeDelegate
>
>org.eclipse.jst.servlet.ui
>  plugin.xml
>  project.facet.WebFacetInstallPage
>
>- Konstantin
>
>
>-----Original Message-----
>From: Naci Dai [mailto:naci.dai@xxxxxxxxxxxxx] 
>Sent: Tuesday, November 08, 2005 12:36 AM
>To: Konstantin Komissarchik
>Cc: Ted Bashor; Chuck Bridgham; General discussion of project-wide or
>architectural issues.
>Subject: XDoclet Facet, and a tutorial
>
>Hi Kosta,
>
>I would like to get this work started.  However, I need some pointers
to
>
>code, maybe a good pattern to follow when I implement the 
>xdoclet-facet.  As a follow-up, I want to turn it into a tutorial for 
>wanna be facet developers.
>
>
>
>
>
>
>_______________________________________________
>wtp-dev mailing list
>wtp-dev@xxxxxxxxxxx
>https://dev.eclipse.org/mailman/listinfo/wtp-dev
>
>  
>


-- 
Naci Dai,
eteration a.s. 
Inonu cad. Sumer sok. Zitas D1-15
Kozyatagi, Istanbul 34742
+90 (533) 580 2393 (cell)
+90 (216) 361 5434 (phone)
+90 (216) 361 2034 (fax)
http://www.eteration.com/
mailto:nacidai@xxxxxxx
mailto:naci@xxxxxxxxxxxxx

_______________________________________________
wtp-dev mailing list
wtp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/wtp-dev



Back to the top