Changeset 84 in default for v2/trunk/de.ugoe.cs.swe.bnftools.ebnf.ui
- Timestamp:
- 07/02/14 13:59:44 (10 years ago)
- Location:
- v2/trunk/de.ugoe.cs.swe.bnftools.ebnf.ui
- Files:
-
- 1 added
- 1 deleted
- 3 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
v2/trunk/de.ugoe.cs.swe.bnftools.ebnf.ui/META-INF/MANIFEST.MF
r61 r84 16 16 org.eclipse.xtext.common.types.ui, 17 17 org.eclipse.xtext.ui.codetemplates.ui, 18 org.eclipse.compare 19 Import-Package: org.apache.log4j, 18 org.eclipse.compare, 19 org.eclipse.core.resources, 20 org.eclipse.ui.workbench, 21 org.eclipse.equinox.registry, 22 org.eclipse.emf.common, 23 com.google.inject, 24 org.eclipse.xtext 25 Import-Package: com.ibm.icu.util;version="50.1.1", 26 org.apache.log4j, 27 org.eclipse.xtext.generator, 20 28 org.eclipse.xtext.xbase.lib 21 29 Bundle-RequiredExecutionEnvironment: J2SE-1.5 22 Export-Package: de.ugoe.cs.swe.bnftools.ui.quickfix, 23 de.ugoe.cs.swe.bnftools.ui.contentassist, 24 de.ugoe.cs.swe.bnftools.ui.contentassist.antlr, 25 de.ugoe.cs.swe.bnftools.ui.internal 30 Export-Package: de.ugoe.cs.swe.bnftools.ui.contentassist, 31 de.ugoe.cs.swe.bnftools.ui.contentassist.antlr; 32 uses:="org.eclipse.xtext, 33 de.ugoe.cs.swe.bnftools.services, 34 org.eclipse.xtext.ui.editor.contentassist.antlr.internal, 35 org.eclipse.xtext.ui.codetemplates.ui.partialEditing, 36 org.eclipse.xtext.ui.editor.contentassist.antlr, 37 de.ugoe.cs.swe.bnftools.ui.contentassist.antlr.internal", 38 de.ugoe.cs.swe.bnftools.ui.handler;uses:="org.eclipse.xtext.ui.resource,org.eclipse.xtext.resource,org.eclipse.core.commands", 39 de.ugoe.cs.swe.bnftools.ui.internal;uses:="org.eclipse.ui.plugin,org.osgi.framework,com.google.inject", 40 de.ugoe.cs.swe.bnftools.ui.quickfix;uses:="org.eclipse.xtext.ui.editor.quickfix,org.eclipse.xtext.validation" 26 41 Bundle-Activator: de.ugoe.cs.swe.bnftools.ui.internal.EbnfActivator 42 Bundle-ClassPath: src/, 43 . -
v2/trunk/de.ugoe.cs.swe.bnftools.ebnf.ui/build.properties
r67 r84 4 4 bin.includes = META-INF/,\ 5 5 .,\ 6 plugin.xml 7 src.includes = .settings/6 plugin.xml,\ 7 src/ -
v2/trunk/de.ugoe.cs.swe.bnftools.ebnf.ui/src/de/ugoe/cs/swe/bnftools/ui/handler/BT_GenerationHandlerPDF.java
r72 r84 26 26 import org.eclipse.emf.ecore.xml.type.SimpleAnyType; 27 27 import org.eclipse.emf.ecore.xml.type.XMLTypeFactory; 28 import org.eclipse.jface.dialogs.MessageDialog; 28 29 import org.eclipse.ui.IEditorInput; 29 30 import org.eclipse.ui.IEditorPart; … … 32 33 import org.eclipse.ui.IWorkbenchWindow; 33 34 import org.eclipse.ui.PlatformUI; 35 import org.eclipse.ui.handlers.HandlerUtil; 34 36 import org.eclipse.ui.part.FileEditorInput; 35 37 import org.eclipse.xtext.builder.EclipseResourceFileSystemAccess2; … … 42 44 import com.google.inject.Provider; 43 45 44 public class BT_GenerationHandler extends AbstractHandler implements IHandler { 46 import de.ugoe.cs.swe.bnftools.generator.EbnfGenerator; 47 48 public class BT_GenerationHandlerPDF extends AbstractHandler implements IHandler { 45 49 46 50 @Inject … … 56 60 IResourceSetProvider resourceSetProvider; 57 61 62 63 58 64 @Override 65 public boolean isEnabled() { 66 return true; 67 } 68 69 70 71 59 72 public Object execute(ExecutionEvent event) throws ExecutionException { 60 73 MessageDialog.openInformation(HandlerUtil.getActiveShell(event), 74 "Hello", "Generating PDF"); 75 76 61 77 //used to save the command name (defined in extensions) 62 78 String mode = ""; … … 65 81 mode = event.getCommand().getName(); 66 82 } catch (NotDefinedException e1) { 67 // TODO Auto-generated catch block68 83 e1.printStackTrace(); 69 84 } … … 127 142 wrapper.setValue(mode); 128 143 // 129 144 EbnfGenerator gen = (EbnfGenerator)generator; 130 145 // add string to resource 131 146 r.getContents().add(wrapper); 132 133 generator.doGenerate(r, fsa);134 147 gen.doGenerate(r, fsa,false); 148 //generator.doGenerate(r, fsa); 149 135 150 return null; 136 151 137 152 } 138 139 @Override140 public boolean isEnabled() {141 return true;142 }143 144 153 } -
v2/trunk/de.ugoe.cs.swe.bnftools.ebnf.ui/src/de/ugoe/cs/swe/bnftools/ui/labeling/EbnfLabelProvider.xtend
r68 r84 5 5 6 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 7 10 import de.ugoe.cs.swe.bnftools.ebnf.ImportSection 8 11 import de.ugoe.cs.swe.bnftools.ebnf.Rule 9 import de.ugoe.cs.swe.bnftools.ebnf.BnfEntry10 import de.ugoe.cs.swe.bnftools.ebnf.DefinitionList11 12 import de.ugoe.cs.swe.bnftools.ebnf.SingleDefinition 12 13 import de.ugoe.cs.swe.bnftools.ebnf.Term 13 import de.ugoe.cs.swe.bnftools.ebnf.Atom14 import de.ugoe.cs.swe.bnftools.ebnf.StringRule14 import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider 15 import org.eclipse.xtext.ui.label.DefaultEObjectLabelProvider 15 16 16 17 /** … … 19 20 * see http://www.eclipse.org/Xtext/documentation.html#labelProvider 20 21 */ 21 class EbnfLabelProvider extends org.eclipse.xtext.ui.label.DefaultEObjectLabelProvider {22 class EbnfLabelProvider extends DefaultEObjectLabelProvider { 22 23 23 24 @Inject 24 new( org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider delegate) {25 new(AdapterFactoryLabelProvider delegate) { 25 26 super(delegate); 26 27 } … … 31 32 32 33 def text(BnfEntry entry){ 33 ' BnfEntry'34 }34 'Rule: '+entry.rule.name 35 } 35 36 36 37 def text(Rule rule){ 37 'Rule: '+rule.name38 38 39 } 39 40
Note: See TracChangeset
for help on using the changeset viewer.