Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Re: Setting project description confusion

On Wednesday 16 September 2009 you wrote:

> 
> Hi,
> 
> I am looking at SetCProjectDescriptionOperation.executeOperation()
> and failing to understand why it is written this way. It basically
> knows ICProjectDescription to set, and a project. However, instead
> of setting that project description directly, it creates new
> CProjectDescription, applies 'data' to it, and only then does:
> 
>       fPrjDescStorage.setCurrentDescription(fNewDescriptionCache, true);
> 
> What is the reason for this additional CProjectDescription instance?

More confusion follows. The SetCProjectDescriptionOperation.executeOperation()
also say:

                // fNewDescriptionCache is still writable and may be written to at this point
                AbstractCProjectDescriptionStorage.fireDataAppliedEvent(
            fNewDescriptionCache, fOldDescriptionCache, fSetDescription, delta);

Nice, but does not seem to work. Configurations in fNewDescriptionCache are instances 
of CConfigurationDescriptionCache, and pretty much every mutating method throws.
For example:

        public void setSourceEntries(ICSourceEntry[] entries) {
                throw ExceptionFactory.createIsReadOnlyException();
        }

So, what exactly is writable in fNewDescriptionCache?

Thanks,
Volodya


Back to the top