use of org.eclipse.sapphire.Listener in project liferay-ide by liferay.
the class CurrentAssignmentsCondition method initCondition.
@Override
protected void initCondition(ISapphirePart part, String parameter) {
super.initCondition(part, parameter);
_parameter = parameter;
Assignable assignable = _op();
Listener assignmentTypeListener = new FilteredListener<PropertyContentEvent>() {
@Override
public void handleTypedEvent(PropertyContentEvent event) {
updateConditionState();
}
};
assignable.attach(assignmentTypeListener, "*");
updateConditionState();
}
use of org.eclipse.sapphire.Listener in project liferay-ide by liferay.
the class ListSelectionEditHandler method init.
@Override
public void init(SapphireAction action, ActionHandlerDef def) {
super.init(action, def);
ImageData typeImage = typeImage();
if (typeImage != null) {
addImage(typeImage);
}
ListSelectionService selectionService = action.getPart().service(ListSelectionService.class);
Listener selectionListener = new Listener() {
@Override
public void handle(Event event) {
refreshEnablementState();
}
};
if (selectionService != null) {
selectionService.attach(selectionListener);
}
}
use of org.eclipse.sapphire.Listener in project liferay-ide by liferay.
the class ModuleProjectArtifactVersionDefaultValueService method initDefaultValueService.
@Override
protected void initDefaultValueService() {
super.initDefaultValueService();
Listener listener = new FilteredListener<PropertyContentEvent>() {
@Override
protected void handleTypedEvent(PropertyContentEvent event) {
refresh();
}
};
NewLiferayModuleProjectOp op = _op();
op.getLocation().attach(listener);
op.getProjectName().attach(listener);
}
use of org.eclipse.sapphire.Listener in project liferay-ide by liferay.
the class LiferayVersionDefaultValueService method initDefaultValueService.
@Override
protected void initDefaultValueService() {
super.initDefaultValueService();
PropertyDef def = context().find(PropertyDef.class);
Property property = context(Element.class).property(def);
PossibleValuesService possibleValuesService = property.service(PossibleValuesService.class);
possibleValuesService.attach(new Listener() {
@Override
public void handle(Event event) {
_possibleValues = possibleValuesService.values();
refresh();
}
});
NewLiferayProfile profile = context(NewLiferayProfile.class);
profile.property(NewLiferayProfile.PROP_RUNTIME_NAME).attach(new FilteredListener<PropertyContentEvent>() {
@Override
protected void handleTypedEvent(PropertyContentEvent event) {
_possibleValues = possibleValuesService.values();
_runtimeVersion = null;
refresh();
}
});
_possibleValues = possibleValuesService.values();
}
use of org.eclipse.sapphire.Listener in project liferay-ide by liferay.
the class ArtifactVersionDefaultValueService method initDefaultValueService.
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);
}
Aggregations