Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » How to create a project with own created moduleType
How to create a project with own created moduleType [message #1184354] Wed, 13 November 2013 06:44
Wei Zhou is currently offline Wei Zhou
Messages: 1
Registered: November 2013
Junior Member
Hi all, I'm trying to develop a plugin for Eclipse. It creates a new own runtime server and a new own moduleType. The problem is that I can't assign this moduleType to a project by installing the facet. The question is how can I install my own moduleType to a project and be able to use it in my own runtime server. Here is my code:

<plugin>

<extension point="org.eclipse.wst.server.core.moduleTypes">
<moduleType
id="com.conwet.applicationmashup.mac"
name="Mashable Application Component"
description="New module created."/>
</extension>
<!--org.eclipse.wst.server.core.model.ModuleFactoryDelegate-->
<extension
point="org.eclipse.wst.server.core.moduleFactories">
<moduleFactory
class="com.conwet.wirecloud.WirecloudModuleFactory"
id="com.conwet.wirecloud.my.ModuleFactory"
projects="true">
<moduleType
types="com.conwet.applicationmashup.mac"
versions="1.0">
</moduleType>
</moduleFactory>
</extension>

<extension
point="org.eclipse.wst.server.core.runtimeTypes">
<runtimeType
id="org.eclipsewtp.server.wirecloud.runtime"
class="org.eclipse.jst.server.generic.core.internal.GenericServerRuntime"
description="Wirecloud"
name="Wirecloud"
vendor="CoNWeTLab"
vendorId="conwet"
version="1.0">
<moduleType types="com.conwet.applicationmashup.mac" version="1.0"/>

<moduleType types="jst.web" versions="2.2, 2.3, 2.4, 2.5, 3.0, 3.1"/>
</runtimeType>
</extension>

<!-- org.eclipse.jst.server.generic.core.internal.ExternalServerBehaviour-->
<extension
point="org.eclipse.wst.server.core.serverTypes">
<serverType
id="org.eclipsewtp.server.wirecloud.server"
runtime="true"
runtimeTypeId="org.eclipsewtp.server.wirecloud.runtime"
name="Wirecloud"
description="Wirecloud"
class="com.conwet.wirecloud.WirecloudServer"
behaviourClass="com.conwet.wirecloud.WirecloudServerBehaviour"

hasConfiguration="false"
initialState="stopped"
launchConfigId="org.eclipse.jst.server.generic.core
.ExternalLaunchConfigurationType"
launchModes="run,debug"
startBeforePublish="true"
startTimeout="120000"
stopTimeout="15000"
supportsRemoteHosts="true"/>
</extension>

<extension
point="org.eclipse.jst.server.core.runtimeClasspathProviders">
<runtimeClasspathProvider
class="org.eclipse.jst.server.generic.core.internal
.GenericServerRuntimeTargetHandler"
id="org.eclipsewtp.jst.server.generic.wirecloud
.runtimeClasspathProvider"
runtimeTypeIds="org.eclipsewtp.server.wirecloud.*"/>
</extension>

<extension
point="org.eclipse.wst.common.project.facet.core.runtimes">
<runtime-component-type id="org.eclipsewtp.server.wirecloud"/>
<runtime-component-version type="org.eclipsewtp.server.wirecloud" version="1.0"/>

<adapter>
<runtime-component id="org.eclipsewtp.server.wirecloud" />
<factory
class="org.eclipse.jst.server.core.internal.RuntimeClasspathProvider$Factory"/>
<type
class="org.eclipse.jst.common.project.facet.core.IClasspathProvider"/>
</adapter>
<adapter>
<runtime-component id="org.eclipsewtp.server.wirecloud"/>
<factory
class="org.eclipse.jst.server.ui.internal.RuntimeLabelProvider$Factory"/>
<type
class="org.eclipse.wst.common.project.facet.ui.IRuntimeComponentLabelProvider"/>
</adapter>


<supported>
<runtime-component id="org.eclipsewtp.server.wirecloud" version="1.0"/>
<facet id="com.conwet.applicationmashup.mac"/>
<facet id="jst.web"/>
</supported>


</extension>

<extension point="org.eclipse.jst.server.core.runtimeFacetMappings">
<runtimeFacetMapping
runtimeTypeId="org.eclipsewtp.server.wirecloud.runtime"
runtime-component="org.eclipsewtp.server.wirecloud"
version="1.0"/>
</extension>

<extension point="org.eclipse.wst.common.project.facet.core.facets">
<project-facet id="com.conwet.applicationmashup.mac">
<label>Mashable Application Component</label>
<description>Enables the project to be deployed as a Mashable Application Component.</description>
</project-facet>
<project-facet-version facet="com.conwet.applicationmashup.mac" version="1.0">

<action type="INSTALL">
<delegate class="com.conwet.wirecloud.MACFacetInstallDelegate"/>
</action>
<action type="UNINSTALL">
<delegate class="com.conwet.wirecloud.MACFacetUninstallDelegate"/>
</action>
</project-facet-version>

</extension>

If I install dynamic web module facet to a project, my runtime server could detect jst.web moduleType, but it is impossible to detect my own moduleType. Please help! Thanks
Previous Topic:Webservice client project option missing
Next Topic:utility project to reference EAR libraries
Goto Forum:
  


Current Time: Fri Jul 25 16:51:39 EDT 2014

Powered by FUDForum. Page generated in 0.01545 seconds