Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] ProjectDescription#setDynamicReferences()

Hi

Thanks for replying.

What is not working is that when I open Properties->C/C++ General->Paths and
Symbols->References, it does not show the reference that I just setup.
However, the Properties->Project References *does* show the reference. As
you can see from the code below, they are both setup at the same time.

Looking at the dialog, I see that I can set a reference on 'Active' 'Debug'
or 'Release', so I am guessing that I am not setting something correctly -
but I have no idea what!

Thanks for replying.
--
Subs

> -----Original Message-----
> From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
> On Behalf Of James Blackburn
> Sent: 01 February 2011 14:32
> To: CDT General developers list.
> Subject: Re: [cdt-dev] ProjectDescription#setDynamicReferences()
> 
> On 1 February 2011 14:21, dmsubs <dmsubs@xxxxxxxxxxxxx> wrote:
> > Hi,
> >
> > I am trying to programmatically set dynamic references on a project. I
> > am using ProjectDescription#setDynamicReferences() to do this, and am
> > using it in the exact same way as I use
> > ProjectDescription#setReferencesProjects(),
> > but it is not working .
> 
> What's not working?  When you next getDescription the dynamic references
> aren't there? Or is it not respecting the dynamic references for open /
build?
> 
> Cheers,
> James
> 
> >
> > My code looks like this:
> >
> >                IProjectDescription desc =
> > projectHandle.getDescription();
> >
> >                IProject[] newRefs =
> > addProject(desc.getReferencedProjects(), refProj) ;
> >                desc.setReferencedProjects(newRefs);
> >
> >                IProject[] newDynRefs =
> > addProject(desc.getDynamicReferences(), refProj) ;
> >                desc.setDynamicReferences(newDynRefs) ;
> >
> >                projectHandle.setDescription(desc, monitor);
> >
> > where addProject() just adds an additional project to a project[] array.
> >
> > Any ideas on what I am doing wrong?
> >
> > Thanks
> > --
> > Subs
> >
> > _______________________________________________
> > 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



Back to the top