Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 352826

Summary: Use size property to compute value string
Product: [Technology] DLTK Reporter: Julien Desgats <jdesgats>
Component: Common-DebugAssignee: dltk.common-inbox <dltk.common-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: andrei.sobolev, andrey, contact
Version: 3.0Keywords: contributed
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on:    
Bug Blocks: 365334    
Attachments:
Description Flags
Use IIndexedValue.getSize() when possible to get size none

Description Julien Desgats CLA 2011-07-22 04:02:26 EDT
Created attachment 200154 [details]
Use IIndexedValue.getSize() when possible to get size

Currently, the org.eclipse.dltk.debug.core.model.CollectionScriptType.formatValue use IScriptValue.getVariables().length to get the children count. This can lead to useless property_get commands in case of the children of the value has not been retrieved yet.

The proposed patch use IIndexedValue.getSize() (which is a basic getter) if possible.
Comment 1 Benjamin Cabé CLA 2011-12-01 11:12:37 EST
Ping :)
Any chance you guys could review and include the attached patch?
Comment 2 Andrey Platov CLA 2011-12-01 11:21:00 EST
Pong :) 
Reviewing...
Comment 3 Andrei Sobolev CLA 2011-12-01 11:28:19 EST
Patch are applied to HEAD.
Thanks.