Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: d7ace5a145e9bfe0ea7297898e2f178358e2f706 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*****************************************************************************
 * Copyright (c) 2014 CEA LIST.
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *  CEA LIST - Initial API and implementation
 *
 *****************************************************************************/
package org.eclipse.papyrus.uml.tools.elementtypesconfigurations.applystereotypeadviceconfiguration;

import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice;
import org.eclipse.papyrus.infra.elementtypesconfigurations.AbstractAdviceBindingConfiguration;
import org.eclipse.papyrus.infra.elementtypesconfigurations.factories.impl.AbstractAdviceBindingFactory;
import org.eclipse.papyrus.infra.elementtypesconfigurations.impl.NullEditHelperAdvice;

public class ApplyStereotypeAdviceFactory extends AbstractAdviceBindingFactory<AbstractAdviceBindingConfiguration> {


	@Override
	protected IEditHelperAdvice getEditHelperAdvice(AbstractAdviceBindingConfiguration adviceConfiguration) {
		if (adviceConfiguration instanceof ApplyStereotypeAdviceConfiguration) {
			IEditHelperAdvice editHelperAdvice = new ApplyStereotypeAdviceEditHelperAdvice((ApplyStereotypeAdviceConfiguration) adviceConfiguration);
			return editHelperAdvice;
		}
		return NullEditHelperAdvice.getInstance();
	}


}

Back to the top