use of org.eclipse.sapphire.modeling.ElementDisposeEvent 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;
}
Aggregations