Line | |
---|
1 | /* |
---|
2 | * generated by Xtext |
---|
3 | */ |
---|
4 | package de.ugoe.cs.swe.bnftools.ui.labeling |
---|
5 | |
---|
6 | import com.google.inject.Inject |
---|
7 | import de.ugoe.cs.swe.bnftools.ebnf.ImportSection
|
---|
8 | import de.ugoe.cs.swe.bnftools.ebnf.Rule
|
---|
9 | import de.ugoe.cs.swe.bnftools.ebnf.BnfEntry
|
---|
10 | import de.ugoe.cs.swe.bnftools.ebnf.DefinitionList
|
---|
11 | import de.ugoe.cs.swe.bnftools.ebnf.SingleDefinition
|
---|
12 | import de.ugoe.cs.swe.bnftools.ebnf.Term
|
---|
13 | import de.ugoe.cs.swe.bnftools.ebnf.Atom
|
---|
14 | import de.ugoe.cs.swe.bnftools.ebnf.StringRule
|
---|
15 |
|
---|
16 | /** |
---|
17 | * Provides labels for a EObjects. |
---|
18 | * |
---|
19 | * see http://www.eclipse.org/Xtext/documentation.html#labelProvider |
---|
20 | */ |
---|
21 | class EbnfLabelProvider extends org.eclipse.xtext.ui.label.DefaultEObjectLabelProvider { |
---|
22 | |
---|
23 | @Inject |
---|
24 | new(org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider delegate) { |
---|
25 | super(delegate); |
---|
26 | } |
---|
27 | |
---|
28 | def text(ImportSection sec){ |
---|
29 | 'Imports' |
---|
30 | } |
---|
31 | |
---|
32 | def text(BnfEntry entry){ |
---|
33 | 'BnfEntry' |
---|
34 | } |
---|
35 | |
---|
36 | def text(Rule rule){ |
---|
37 | 'Rule: '+rule.name |
---|
38 | } |
---|
39 | |
---|
40 | def text(DefinitionList dlist){ |
---|
41 | 'Definition List' |
---|
42 | } |
---|
43 | |
---|
44 | def text(SingleDefinition sdef){ |
---|
45 | 'Single Definition' |
---|
46 | } |
---|
47 | |
---|
48 | def text(Term term){ |
---|
49 | 'Term' |
---|
50 | } |
---|
51 | |
---|
52 | def text(Atom atom){ |
---|
53 | 'Atom' |
---|
54 | } |
---|
55 | |
---|
56 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.