Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 69876 Details for
Bug 52100
C++ classes should be viewable "flat" or "treeed"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix
patch_52100.txt (text/plain), 3.30 KB, created by
Sergey Prigogin
on 2007-06-02 21:32:26 EDT
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Sergey Prigogin
Created:
2007-06-02 21:32:26 EDT
Size:
3.30 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.cdt.debug.mi.core >Index: cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.cdt-debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java,v >retrieving revision 1.24 >diff -u -r1.24 Variable.java >--- cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java 16 May 2007 19:11:49 -0000 1.24 >+++ cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java 3 Jun 2007 01:26:50 -0000 >@@ -10,6 +10,9 @@ > *******************************************************************************/ > package org.eclipse.cdt.debug.mi.core.cdi.model; > >+import java.util.ArrayList; >+import java.util.List; >+ > import org.eclipse.cdt.debug.core.cdi.CDIException; > import org.eclipse.cdt.debug.core.cdi.ICDIFormat; > import org.eclipse.cdt.debug.core.cdi.model.ICDITarget; >@@ -79,11 +82,11 @@ > /** > */ > public abstract class Variable extends VariableDescriptor implements ICDIVariable { >- >+ private static final ICDIVariable[] NO_CHILDREN = new ICDIVariable[0]; > protected MIVarCreate fVarCreateCMD; > protected MIVar fMIVar; > Value value; >- public ICDIVariable[] children = new ICDIVariable[0]; >+ public ICDIVariable[] children = NO_CHILDREN; > String editable = null; > String language; > boolean isFake = false; >@@ -243,6 +246,7 @@ > * allow the override of the timeout. > */ > public ICDIVariable[] getChildren(int timeout) throws CDIException { >+ children = NO_CHILDREN; > MISession mi = ((Target)getTarget()).getMISession(); > CommandFactory factory = mi.getCommandFactory(); > MIVarListChildren var = factory.createMIVarListChildren(getMIVar().getVarName()); >@@ -257,9 +261,10 @@ > throw new CDIException(CdiResources.getString("cdi.Common.No_answer")); //$NON-NLS-1$ > } > MIVar[] vars = info.getMIVars(); >- children = new Variable[vars.length]; >+ List childrenList = new ArrayList(vars.length); >+// children = new Variable[vars.length]; > // For C++ in GDB the children of the >- // the struture are the scope and the inherited classes. >+ // the structure are the scope and the inherited classes. > // For example: > // class foo: public bar { > // int x; >@@ -279,7 +284,7 @@ > boolean container = isStructureProvider(t); > for (int i = 0; i < vars.length; i++) { > String prefix = "(" + getFullName() + ")"; // parent qualified name >- String childName = vars[i].getExp(); // chield simple name >+ String childName = vars[i].getExp(); // child simple name > String childFullName = prefix + "." + childName; // fallback full name > ICDIType childType = null; > boolean childFake = false; >@@ -322,8 +327,18 @@ > v.fType = childType; > } > v.setIsFake(childFake); >- children[i] = v; >+ if (childFake && isAccessQualifier(childName)) { >+ // Replace a fake variable representing an access qualifier with its children. >+ ICDIVariable[] grandchildren = v.getChildren(timeout); >+ for (int j = 0; j < grandchildren.length; j++) { >+ childrenList.add(grandchildren[j]); >+ } >+ } else { >+ childrenList.add(v); >+ } > } >+ if (!childrenList.isEmpty()) >+ children = (ICDIVariable[]) childrenList.toArray(new Variable[childrenList.size()]); > } catch (MIException e) { > throw new MI2CDIException(e); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
bjorn.freeman-benson
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 52100
: 69876