From 93ae2153c7ff4c900ab9d9941f584225531f7461 Mon Sep 17 00:00:00 2001 From: Andrew Ferguson Date: Fri, 27 Apr 2007 12:58:21 +0000 Subject: 184216: add two missing composite template bindings --- .../index/tests/IndexBindingResolutionBugs.java | 247 ------------------ .../index/tests/IndexCPPBindingResolutionBugs.java | 276 +++++++++++++++++++++ .../tests/IndexCPPTemplateResolutionTest.java | 1 - .../cdt/internal/index/tests/IndexTests.java | 6 +- .../index/composite/cpp/CPPCompositesFactory.java | 4 + .../cpp/CompositeCPPConstructorTemplate.java | 27 ++ .../composite/cpp/CompositeCPPMethodTemplate.java | 47 ++++ .../cdt/internal/core/pdom/db/DBStatus.java | 2 +- .../cdt/internal/core/pdom/dom/PDOMFile.java | 2 - 9 files changed, 358 insertions(+), 254 deletions(-) delete mode 100644 core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexBindingResolutionBugs.java create mode 100644 core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCPPBindingResolutionBugs.java create mode 100644 core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPConstructorTemplate.java create mode 100644 core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPMethodTemplate.java diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexBindingResolutionBugs.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexBindingResolutionBugs.java deleted file mode 100644 index 843a6fa8b44..00000000000 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexBindingResolutionBugs.java +++ /dev/null @@ -1,247 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2006, 2007 Wind River Systems, Inc. and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Markus Schorn - initial API and implementation - * Andrew Ferguson (Symbian) - *******************************************************************************/ -package org.eclipse.cdt.internal.index.tests; - -import junit.framework.TestSuite; - -import org.eclipse.cdt.core.dom.ast.DOMException; -import org.eclipse.cdt.core.dom.ast.IASTName; -import org.eclipse.cdt.core.dom.ast.IBinding; -import org.eclipse.cdt.core.dom.ast.IFunction; -import org.eclipse.cdt.core.dom.ast.IScope; -import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassTemplate; -import org.eclipse.cdt.core.dom.ast.cpp.ICPPField; -import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespace; -import org.eclipse.cdt.core.dom.ast.cpp.ICPPSpecialization; -import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameter; -import org.eclipse.cdt.core.dom.ast.cpp.ICPPVariable; -import org.eclipse.cdt.core.parser.util.ObjectMap; - -/** - * For testing PDOM binding resolution - */ -public class IndexBindingResolutionBugs extends IndexBindingResolutionTestBase { - - public static class SingleProject extends IndexBindingResolutionBugs { - public SingleProject() {setStrategy(new SinglePDOMTestStrategy(true));} - } - public static class ProjectWithDepProj extends IndexBindingResolutionBugs { - public ProjectWithDepProj() {setStrategy(new ReferencedProject(true));} - } - - public static void addTests(TestSuite suite) { - suite.addTest(suite(SingleProject.class)); - suite.addTest(suite(ProjectWithDepProj.class)); - } - - public static TestSuite suite() { - return suite(IndexBindingResolutionBugs.class); - } - - public IndexBindingResolutionBugs() { - setStrategy(new SinglePDOMTestStrategy(true)); - } - - // // header file - // class cl; - // typedef cl* t1; - // typedef t1 t2; - - //// referencing content - // void func(t2 a); - // void func(int b); - // void ref() { - // cl* a; - // func(a); - // } - public void testBug166954() { - IBinding b0 = getBindingFromASTName("func(a)", 4); - } - - // // header - // class Base { - // public: - // void foo(int i); - // int fooint(); - // char* fooovr(); - // char* fooovr(int a); - // char* fooovr(char x); - // }; - - // // references - // #include "header.h" - // void Base::foo(int i) {} - // int Base::fooint() {return 0;} - // char* Base::fooovr() {return 0;} - // char* Base::fooovr(int a) {return 0;} - // char* Base::fooovr(char x) {return 0;} - // - // void refs() { - // Base b; - // b.foo(1); - // b.fooint(); - // b.fooovr(); - // b.fooovr(1); - // b.fooovr('a'); - // } - public void test168020() { - getBindingFromASTName("foo(int i)", 3); - getBindingFromASTName("fooint()", 6); - getBindingFromASTName("fooovr()", 6); - getBindingFromASTName("fooovr(int", 6); - getBindingFromASTName("fooovr(char", 6); - - getBindingFromASTName("foo(1)", 3); - getBindingFromASTName("fooint();", 6); - getBindingFromASTName("fooovr();", 6); - getBindingFromASTName("fooovr(1", 6); - getBindingFromASTName("fooovr('", 6); - } - - - // // header - // class Base { - // public: - // void foo(int i); - // int foo2(int i); - // }; - // - // void func(int k); - // void func2(int i); - - // // references - // #include "header.h" - // void Base::foo(int i) { - // i=2; - // } - // void Base::foo2(int j) { - // j=2; - // } - // void func(int k) { - // k=2; - // } - // void func2(int l) { - // l=2; - // } - public void test168054() { - getBindingFromASTName("i=2", 1); - getBindingFromASTName("j=2", 1); - getBindingFromASTName("k=2", 1); - getBindingFromASTName("l=2", 1); - } - - // namespace X {} - - // namespace Y { - // class Ambiguity {}; - // enum Ambiguity {A1,A2,A3}; - // void foo() { - // Ambiguity problem; - // } - // } - public void testBug176708_CCE() throws Exception { - IBinding binding= getBindingFromASTName("Y {", 1); - assertTrue(binding instanceof ICPPNamespace); - ICPPNamespace adapted= (ICPPNamespace) strategy.getIndex().adaptBinding(binding); - IASTName[] names= findNames("Ambiguity problem", 9); - assertEquals(1, names.length); - IBinding binding2= adapted.getNamespaceScope().getBinding(names[0], true); - } - - // namespace X {int i;} - - // // references - // #include "header.h" - // int a= X::i; - public void testBug176708_NPE() throws Exception { - IBinding binding= getBindingFromASTName("i;", 1); - assertTrue(binding instanceof ICPPVariable); - IScope scope= binding.getScope(); - } - - // template - // class A {}; - - // template<> - // class A {}; - public void testBug180784() throws Exception { - IBinding b0= getBindingFromASTName("A {};", 20); - assertInstance(b0, ICPPSpecialization.class); - ICPPSpecialization s= (ICPPSpecialization) b0; - ObjectMap map= s.getArgumentMap(); - IBinding b1= s.getSpecializedBinding(); - assertInstance(b1, ICPPClassTemplate.class); - ICPPClassTemplate t= (ICPPClassTemplate) b1; - ICPPTemplateParameter[] ps = t.getTemplateParameters(); - assertNotNull(ps); - assertEquals(3, ps.length); - assertNotNull(map.get(ps[0])); - assertNotNull(map.get(ps[1])); - assertNotNull(map.get(ps[2])); - } - - // class A{}; - // - // template - // T id (T t) {return t;} - // - // template<> - // A id (A a) {return a;} - // - // int id(int x) {return x;} - - // void foo() { - // id(*new A()); - // id(6); - // } - public void testBug180948() throws Exception { - // Main check occurs in BaseTestCase - that no ClassCastException - // is thrown during indexing - IBinding b0= getBindingFromASTName("id(*", 2); - IBinding b1= getBindingFromASTName("id(6", 2); - } - - - // void func1(void); - - // #include "header.h" - // - // int main(void) - // { - // void* v= func1; - // } - public void testBug181735() throws DOMException { - IBinding b0 = getBindingFromASTName("func1;", 5); - assertTrue(b0 instanceof IFunction); - } - - // class B { - // public: - // class BB { - // public: - // int field; - // }; - // }; - // - // class A : public B::BB {}; - - // #include "header.h" - // - // void foo() { - // A c; - // c.field;//comment - // } - public void testBug183843() throws DOMException { - IBinding b0 = getBindingFromASTName("field;//", 5); - assertTrue(b0 instanceof ICPPField); - } -} diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCPPBindingResolutionBugs.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCPPBindingResolutionBugs.java new file mode 100644 index 00000000000..b53754d3668 --- /dev/null +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCPPBindingResolutionBugs.java @@ -0,0 +1,276 @@ +/******************************************************************************* + * Copyright (c) 2006, 2007 Wind River Systems, Inc. and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Markus Schorn - initial API and implementation + * Andrew Ferguson (Symbian) + *******************************************************************************/ +package org.eclipse.cdt.internal.index.tests; + +import junit.framework.TestSuite; + +import org.eclipse.cdt.core.dom.ast.DOMException; +import org.eclipse.cdt.core.dom.ast.IASTName; +import org.eclipse.cdt.core.dom.ast.IBinding; +import org.eclipse.cdt.core.dom.ast.IFunction; +import org.eclipse.cdt.core.dom.ast.IScope; +import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassTemplate; +import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType; +import org.eclipse.cdt.core.dom.ast.cpp.ICPPField; +import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod; +import org.eclipse.cdt.core.dom.ast.cpp.ICPPNamespace; +import org.eclipse.cdt.core.dom.ast.cpp.ICPPSpecialization; +import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateDefinition; +import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameter; +import org.eclipse.cdt.core.dom.ast.cpp.ICPPVariable; +import org.eclipse.cdt.core.parser.util.ObjectMap; + +/** + * For testing PDOM binding resolution + */ +public class IndexCPPBindingResolutionBugs extends IndexBindingResolutionTestBase { + + public static class SingleProject extends IndexCPPBindingResolutionBugs { + public SingleProject() {setStrategy(new SinglePDOMTestStrategy(true));} + } + public static class ProjectWithDepProj extends IndexCPPBindingResolutionBugs { + public ProjectWithDepProj() {setStrategy(new ReferencedProject(true));} + } + + public static void addTests(TestSuite suite) { + suite.addTest(suite(SingleProject.class)); + suite.addTest(suite(ProjectWithDepProj.class)); + } + + public static TestSuite suite() { + return suite(IndexCPPBindingResolutionBugs.class); + } + + public IndexCPPBindingResolutionBugs() { + setStrategy(new SinglePDOMTestStrategy(true)); + } + + // class MyClass { + // public: + // template + // T* MopGetObject(T*& aPtr) + // { return 0; } + // + // + // template + // T* MopGetObjectNoChaining(T*& aPtr) + // { return 0; } + // + // }; + + // int main() { + // MyClass* cls; + // } + public void test184216() throws Exception { + IBinding b0= getBindingFromASTName("MyClass", 7); + assertInstance(b0, ICPPClassType.class); + ICPPClassType ct= (ICPPClassType) b0; + ICPPMethod[] ms= ct.getDeclaredMethods(); // 184216 reports CCE thrown + assertEquals(2, ms.length); + assertInstance(ms[0], ICPPTemplateDefinition.class); + assertInstance(ms[1], ICPPTemplateDefinition.class); + } + + // // header file + // class cl; + // typedef cl* t1; + // typedef t1 t2; + + //// referencing content + // void func(t2 a); + // void func(int b); + // void ref() { + // cl* a; + // func(a); + // } + public void testBug166954() { + IBinding b0 = getBindingFromASTName("func(a)", 4); + } + + // // header + // class Base { + // public: + // void foo(int i); + // int fooint(); + // char* fooovr(); + // char* fooovr(int a); + // char* fooovr(char x); + // }; + + // // references + // #include "header.h" + // void Base::foo(int i) {} + // int Base::fooint() {return 0;} + // char* Base::fooovr() {return 0;} + // char* Base::fooovr(int a) {return 0;} + // char* Base::fooovr(char x) {return 0;} + // + // void refs() { + // Base b; + // b.foo(1); + // b.fooint(); + // b.fooovr(); + // b.fooovr(1); + // b.fooovr('a'); + // } + public void test168020() { + getBindingFromASTName("foo(int i)", 3); + getBindingFromASTName("fooint()", 6); + getBindingFromASTName("fooovr()", 6); + getBindingFromASTName("fooovr(int", 6); + getBindingFromASTName("fooovr(char", 6); + + getBindingFromASTName("foo(1)", 3); + getBindingFromASTName("fooint();", 6); + getBindingFromASTName("fooovr();", 6); + getBindingFromASTName("fooovr(1", 6); + getBindingFromASTName("fooovr('", 6); + } + + + // // header + // class Base { + // public: + // void foo(int i); + // int foo2(int i); + // }; + // + // void func(int k); + // void func2(int i); + + // // references + // #include "header.h" + // void Base::foo(int i) { + // i=2; + // } + // void Base::foo2(int j) { + // j=2; + // } + // void func(int k) { + // k=2; + // } + // void func2(int l) { + // l=2; + // } + public void test168054() { + getBindingFromASTName("i=2", 1); + getBindingFromASTName("j=2", 1); + getBindingFromASTName("k=2", 1); + getBindingFromASTName("l=2", 1); + } + + // namespace X {} + + // namespace Y { + // class Ambiguity {}; + // enum Ambiguity {A1,A2,A3}; + // void foo() { + // Ambiguity problem; + // } + // } + public void testBug176708_CCE() throws Exception { + IBinding binding= getBindingFromASTName("Y {", 1); + assertTrue(binding instanceof ICPPNamespace); + ICPPNamespace adapted= (ICPPNamespace) strategy.getIndex().adaptBinding(binding); + IASTName[] names= findNames("Ambiguity problem", 9); + assertEquals(1, names.length); + IBinding binding2= adapted.getNamespaceScope().getBinding(names[0], true); + } + + // namespace X {int i;} + + // // references + // #include "header.h" + // int a= X::i; + public void testBug176708_NPE() throws Exception { + IBinding binding= getBindingFromASTName("i;", 1); + assertTrue(binding instanceof ICPPVariable); + IScope scope= binding.getScope(); + } + + // template + // class A {}; + + // template<> + // class A {}; + public void testBug180784() throws Exception { + IBinding b0= getBindingFromASTName("A {};", 20); + assertInstance(b0, ICPPSpecialization.class); + ICPPSpecialization s= (ICPPSpecialization) b0; + ObjectMap map= s.getArgumentMap(); + IBinding b1= s.getSpecializedBinding(); + assertInstance(b1, ICPPClassTemplate.class); + ICPPClassTemplate t= (ICPPClassTemplate) b1; + ICPPTemplateParameter[] ps = t.getTemplateParameters(); + assertNotNull(ps); + assertEquals(3, ps.length); + assertNotNull(map.get(ps[0])); + assertNotNull(map.get(ps[1])); + assertNotNull(map.get(ps[2])); + } + + // class A{}; + // + // template + // T id (T t) {return t;} + // + // template<> + // A id (A a) {return a;} + // + // int id(int x) {return x;} + + // void foo() { + // id(*new A()); + // id(6); + // } + public void testBug180948() throws Exception { + // Main check occurs in BaseTestCase - that no ClassCastException + // is thrown during indexing + IBinding b0= getBindingFromASTName("id(*", 2); + IBinding b1= getBindingFromASTName("id(6", 2); + } + + + // void func1(void); + + // #include "header.h" + // + // int main(void) + // { + // void* v= func1; + // } + public void testBug181735() throws DOMException { + IBinding b0 = getBindingFromASTName("func1;", 5); + assertTrue(b0 instanceof IFunction); + } + + // class B { + // public: + // class BB { + // public: + // int field; + // }; + // }; + // + // class A : public B::BB {}; + + // #include "header.h" + // + // void foo() { + // A c; + // c.field;//comment + // } + public void testBug183843() throws DOMException { + IBinding b0 = getBindingFromASTName("field;//", 5); + assertTrue(b0 instanceof ICPPField); + } +} diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCPPTemplateResolutionTest.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCPPTemplateResolutionTest.java index 5c4eea02b61..6ed8008b7d4 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCPPTemplateResolutionTest.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexCPPTemplateResolutionTest.java @@ -42,7 +42,6 @@ public class IndexCPPTemplateResolutionTest extends IndexBindingResolutionTestBa suite.addTest(suite(SingleProject.class)); suite.addTest(suite(ProjectWithDepProj.class)); } - // template // void foo(X x) {} diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexTests.java index b4a09cd8027..2698a4ebdfa 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexTests.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexTests.java @@ -30,11 +30,11 @@ public class IndexTests extends TestSuite { suite.addTest(TeamSharedIndexTest.suite()); suite.addTest(IndexProviderManagerTest.suite()); - IndexCBindingResolutionTest.addTests(suite); - IndexCPPTemplateResolutionTest.addTests(suite); + IndexCPPBindingResolutionBugs.addTests(suite); IndexCPPBindingResolutionTest.addTests(suite); + IndexCPPTemplateResolutionTest.addTests(suite); IndexCBindingResolutionBugs.addTests(suite); - IndexBindingResolutionBugs.addTests(suite); + IndexCBindingResolutionTest.addTests(suite); return suite; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CPPCompositesFactory.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CPPCompositesFactory.java index 7666e280284..34f00456503 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CPPCompositesFactory.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CPPCompositesFactory.java @@ -162,6 +162,10 @@ public class CPPCompositesFactory extends AbstractCompositeFactory implements IC } else if (binding instanceof ICPPTemplateDefinition) { if(binding instanceof ICPPClassTemplate) { return new CompositeCPPClassTemplate(this, (ICPPClassType) findOneDefinition(binding)); + } else if (binding instanceof ICPPConstructor) { + return new CompositeCPPConstructorTemplate(this, (ICPPConstructor) binding); + } else if (binding instanceof ICPPMethod) { + return new CompositeCPPMethodTemplate(this, (ICPPMethod) binding); } else if (binding instanceof ICPPFunctionTemplate) { return new CompositeCPPFunctionTemplate(this, (ICPPFunction) binding); } else { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPConstructorTemplate.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPConstructorTemplate.java new file mode 100644 index 00000000000..7d72c84cfa3 --- /dev/null +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPConstructorTemplate.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 2007 Symbian Software Systems and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Andrew Ferguson (Symbian) - Initial implementation + *******************************************************************************/ +package org.eclipse.cdt.internal.core.index.composite.cpp; + +import org.eclipse.cdt.core.dom.ast.DOMException; +import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor; +import org.eclipse.cdt.internal.core.index.composite.ICompositesFactory; + +public class CompositeCPPConstructorTemplate extends CompositeCPPMethodTemplate implements ICPPConstructor { + + public CompositeCPPConstructorTemplate(ICompositesFactory cf, ICPPConstructor rbinding) { + super(cf, rbinding); + } + + public boolean isExplicit() throws DOMException { + return ((ICPPConstructor)rbinding).isExplicit(); + } + +} diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPMethodTemplate.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPMethodTemplate.java new file mode 100644 index 00000000000..4deba0ba000 --- /dev/null +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPMethodTemplate.java @@ -0,0 +1,47 @@ +/******************************************************************************* + * Copyright (c) 2007 Symbian Software Systems and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Andrew Ferguson (Symbian) - Initial implementation + *******************************************************************************/ +package org.eclipse.cdt.internal.core.index.composite.cpp; + +import org.eclipse.cdt.core.dom.ast.DOMException; +import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType; +import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod; +import org.eclipse.cdt.internal.core.index.IIndexFragmentBinding; +import org.eclipse.cdt.internal.core.index.composite.ICompositesFactory; + +public class CompositeCPPMethodTemplate extends CompositeCPPFunctionTemplate implements ICPPMethod { + + public CompositeCPPMethodTemplate(ICompositesFactory cf, ICPPMethod rbinding) { + super(cf, rbinding); + } + + public boolean isDestructor() throws DOMException { + return ((ICPPMethod)rbinding).isDestructor(); + } + + public boolean isImplicit() { + return ((ICPPMethod)rbinding).isImplicit(); + } + + public boolean isVirtual() throws DOMException { + return ((ICPPMethod)rbinding).isVirtual(); + } + + public ICPPClassType getClassOwner() throws DOMException { + IIndexFragmentBinding rowner = (IIndexFragmentBinding) ((ICPPMethod)rbinding).getClassOwner(); + return (ICPPClassType) cf.getCompositeBinding(rowner); + } + + + public int getVisibility() throws DOMException { + return ((ICPPMethod)rbinding).getVisibility(); + } + +} diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/DBStatus.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/DBStatus.java index 34441deffd4..1164e545de7 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/DBStatus.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/DBStatus.java @@ -27,7 +27,7 @@ public class DBStatus extends Status { * @param exception */ public DBStatus(IOException exception) { - super(IStatus.ERROR, CCorePlugin.PLUGIN_ID, 0, "IOException", exception); + super(IStatus.ERROR, CCorePlugin.PLUGIN_ID, 0, "IOException", exception); //$NON-NLS-1$ } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMFile.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMFile.java index cea582844f7..f14a8cbd9dc 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMFile.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMFile.java @@ -12,9 +12,7 @@ *******************************************************************************/ package org.eclipse.cdt.internal.core.pdom.dom; -import java.lang.reflect.Array; import java.util.ArrayList; -import java.util.Arrays; import java.util.HashMap; import java.util.Iterator; import java.util.List; -- cgit v1.2.3