Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 58d4818e7e9b873f32c5a961ed93d06149673dc1 (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*****************************************************************************
 * 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.infra.types.core.impl;

import java.net.URL;

import org.eclipse.gmf.runtime.emf.type.core.IContainerDescriptor;
import org.eclipse.gmf.runtime.emf.type.core.IElementMatcher;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.emf.type.core.SpecializationType;
import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice;
import org.eclipse.papyrus.infra.types.ElementTypeConfiguration;
import org.eclipse.papyrus.infra.types.SpecializationTypeConfiguration;
import org.eclipse.papyrus.infra.types.core.IConfiguredHintedElementType;


public class ConfiguredHintedSpecializationElementType extends SpecializationType implements IConfiguredHintedElementType {

	private String semanticHint;

	private ElementTypeConfiguration configuration;

	/**
	 * @param id
	 * @param iconURL
	 * @param displayName
	 * @param elementTypes
	 * @param matcher
	 * @param descriptor
	 * @param editHelperAdvice
	 * @param iElementCreationValidator
	 */
	public ConfiguredHintedSpecializationElementType(String id, URL iconURL, String displayName, IElementType[] elementTypes, IElementMatcher matcher, IContainerDescriptor containerDescriptor, IEditHelperAdvice editHelperAdvice, String semanticHint,
			SpecializationTypeConfiguration configuration) {
		super(id, iconURL, displayName, elementTypes, matcher, containerDescriptor, editHelperAdvice);
		this.semanticHint = semanticHint;
		this.configuration = configuration;
	}

	public String getSemanticHint() {
		return semanticHint;
	}

	public void setSemanticHint(String semanticHint) {
		this.semanticHint = semanticHint;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public String toString() {
		return "Configured Specialization Type: " + getDisplayName() + " [" + getId() + "]";
	}

	/**
	 * @see org.eclipse.papyrus.infra.types.IConfiguredHintedElementType#getConfiguration()
	 *
	 * @return
	 */
	@Override
	public ElementTypeConfiguration getConfiguration() {
		return configuration;
	}
}

Back to the top