Skip to main content
summaryrefslogtreecommitdiffstats
blob: 063d26b676d2a1444bbb11a15ef8f7099e9adc31 (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
package org.eclipse.papyrus.moka.fuml.presentation;

import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.model.IValue;
import org.eclipse.papyrus.moka.fuml.FUMLExecutionEngine;
import org.eclipse.papyrus.moka.fuml.Semantics.Classes.Kernel.FeatureValue;
import org.eclipse.swt.graphics.Image;

public class MokaVariable_from_FeatureValue extends MokaVariable_for_fUML {
	
	protected FeatureValue featureValue ;
	
	protected IValue value ;

	public MokaVariable_from_FeatureValue(FeatureValue featureValue) {
		super() ;
		this.featureValue = featureValue ;
		this.name = featureValue.feature.getName() ;
	}

	////////////////////////
	// Presentation
	////////////////////////
	
	@Override
	public Image getImage() {
		return FUMLExecutionEngine.getImage(featureValue.feature);
	}

	////////////////////////
	// Debug
	////////////////////////
	
	@Override
	public IValue getValue() throws DebugException {
		if (this.value == null) {
			this.value = new MokaValue_from_FeatureValue(featureValue) ;
		}
		return this.value;
	}
	
}

Back to the top