Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Performing automatic corrections
Performing automatic corrections [message #1059692] Tue, 21 May 2013 04:58
Marco Naddeo is currently offline Marco Naddeo
Messages: 49
Registered: November 2012
Member
Hi Smile

The Java editor automatically corrects the code in some cases... For example, if I have a class B which extends a class A, I can declare an object myObject in this way:

A myObject = new B();


but now, supposing that myMethod is a method definied in the subclass B, if I try to call it directly on myObject (declared of type A):

myObject.myMethod()


the editor in some cases automatically adds a cast converting the code as following:

((B)myObject).myMethod()


Now, I have to implement some automatic corrections on user typing. Is there some Xtext or Eclipse support for implementing them?

Where can I hook to do this?


Thanks in advance,
Marco
Previous Topic:Xtext Save
Next Topic:Referencing plug-in resources
Goto Forum:
  


Current Time: Tue May 28 03:47:50 EDT 2013

Powered by FUDForum. Page generated in 0.01405 seconds