use of org.eclipse.sapphire.PropertyContentEvent in project liferay-ide by liferay.
the class ScriptPropertyEditorCondition method initCondition.
@Override
protected void initCondition(ISapphirePart part, String parameter) {
super.initCondition(part, parameter);
/*
* TODO replace with visible when
*
* SapphireIfElseDirectiveDef ifDef =
* this.getPart().definition().nearest( SapphireIfElseDirectiveDef.class
* );
*
* String param = ifDef.getConditionParameter().content();
*
* for( ScriptLanguageType type :
* ScriptLanguageType.class.getEnumConstants() ) { if(
* type.name().equals( param ) ) { this.paramType = type; break; } }
*/
Scriptable scriptable = _scriptable();
Listener listener = new FilteredListener<PropertyContentEvent>() {
@Override
protected void handleTypedEvent(PropertyContentEvent event) {
ScriptPropertyEditorCondition.this.updateConditionState();
}
};
scriptable.attach(listener, "ScriptLanguage");
}
use of org.eclipse.sapphire.PropertyContentEvent in project liferay-ide by liferay.
the class HookXmlEditor method adaptModel.
@Override
protected void adaptModel(Element model) {
super.adaptModel(model);
Listener listener = new FilteredListener<PropertyContentEvent>() {
@Override
public void handleTypedEvent(PropertyContentEvent event) {
handleCustomJspsPropertyChangedEvent(event);
}
};
_ignoreCustomModelChanges = true;
// $NON-NLS-1$
model.attach(listener, Hook.PROP_CUSTOM_JSPS.name() + "/*");
_ignoreCustomModelChanges = false;
}
use of org.eclipse.sapphire.PropertyContentEvent 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.PropertyContentEvent in project liferay-ide by liferay.
the class WindowStatesPossibleValueService method initPossibleValuesService.
@Override
protected void initPossibleValuesService() {
super.initPossibleValuesService();
PortletApp portletApp = context(PortletApp.class);
Listener listener = new FilteredListener<PropertyContentEvent>() {
@Override
protected void handleTypedEvent(PropertyContentEvent event) {
refreshValues();
}
};
portletApp.attach(listener, PortletApp.PROP_CUSTOM_WINDOW_STATES.name());
refreshValues();
portletApp.attach(new FilteredListener<ElementDisposeEvent>() {
@Override
protected void handleTypedEvent(ElementDisposeEvent event) {
portletApp.detach(listener, PortletApp.PROP_CUSTOM_WINDOW_STATES.name());
}
});
this.initialized = true;
}
use of org.eclipse.sapphire.PropertyContentEvent in project liferay-ide by liferay.
the class SDKImportDerivedValueService method initDerivedValueService.
@Override
protected void initDerivedValueService() {
super.initDerivedValueService();
_listener = new FilteredListener<PropertyContentEvent>() {
@Override
protected void handleTypedEvent(PropertyContentEvent event) {
refresh();
}
};
ParentSDKProjectImportOp op = _op();
op.property(ParentSDKProjectImportOp.PROP_SDK_LOCATION).attach(_listener);
}
Aggregations