blob: be17bb2ad2a1b8eb0fbc1649131ba1b30b6529c7 (
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
|
package org.eclipse.papyrus.eastadl.service.types.filter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.papyrus.eastadl.service.types.elements.EastadlElementTypes;
import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
import org.eclipse.papyrus.uml.service.types.filter.ICommandFilter;
public class EastadlCommandFilter implements ICommandFilter {
public static final EastadlCommandFilter INSTANCE = new EastadlCommandFilter();
private EastadlCommandFilter() {
}
private List<IElementType> visibleCommands;
@Override
public List<IElementType> getVisibleCommands() {
if (visibleCommands == null) {
List<IElementType> localVisibleCommands = new ArrayList<IElementType>();
localVisibleCommands = new ArrayList<IElementType>();
localVisibleCommands.add(EastadlElementTypes.FUNCTION_ALLOCATE);
localVisibleCommands.add(UMLElementTypes.PROPERTY);
this.visibleCommands = Collections.unmodifiableList(localVisibleCommands);
}
return visibleCommands;
}
}
|