Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: RE: [cdt-dev] PDom locking, lifecycle of PDom objects

hi Henning,

Part of
        https://bugs.eclipse.org/bugs/show_bug.cgi?id=74433

is considering how component indexes could be joined together behind a 
single interface, but its early days and help is welcome :)

> Is the user supposed to use the "Project Poperties"->"Project 
> References" Dialog? Or do you want to implement some kind of "behind
> the scene magic"?

I think both - projects that reference other projects in the workspace 
would be linked up by the user like right now, but behind the scenes other 
indexes would also be added to a project indexing environment. 

thanks,
Andrew

Andrew Ferguson
Software Engineer, PTD, Symbian
skype: andrew.ferguson


> Hmm, just following the topic and got some question/idea.
> 
> If you have two or more projects depending on each other, how is 
> your plan to the user to make the dependency?
> 
> Is the user supposed to use the "Project Poperties"->"Project 
> References" Dialog? Or do you want to implement some kind of "behind
> the scene magic"?
> 
> In the first case, isn't there a way of "importing" the referenced 
> projects PDOM (or a reference on it) into the referencing projects 
> PDOM or some kind of PDOM-link storage?
> 
> e.g. 
> Project.Create()
>     PDomReferenceStorage.Add(new PDOM(this));
> 
> Project.AddReferencedProject(proj[])
>     foreach(Project p in proj[] : if (p != null) 
> PDomReferenceStorage.Add(new PDOM(p)));
> 
> Then, doing the search would be a search over the PDomReferenceStorage.
> The project would know about all PDOMs used. The PDOMs get added 
> only if the project is refernced by the project. You might even add 
> default PDOMs like libraries etc. on project settings by 
> enabling/disabling the PDOM references according to project settings.
> 
> Maybe I'm wrong on this, or its already solved otherwise.
> 
> Regards,
> Henning
> 
> 
> 
> 
> 
> -------- Original-Nachricht --------
> Datum: Tue, 5 Sep 2006 10:48:01 -0400 
> Von: Doug Schaefer <DSchaefer@xxxxxxx>
> An: "CDT General developers list." <cdt-dev@xxxxxxxxxxx>
> Betreff: RE: [cdt-dev] PDom locking, lifecycle of PDom objects
> 
> > Interesting idea. I've never used adaptBinding that way (I don't
> > think...).
> > 
> > At any rate, once you get the new binding, you can release the old one 
and
> > the unlock the old PDOM.
> > 
> > Doug Schaefer
> > QNX Software Systems
> > Eclipse CDT Project Lead
> > http://cdtdoug.blogspot.com
> > 
> > 
> > -----Original Message-----
> > From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] 
On
> > Behalf Of Schorn, Markus
> > Sent: Tuesday, September 05, 2006 10:31 AM
> > To: CDT General developers list.
> > Subject: RE: [cdt-dev] PDom locking, lifecycle of PDom objects
> > 
> > The point is that definitions for references are not necessarily
> > part of the same project:
> > 
> > Project A:
> >   File: library.h:  void lib_func();
> >   File: library.c:  void lib_func() {}
> >   File: testLibrary.c: int main(int argc, char** argv) { lib_func();} 
> > 
> > Project B:
> >   File: main.c:  int main(int argc, char** argv) { lib_func();}
> > 
> > In case I want to show the call hierarchy for 'lib_func', I need to
> > search the PDom of project A and B.
> > 
> > I currently make this happen by using PDOMLinkage.adaptBinding() to
> > convert the PDOMBinding from the one PDOM to the other. 
> > 
> > Markus.
> > 
> > > -----Original Message-----
> > > From: cdt-dev-bounces@xxxxxxxxxxx 
> > > [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Doug Schaefer
> > > Sent: Dienstag, 05. September 2006 15:19
> > > To: CDT General developers list.
> > > Subject: RE: [cdt-dev] PDom locking, lifecycle of PDom objects
> > > 
> > > Hmm, I'm a little confused. PDOM's don't know about 
> > > eachother. So I'm not
> > > sure what you meant by (c). Once you have the IASTName, you ask the
> > > IPDOMResolver to resolve the IBinding, then from there you 
> > > can navigate to
> > > references or definitions or declarations. You would have to 
> > > do that for
> > > each PDOM. It certainly wasn't my intention that you can use 
> > > PDOM objects
> > > from one PDOM to navigate to objects in another PDOM. Given 
> > > that, you would
> > > only need to lock one PDOM at a time.
> > > 
> > > Doug Schaefer
> > > QNX Software Systems
> > > Eclipse CDT Project Lead
> > > http://cdtdoug.blogspot.com
> > > 
> > > 
> > > -----Original Message-----
> > > From: cdt-dev-bounces@xxxxxxxxxxx 
> > > [mailto:cdt-dev-bounces@xxxxxxxxxxx] On
> > > Behalf Of Schorn, Markus
> > > Sent: Tuesday, September 05, 2006 8:15 AM
> > > To: CDT General developers list.
> > > Subject: RE: [cdt-dev] PDom locking, lifecycle of PDom objects
> > > 
> > > Doug,
> > > 
> > > I avoided using PDom objects in the model of the Call Hierarchy,
> > > so that should be ok. 
> > > Yet I work with the PDOM to find the references. For that I have
> > > to access multiple PDOMs and I can see a problem with that, because
> > > I cannot obtain the locks on multiple PDOMs without taking the risk
> > > of a deadlock. 
> > > 
> > > Here is what I do
> > > (a) convert input from ICElement to IASTName.
> > > (b) find references for the IASTName in PDom.
> > > (c) find definitions for references in multiple PDoms
> > > (d) convert definitions to ICElements.
> > > 
> > > (c) is the problematic step as I have to use the reference found in
> > >     a PDom to search for definitions in all other PDoms.
> > > 
> > > I'll be happy to discuss this at the summit.
> > > 
> > > Markus.
> > > 
> > > > -----Original Message-----
> > > > From: cdt-dev-bounces@xxxxxxxxxxx 
> > > > [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Doug Schaefer
> > > > Sent: Dienstag, 05. September 2006 13:42
> > > > To: CDT General developers list.
> > > > Subject: RE: [cdt-dev] PDom locking, lifecycle of PDom objects
> > > > 
> > > > Sorry, Markus, I was trying very hard not to work on the 
> > > > holiday yesterday
> > > > ;). 
> > > > The PDOM is probably immature in this area, which is one 
> > > > reason why the
> > > > Index View is hidden and not recommended for heavy use. The 
> > > > PDOM does have a
> > > > read/write lock on it. While you are looking at objects you 
> > > > should have the
> > > > read lock turned on. You shouldn't keep them around long 
> > > > term. That is the
> > > > role of the ICElement objects. That comes back to the need to 
> > > > be able to
> > > > create ICElement objects from the PDOM and to update them 
> > > > based on PDOM
> > > > updates. That would probably make your life easier.
> > > > 
> > > > This is something we need to talk about at the Summit. I'll have a
> > > > presentation there that will hopefully clarify what the 
> > > > architecture is
> > > > supposed to be.
> > > > 
> > > > Doug Schaefer
> > > > QNX Software Systems
> > > > Eclipse CDT Project Lead
> > > > http://cdtdoug.blogspot.com
> > > > 
> > > > 
> > > > -----Original Message-----
> > > > From: cdt-dev-bounces@xxxxxxxxxxx 
> > > > [mailto:cdt-dev-bounces@xxxxxxxxxxx] On
> > > > Behalf Of Schorn, Markus
> > > > Sent: Tuesday, September 05, 2006 4:19 AM
> > > > To: CDT General developers list.
> > > > Subject: RE: [cdt-dev] PDom locking, lifecycle of PDom objects
> > > > 
> > > > Hi Doug,
> > > > please help me out on this, I really need to understand how 
> > > > to correctly
> > > > use locks on the PDom. I try to restate my question:
> > > > 
> > > > The implementation of the Call Hierarchy has the need to work 
> > > > with multiple PDoms, because such hierarchies may span over 
multiple
> > > > projects. I must not simultaneously hold locks of multiple PDoms
> > > > as this would lead to dead-locks. So I have to avoid locks where
> > > > possible and I have to understand under which circumstances this
> > > > is reasonable to do.
> > > > 
> > > > If there is no safe way to work with multiple PDoms we should
> > > > make changes to our architecture. That's why I'd like to 
understand
> > > > this as soon as possible.
> > > > 
> > > > Markus.
> > > > 
> > > > > -----Original Message-----
> > > > > From: cdt-dev-bounces@xxxxxxxxxxx 
> > > > > [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Schorn, Markus
> > > > > Sent: Montag, 04. September 2006 15:26
> > > > > To: CDT General developers list.
> > > > > Subject: [cdt-dev] PDom locking, lifecycle of PDom objects
> > > > > 
> > > > > Hi,
> > > > > I am trying to understand how to safely use the PDom. I have 
> > > > > a bunch of
> > > > > questions. I can only ask the first one, as the next one will 
> > > > > depend on
> > > > > the first answer. 
> > > > > 
> > > > > Objects obtained by the PDOM (e.g. PDOMName) will actually 
> > > > access the
> > > > > database when I invoke methods (e.g. 
> > > > PDOMName.toCharArray()) on them.
> > > > > What happens if the database was modified after the PDOM 
> > > object was
> > > > > handed to me?
> > > > > 
> > > > > Markus.
> > > > > _______________________________________________
> > > > > cdt-dev mailing list
> > > > > cdt-dev@xxxxxxxxxxx
> > > > > https://dev.eclipse.org/mailman/listinfo/cdt-dev
> > > > > 
> > > > _______________________________________________
> > > > cdt-dev mailing list
> > > > cdt-dev@xxxxxxxxxxx
> > > > https://dev.eclipse.org/mailman/listinfo/cdt-dev
> > > > _______________________________________________
> > > > cdt-dev mailing list
> > > > cdt-dev@xxxxxxxxxxx
> > > > https://dev.eclipse.org/mailman/listinfo/cdt-dev
> > > > 
> > > _______________________________________________
> > > cdt-dev mailing list
> > > cdt-dev@xxxxxxxxxxx
> > > https://dev.eclipse.org/mailman/listinfo/cdt-dev
> > > _______________________________________________
> > > cdt-dev mailing list
> > > cdt-dev@xxxxxxxxxxx
> > > https://dev.eclipse.org/mailman/listinfo/cdt-dev
> > > 
> > _______________________________________________
> > cdt-dev mailing list
> > cdt-dev@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/cdt-dev
> > _______________________________________________
> > cdt-dev mailing list
> > cdt-dev@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/cdt-dev
> 
> -- 
> 
> 
> NEU: GMX DSL Sofort-Start-Set ? blitzschnell ins Internet!
> Echte DSL-Flatrate ab 0,- Euro* http://www.gmx.net/de/go/dsl
> _______________________________________________
> cdt-dev mailing list
> cdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/cdt-dev


-----------------------------------------
Don't miss out on your chance to...Do more with Symbian. Make sure
you visit the Symbian Smartphone Show, 17-18 October 2006, Excel,
London
www.symbiansmartphoneshow.com 

*******************************************************************
*** Symbian Software Ltd is a company registered in England and
Wales with registered number 4190020 and registered office at 2-6
Boundary Row, Southwark, London,  SE1 8HP, UK. This message is
intended only for use by the named addressee and may contain
privileged and/or confidential information. If you are not the
named addressee you should not disseminate, copy or take any action
in reliance on it. If you have received this message in error
please notify postmaster@xxxxxxxxxxx and delete the message and any
attachments accompanying it immediately. Neither Symbian nor any of
its Affiliates accepts liability for any corruption, interception,
amendment, tampering or viruses occurring to this message in
transit or for any message sent by its employees which is not in
compliance with Symbian corporate policy. *************************
*********************************************



Back to the top