Search in sources :

Example 21 with Listener

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

the class NewLiferayProfileIdDefaultValueService method initDefaultValueService.

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

        @Override
        protected void handleTypedEvent(PropertyContentEvent event) {
            refresh();
        }
    };
    NewLiferayProfile profile = _newLiferayProfile();
    profile.getRuntimeName().attach(listener);
}
Also used : FilteredListener(org.eclipse.sapphire.FilteredListener) PropertyContentEvent(org.eclipse.sapphire.PropertyContentEvent) FilteredListener(org.eclipse.sapphire.FilteredListener) Listener(org.eclipse.sapphire.Listener) NewLiferayProfile(com.liferay.ide.project.core.model.NewLiferayProfile)

Example 22 with Listener

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

the class ProjectTemplateNameValidationService method initValidationService.

@Override
protected void initValidationService() {
    super.initValidationService();
    NewLiferayModuleProjectOp op = context(NewLiferayModuleProjectOp.class);
    ProjectTemplateNamePossibleValuesService pvs = op.property(NewLiferayModuleProjectOp.PROP_PROJECT_TEMPLATE_NAME).service(ProjectTemplateNamePossibleValuesService.class);
    Set<String> templateNames = pvs.values();
    if (ListUtil.isNotEmpty(templateNames)) {
        _templateNameStatus = Status.createOkStatus();
    } else {
        pvs.attach(new Listener() {

            @Override
            public void handle(Event event) {
                _templateNameStatus = Status.createOkStatus();
                refresh();
            }
        });
    }
}
Also used : Listener(org.eclipse.sapphire.Listener) Event(org.eclipse.sapphire.Event)

Example 23 with Listener

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

the class ModuleProjectGroupIdDefaultValueService 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);
    op.getPackageName().attach(listener);
}
Also used : FilteredListener(org.eclipse.sapphire.FilteredListener) PropertyContentEvent(org.eclipse.sapphire.PropertyContentEvent) FilteredListener(org.eclipse.sapphire.FilteredListener) Listener(org.eclipse.sapphire.Listener)

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