@@ -0,0 +1,1845 @@
+/**%0A * Copyright (C) 2006-2017 Talend Inc. - www.talend.com%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A * http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage org.talend.sdk.component.studio.model.parameter.listener;%0A%0Aimport java.beans.PropertyChangeEvent;%0Aimport java.beans.PropertyChangeListener;%0A%0Aimport org.talend.core.model.process.IElementParameter;%0A%0Aimport lombok.RequiredArgsConstructor;%0A%0A/**%0A * %7B@link PropertyChangeListener%7D, which activates/deactivates %7B@link IElementParameter%7D according target%0A * %7B@link IElementParameter%7D new value%0A * If new value is the same as one of specified %3Ccode%3Evalues%3C/code%3E, then %7B@link ParameterActivator%7D activates (shows)%0A * %7B@link IElementParameter%7D.%0A * Else it deactivates %7B@link IElementParameter%7D%0A */%0A@RequiredArgsConstructor%0Apublic class ParameterActivator implements PropertyChangeListener %7B%0A%0A    private final String%5B%5D values;%0A%0A    private final IElementParameter parameter;%0A%0A    @Override%0A    public void propertyChange(final PropertyChangeEvent event) %7B%0A        if (test(event.getNewValue())) %7B%0A            parameter.setShow(true);%0A        %7D else %7B%0A            parameter.setShow(false);%0A        %7D%0A    %7D%0A%0A    boolean test(final Object newValue) %7B%0A        for (String value : values) %7B%0A            if (value.equals(String.valueOf(newValue))) %7B%0A                return true;%0A            %7D%0A        %7D%0A        return false;%0A    %7D%0A%0A%7D%0A

implement ParameterActivator listener