eclipse - How to listen to changes in Java editor to refresh a view part? -
i'm implementing eclipse plug-in refresh new view part when change occurs in java file. possible? , how?
besides that, need identify abstract syntax tree (ast) of present code in java editor. suggestion?
you can listen changes of underlying idocument
described here: eclipse plugin granularly monitor editor changes
the java editor input adapts ijavaelement
. example:
editor.geteditorinput().getadapter( ijavaelement.class )
if result icompilationunit
, can create ast thereof described here: https://www.eclipse.org/articles/article.php?file=article-javacodemanipulation_ast/index.html