Why is delete() not a supported operation on AstWrapperPsiElement?

Why is this? It makes PSI programming just a little bit harder with my custom
language.

2 comments
Comment actions Permalink

Keith Lea wrote:

Why is this? It makes PSI programming just a little bit harder with my
custom language.


Your could try to override it with some code like

getNode().getTreeParent().removeChild(getNode())

Shouldn't that work?

Of course it would be nice if that were the default behavior, but there may be reasons
which are against that...

Sascha

0
Comment actions Permalink

yes, it does.
The idea still is that you won't be using simple delete(), but will write a
more semantic-rich delete-something-from-some-parent method, that will make
all the service stuff like adding or removing tokens.

Eugene.

"Keith Lea" <keith@cs.oswego.edu> wrote in message
news:dcu1e5$3vg$1@is.intellij.net...

Why is this? It makes PSI programming just a little bit harder with my

custom

language.



0

Please sign in to leave a comment.