Search in sources :

Example 1 with PropertyContentEvent

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

the class TaskScriptedAssignmentCondition method initCondition.

@Override
protected void initCondition(ISapphirePart part, String parameter) {
    super.initCondition(part, parameter);
    Task task = _task();
    Listener assignmentTypeListener = new FilteredListener<PropertyContentEvent>() {

        @Override
        public void handleTypedEvent(PropertyContentEvent event) {
            updateConditionState();
        }
    };
    if (task != null) {
        task.attach(assignmentTypeListener, Task.PROP_SCRIPTED_ASSIGNMENT.name());
    }
    updateConditionState();
}
Also used : FilteredListener(org.eclipse.sapphire.FilteredListener) PropertyContentEvent(org.eclipse.sapphire.PropertyContentEvent) Task(com.liferay.ide.kaleo.core.model.Task) FilteredListener(org.eclipse.sapphire.FilteredListener) Listener(org.eclipse.sapphire.Listener)

Example 2 with PropertyContentEvent

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

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

the class SDKLocationValidationService method initValidationService.

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

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

Example 4 with PropertyContentEvent

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

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

the class ProjectNameValidationService method initValidationService.

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

        @Override
        protected void handleTypedEvent(PropertyContentEvent event) {
            PropertyDef def = event.property().definition();
            if (!def.equals(NewLiferayPluginProjectOp.PROP_DISPLAY_NAME) && !def.equals(NewLiferayPluginProjectOp.PROP_FINAL_PROJECT_NAME) && !def.equals(NewLiferayPluginProjectOp.PROP_PORTLET_NAME) && !def.equals(NewLiferayPluginProjectOp.PROP_PROJECT_NAMES) && !def.equals(NewLiferayPluginProjectOp.PROP_PROJECT_NAME)) {
                try {
                    refresh();
                } catch (Exception e) {
                    ProjectCore.logError(e);
                }
            }
        }
    };
    NewLiferayPluginProjectOp op = _op();
    op.attach(_listener, "*");
}
Also used : PropertyContentEvent(org.eclipse.sapphire.PropertyContentEvent) PropertyDef(org.eclipse.sapphire.PropertyDef) NewLiferayPluginProjectOp(com.liferay.ide.project.core.model.NewLiferayPluginProjectOp) CoreException(org.eclipse.core.runtime.CoreException)

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