01: package org.drools.eclipse.dsl.editor;
02:
03: import java.util.HashSet;
04: import java.util.Set;
05:
06: import org.drools.lang.dsl.DefaultDSLMapping;
07:
08: /**
09: * This extends the compilers DSL grammar implementation to provide
10: * change listener support.
11: *
12: * @author Michael Neale
13: *
14: */
15: public class NLGrammarModel extends DefaultDSLMapping {
16:
17: private static final long serialVersionUID = 400L;
18:
19: private Set changeListeners = new HashSet();
20:
21: /**
22: * @param viewer
23: */
24: public void removeChangeListener(IMappingListViewer viewer) {
25: changeListeners.remove(viewer);
26: }
27:
28: /**
29: * @param viewer
30: */
31: public void addChangeListener(IMappingListViewer viewer) {
32: changeListeners.add(viewer);
33: }
34:
35: }
|