use of org.eclipse.sapphire.ui.ListSelectionService 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.ui.ListSelectionService in project liferay-ide by liferay.
the class ListSelectionEditHandler method run.
@Override
protected Object run(Presentation context) {
Object retval = null;
ListSelectionService selectionService = getSelectionService();
if (selectionService != null) {
List<Element> selection = selectionService.selection();
retval = edit(selection.get(0), context);
}
return retval;
}
Aggregations