use of org.eclipse.wst.common.project.facet.core.IProjectFacetVersion 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;
}
use of org.eclipse.wst.common.project.facet.core.IProjectFacetVersion in project mdw-designer by CenturyLinkCloud.
the class WorkflowProjectPage method setWizardContext.
public void setWizardContext(IWizardContext wizardContext) {
IProjectFacetVersion workflowProjectFacetVersion = null;
boolean hasJava16Facet = false;
for (Object selectedFacetVersion : wizardContext.getSelectedProjectFacets()) {
IProjectFacetVersion projectFacetVersion = (IProjectFacetVersion) selectedFacetVersion;
if (projectFacetVersion.getProjectFacet().getId().equals("mdw.workflow"))
workflowProjectFacetVersion = projectFacetVersion;
else if (projectFacetVersion.getProjectFacet().getId().equals("java") && Float.parseFloat(projectFacetVersion.getVersionString()) >= 1.6)
hasJava16Facet = true;
}
if (workflowProjectFacetVersion != null) {
setProject((WorkflowProject) wizardContext.getAction(IFacetedProject.Action.Type.INSTALL, workflowProjectFacetVersion).getConfig());
if (hasJava16Facet) {
getProject().setCloudProject(true);
}
}
}
Aggregations