Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-patch] [cdt-patch]Model Builder Fixes

> > 

I have applied the patch below to correct this:
Bug 36624

> > This patch updates the create methods of the CModelBuilder:
> > -changes visibility to protected.
> > -returns the created element.
> > 
> 
> This seems to create some problem with the old parser enable,
> since now the Map is null.
> 
> Patch below, **Not** applied, I'll let you evaluate.
> 
> ============================================================================
> 
> Index: model/org/eclipse/cdt/internal/core/model/TranslationUnit.java
> ===================================================================
> RCS file: /home/tools/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/TranslationUnit.java,v
> retrieving revision 1.5
> diff -u -r1.5 TranslationUnit.java
> --- model/org/eclipse/cdt/internal/core/model/TranslationUnit.java	15 Apr 2003 18:37:32 -0000	1.5
> +++ model/org/eclipse/cdt/internal/core/model/TranslationUnit.java	16 Apr 2003 14:57:16 -0000
> @@ -302,12 +302,14 @@
>  		TranslationUnitInfo unitInfo = (TranslationUnitInfo) info;
>  		
>  		// generate structure
> -		newElements = null;
> -		newElements = this.parse();
> +		Map mapping = this.parse();
>  		
>  		// this is temporary until the New Model Builder is implemented
> -		if(newElements == null)
> -			getNewElements(newElements, this);		
> +		if(mapping == null) {
> +			getNewElements(newElements, this);
> +		} else {
> +			newElements.putAll(mapping);
> +		}
>  		///////////////////////////////////////////////////////////////
>  		
>  		if (isWorkingCopy()) {
> 



Back to the top