[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[pdt-dev] Access PHP AST from within WTP/WST

I managed to intercept and alter the edits the user makes to the pdt editor via
org.eclipse.wst.sse.ui.internal.text.StructuredAutoEditStrategy. 

>From there I have acces to:

 - org.eclipse.jface.text.IDocument
 - org.eclipse.wst.sse.core.internal.provisional.IStructuredModel
 - org.eclipse.jface.text.DocumentCommand


Thats al nice and well, but to make intelligent changes I need access to the document's
 AST which is constructed by PDT. As far as I understand the AST representation
of the PHP code is modelled with DLTK.

My question: how can I get acces to the AST from within StructuredAutoEditStrategy?
The IDocument is fairly low evel. I can retrieve the current editor as an ITextEditor.


(For question context, see http://dev.eclipse.org/mhonarc/lists/pdt-dev/msg03137.html)