Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-core-dev] JavaModel on Eclipse start/stop

Hi Philippe,

   I am now working on some specific navigator (a la JDT's Package Explorer 
and CDT's C Brower).
   I am aware of the multitude of navigators out there 
(https://bugs.eclipse.org/bugs/show_bug.cgi?id=36961). 
   I hoped I could plugin into the Resource Navigator and provide visual 
representations and operations quite easily, based on the project nature and 
the file contents or directory topology. I did not want to go deeper than 
that: just at the project scope and provide navigation and wizards based on 
selected resources, no need to analyze contents more than topologically.
   Indeed, in the future, having a model might bring further advantages... 
Although, as far as I understood, autocompletion, code navigation (e.g. 
hyperlinks to declaration) and search are based on the indexer.
   
   I'll look over the chapter, as you suggested, and navigate more in the 
sources.

Thanks for the pointers and conceptual clarifications, Cristian

On Thursday 08 December 2005 15:59, Philippe P Mulet wrote:
 >The model is shared amongst various views (not builder, not indexer). It
 >doesn't need to be persisted.
 >It is mostly an partial model which lazily populates itself upon request
 >(LRU cache underneath).
 >The model cache always starts empty at the beginning of each session. Some
 >clients (like package explorer) may want to retain a given structure, this
 >is why mementos are provided for, so that clients can keep some pointers to
 >some elements in a format which can easily be persisted.
 >
 >The model is not exhaustive; it doesn't perform a full scan of the
 >workspace unless a client exhaustively attempts to reach all elements of
 >the model (which isn't the way it is meant to be used). What exactly are
 >you trying to achieve ?
 >
 >As for a book, I would recommend "Contributing to Eclipse: Principles,
 >Patterns, and Plug-Ins" by Erich Gamma and Kent Beck, ISBN 0321205758
 >wich has a chapter on the Java model architecture.
 >
 >
 >
 >
 >             Cristian
 >             Amitroaie
 >             <cristian@xxxxxxx                                          To
 >
 >             >                         "Eclipse JDT Core developers list."
 >
 >             Sent by:                  <jdt-core-dev@xxxxxxxxxxx>
 >             jdt-core-dev-boun                                          cc
 >             ces@xxxxxxxxxxx
 >                                                                   Subject
 >                                       Re: [jdt-core-dev] JavaModel on
 >             12/08/2005 12:23          Eclipse start/stop
 >             PM
 >
 >
 >             Please respond to
 >             "Eclipse JDT Core
 >             developers list."
 >
 >
 >
 >
 >
 >
 >
 >   Should I understand that if the package explorer is not open and Eclipse
 >is
 >closed, the "memento" state of the JavaModel is no longer up to date? And
 >more than a delta between Eclipse invocations is required to recreate the
 >model? In other words a full scan of the workspace is required?
 >
 >   If I got it right, the JavaModel is shared between builder, indexer and
 >various views. Isn't it?
 >
 >   BTW, is there a document presenting the whole JDT architecture
 >(including
 >views and models relationships)? At least the conceptual level, not the
 >actual classes.
 >
 >Thanks, Cristian
 >
 >On Thursday 08 December 2005 11:37, Philippe P Mulet wrote:
 > >The model is not persisted across session, it can lazily be reconstructed
 > >from underlying resources.
 > >It is the responsibility of a client to save transient elements, such as
 > >working copies (e.g. save editors before exiting).
 > >
 > >The package explorer is rendering the model in the UI. UI is persisting
 >
 >the
 >
 > >rendered tree by asking each element it cares about for its memento.
 > >A memento can be converted back into an element in the next session
 >
 >(again
 >
 > >on UI request).
 > >
 > >A memento is nothing more than a string representation for a Java element
 > >handle (i.e. pretty much a path to a given Java element, nothing about
 > >actual contents).
 > >
 > >
 > >
 > >
 > >             Cristian
 > >             Amitroaie
 > >             <cristian@xxxxxxx
 >
 >To
 >
 > >             >                         jdt-core-dev@xxxxxxxxxxx
 > >
 > >             Sent by:
 >
 >cc
 >
 > >             jdt-core-dev-boun
 > >             ces@xxxxxxxxxxx
 >
 >Subject
 >
 > >                                       [jdt-core-dev] JavaModel on
 >
 >Eclipse
 >
 > >                                       start/stop
 > >             12/08/2005 01:19
 > >             AM
 > >
 > >
 > >             Please respond to
 > >             "Eclipse JDT Core
 > >             developers list."
 > >
 > >
 > >
 > >
 > >
 > >
 > >Hi,
 > >
 > >   I started to develop a plugin for some language in Eclipse and one of
 > >the
 > >main sources of inspiration is JDT/CDT.
 > >   I browsed a lot through the sources and I got stuck with the
 >
 >JavaModel.
 >
 > >I
 > >do not realize where it stars and were it ends. CDT seems quite a
 > >copy/paste
 > >so I am lost there too.
 > >
 > >   For now, a concrete question: What happens between two Eclipse
 > >invocations?
 > >How is the model saved/restored? In other words who handles the
 > >persistence,
 > >if any?
 > >
 > >
 > >Thanks, Cristian
 > >_______________________________________________
 > >jdt-core-dev mailing list
 > >jdt-core-dev@xxxxxxxxxxx
 > >https://dev.eclipse.org/mailman/listinfo/jdt-core-dev
 > >
 > >
 > >_______________________________________________
 > >jdt-core-dev mailing list
 > >jdt-core-dev@xxxxxxxxxxx
 > >https://dev.eclipse.org/mailman/listinfo/jdt-core-dev
 >
 >_______________________________________________
 >jdt-core-dev mailing list
 >jdt-core-dev@xxxxxxxxxxx
 >https://dev.eclipse.org/mailman/listinfo/jdt-core-dev
 >
 >
 >_______________________________________________
 >jdt-core-dev mailing list
 >jdt-core-dev@xxxxxxxxxxx
 >https://dev.eclipse.org/mailman/listinfo/jdt-core-dev


Back to the top