use of org.eclipse.sapphire.java.JavaTypeConstraint in project liferay-ide by liferay.
the class ServiceImplJavaTypeConstraintService method initJavaTypeConstraintService.
@Override
protected void initJavaTypeConstraintService() {
super.initJavaTypeConstraintService();
Property property = context().find(Property.class);
JavaTypeConstraint javaTypeConstraintAnnotation = property.definition().getAnnotation(JavaTypeConstraint.class);
Set<JavaTypeKind> kind = EnumSet.noneOf(JavaTypeKind.class);
for (JavaTypeKind k : javaTypeConstraintAnnotation.kind()) {
kind.add(k);
}
_kinds = kind;
_behavior = javaTypeConstraintAnnotation.behavior();
_service = context(ServiceWrapper.class);
Listener listener = new FilteredListener<PropertyContentEvent>() {
@Override
public void handleTypedEvent(PropertyContentEvent event) {
refresh();
}
};
_service.attach(listener, "ServiceType");
}
use of org.eclipse.sapphire.java.JavaTypeConstraint in project liferay-ide by liferay.
the class HierarchyBrowseActionHandler method _getClassReferenceType.
private String _getClassReferenceType(Property property) {
JavaTypeConstraint typeConstraint = property.definition().getAnnotation(JavaTypeConstraint.class);
String retval = Arrays.toString(typeConstraint.type()).replaceAll("[\\[\\]\\s,]", "");
return retval;
}
Aggregations