Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Eclipse CDT: Modify and save AST

As for minimal examples I don't know. Have a look in
org.eclipse.cdt.internal.ui.refactoring (both test and non-test
plug-ins) for lots of examples.
~~~
Jonah Graham
Kichwa Coders Ltd.
www.kichwacoders.com


On 27 November 2016 at 00:05, Jonah Graham <jonah@xxxxxxxxxxxxxxxx> wrote:
> On 26 November 2016 at 23:55, sim0s <gerasimu_s@xxxxxxxxxxx> wrote:
>> Hi Jonah,
>>
>> Thanks for your advice.
>
> No problem.
>
>
>> Yes, my project is an Eclipse plugin. I restart Eclipse and everything seems
>> to be working fine now. I am not quite sure what was wrong but it seems that
>> refactoring is working now.
> If you were live editing during a debug session, or something else
> happening it is reasonable* that the OSGi classloaders may have got
> out of sync.
>
>
> *reasonable, but unfortunate, If you ever come across are reproducible
> test case, please file a bug
> https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform
>
>
>>
>> I have another question and I hope you can help: While researching how
>> refactoring is implemented in CDT I came across some advice suggesting to
>> implement my refactoring class (that extends CRefactoring) and to populate
>> it with the following methods:
>> 1. checkInitialConditions(..)
>> 2. createChange()...
>> 3. checkFinalConditions().
>
> I assume you are referring to these slides:
> http://www.slideshare.net/dschaefer/code-analysis-and-refactoring-with-cdt-presentation
>
> Refactoring is the UI, undo, preview etc on top of actually doing the
> changes. So if you are exposing this in the UI you probably want
> CRefactoring. If you are creating a tool with some other user
> interface you probably don't need CRefactoring.
>
>
>>
>> What is the difference between these two approaches? Which is the most
>> preferred? And finally, is there any minimal code snippet I could use?
>>
>>
>> Regards,
>> Simos
>>
>>
>>
>>
>> --
>> View this message in context: http://eclipse.1072660.n5.nabble.com/Eclipse-CDT-Modify-and-save-AST-tp186373p186375.html
>> Sent from the Eclipse CDT - Development mailing list archive at Nabble.com.
>> _______________________________________________
>> cdt-dev mailing list
>> cdt-dev@xxxxxxxxxxx
>> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
>> https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top