Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Migration of Xtext1.0 to Xtext2.3, Methods not found(Methods or alternatives not found)
Migration of Xtext1.0 to Xtext2.3, Methods not found [message #1006593] Fri, 01 February 2013 05:25 Go to next message
Ankit Agarwal is currently offline Ankit AgarwalFriend
Messages: 35
Registered: March 2012
Member
I followed the migration guide from http://www.eclipse.org/Xtext/documentation.html#migrating_from_1_0_x but i Could not find the alternative for the following methods in Xtext 2.3 which were present in Xtext1.0

1. NodeUtil.getNearestSemanticObject(AbstractNode node)
2. ParseTreeUtil.getLastCompleteNodeByOffset(CompositeNode node ,int offset);
3. NodeAdapter.getNodeAdapter(EObject obj);
4. NodeUtil.findASTElement(CompositeNode root);
5. NodeUtil.getRootNode(EObject obj);

Any Help will be much appreciated.

[Updated on: Fri, 01 February 2013 05:25]

Report message to a moderator

Re: Migration of Xtext1.0 to Xtext2.3, Methods not found [message #1006599 is a reply to message #1006593] Fri, 01 February 2013 06:55 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 6550
Registered: July 2009
Senior Member
Hi in NodemodelUtils (findactualsemanticobjectfor) and inode
(getrootnode) may be some of the things you are looking for (have a
look at the java docs)

You will find replacements for everything. There is stuff that is
obsolete like getnodeadapter since the node model technically changed

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de
Re: Migration of Xtext1.0 to Xtext2.3, Methods not found [message #1007027 is a reply to message #1006599] Mon, 04 February 2013 06:27 Go to previous messageGo to next message
Ankit Agarwal is currently offline Ankit AgarwalFriend
Messages: 35
Registered: March 2012
Member
Thanks Christian for your response.
I have one more doubt, There was a class in Xtext 1 as org.eclipse.xtext.MweReader which was deprecated, URIBasedReader is to be used as an alternative if i am not wrong, but i could not find an appropriate method equivalent to doValidate.
Re: Migration of Xtext1.0 to Xtext2.3, Methods not found [message #1007031 is a reply to message #1007027] Mon, 04 February 2013 07:14 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 6550
Registered: July 2009
Senior Member
Hi as far as I remember the new class is simply called Reader

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de
Re: Migration of Xtext1.0 to Xtext2.3, Methods not found [message #1007905 is a reply to message #1007031] Fri, 08 February 2013 06:02 Go to previous messageGo to next message
Ankit Agarwal is currently offline Ankit AgarwalFriend
Messages: 35
Registered: March 2012
Member
Hi,

I was successful in migrating all parts except the Editor Validations. As suggested i tried using error(String, EStructuralFeature) instead of error(String, Integer), but then i get the following error :
ERROR org.eclipse.xtext.validation.CompositeEValidator - Error executing EValidator
java.lang.IllegalArgumentException: The sources EClass 'ABC' does not expose the feature 'DEF'.

I am using it like
@Check(CheckType.FAST)
public void checkValue(final ABC abc) {
//some logiv....
error("Value does not match",Epackage.Literal.DEF);
}
Re: Migration of Xtext1.0 to Xtext2.3, Methods not found [message #1007973 is a reply to message #1007905] Fri, 08 February 2013 07:00 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 6550
Registered: July 2009
Senior Member
Id expect something like my pack.literals.ABC__Name
Or pack.literals.ABC__somethingelse

Can you tell why you use DEF

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de
Re: Migration of Xtext1.0 to Xtext2.3, Methods not found [message #1146526 is a reply to message #1007973] Sun, 20 October 2013 07:50 Go to previous message
Hirdesh Agrawal is currently offline Hirdesh AgrawalFriend
Messages: 13
Registered: October 2013
Junior Member
Dear All,

I need your favor or suggestion regarding migrate the xtext version from 1.0.1 to 2.3.0 in custom application.

I followed all following process for migrate the xtext version.
1. Delete the old plug-ins and update the latest plug-ins in target platform.
2. Update the Plug-in Dependencies and Import Statements.
3. Introduction of the Qualified Name.
4. Changes in the index and in find references.
5. Rewritten Node Model.
6. AutoEditStrategy.
7. Other Noteworthy API Changes
To consider the above steps, I started the work with Eclipse-4.2, Which has a xtext-2.3.0 dependency. Successfully I completed the all above steps and removed the compilation error.

Problem: After that I start the testing and getting below error Messages:
[XtextLinkingDiagnostic: null:6 Couldn't resolve reference to Material 'MPS_RECUR'.,
XtextLinkingDiagnostic: null:9 Couldn't resolve reference to Cstic 'NUM_OF_ALLOC'.,
XtextLinkingDiagnostic: null:15 Couldn't resolve reference to Cstic 'INSTANCE_NUM'.,
XtextLinkingDiagnostic: null:14 Couldn't resolve reference to Class 'ALLOC'.]
Previous Topic:Couldn't resolve reference to EPackage
Next Topic:Migration strategies
Goto Forum:
  


Current Time: Sun Dec 21 23:17:56 GMT 2014

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

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