Search in sources :

Example 6 with PropertyContentEvent

use of org.eclipse.sapphire.PropertyContentEvent in project liferay-ide by liferay.

the class TaskValidationService method initValidationService.

@Override
protected void initValidationService() {
    Assignable assignable = assignable();
    if (assignable != null) {
        _listener = new FilteredListener<PropertyContentEvent>() {

            @Override
            protected void handleTypedEvent(PropertyContentEvent event) {
                refresh();
            }
        };
        assignable.attach(_listener, "*");
    }
}
Also used : PropertyContentEvent(org.eclipse.sapphire.PropertyContentEvent) Assignable(com.liferay.ide.kaleo.core.model.Assignable)

Example 7 with PropertyContentEvent

use of org.eclipse.sapphire.PropertyContentEvent 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 8 with PropertyContentEvent

use of org.eclipse.sapphire.PropertyContentEvent in project liferay-ide by liferay.

the class LocationValidationService method initValidationService.

@Override
protected void initValidationService() {
    _listener = new FilteredListener<PropertyContentEvent>() {

        @Override
        protected void handleTypedEvent(PropertyContentEvent event) {
            refresh();
        }
    };
    NewLiferayPluginProjectOp op = _op();
    op.getProjectName().attach(_listener);
    op.getProjectProvider().attach(_listener);
}
Also used : PropertyContentEvent(org.eclipse.sapphire.PropertyContentEvent) NewLiferayPluginProjectOp(com.liferay.ide.project.core.model.NewLiferayPluginProjectOp)

Example 9 with PropertyContentEvent

use of org.eclipse.sapphire.PropertyContentEvent 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)

Example 10 with PropertyContentEvent

use of org.eclipse.sapphire.PropertyContentEvent in project liferay-ide by liferay.

the class DisplayNameDefaultValueService method initDefaultValueService.

@Override
protected void initDefaultValueService() {
    super.initDefaultValueService();
    _listener = new FilteredListener<PropertyContentEvent>() {

        @Override
        protected void handleTypedEvent(PropertyContentEvent event) {
            refresh();
        }
    };
    NewLiferayPluginProjectOp op = _op();
    op.property(NewLiferayPluginProjectOp.PROP_PROJECT_NAME).attach(_listener);
}
Also used : PropertyContentEvent(org.eclipse.sapphire.PropertyContentEvent) NewLiferayPluginProjectOp(com.liferay.ide.project.core.model.NewLiferayPluginProjectOp)

Aggregations

PropertyContentEvent (org.eclipse.sapphire.PropertyContentEvent)25 FilteredListener (org.eclipse.sapphire.FilteredListener)14 Listener (org.eclipse.sapphire.Listener)14 NewLiferayPluginProjectOp (com.liferay.ide.project.core.model.NewLiferayPluginProjectOp)10 Assignable (com.liferay.ide.kaleo.core.model.Assignable)2 NewLiferayProfile (com.liferay.ide.project.core.model.NewLiferayProfile)2 Element (org.eclipse.sapphire.Element)2 Event (org.eclipse.sapphire.Event)2 Property (org.eclipse.sapphire.Property)2 PropertyDef (org.eclipse.sapphire.PropertyDef)2 ServiceWrapper (com.liferay.ide.hook.core.model.ServiceWrapper)1 Scriptable (com.liferay.ide.kaleo.core.model.Scriptable)1 Task (com.liferay.ide.kaleo.core.model.Task)1 User (com.liferay.ide.kaleo.core.model.User)1 PortletApp (com.liferay.ide.portlet.core.model.PortletApp)1 ParentSDKProjectImportOp (com.liferay.ide.project.core.model.ParentSDKProjectImportOp)1 SDKProjectsImportOp (com.liferay.ide.project.core.model.SDKProjectsImportOp)1 CoreException (org.eclipse.core.runtime.CoreException)1 DisposeEvent (org.eclipse.sapphire.DisposeEvent)1 PossibleValuesService (org.eclipse.sapphire.PossibleValuesService)1