How to apply an IJavaElementDelta to a Compilation Unit

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to apply an IJavaElementDelta to a Compilation Unit

Leandro Pfleger de Aguiar-2
Hi

    The Eclipse jdt help sugests add a IElementChangeListener to respond to
changes in Java Elements as the following example:

JavaCore.addElementChangedListener(new MyJavaElementChangeReporter());public
class MyJavaElementChangeReporter implements IElementChangedListener {
      public void elementChanged(ElementChangedEvent event) {
         IJavaElementDelta delta= event.getDelta();
         if (delta != null) {
            System.out.println("delta received: ");
            System.out.print(delta);
         }
      }
   }    I need to get the IJavaElementDelta received and so reproduce the
event in a second ICompilationUnit. Ho can i do this ?


Tanks !

Leandro Pfleger de Aguiar


_______________________________________________
jdt-dev mailing list
[hidden email]
https://dev.eclipse.org/mailman/listinfo/jdt-dev