com.intellij.codeEditor.CodeEditorManager.getInstance(myProject).commitAllToPsiFile()

Has anybody converted a Psi-based plugin to run under Aurora?
According to http://www.intellij.org/twiki/bin/view/Main/PsiIntroduction one
should call

com.intellij.codeEditor.CodeEditorManager.getInstance(myProject).commitAllTo
PsiFile()

before the Psi tree is sync'd with what's in the editor. However, in
Aurora, this class has disappeared.

(Sorry to have asked a Psi-related question...guess I'll have to buy Mike
Aizatsky a vodka...)
I'll update the page if I get a knowledgeable answer!

Thanks,
-Dave


2 comments

Try this:

final com.intellij.psi.PsiDocumentManager pdm =
com.intellij.psi.PsiDocumentManager.getInstance(project);

// make sure PSI is in sync with a certain document
pdm.commitDocument(document);

// alternatively commit all documents
// pdm.commitAllDocuments();

I got the info from
http://www.intellij.net/forums/thread.jsp?forum=23&thread=24071&message=452639&q=436f6465456469746f7
24d616e61676572#452639 and it works perfectly for me.

Sascha

"Dave Kriewall" <davek@wrq.com> schrieb im Newsbeitrag news:b89lqg$86d$1@is.intellij.net...

Has anybody converted a Psi-based plugin to run under Aurora?
According to http://www.intellij.org/twiki/bin/view/Main/PsiIntroduction one
should call

>

com.intellij.codeEditor.CodeEditorManager.getInstance(myProject).commitAllTo
PsiFile()

>

before the Psi tree is sync'd with what's in the editor. However, in
Aurora, this class has disappeared.

>

(Sorry to have asked a Psi-related question...guess I'll have to buy Mike
Aizatsky a vodka...)
I'll update the page if I get a knowledgeable answer!

>

Thanks,
-Dave

>
>


0

Thanks very much. I've updated the Wiki page. -Dave

"Sascha Weinreuter" <sascha.weinreuter@cit.de> wrote in message
news:b8at7o$u4l$1@is.intellij.net...

Try this:

>

final com.intellij.psi.PsiDocumentManager pdm =
com.intellij.psi.PsiDocumentManager.getInstance(project);

>

// make sure PSI is in sync with a certain document
pdm.commitDocument(document);

>

// alternatively commit all documents
// pdm.commitAllDocuments();

>

I got the info from

>
http://www.intellij.net/forums/thread.jsp?forum=23&thread=24071&message=452639&q=436f6465456469746f7

24d616e61676572#452639 and it works perfectly for me.

>

Sascha

>

"Dave Kriewall" <davek@wrq.com> schrieb im Newsbeitrag

news:b89lqg$86d$1@is.intellij.net...

Has anybody converted a Psi-based plugin to run under Aurora?
According to http://www.intellij.org/twiki/bin/view/Main/PsiIntroduction

one

should call

>
>

com.intellij.codeEditor.CodeEditorManager.getInstance(myProject).commitAllTo

PsiFile()

>

before the Psi tree is sync'd with what's in the editor. However, in
Aurora, this class has disappeared.

>

(Sorry to have asked a Psi-related question...guess I'll have to buy

Mike

Aizatsky a vodka...)
I'll update the page if I get a knowledgeable answer!

>

Thanks,
-Dave

>
>

>
>


0

Please sign in to leave a comment.