mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 18:26:01 +02:00
Fix for 192834, missing location for struct-members in Open Element dialog.
This commit is contained in:
parent
d93eede391
commit
d09c6cad1e
1 changed files with 8 additions and 1 deletions
|
@ -41,6 +41,8 @@ import org.eclipse.cdt.core.browser.IndexTypeInfo;
|
||||||
import org.eclipse.cdt.core.browser.QualifiedTypeName;
|
import org.eclipse.cdt.core.browser.QualifiedTypeName;
|
||||||
import org.eclipse.cdt.core.dom.ast.DOMException;
|
import org.eclipse.cdt.core.dom.ast.DOMException;
|
||||||
import org.eclipse.cdt.core.dom.ast.IBinding;
|
import org.eclipse.cdt.core.dom.ast.IBinding;
|
||||||
|
import org.eclipse.cdt.core.dom.ast.ICompositeType;
|
||||||
|
import org.eclipse.cdt.core.dom.ast.IField;
|
||||||
import org.eclipse.cdt.core.dom.ast.IFunction;
|
import org.eclipse.cdt.core.dom.ast.IFunction;
|
||||||
import org.eclipse.cdt.core.dom.ast.cpp.ICPPBinding;
|
import org.eclipse.cdt.core.dom.ast.cpp.ICPPBinding;
|
||||||
import org.eclipse.cdt.core.index.IIndex;
|
import org.eclipse.cdt.core.index.IIndex;
|
||||||
|
@ -253,7 +255,12 @@ public class ElementSelectionDialog extends TypeSelectionDialog {
|
||||||
|
|
||||||
if(binding instanceof ICPPBinding) {
|
if(binding instanceof ICPPBinding) {
|
||||||
fqn= ((ICPPBinding)binding).getQualifiedName();
|
fqn= ((ICPPBinding)binding).getQualifiedName();
|
||||||
} else {
|
} else if (binding instanceof IField) {
|
||||||
|
IField field= (IField) binding;
|
||||||
|
ICompositeType owner= field.getCompositeTypeOwner();
|
||||||
|
fqn= new String[] {owner.getName(), field.getName()};
|
||||||
|
}
|
||||||
|
else {
|
||||||
fqn= new String[] {binding.getName()};
|
fqn= new String[] {binding.getName()};
|
||||||
}
|
}
|
||||||
if (binding instanceof IFunction) {
|
if (binding instanceof IFunction) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue