use of org.eclipse.jst.common.project.facet.core.libprov.EnablementExpressionContext in project liferay-ide by liferay.
the class LiferayRuntimePropertyTester method test.
public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
boolean retval = false;
try {
EnablementExpressionContext ctx = (EnablementExpressionContext) receiver;
IFacetedProjectBase projectBase = ctx.getFacetedProject();
IRuntime serverRuntime = FacetUtil.getRuntime(projectBase.getPrimaryRuntime());
String runtimeId = serverRuntime.getRuntimeType().getId();
if (runtimeId.startsWith("com.liferay.")) {
retval = true;
}
} catch (Throwable t) {
// don't log error just means test returns false;
}
return retval;
}
Aggregations