use of org.eclipse.wst.common.frameworks.datamodel.IDataModelProvider in project liferay-ide by liferay.
the class LiferayMavenProjectConfigurator method _getNewLiferayFacetInstallAction.
private Action _getNewLiferayFacetInstallAction(String pluginType) {
Action retval = null;
IProjectFacetVersion newFacet = null;
IDataModelProvider dataModel = null;
if (ILiferayMavenConstants.PORTLET_PLUGIN_TYPE.equals(pluginType)) {
newFacet = IPluginFacetConstants.LIFERAY_PORTLET_PROJECT_FACET.getDefaultVersion();
dataModel = new MavenPortletPluginFacetInstallProvider();
} else if (ILiferayMavenConstants.HOOK_PLUGIN_TYPE.equals(pluginType)) {
newFacet = IPluginFacetConstants.LIFERAY_HOOK_PROJECT_FACET.getDefaultVersion();
dataModel = new MavenHookPluginFacetInstallProvider();
} else if (ILiferayMavenConstants.EXT_PLUGIN_TYPE.equals(pluginType)) {
newFacet = IPluginFacetConstants.LIFERAY_EXT_PROJECT_FACET.getDefaultVersion();
dataModel = new MavenExtPluginFacetInstallProvider();
} else if (ILiferayMavenConstants.LAYOUTTPL_PLUGIN_TYPE.equals(pluginType)) {
newFacet = IPluginFacetConstants.LIFERAY_LAYOUTTPL_PROJECT_FACET.getDefaultVersion();
dataModel = new MavenLayoutTplPluginFacetInstallProvider();
} else if (ILiferayMavenConstants.THEME_PLUGIN_TYPE.equals(pluginType)) {
newFacet = IPluginFacetConstants.LIFERAY_THEME_PROJECT_FACET.getDefaultVersion();
dataModel = new MavenThemePluginFacetInstallProvider();
} else if (ILiferayMavenConstants.WEB_PLUGIN_TYPE.equals(pluginType)) {
newFacet = IPluginFacetConstants.LIFERAY_WEB_PROJECT_FACET.getDefaultVersion();
dataModel = new MavenWebPluginFacetInstallProvider();
}
if (newFacet != null) {
IDataModel config = DataModelFactory.createDataModel(dataModel);
retval = new Action(Action.Type.INSTALL, newFacet, config);
}
return retval;
}
Aggregations