开发者

Create eclipse modeling project

I am trying to create eclipse modeling project with specific templates programatically like we create Dynamic web and java projects. I couldnot find the way at all. Can some give me a feed?

It Would be greate, If you could tell me which eclipse plugin or package that i need to use at least.


Thanks for your input. I want to make my question more clear. I am developing a plugin to setup workspace, which will create various types of projects (java, web, general project etc) programmatically. For eg. Below is code snippet from my plugin for creating web project.

IDataModel model = DataModelFactory.cre开发者_StackOverflow中文版ateDataModel(new WebFacetProjectCreationDataModelProvider());
model.setProperty(IFacetDataModelProperties.FACET_PROJECT_NAME, "WebTest1");

FacetDataModelMap map = (FacetDataModelMap) model
      .getProperty(IFacetProjectCreationDataModelProperties.FACET_DM_MAP);
IDataModel webModel = (IDataModel) map.get(IModuleConstants.JST_WEB_MODULE);
webModel.setProperty(IJ2EEModuleFacetInstallDataModelProperties.FACET_VERSION_STR, "2.4");
webModel.setBooleanProperty(IJ2EEModuleFacetInstallDataModelProperties.ADD_TO_EAR, true);
model.getDefaultOperation().execute(new NullProgressMonitor(), null);

Like above, is there any way to create modeling project? We have projects with modeling nature to be created while setting up the workspace.

Thanks.


Sebastian,

Regarding the package you should use, your question make it clear : the modeling package. From the Eclipse download page, download "Eclipse Modeling Tools". That will give you a good starting point w.r.t the plugins you should have installed.

With this, simply launch this Eclipse and use File > New... to find the Modeling related wizards; they are located in the category "Eclipse Modeling Framework". Creating a "Modeling Project" is the "EMF Project" wizard. You should read the EMF (Eclipse Modeling Framework) tutorials in order to get you started. You can find a number of them on the EMF Documentation page.

If you wish to install new modeling-related components that are not by default in the bundle, you can use the new "install modeling components" item in the "Help" menu. Use this to open the modeling discovery UI. You can also find this explanation on the Acceleo Download Page (steps 1 and 2).

Hope this helps.


I'd look at Xtext and Xpand: with Xtext you could create textual models, and with Xpand you could generate code from it, and the two are integrated well to make the start easy.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜