blob: a933282ca9ceb6e70ab06ac37f3164d0d3284fdd (
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
34
35
36
37
38
39
40
41
42
43
|
/*****************************************************************************
* 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 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* CEA LIST - Initial API and implementation
* Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - add createAdviceBindingConfiguration method
*
*****************************************************************************/
package org.eclipse.papyrus.infra.types.core.factories.impl;
import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice;
import org.eclipse.papyrus.infra.tools.util.ClassLoaderHelper;
import org.eclipse.papyrus.infra.types.AbstractAdviceBindingConfiguration;
import org.eclipse.papyrus.infra.types.AdviceBindingConfiguration;
import org.eclipse.papyrus.infra.types.ElementTypesConfigurationsFactory;
public class DefaultAdviceBindingFactory extends AbstractAdviceBindingFactory<AdviceBindingConfiguration> {
/**
* {@inheritDoc}
*/
@Override
protected IEditHelperAdvice getEditHelperAdvice(final AdviceBindingConfiguration adviceConfiguration) {
IEditHelperAdvice editHelperAdvice = ClassLoaderHelper.newInstance(adviceConfiguration.getEditHelperAdviceClassName(), IEditHelperAdvice.class);
return editHelperAdvice;
}
/**
* {@inheritDoc}
*/
@Override
public AbstractAdviceBindingConfiguration createAdviceBindingConfiguration() {
return ElementTypesConfigurationsFactory.eINSTANCE.createAdviceBindingConfiguration();
}
}
|