use of org.eclipse.sapphire.Listener in project liferay-ide by liferay.
the class GroupIdDefaultValueService method initDefaultValueService.
@Override
protected void initDefaultValueService() {
super.initDefaultValueService();
Listener listener = new FilteredListener<PropertyContentEvent>() {
@Override
protected void handleTypedEvent(PropertyContentEvent event) {
refresh();
}
};
NewLiferayPluginProjectOp op = _op();
op.getLocation().attach(listener);
op.getProjectName().attach(listener);
}
use of org.eclipse.sapphire.Listener in project liferay-ide by liferay.
the class PluginTypeValidationService method initValidationService.
@Override
protected void initValidationService() {
super.initValidationService();
Listener listener = new FilteredListener<PropertyContentEvent>() {
@Override
protected void handleTypedEvent(PropertyContentEvent event) {
refresh();
}
};
NewLiferayPluginProjectOp op = _op();
op.getProjectProvider().attach(listener);
}
use of org.eclipse.sapphire.Listener in project liferay-ide by liferay.
the class ColumnImageService method initImageService.
@Override
protected void initImageService() {
_listener = new FilteredListener<PropertyEvent>() {
@Override
protected void handleTypedEvent(PropertyEvent event) {
refresh();
}
};
context(Element.class).attach(_listener, Column.PROP_PRIMARY.name());
attach(new Listener() {
@Override
public void handle(Event event) {
if (event instanceof DisposeEvent) {
context(Element.class).detach(_listener, Column.PROP_PRIMARY.name());
}
}
});
}
use of org.eclipse.sapphire.Listener in project liferay-ide by liferay.
the class AddFilesFromOSGiBundleAction method init.
@Override
public void init(SapphireAction action, ActionHandlerDef def) {
super.init(action, def);
final Element element = getModelElement();
final Listener listener = new FilteredListener<PropertyContentEvent>() {
@Override
protected void handleTypedEvent(PropertyContentEvent event) {
refreshEnablementState();
}
};
element.attach(listener, NewModuleFragmentOp.PROP_HOST_OSGI_BUNDLE.name());
attach(new Listener() {
@Override
public void handle(final Event event) {
if (event instanceof DisposeEvent) {
element.detach(listener, NewModuleFragmentOp.PROP_HOST_OSGI_BUNDLE.name());
}
}
});
}
use of org.eclipse.sapphire.Listener 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");
}
Aggregations