Search in sources :

Example 6 with Listener

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();
}
Also used : FilteredListener(org.eclipse.sapphire.FilteredListener) PropertyContentEvent(org.eclipse.sapphire.PropertyContentEvent) FilteredListener(org.eclipse.sapphire.FilteredListener) Listener(org.eclipse.sapphire.Listener) Assignable(com.liferay.ide.kaleo.core.model.Assignable)

Example 7 with Listener

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);
    }
}
Also used : Listener(org.eclipse.sapphire.Listener) ImageData(org.eclipse.sapphire.ImageData) Event(org.eclipse.sapphire.Event) ListSelectionService(org.eclipse.sapphire.ui.ListSelectionService)

Example 8 with Listener

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);
}
Also used : FilteredListener(org.eclipse.sapphire.FilteredListener) PropertyContentEvent(org.eclipse.sapphire.PropertyContentEvent) FilteredListener(org.eclipse.sapphire.FilteredListener) Listener(org.eclipse.sapphire.Listener)

Example 9 with 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();
}
Also used : PossibleValuesService(org.eclipse.sapphire.PossibleValuesService) PropertyContentEvent(org.eclipse.sapphire.PropertyContentEvent) FilteredListener(org.eclipse.sapphire.FilteredListener) Listener(org.eclipse.sapphire.Listener) PropertyDef(org.eclipse.sapphire.PropertyDef) Element(org.eclipse.sapphire.Element) NewLiferayProfile(com.liferay.ide.project.core.model.NewLiferayProfile) PropertyContentEvent(org.eclipse.sapphire.PropertyContentEvent) Event(org.eclipse.sapphire.Event) Property(org.eclipse.sapphire.Property)

Example 10 with Listener

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);
}
Also used : FilteredListener(org.eclipse.sapphire.FilteredListener) PropertyContentEvent(org.eclipse.sapphire.PropertyContentEvent) FilteredListener(org.eclipse.sapphire.FilteredListener) Listener(org.eclipse.sapphire.Listener) NewLiferayPluginProjectOp(com.liferay.ide.project.core.model.NewLiferayPluginProjectOp)

Aggregations

Listener (org.eclipse.sapphire.Listener)23 FilteredListener (org.eclipse.sapphire.FilteredListener)20 PropertyContentEvent (org.eclipse.sapphire.PropertyContentEvent)14 Event (org.eclipse.sapphire.Event)10 Element (org.eclipse.sapphire.Element)7 PropertyEvent (org.eclipse.sapphire.PropertyEvent)6 DisposeEvent (org.eclipse.sapphire.DisposeEvent)5 NewLiferayPluginProjectOp (com.liferay.ide.project.core.model.NewLiferayPluginProjectOp)3 Property (org.eclipse.sapphire.Property)3 NewLiferayProfile (com.liferay.ide.project.core.model.NewLiferayProfile)2 PropertyDef (org.eclipse.sapphire.PropertyDef)2 ValueProperty (org.eclipse.sapphire.ValueProperty)2 ServiceWrapper (com.liferay.ide.hook.core.model.ServiceWrapper)1 Assignable (com.liferay.ide.kaleo.core.model.Assignable)1 Scriptable (com.liferay.ide.kaleo.core.model.Scriptable)1 Task (com.liferay.ide.kaleo.core.model.Task)1 LayoutTplElement (com.liferay.ide.layouttpl.core.model.LayoutTplElement)1 PortletApp (com.liferay.ide.portlet.core.model.PortletApp)1 IFile (org.eclipse.core.resources.IFile)1 ImageData (org.eclipse.sapphire.ImageData)1