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