• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

IElementChangedListener

 
Alexandru Popescu
Ranch Hand
Posts: 995
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
API:
An element changed listener receives notification of changes to Java elements
maintained by the Java model.


1. What kind of notifications this listener refers to?
2. What is the meaning of Java elements and Java model?

./pope
 
Alexandru Popescu
Ranch Hand
Posts: 995
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anybody point me at least to some piece of documentation about this?

10x in advance,
./pope
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
These terms come from the JDT, the Java Development Tools. A Java project is represented internally by the JDT plugin as, more or less, a tree of "elements": packages, classes, members are all "Java elements." This tree is the "Java model". Changes occur to the model when you type, when a refactoring is done, etc. If you register an IElementChangedListener, it gets notified when any of these changes occur.
 
Eric Clayberg
author
Ranch Hand
Posts: 63
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anybody point me at least to some piece of documentation about this?
The Eclipse system generates change events indicating, for example, the files and folders that have been added, modified, and removed during the course of an operation. The Java tools issue similar events covering the creation, modification and deletion of Java elements (methods, fields, types, etc.). Interested objects can subscribe to these events and take whatever action is necessary to keep themselves synchronized with Eclipse. We cover this in chapter 8 ("Resource Change Tracking") of our book.

API docs for all of the Eclipse APIs are available on the eclipse.org web site. See...IElementChangedListener
 
Alexandru Popescu
Ranch Hand
Posts: 995
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ernest Friedman-Hill:
These terms come from the JDT, the Java Development Tools. A Java project is represented internally by the JDT plugin as, more or less, a tree of "elements": packages, classes, members are all "Java elements." This tree is the "Java model". Changes occur to the model when you type, when a refactoring is done, etc. If you register an IElementChangedListener, it gets notified when any of these changes occur.


Exactly what I expected. Thanks Ernest and Eric. I have already read the API ;-). What is interesting is that the same event is triggered for resource changes (files, folders) and also for logical resources (methods, fields, imports).

./pope
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic