Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Tutorial about Quick Fixes
Tutorial about Quick Fixes [message #1386604] Wed, 18 June 2014 14:56 Go to next message
Félix SILINOU KAMDEM is currently offline Félix SILINOU KAMDEMFriend
Messages: 96
Registered: April 2013
Member
Hi,

Does anyone know a good tutorial about Quick Fixes on Xtext starting from be beginning.

I want to performed Quick Fixes, I followed this tutorial https://www.eclipse.org/Xtext/documentation.html#quickfixes but it wasn't helpful.

Regards,
Felix.
Re: Tutorial about Quick Fixes [message #1386607 is a reply to message #1386604] Wed, 18 June 2014 15:15 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi i dont know any tutorial that covers all usecases Of quickfixes.
Can you give some hints what you want to do?


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Tutorial about Quick Fixes [message #1386611 is a reply to message #1386607] Wed, 18 June 2014 16:09 Go to previous messageGo to next message
Félix SILINOU KAMDEM is currently offline Félix SILINOU KAMDEMFriend
Messages: 96
Registered: April 2013
Member
Hi,

Features I would like to use are "Validation and Quick Fixes", "Syntax Coloring" and "Serialization".
For quick fixes, I want to select, add and remove elements.
Re: Tutorial about Quick Fixes [message #1386612 is a reply to message #1386611] Wed, 18 June 2014 16:29 Go to previous messageGo to next message
Uli Merkel is currently offline Uli MerkelFriend
Messages: 250
Registered: June 2013
Senior Member
There is some example in Lorenzo Bettinis Book "Implementing Domain-Specific Languages with Xtext and Xtend" from www.packtpub.com
Re: Tutorial about Quick Fixes [message #1386614 is a reply to message #1386612] Wed, 18 June 2014 16:57 Go to previous messageGo to next message
Félix SILINOU KAMDEM is currently offline Félix SILINOU KAMDEMFriend
Messages: 96
Registered: April 2013
Member
Thanks @Uli but I would like something free at the beginning. I will use it for a specific project and I don't think that my professor will buy it due a short period of time.
Re: Tutorial about Quick Fixes [message #1386619 is a reply to message #1386614] Wed, 18 June 2014 18:07 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
If you show us the problems with your quickfix we might be able to
help.


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Tutorial about Quick Fixes [message #1386621 is a reply to message #1386614] Wed, 18 June 2014 18:49 Go to previous messageGo to next message
Uli Merkel is currently offline Uli MerkelFriend
Messages: 250
Registered: June 2013
Senior Member
well, if you have trouble spending some 20€ for an ebook which helps you, ...

[Updated on: Wed, 18 June 2014 18:49]

Report message to a moderator

Re: Tutorial about Quick Fixes [message #1386622 is a reply to message #1386619] Wed, 18 June 2014 18:52 Go to previous messageGo to next message
Félix SILINOU KAMDEM is currently offline Félix SILINOU KAMDEMFriend
Messages: 96
Registered: April 2013
Member
I do not have a concrete example but I want to do is the same quick fixes we have on Eclipse.

Here is an example for java project :
http://i57.tinypic.com/29auwxw.png

I would like user to use quickFixes to remove element and select element.
Re: Tutorial about Quick Fixes [message #1386627 is a reply to message #1386622] Wed, 18 June 2014 20:13 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

there is actually a difference between quickfixes and quick assist.
xtext can only quick fixes for Isses Produced by the validator

But let us asume you have the xtext hello world example


Model:
	greetings+=Greeting*;
	
Greeting:
	'Hello' name=ID '!';



class MyDslValidator extends AbstractMyDslValidator {

  public static val GREETING_NOT_USED = 'GREETING_NOT_USED'

	@Check
	def checkGreetingStartsWithCapital(Greeting greeting) {
			warning('Greeting is not in use', 
					MyDslPackage.Literals.GREETING__NAME,
					GREETING_NOT_USED)
	}
}



class MyDslQuickfixProvider extends DefaultQuickfixProvider {

	@Fix(MyDslValidator.GREETING_NOT_USED)
	def capitalizeName(Issue issue, IssueResolutionAcceptor acceptor) {
		acceptor.accept(issue, 'Remove Greeting', 'Remove the Greeting from the file', 'upcase.png') [
			eobject, context |
			if (eobject instanceof Greeting) {
				val g = eobject as Greeting
				EcoreUtil2.getContainerOfType(g, Model).greetings -= g
			}
		]
	}
}



for real quick assist i thing you have to do all the stuff yourself (XtextQuickAssistProcessor)


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Tutorial about Quick Fixes [message #1386731 is a reply to message #1386627] Thu, 19 June 2014 23:03 Go to previous messageGo to next message
Félix SILINOU KAMDEM is currently offline Félix SILINOU KAMDEMFriend
Messages: 96
Registered: April 2013
Member
Hi Christian,

I have tried what you told for a specific element in my grammar. I can have a quick fixes remove. But When I am clicking on it, no element is remove.
Here is my code:

grammar org.ramses.mydsl.RamsesDsl with org.eclipse.xtext.common.Terminals
generate ramsesDSL "http://www.ramses.org/mydsl/RamsesDSL"
import 'http://www.eclipse.org/emf/2002/Ecore' as refModel 

Ramses: contents+=Contents*;

Contents: Altern | Decision | Result ;

Altern: name=Alternative;

/********************** Alternative *************************/
Alternative:
	'Alternative' id=INT ':'
		'for' element=ElementSyntaxName 'select' ':' 
		rule=Rule (params+=RuleList)*  ';' ;

RuleList: 'or' rule=Rule ;
...
...
...
/**********************  End Alternative **********************/



class RamsesDslValidator extends AbstractRamsesDslValidator {
    public static val REMOVE_ELT = 'RomevedElement'
	@Check
	def removeAlternativeDecision(Altern altern) {
		// faire un traitement pour vérifier que les éléments doivent être enlever
		error('Alternative and decision should be remove after taking your decision', RamsesDSLPackage.Literals.ALTERN__NAME, REMOVE_ELT)
	}
}



class RamsesDslQuickfixProvider extends DefaultQuickfixProvider {
	@Fix(RamsesDslValidator::REMOVE_ELT)
	def removeGreeting(Issue issue, IssueResolutionAcceptor acceptor) {
		acceptor.accept(issue, 'Remove Alternative and decision', 'Remove Alternative and decision from the file after making your choice', 'upcase.png') [
			eobject, context |
			if (eobject instanceof Altern) {
				val g = eobject as Altern
				EcoreUtil2.getContainerOfType(g, Ramses).contents -= g
			}
		]
	}
}


Best Regards,
Felix
Re: Tutorial about Quick Fixes [message #1386732 is a reply to message #1386731] Thu, 19 June 2014 23:52 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
The. Parent of altern is contents so you should Remove it from there and
Not from the grandparent


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Tutorial about Quick Fixes [message #1386733 is a reply to message #1386731] Thu, 19 June 2014 23:52 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Please Share a complete reproduceable grammar

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Tutorial about Quick Fixes [message #1386747 is a reply to message #1386732] Fri, 20 June 2014 05:14 Go to previous messageGo to next message
Félix SILINOU KAMDEM is currently offline Félix SILINOU KAMDEMFriend
Messages: 96
Registered: April 2013
Member
Here is tyhe complete reproductable grammar :

grammar org.ramses.mydsl.RamsesDsl with org.eclipse.xtext.common.Terminals

generate ramsesDSL "http://www.ramses.org/mydsl/RamsesDSL"

import 'http://www.eclipse.org/emf/2002/Ecore' as refModel 

Ramses: contents+=Contents*;

Contents: Altern | Decision | Result ;

Altern: name=Alternative;

/********************** Alternative *************************/
Alternative:
	'Alternative' id=INT ':'
	
			'for' element=ElementSyntaxName 'select' ':' 
			rule=Rule (params+=RuleList)*  ';' ;

RuleList: 'or' rule=Rule ;
/**********************  End Alternative **********************/

/********************** Decision *************************/
Decision:
	'Decision' id=Entier ':' select=Select ';'
			'consequences' ':' consequenceDecl=ConsequencesDeclaration ;

Select: 'select' rule=[Rule] 'for' elementID=[ElementSyntaxName|ElementSyntax]; // ElementSyntaxName;
	
ConsequencesDeclaration: NoneDecision | (subDecisions+=SubDecision)+ | SelectDecision ;
NoneDecision: name='none' ';' ;
SubDecision: 'Decision' i=[Entier]'.'j=Entier ':' select=Select (excludes+=ExcludeDecision)+ ';' ;	
SelectDecision: select=Select (excludes+=ExcludeDecision)+ ';' ;
ExcludeDecision:'and' 'exclude' rule=[Rule] 'for' elementID=[ElementSyntaxName|ElementSyntax]  ; 
Entier : id=INT	; 
/**********************  End Decision **********************/


/********************** Resulting Allocation *************************/
Result: ExcludeRule | ApplyRule ';' ;
ExcludeRule: 'Exclude' 'Rule' rule=Rule 'for' 'Elements' elementID=[ElementSyntaxName|ElementSyntax];
ApplyRule: 'Apply' 'Rule' rule=Rule'for' 'Elements' elementID=[ElementSyntaxName|ElementSyntax];
/**********************  End Resulting Allocation **********************/


/**********************  Useful Element ***********************/
ElementSyntaxName: name=ElementSyntax ; // elementID=[ElementSyntaxName|ElementSyntax] 
ElementSyntax:  '{' ID (',' ID)* '}';//'{' elt=ElementID (',' elts+=ElementID)* '}';
ElementID: name=ID;
Rule : name=ID ;
//Yo: eltIDs+=[refModel::EObject|STRING]* ;
/**********************  end of Element ***********************/


/**********************  Quick Fixes Element ***********************/
//Identifier: name=RuleElt;
//RuleElt
//RemoveElement: alt_dec= AlternativeOrDecision;
//AlternativeOrDecision: Alternative | Decision;
/**********************  end of Quick Fixes Element ***********************/


Actually, I had element Altern for the occasion (especially for that quick fixe).
Re: Tutorial about Quick Fixes [message #1386749 is a reply to message #1386747] Fri, 20 June 2014 05:22 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
so it should be EcureUtil2.getContainerOfTyoe(g, Contents) !!!!

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Tutorial about Quick Fixes [message #1386750 is a reply to message #1386749] Fri, 20 June 2014 05:38 Go to previous messageGo to next message
Félix SILINOU KAMDEM is currently offline Félix SILINOU KAMDEMFriend
Messages: 96
Registered: April 2013
Member
I did That (adding element Altern) because Contents is an enumaration and this isn't work either
EcoreUtil2.getContainerOfType(g, Contents).eContents -= g
.
Maybe I should remove element Altern and use directly Alternative.
Re: Tutorial about Quick Fixes [message #1386752 is a reply to message #1386750] Fri, 20 June 2014 05:48 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
I will give it a try

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Tutorial about Quick Fixes [message #1386758 is a reply to message #1386752] Fri, 20 June 2014 07:23 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Sorry i had misread your Grammar,

in such situations using a debugger is helpful.
this showed that there is actually a exception

java.lang.RuntimeException: Could not serialize EObject via backtracking.
Constraint: null contents+=Contents+ null
Values: 
Semantic Object: Ramses
Context: Ramses


if you have a look at the Grammar rule Ramses you can see a warning

Ramses: contents+=Contents*;


thus the model can be entirely empty. xtext does not be able to handle that in the serializer.
could you file a bug for that

as a workaround change the entry rule to

Ramses: {Ramses}contents+=Contents*;


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Tutorial about Quick Fixes [message #1386844 is a reply to message #1386758] Sat, 21 June 2014 14:34 Go to previous messageGo to next message
Félix SILINOU KAMDEM is currently offline Félix SILINOU KAMDEMFriend
Messages: 96
Registered: April 2013
Member
Hi Christian,

I have debugging it but I didn't get the same error as yours.
I did something like this :
	def removeGreeting(Issue issue, IssueResolutionAcceptor acceptor) {
		acceptor.accept(issue, 'Remove Alternative and decision', 'Remove Alternative and decision from the file after making your choice.', 'upcase.png') [
			eobject, context |
			if (eobject instanceof Altern) {
				val g = eobject as Altern
				val list = EcoreUtil2.getContainerOfType(g, Contents).eContents
				print("first size of my list " + list.size)
				println(list)
				list.forEach[
					println("\t"+it.eClass().name)
				]
				list -= g
				print("second size of my list " + list.size)
				println(list)
			}
		]
	}

I realized that my list has the same size with the same element after removing it. Even this isn't working : [b]"list.remove(g)"[/b]


And Below you see the containt of my log file
!ENTRY org.eclipse.ui 4 0 2014-06-21 15:38:44.553
!MESSAGE Unhandled event loop exception
!STACK 0
org.eclipse.e4.core.di.InjectionException: java.lang.ClassCastException: org.eclipse.egit.ui.internal.repository.tree.FolderNode cannot be cast to org.eclipse.egit.ui.internal.repository.tree.FileNode
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:63)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:231)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:212)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:131)
	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:171)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:831)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(HandledContributionItem.java:724)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$7(HandledContributionItem.java:708)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$4.handleEvent(HandledContributionItem.java:647)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
Caused by: java.lang.ClassCastException: org.eclipse.egit.ui.internal.repository.tree.FolderNode cannot be cast to org.eclipse.egit.ui.internal.repository.tree.FileNode
	at org.eclipse.egit.ui.internal.repository.tree.command.AddToIndexCommand.execute(AddToIndexCommand.java:34)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:290)
	at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:76)
	at sun.reflect.GeneratedMethodAccessor167.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
	... 33 more

!ENTRY org.eclipse.ui 4 0 2014-06-21 15:38:50.817
!MESSAGE Unhandled event loop exception
!STACK 0
org.eclipse.e4.core.di.InjectionException: java.lang.ClassCastException: org.eclipse.egit.ui.internal.repository.tree.FolderNode cannot be cast to org.eclipse.egit.ui.internal.repository.tree.FileNode
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:63)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:231)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:212)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:131)
	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:171)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:831)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(HandledContributionItem.java:724)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$7(HandledContributionItem.java:708)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$4.handleEvent(HandledContributionItem.java:647)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4169)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
Caused by: java.lang.ClassCastException: org.eclipse.egit.ui.internal.repository.tree.FolderNode cannot be cast to org.eclipse.egit.ui.internal.repository.tree.FileNode
	at org.eclipse.egit.ui.internal.repository.tree.command.AddToIndexCommand.execute(AddToIndexCommand.java:34)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:290)
	at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:76)
	at sun.reflect.GeneratedMethodAccessor167.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
	... 33 more

[Updated on: Sat, 21 June 2014 14:36]

Report message to a moderator

Re: Tutorial about Quick Fixes [message #1386845 is a reply to message #1386844] Sat, 21 June 2014 14:35 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
hi,

the trace is not xtext related. asi said changing the grammar solves you problem/the xtext bug


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Tutorial about Quick Fixes [message #1386846 is a reply to message #1386845] Sat, 21 June 2014 14:39 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
and the parent is Ramses. i misread your grammar with respect to that

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Tutorial about Quick Fixes [message #1386847 is a reply to message #1386845] Sat, 21 June 2014 14:49 Go to previous messageGo to next message
Félix SILINOU KAMDEM is currently offline Félix SILINOU KAMDEMFriend
Messages: 96
Registered: April 2013
Member
Hi,

I am really confused :
=> Who is asi
=> I have tried "Debbug as" on Xtext File but it is not possible to add a breakpoint.
=> Do you mean that I should change my grammar? It's a little strange because I wrote my grammar using the same approach as it mention here https://www.eclipse.org/Xtext/documentation.html#FirstFiveMinutes
        Model:
            greetings+=Greeting*;
  
        Greeting:
            'Hello' name=ID '!';
      

=> Do you mean that the bug is an internal bug
Re: Tutorial about Quick Fixes [message #1386848 is a reply to message #1386847] Sat, 21 June 2014 14:50 Go to previous messageGo to next message
Félix SILINOU KAMDEM is currently offline Félix SILINOU KAMDEMFriend
Messages: 96
Registered: April 2013
Member
Ok, I'll try it.
Re: Tutorial about Quick Fixes [message #1386849 is a reply to message #1386848] Sat, 21 June 2014 14:53 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

i was talking about debugging the quickfix


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Tutorial about Quick Fixes [message #1386851 is a reply to message #1386849] Sat, 21 June 2014 15:04 Go to previous messageGo to next message
Félix SILINOU KAMDEM is currently offline Félix SILINOU KAMDEMFriend
Messages: 96
Registered: April 2013
Member
Hi, it works perfectly even if it modify indentation.
Xtext does gave the possibility to reformat the code?
Re: Tutorial about Quick Fixes [message #1386852 is a reply to message #1386851] Sat, 21 June 2014 15:07 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

yes you an implement the formatter,
but the api is a bit cumbersome


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Set an property which not defined in the grammar
Next Topic:[Xbase] How to provide scope for a XBlockExpression
Goto Forum:
  


Current Time: Fri Apr 19 22:32:51 GMT 2024

Powered by FUDForum. Page generated in 0.07232 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top