diff --git a/core/org.eclipse.cdt.core.aix/META-INF/MANIFEST.MF b/core/org.eclipse.cdt.core.aix/META-INF/MANIFEST.MF index a238bc8a7ca..1ee36ed73f0 100644 --- a/core/org.eclipse.cdt.core.aix/META-INF/MANIFEST.MF +++ b/core/org.eclipse.cdt.core.aix/META-INF/MANIFEST.MF @@ -3,7 +3,6 @@ Bundle-ManifestVersion: 2 Bundle-Name: %fragmentName.aix Bundle-SymbolicName: org.eclipse.cdt.core.aix; singleton:=true Bundle-Version: 5.1.1.qualifier -Bundle-ClassPath: cdtaix.jar Bundle-Vendor: %providerName Fragment-Host: org.eclipse.cdt.core;bundle-version="[5.0.0,6.0.0)" Bundle-Localization: plugin diff --git a/core/org.eclipse.cdt.core.aix/build.properties b/core/org.eclipse.cdt.core.aix/build.properties index 1c593888d45..4cc40daacc3 100644 --- a/core/org.eclipse.cdt.core.aix/build.properties +++ b/core/org.eclipse.cdt.core.aix/build.properties @@ -13,6 +13,7 @@ bin.includes = fragment.xml,\ .,\ about.html,\ META-INF/,\ - os/ + os/,\ + plugin.properties src.includes = library/,\ about.html diff --git a/core/org.eclipse.cdt.core.aix/cdtaix.jar b/core/org.eclipse.cdt.core.aix/cdtaix.jar deleted file mode 100644 index ed750248701..00000000000 Binary files a/core/org.eclipse.cdt.core.aix/cdtaix.jar and /dev/null differ diff --git a/core/org.eclipse.cdt.core.aix/plugin.properties b/core/org.eclipse.cdt.core.aix/plugin.properties new file mode 100644 index 00000000000..a7caa474ef7 --- /dev/null +++ b/core/org.eclipse.cdt.core.aix/plugin.properties @@ -0,0 +1,2 @@ +fragmentName.linux=C/C++ Development Tools Core for AIX +providerName=Eclipse CDT diff --git a/core/org.eclipse.cdt.core.linux/META-INF/MANIFEST.MF b/core/org.eclipse.cdt.core.linux/META-INF/MANIFEST.MF index 80e45316a4e..b8c60b0b498 100644 --- a/core/org.eclipse.cdt.core.linux/META-INF/MANIFEST.MF +++ b/core/org.eclipse.cdt.core.linux/META-INF/MANIFEST.MF @@ -3,7 +3,6 @@ Bundle-ManifestVersion: 2 Bundle-Name: %fragmentName.linux Bundle-SymbolicName: org.eclipse.cdt.core.linux; singleton:=true Bundle-Version: 5.2.0.qualifier -Bundle-ClassPath: cdt_linux.jar Bundle-Vendor: %providerName Fragment-Host: org.eclipse.cdt.core;bundle-version="[5.2.0,6.0.0)" Bundle-Localization: plugin diff --git a/core/org.eclipse.cdt.core.linux/build.properties b/core/org.eclipse.cdt.core.linux/build.properties index 6542e91cbdf..cfcc7204fc7 100644 --- a/core/org.eclipse.cdt.core.linux/build.properties +++ b/core/org.eclipse.cdt.core.linux/build.properties @@ -11,7 +11,8 @@ bin.includes = fragment.xml,\ about.html,\ .,\ - META-INF/ + META-INF/,\ + plugin.properties src.includes = about.html,\ library/ source.. = src/ diff --git a/core/org.eclipse.cdt.core.linux/cdt_linux.jar b/core/org.eclipse.cdt.core.linux/cdt_linux.jar deleted file mode 100644 index d52f913efb2..00000000000 Binary files a/core/org.eclipse.cdt.core.linux/cdt_linux.jar and /dev/null differ diff --git a/core/org.eclipse.cdt.core.linux/plugin.properties b/core/org.eclipse.cdt.core.linux/plugin.properties new file mode 100644 index 00000000000..6c8e47ac7e1 --- /dev/null +++ b/core/org.eclipse.cdt.core.linux/plugin.properties @@ -0,0 +1,2 @@ +fragmentName.linux=C/C++ Development Tools Core for Linux +providerName=Eclipse CDT diff --git a/core/org.eclipse.cdt.core.macosx/META-INF/MANIFEST.MF b/core/org.eclipse.cdt.core.macosx/META-INF/MANIFEST.MF index 9391a5985ab..448544e2327 100644 --- a/core/org.eclipse.cdt.core.macosx/META-INF/MANIFEST.MF +++ b/core/org.eclipse.cdt.core.macosx/META-INF/MANIFEST.MF @@ -3,7 +3,6 @@ Bundle-ManifestVersion: 2 Bundle-Name: %fragmentName.macosx Bundle-SymbolicName: org.eclipse.cdt.core.macosx; singleton:=true Bundle-Version: 5.2.0.qualifier -Bundle-ClassPath: cdt_macosx.jar Bundle-Vendor: %providerName Fragment-Host: org.eclipse.cdt.core;bundle-version="[5.2.0,6.0.0)" Bundle-Localization: plugin diff --git a/core/org.eclipse.cdt.core.macosx/build.properties b/core/org.eclipse.cdt.core.macosx/build.properties index fc76b9bff0c..72726d4a8ce 100644 --- a/core/org.eclipse.cdt.core.macosx/build.properties +++ b/core/org.eclipse.cdt.core.macosx/build.properties @@ -12,7 +12,8 @@ bin.includes = fragment.xml,\ about.html,\ .,\ os/,\ - META-INF/ + META-INF/,\ + plugin.properties src.includes = about.html,\ library/ source.. = src/ diff --git a/core/org.eclipse.cdt.core.macosx/cdt_macosx.jar b/core/org.eclipse.cdt.core.macosx/cdt_macosx.jar deleted file mode 100644 index 99d684f11a0..00000000000 Binary files a/core/org.eclipse.cdt.core.macosx/cdt_macosx.jar and /dev/null differ diff --git a/core/org.eclipse.cdt.core.macosx/plugin.properties b/core/org.eclipse.cdt.core.macosx/plugin.properties new file mode 100644 index 00000000000..dda4771c596 --- /dev/null +++ b/core/org.eclipse.cdt.core.macosx/plugin.properties @@ -0,0 +1,2 @@ +fragmentName.linux=C/C++ Development Tools Core for Mac OS X +providerName=Eclipse CDT diff --git a/core/org.eclipse.cdt.core.solaris/META-INF/MANIFEST.MF b/core/org.eclipse.cdt.core.solaris/META-INF/MANIFEST.MF index 92d3b1e3cf1..9fd313a9c02 100644 --- a/core/org.eclipse.cdt.core.solaris/META-INF/MANIFEST.MF +++ b/core/org.eclipse.cdt.core.solaris/META-INF/MANIFEST.MF @@ -3,7 +3,6 @@ Bundle-ManifestVersion: 2 Bundle-Name: %fragmentName.solaris Bundle-SymbolicName: org.eclipse.cdt.core.solaris; singleton:=true Bundle-Version: 5.2.0.qualifier -Bundle-ClassPath: cdt_solaris.jar Bundle-Vendor: %providerName Fragment-Host: org.eclipse.cdt.core;bundle-version="[5.2.0,6.0.0)" Bundle-Localization: plugin diff --git a/core/org.eclipse.cdt.core.solaris/build.properties b/core/org.eclipse.cdt.core.solaris/build.properties index 682baefa984..4b121c5dec2 100644 --- a/core/org.eclipse.cdt.core.solaris/build.properties +++ b/core/org.eclipse.cdt.core.solaris/build.properties @@ -12,7 +12,8 @@ bin.includes = fragment.xml,\ about.html,\ os/,\ .,\ - META-INF/ + META-INF/,\ + plugin.properties src.includes = about.html,\ library/ source.. = src/ diff --git a/core/org.eclipse.cdt.core.solaris/cdt_solaris.jar b/core/org.eclipse.cdt.core.solaris/cdt_solaris.jar deleted file mode 100644 index 5b7ad3f5649..00000000000 Binary files a/core/org.eclipse.cdt.core.solaris/cdt_solaris.jar and /dev/null differ diff --git a/core/org.eclipse.cdt.core.solaris/plugin.properties b/core/org.eclipse.cdt.core.solaris/plugin.properties new file mode 100644 index 00000000000..6b680ec07d0 --- /dev/null +++ b/core/org.eclipse.cdt.core.solaris/plugin.properties @@ -0,0 +1,2 @@ +fragmentName.linux=C/C++ Development Tools Core for Solaris +providerName=Eclipse CDT diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java index 0bc7d6659da..ccef1360111 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java @@ -57,7 +57,6 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateId; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUnaryExpression; import org.eclipse.cdt.core.dom.ast.cpp.ICPPBase; import org.eclipse.cdt.core.dom.ast.cpp.ICPPBasicType; -import org.eclipse.cdt.core.dom.ast.cpp.ICPPBinding; import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassScope; import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassSpecialization; import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassTemplate; @@ -327,7 +326,7 @@ public class AST2TemplateTests extends AST2BaseTest { // the instantiation of A has to be deferred. assertInstance(b0, ICPPUnknownBinding.class); - final ICPPBinding parent = ((ICPPInternalUnknownScope) b0.getScope()).getScopeBinding(); + final IType parent = ((ICPPInternalUnknownScope) b0.getScope()).getScopeType(); assertInstance(parent, ICPPDeferredClassInstance.class); assertSame(((ICPPDeferredClassInstance) parent).getSpecializedBinding(), A); @@ -6034,4 +6033,45 @@ public class AST2TemplateTests extends AST2BaseTest { public void testDeductionOfNonTypeTemplateArg_372587() throws Exception { parseAndCheckBindings(getAboveComment(), CPP, true); } + + // template void b(_Functor __f) {} + // template void f(T __first, T __last, const V& __val) {} + // template void f(T __first, T __last, const T& __val) {} + // void test() { + // b(f); + // } + public void testFunctionSetWithNonMatchingTemplateArgs_379604() throws Exception { + parseAndCheckBindings(getAboveComment(), CPP, true); + } + + // template struct C { + // typedef decltype(&T::m) dtm; + // }; + // struct X { + // int m() {return 0;} + // }; + // void f(int (X::*)()) {} + // void test() { + // f(&X::m); + // C::dtm v; + // f(v); + // } + public void testPointerToMemberAsDependentExpression_391001() throws Exception { + parseAndCheckBindings(getAboveComment(), CPP, true); + } + + // class Memory { }; + // Memory memory; + // template struct Container { + // struct iterator { + // int test; + // }; + // }; + // int main() { + // Container<&memory>::iterator it; + // it.test; // Field 'test' could not be resolved + // } + public void testAddressAsTemplateArgument_391190() throws Exception { + parseAndCheckBindings(getAboveComment(), CPP, true); + } } diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexBugsTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexBugsTests.java index 785a110ed0b..578d5475c32 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexBugsTests.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexBugsTests.java @@ -1777,10 +1777,6 @@ public class IndexBugsTests extends BaseTestCase { assertEquals(1, bases.length); IBinding inst = bases[0].getBaseClass(); assertTrue(inst instanceof ICPPTemplateInstance); - - IIndexName name= (IIndexName) bases[0].getBaseClassSpecifierName(); - IBinding inst2= fIndex.findBinding(name); - assertEquals(inst, inst2); } finally { fIndex.releaseReadLock(); } 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 ac479f76372..8c00a830dd1 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 @@ -2034,4 +2034,16 @@ public class IndexCPPTemplateResolutionTest extends IndexBindingResolutionTestBa public void testSFINAE_b() throws Exception { checkBindings(); } + + // struct CString { + // template class ListT, class UType, class Alloc, typename StringT> + // void split(ListT& out, const StringT& sep, bool keepEmptyElements = false, bool trimElements = true, bool emptyBefore = true) const; + // }; + + // template class ListT, class UType, class Alloc, class StringT> + // void CString::split(ListT& out, const StringT& sep, bool keepEmptyElements, bool trimElements, bool emptyBefore) const { + // } + public void testMemberOfTemplateTemplateParameter_Bug381824() throws Exception { + checkBindings(); + } } diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexUpdateTests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexUpdateTests.java index c25c43b7e29..80faf0f2e50 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexUpdateTests.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/internal/index/tests/IndexUpdateTests.java @@ -28,6 +28,7 @@ import org.eclipse.cdt.core.dom.ast.IType; import org.eclipse.cdt.core.dom.ast.ITypedef; import org.eclipse.cdt.core.dom.ast.IValue; import org.eclipse.cdt.core.dom.ast.IVariable; +import org.eclipse.cdt.core.dom.ast.cpp.ICPPBase; 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.ICPPConstructor; @@ -1461,4 +1462,43 @@ public class IndexUpdateTests extends IndexTestBase { fIndex.releaseReadLock(); } } + + // struct Base { + // void foo() {} + // }; + // struct Derived: Base { + // Derived(); + // }; + + // struct Base { + // void foo() {} + // }; + // struct Derived: Base { + // Derived(); + // }; + public void testBaseClass_Bug391284() throws Exception { + setupFile(2, true); + fIndex.acquireReadLock(); + try { + final ICPPClassType s = (ICPPClassType) findBinding("Derived"); + assertNotNull(s); + final ICPPBase[] bases = s.getBases(); + assertEquals(1, bases.length); + assertEquals("Base", bases[0].getBaseClass().getName()); + } finally { + fIndex.releaseReadLock(); + } + updateFile(); + + fIndex.acquireReadLock(); + try { + final ICPPClassType s = (ICPPClassType) findBinding("Derived"); + assertNotNull(s); + final ICPPBase[] bases = s.getBases(); + assertEquals(1, bases.length); + assertEquals("Base", bases[0].getBaseClass().getName()); + } finally { + fIndex.releaseReadLock(); + } + } } diff --git a/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/suite/AutomatedIntegrationSuite.java b/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/suite/AutomatedIntegrationSuite.java index 3e999a48886..d458b04a10a 100644 --- a/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/suite/AutomatedIntegrationSuite.java +++ b/core/org.eclipse.cdt.core.tests/suite/org/eclipse/cdt/core/suite/AutomatedIntegrationSuite.java @@ -71,10 +71,7 @@ public class AutomatedIntegrationSuite extends TestSuite { suite.addTest(CDescriptorOldTests.suite()); suite.addTest(IEnvironmentVariableManagerTests.suite()); suite.addTest(ErrorParserTests.suite()); - // Has intermittent failures - if (System.getProperty("cdt.skip.known.test.failures") == null) { suite.addTest(ParserTestSuite.suite()); - } suite.addTest(AllCoreTests.suite()); suite.addTest(ElementDeltaTests.suite()); suite.addTest(WorkingCopyTests.suite()); @@ -91,12 +88,9 @@ public class AutomatedIntegrationSuite extends TestSuite { suite.addTest(EFSExtensionTests.suite()); suite.addTest(ByteUtilsTest.suite()); - // Has intermittent failures - if (System.getProperty("cdt.skip.known.test.failures") == null) { //$NON-NLS-1$ // Add in PDOM tests suite.addTest(PDOMTests.suite()); suite.addTest(IndexTests.suite()); - } suite.addTest(RefreshScopeTests.suite()); diff --git a/core/org.eclipse.cdt.core.win32/META-INF/MANIFEST.MF b/core/org.eclipse.cdt.core.win32/META-INF/MANIFEST.MF index e8227526a50..e1f24800250 100644 --- a/core/org.eclipse.cdt.core.win32/META-INF/MANIFEST.MF +++ b/core/org.eclipse.cdt.core.win32/META-INF/MANIFEST.MF @@ -3,7 +3,6 @@ Bundle-ManifestVersion: 2 Bundle-Name: %fragmentName.win32 Bundle-SymbolicName: org.eclipse.cdt.core.win32; singleton:=true Bundle-Version: 5.3.0.qualifier -Bundle-ClassPath: cdt_win32.jar Bundle-Vendor: %providerName Fragment-Host: org.eclipse.cdt.core;bundle-version="[5.2.0,6.0.0)" Bundle-Localization: plugin diff --git a/core/org.eclipse.cdt.core.win32/build.properties b/core/org.eclipse.cdt.core.win32/build.properties index 3805517ebdd..5afcaa0bc45 100644 --- a/core/org.eclipse.cdt.core.win32/build.properties +++ b/core/org.eclipse.cdt.core.win32/build.properties @@ -11,7 +11,8 @@ bin.includes = fragment.xml,\ about.html,\ .,\ - META-INF/ + META-INF/,\ + plugin.properties src.includes = about.html,\ library/ source.. = src/ diff --git a/core/org.eclipse.cdt.core.win32/cdt_win32.jar b/core/org.eclipse.cdt.core.win32/cdt_win32.jar deleted file mode 100644 index ba72d9299ed..00000000000 Binary files a/core/org.eclipse.cdt.core.win32/cdt_win32.jar and /dev/null differ diff --git a/core/org.eclipse.cdt.core.win32/plugin.properties b/core/org.eclipse.cdt.core.win32/plugin.properties new file mode 100644 index 00000000000..0b31b3ca94e --- /dev/null +++ b/core/org.eclipse.cdt.core.win32/plugin.properties @@ -0,0 +1,2 @@ +fragmentName.linux=C/C++ Development Tools Core for Windows +providerName=Eclipse CDT diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/ASTTypeUtil.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/ASTTypeUtil.java index 325295bd82d..7e7bf4c563c 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/ASTTypeUtil.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/ASTTypeUtil.java @@ -41,7 +41,7 @@ import org.eclipse.cdt.internal.core.dom.parser.c.ICInternalBinding; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTTypeId; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPDeferredClassInstance; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalBinding; -import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownClassInstance; +import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownMemberClassInstance; import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor; import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil; @@ -727,8 +727,8 @@ public class ASTTypeUtil { if (binding instanceof ICPPTemplateInstance) { appendArgumentList(((ICPPTemplateInstance) binding).getTemplateArguments(), normalize, result); - } else if (binding instanceof ICPPUnknownClassInstance) { - appendArgumentList(((ICPPUnknownClassInstance) binding).getArguments(), normalize, result); + } else if (binding instanceof ICPPUnknownMemberClassInstance) { + appendArgumentList(((ICPPUnknownMemberClassInstance) binding).getArguments(), normalize, result); } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPBase.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPBase.java index b00f57b3b40..05e4a01f4a4 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPBase.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPBase.java @@ -13,7 +13,9 @@ package org.eclipse.cdt.core.dom.ast.cpp; import org.eclipse.cdt.core.dom.IName; import org.eclipse.cdt.core.dom.ast.IBinding; +import org.eclipse.cdt.core.dom.ast.IType; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.ICPPASTBaseSpecifier; +import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownType; /** * Represents the relationship between a class and one of its base classes. @@ -35,11 +37,24 @@ public interface ICPPBase extends Cloneable { public IBinding getBaseClass(); /** - * Returns the name that specifies the base class. - * @since 4.0 + * The base class. Generally a ICPPClassType, but may be an {@link ICPPUnknownType}. + * In the case of typedefs, the target type will be returned instead of the typedef itself. + * @since 5.5 */ + public IType getBaseClassType(); + + /** + * @deprecated don't use it, a base class may be specified without the use of a name. + */ + @Deprecated public IName getBaseClassSpecifierName(); + /** + * Returns the name of the class definition that originally declares the base. + * @since 5.5 + */ + public IName getClassDefinitionName(); + /** * The visibility qualifier applied to the base class. * @@ -59,8 +74,13 @@ public interface ICPPBase extends Cloneable { /** * Used internally to change cloned bases. - * * @noreference This method is not intended to be referenced by clients. */ public void setBaseClass(IBinding baseClass); + + /** + * Used internally to change cloned bases. + * @noreference This method is not intended to be referenced by clients. + */ + public void setBaseClass(IType baseClass); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ITypeMarshalBuffer.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ITypeMarshalBuffer.java index 6d859a6d450..5198b0ac12c 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ITypeMarshalBuffer.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/ITypeMarshalBuffer.java @@ -31,6 +31,9 @@ public interface ITypeMarshalBuffer { final static byte PROBLEM_TYPE= 9; final static byte VALUE= 10; final static byte DEPENDENT_EXPRESSION_TYPE= 11; + final static byte UNKNOWN_MEMBER= 12; + final static byte UNKNOWN_MEMBER_CLASS_INSTANCE= 13; + final static byte DEFERRED_CLASS_INSTANCE= 14; final static byte EVAL_BINARY= 1, diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/Value.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/Value.java index 8fb39d3c2e7..a0bd08dcc20 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/Value.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/Value.java @@ -370,7 +370,10 @@ public class Value implements IValue { * Tests whether the value depends on a template parameter. */ public static boolean isDependentValue(IValue nonTypeValue) { - return nonTypeValue != null && nonTypeValue.getEvaluation() != null; + if (nonTypeValue == null) + return false; + ICPPEvaluation eval = nonTypeValue.getEvaluation(); + return eval != null && eval.isValueDependent(); } /** diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CStructure.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CStructure.java index cbf9327dcfe..103c6ca0431 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CStructure.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/c/CStructure.java @@ -170,7 +170,7 @@ public class CStructure extends PlatformObject implements ICompositeType, ICInte for (IASTDeclarator declarator : declarators) { IASTName name = ASTQueries.findInnermostDeclarator(declarator).getName(); IBinding binding = name.resolveBinding(); - if (binding != null) + if (binding instanceof IField) fields = ArrayUtil.append(fields, (IField) binding); } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTConstructorChainInitializer.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTConstructorChainInitializer.java index e99fbcd791a..e98bd8708bc 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTConstructorChainInitializer.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTConstructorChainInitializer.java @@ -21,6 +21,7 @@ import org.eclipse.cdt.core.dom.ast.IASTName; import org.eclipse.cdt.core.dom.ast.IASTNode; import org.eclipse.cdt.core.dom.ast.IBinding; import org.eclipse.cdt.core.dom.ast.ICPPASTCompletionContext; +import org.eclipse.cdt.core.dom.ast.IType; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTConstructorChainInitializer; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTConstructorInitializer; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFunctionDefinition; @@ -175,7 +176,9 @@ public class CPPASTConstructorChainInitializer extends ASTNode implements if (method instanceof ICPPMethod) { ICPPClassType cls= ((ICPPMethod) method).getClassOwner(); for (ICPPBase base : ClassTypeHelper.getBases(cls, fdef)) { - result.put(base.getBaseClassSpecifierName().getSimpleID()); + IType baseType= base.getBaseClassType(); + if (baseType instanceof IBinding) + result.put(((IBinding) baseType).getNameCharArray()); } return result; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUnaryExpression.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUnaryExpression.java index 290015f4052..5176d296cf5 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUnaryExpression.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTUnaryExpression.java @@ -14,31 +14,23 @@ package org.eclipse.cdt.internal.core.dom.parser.cpp; import static org.eclipse.cdt.core.dom.ast.IASTExpression.ValueCategory.LVALUE; -import static org.eclipse.cdt.core.dom.ast.IASTExpression.ValueCategory.PRVALUE; import org.eclipse.cdt.core.dom.ast.ASTVisitor; -import org.eclipse.cdt.core.dom.ast.DOMException; import org.eclipse.cdt.core.dom.ast.IASTExpression; import org.eclipse.cdt.core.dom.ast.IASTIdExpression; import org.eclipse.cdt.core.dom.ast.IASTImplicitName; import org.eclipse.cdt.core.dom.ast.IASTName; import org.eclipse.cdt.core.dom.ast.IASTNode; -import org.eclipse.cdt.core.dom.ast.IASTUnaryExpression; import org.eclipse.cdt.core.dom.ast.IBinding; -import org.eclipse.cdt.core.dom.ast.IFunction; import org.eclipse.cdt.core.dom.ast.IProblemBinding; -import org.eclipse.cdt.core.dom.ast.IProblemType; import org.eclipse.cdt.core.dom.ast.IType; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTExpression; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTQualifiedName; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUnaryExpression; import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction; -import org.eclipse.cdt.core.dom.ast.cpp.ICPPMember; import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod; import org.eclipse.cdt.internal.core.dom.parser.ASTNode; import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguityParent; -import org.eclipse.cdt.internal.core.dom.parser.ProblemBinding; -import org.eclipse.cdt.internal.core.dom.parser.Value; import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalFixed; import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalUnary; import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.FunctionSetType; @@ -175,39 +167,6 @@ public class CPPASTUnaryExpression extends ASTNode implements ICPPASTUnaryExpres } } - private IType computePointerToMemberType() { - if (fOperator != op_amper) - return null; - - IASTNode child= fOperand; - boolean inParenthesis= false; - while (child instanceof IASTUnaryExpression && ((IASTUnaryExpression) child).getOperator() == IASTUnaryExpression.op_bracketedPrimary) { - child= ((IASTUnaryExpression) child).getOperand(); - inParenthesis= true; - } - if (child instanceof IASTIdExpression) { - IASTName name= ((IASTIdExpression) child).getName(); - if (name instanceof ICPPASTQualifiedName) { - IBinding b= name.resolveBinding(); - if (b instanceof ICPPMember) { - ICPPMember member= (ICPPMember) b; - if (!member.isStatic()) { - try { - if (!inParenthesis) { - return new CPPPointerToMemberType(member.getType(), member.getClassOwner(), false, false, false); - } else if (member instanceof IFunction) { - return new ProblemBinding(fOperand, IProblemBinding.SEMANTIC_INVALID_TYPE, fOperand.getRawSignature().toCharArray()); - } - } catch (DOMException e) { - return e.getProblem(); - } - } - } - } - } - return null; - } - @Override public ICPPFunction getOverload() { ICPPEvaluation eval = getEvaluation(); @@ -219,27 +178,34 @@ public class CPPASTUnaryExpression extends ASTNode implements ICPPASTUnaryExpres @Override public ICPPEvaluation getEvaluation() { if (fEvaluation == null) { - if (fOperand == null) - return EvalFixed.INCOMPLETE; - - final ICPPEvaluation arg = fOperand.getEvaluation(); - if (fOperator == op_bracketedPrimary) { - fEvaluation= arg; - } else if (arg.isFunctionSet() && fOperator == op_amper) { - return arg; - } else { - IType type= computePointerToMemberType(); - if (type != null) { - if (type instanceof IProblemType) - return EvalFixed.INCOMPLETE; - fEvaluation= new EvalFixed(type, PRVALUE, Value.UNKNOWN); - } else { - fEvaluation= new EvalUnary(fOperator, fOperand.getEvaluation()); - } - } + fEvaluation= computeEvaluation(); } return fEvaluation; } + + private ICPPEvaluation computeEvaluation() { + if (fOperand == null) + return EvalFixed.INCOMPLETE; + + final ICPPEvaluation nestedEval = fOperand.getEvaluation(); + if (fOperator == op_bracketedPrimary) + return nestedEval; + + if (nestedEval.isFunctionSet() && fOperator == op_amper) { + return nestedEval; + } + + IBinding addressOfQualifiedNameBinding= null; + if (fOperator == op_amper && fOperand instanceof IASTIdExpression) { + IASTName name= ((IASTIdExpression) fOperand).getName(); + if (name instanceof ICPPASTQualifiedName) { + addressOfQualifiedNameBinding= name.resolveBinding(); + if (addressOfQualifiedNameBinding instanceof IProblemBinding) + return EvalFixed.INCOMPLETE; + } + } + return new EvalUnary(fOperator, nestedEval, addressOfQualifiedNameBinding); + } @Override public IType getExpressionType() { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPBaseClause.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPBaseClause.java index 7963c9d8979..5d45beba891 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPBaseClause.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPBaseClause.java @@ -16,6 +16,7 @@ import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUti import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.getNestedType; import org.eclipse.cdt.core.dom.IName; +import org.eclipse.cdt.core.dom.ast.IASTNode; import org.eclipse.cdt.core.dom.ast.IBinding; import org.eclipse.cdt.core.dom.ast.IProblemBinding; import org.eclipse.cdt.core.dom.ast.ISemanticProblem; @@ -24,40 +25,41 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.ICPPASTBaseSpecifier; import org.eclipse.cdt.core.dom.ast.cpp.ICPPBase; import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType; -import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameter; public class CPPBaseClause implements ICPPBase, ICPPInternalBase { - private ICPPASTBaseSpecifier base; - private IBinding baseClass; + private final ICPPASTBaseSpecifier base; + private IType baseClass; public CPPBaseClause(ICPPASTBaseSpecifier base) { this.base = base; } - /* (non-Javadoc) - * @see org.eclipse.cdt.core.dom.ast.cpp.ICPPBase#getBaseClass() - */ @Override public IBinding getBaseClass() { + IType type= getBaseClassType(); + type = getNestedType(type, TDEF); + if (type instanceof IBinding) + return (IBinding) type; + return null; + } + + @Override + public IType getBaseClassType() { if (baseClass == null) { IBinding b = base.getName().resolveBinding(); - if (b instanceof IProblemBinding) { + if (b instanceof IProblemBinding || ! (b instanceof IType)) { baseClass = new CPPClassType.CPPClassTypeProblem(base.getName(), ((IProblemBinding) b).getID()); } else { - IType t= null; - if (b instanceof IType) { - t= getNestedType((IType) b, TDEF); - } - if (t instanceof ICPPClassType || t instanceof ICPPTemplateParameter) { - baseClass = (IBinding) t; - } else { + baseClass= (IType) b; + IType check= getNestedType(baseClass, TDEF); + if (!(check instanceof ICPPClassType || check instanceof ICPPUnknownType)) { baseClass = new CPPClassType.CPPClassTypeProblem(base.getName(), ISemanticProblem.BINDING_NO_CLASS); } } } return baseClass; } - + /* (non-Javadoc) * @see org.eclipse.cdt.core.dom.ast.cpp.ICPPBase#getVisibility() */ @@ -86,6 +88,12 @@ public class CPPBaseClause implements ICPPBase, ICPPInternalBase { @Override public void setBaseClass(IBinding cls) { + if (cls instanceof IType) + baseClass = (IType) cls; + } + + @Override + public void setBaseClass(IType cls) { baseClass = cls; } @@ -94,7 +102,19 @@ public class CPPBaseClause implements ICPPBase, ICPPInternalBase { return base.getName(); } - @Override + /* (non-Javadoc) + * @see org.eclipse.cdt.core.dom.ast.cpp.ICPPBase#getClassDefinitionName() + */ + @Override + public IName getClassDefinitionName() { + IASTNode parent = base.getParent(); + if (parent instanceof ICPPASTCompositeTypeSpecifier) { + return ((ICPPASTCompositeTypeSpecifier) parent).getName(); + } + return null; + } + + @Override public ICPPBase clone() { ICPPBase t = null; try { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPDeferredClassInstance.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPDeferredClassInstance.java index 7e045431fc3..3040eddf927 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPDeferredClassInstance.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPDeferredClassInstance.java @@ -15,21 +15,32 @@ package org.eclipse.cdt.internal.core.dom.parser.cpp; import org.eclipse.cdt.core.dom.ast.ASTTypeUtil; import org.eclipse.cdt.core.dom.ast.DOMException; import org.eclipse.cdt.core.dom.ast.IBinding; +import org.eclipse.cdt.core.dom.ast.IField; import org.eclipse.cdt.core.dom.ast.IScope; import org.eclipse.cdt.core.dom.ast.IType; import org.eclipse.cdt.core.dom.ast.ITypedef; +import org.eclipse.cdt.core.dom.ast.cpp.ICPPBase; 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.ICPPConstructor; +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.ICPPScope; import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateArgument; import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateDefinition; import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameter; import org.eclipse.cdt.core.parser.util.ObjectMap; +import org.eclipse.cdt.internal.core.dom.parser.ISerializableType; +import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer; import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPTemplates; +import org.eclipse.cdt.internal.core.index.IIndexFragment; +import org.eclipse.cdt.internal.core.pdom.dom.cpp.PDOMCPPDeferredClassInstance; +import org.eclipse.core.runtime.CoreException; /** * Represents a instantiation that cannot be performed because of dependent arguments or an unknown template. */ -public class CPPDeferredClassInstance extends CPPUnknownClass implements ICPPDeferredClassInstance { +public class CPPDeferredClassInstance extends CPPUnknownBinding implements ICPPDeferredClassInstance, ISerializableType { private final ICPPTemplateArgument[] fArguments; private final ICPPClassTemplate fClassTemplate; private final ICPPScope fLookupScope; @@ -38,7 +49,7 @@ public class CPPDeferredClassInstance extends CPPUnknownClass implements ICPPDef ICPPScope lookupScope) { // With template template parameters the owner must not be calculated, it'd lead to an infinite loop. // Rather than that we override getOwner(). - super(null, template.getNameCharArray()); + super(template.getNameCharArray()); fArguments= arguments; fClassTemplate= template; fLookupScope= lookupScope; @@ -94,6 +105,71 @@ public class CPPDeferredClassInstance extends CPPUnknownClass implements ICPPDef return getClassTemplate().getKey(); } + @Override + public ICPPBase[] getBases() { + return ICPPBase.EMPTY_BASE_ARRAY; + } + + @Override + public IField[] getFields() { + return IField.EMPTY_FIELD_ARRAY; + } + + @Override + public IField findField(String name) { + return null; + } + + @Override + public ICPPField[] getDeclaredFields() { + return ICPPField.EMPTY_CPPFIELD_ARRAY; + } + + @Override + public ICPPMethod[] getMethods() { + return ICPPMethod.EMPTY_CPPMETHOD_ARRAY; + } + + @Override + public ICPPMethod[] getAllDeclaredMethods() { + return ICPPMethod.EMPTY_CPPMETHOD_ARRAY; + } + + @Override + public ICPPMethod[] getDeclaredMethods() { + return ICPPMethod.EMPTY_CPPMETHOD_ARRAY; + } + + @Override + public ICPPConstructor[] getConstructors() { + return ICPPConstructor.EMPTY_CONSTRUCTOR_ARRAY; + } + + @Override + public IBinding[] getFriends() { + return IBinding.EMPTY_BINDING_ARRAY; + } + + @Override + public final IScope getCompositeScope() { + return asScope(); + } + + @Override + public ICPPClassType[] getNestedClasses() { + return ICPPClassType.EMPTY_CLASS_ARRAY; + } + + @Override + public boolean isAnonymous() { + return false; + } + + @Override + public boolean isFinal() { + return false; + } + @Override @Deprecated public IType[] getArguments() { @@ -148,4 +224,25 @@ public class CPPDeferredClassInstance extends CPPUnknownClass implements ICPPDef public String toString() { return ASTTypeUtil.getType(this, true); } + + @Override + public void marshal(ITypeMarshalBuffer buffer) throws CoreException { + int firstByte= ITypeMarshalBuffer.DEFERRED_CLASS_INSTANCE; + buffer.putByte((byte) firstByte); + buffer.marshalBinding(fClassTemplate); + buffer.putShort((short) fArguments.length); + for (ICPPTemplateArgument arg : fArguments) { + buffer.marshalTemplateArgument(arg); + } + } + + public static ICPPDeferredClassInstance unmarshal(IIndexFragment fragment, int firstByte, ITypeMarshalBuffer buffer) throws CoreException { + IBinding template= buffer.unmarshalBinding(); + int argcount= buffer.getShort() & 0xffff; + ICPPTemplateArgument[] args = new ICPPTemplateArgument[argcount]; + for (int i = 0; i < argcount; i++) { + args[i]= buffer.unmarshalTemplateArgument(); + } + return new PDOMCPPDeferredClassInstance(fragment, (ICPPClassTemplate) template, args); + } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownFunction.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPDeferredFunction.java similarity index 84% rename from core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownFunction.java rename to core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPDeferredFunction.java index 90726a1e0a7..1e3fccf39e3 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownFunction.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPDeferredFunction.java @@ -23,9 +23,9 @@ import org.eclipse.cdt.internal.core.dom.parser.ProblemType; /** * Represents a reference to a (member) function (instance), which cannot be resolved because - * it depends on a template parameter. A compiler would resolve it during instantiation. + * an argument depends on a template parameter. A compiler would resolve it during instantiation. */ -public class CPPUnknownFunction extends CPPUnknownBinding implements ICPPFunction { +public class CPPDeferredFunction extends CPPUnknownBinding implements ICPPFunction { private static final ICPPFunctionType FUNCTION_TYPE= new CPPFunctionType(ProblemType.UNKNOWN_FOR_EXPRESSION, IType.EMPTY_TYPE_ARRAY); @@ -33,11 +33,15 @@ public class CPPUnknownFunction extends CPPUnknownBinding implements ICPPFunctio if (sample instanceof ICPPConstructor) return new CPPUnknownConstructor(((ICPPConstructor) sample).getClassOwner()); - return new CPPUnknownFunction(sample.getOwner(), sample.getNameCharArray()); + final IBinding owner = sample.getOwner(); + return new CPPDeferredFunction(owner, sample.getNameCharArray()); } - public CPPUnknownFunction(IBinding owner, char[] name) { - super(owner, name); + private final IBinding fOwner; + + public CPPDeferredFunction(IBinding owner, char[] name) { + super(name); + fOwner= owner; } @Override @@ -119,4 +123,9 @@ public class CPPUnknownFunction extends CPPUnknownBinding implements ICPPFunctio public boolean hasParameterPack() { return false; } + + @Override + public IBinding getOwner() { + return fOwner; + } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateTemplateParameter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateTemplateParameter.java index 6b3fd5c7296..88d0455d02b 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateTemplateParameter.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateTemplateParameter.java @@ -70,7 +70,7 @@ public class CPPTemplateTemplateParameter extends CPPTemplateParameter implement IASTNode[] nodes = getDeclarations(); if (nodes != null && nodes.length > 0) n = (IASTName) nodes[0]; - unknownScope = new CPPUnknownScope(this, n); + unknownScope = new CPPUnknownTypeScope(this, n); } return unknownScope; } @@ -232,11 +232,6 @@ public class CPPTemplateTemplateParameter extends CPPTemplateParameter implement return ICPPTemplateInstance.EMPTY_TEMPLATE_INSTANCE_ARRAY; } - @Override - public IASTName getUnknownName() { - return new CPPASTName(getNameCharArray()); - } - @Override public boolean isAnonymous() { return false; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateTypeParameter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateTypeParameter.java index 9b2bf75ab72..33a193648bc 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateTypeParameter.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPTemplateTypeParameter.java @@ -48,7 +48,7 @@ public class CPPTemplateTypeParameter extends CPPTemplateParameter implements IASTNode[] nodes = getDeclarations(); if (nodes != null && nodes.length > 0) n = (IASTName) nodes[0]; - unknownScope = new CPPUnknownScope(this, n); + unknownScope = new CPPUnknownTypeScope(this, n); } return unknownScope; } @@ -92,9 +92,4 @@ public class CPPTemplateTypeParameter extends CPPTemplateParameter implements return getParameterID() == ((ICPPTemplateParameter) type).getParameterID(); } - - @Override - public IASTName getUnknownName() { - return new CPPASTName(getNameCharArray()); - } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownBinding.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownBinding.java index 8726f18722f..c279433f0e2 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownBinding.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownBinding.java @@ -14,7 +14,6 @@ package org.eclipse.cdt.internal.core.dom.parser.cpp; import org.eclipse.cdt.core.dom.ILinkage; import org.eclipse.cdt.core.dom.ast.DOMException; -import org.eclipse.cdt.core.dom.ast.IASTName; import org.eclipse.cdt.core.dom.ast.IASTNode; import org.eclipse.cdt.core.dom.ast.IBinding; import org.eclipse.cdt.core.dom.ast.IScope; @@ -29,16 +28,14 @@ import org.eclipse.core.runtime.PlatformObject; /** * Represents a binding that is unknown because it depends on template arguments. */ -public class CPPUnknownBinding extends PlatformObject +public abstract class CPPUnknownBinding extends PlatformObject implements ICPPUnknownBinding, ICPPInternalBinding, Cloneable { - protected IBinding fOwner; private ICPPScope unknownScope; - protected IASTName name; + protected char[] name; - public CPPUnknownBinding(IBinding owner, char[] name) { + public CPPUnknownBinding(char[] name) { super(); - this.name = new CPPASTName(name); - fOwner= owner; + this.name = name; } @Override @@ -76,12 +73,12 @@ public class CPPUnknownBinding extends PlatformObject @Override public String getName() { - return name.toString(); + return new String(name); } @Override public char[] getNameCharArray() { - return name.getSimpleID(); + return name; } @Override @@ -102,12 +99,16 @@ public class CPPUnknownBinding extends PlatformObject @Override public ICPPScope asScope() { - if (unknownScope == null) { - unknownScope = new CPPUnknownScope(this, name); - } + if (unknownScope == null && this instanceof ICPPUnknownType) { + unknownScope = createScope(); + } return unknownScope; } + protected CPPUnknownTypeScope createScope() { + return new CPPUnknownTypeScope((ICPPUnknownType) this, new CPPASTName(name)); + } + @Override public ILinkage getLinkage() { return Linkage.CPP_LINKAGE; @@ -126,14 +127,4 @@ public class CPPUnknownBinding extends PlatformObject public String toString() { return getName(); } - - @Override - public IASTName getUnknownName() { - return name; - } - - @Override - public IBinding getOwner() { - return fOwner; - } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownClassInstance.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownClassInstance.java index 93a9386f9ce..12d96d5c75b 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownClassInstance.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownClassInstance.java @@ -12,21 +12,24 @@ package org.eclipse.cdt.internal.core.dom.parser.cpp; import org.eclipse.cdt.core.dom.ast.ASTTypeUtil; -import org.eclipse.cdt.core.dom.ast.IBinding; import org.eclipse.cdt.core.dom.ast.IType; import org.eclipse.cdt.core.dom.ast.ITypedef; import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateArgument; import org.eclipse.cdt.core.parser.util.CharArrayUtils; +import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer; +import org.eclipse.cdt.internal.core.index.IIndexFragment; +import org.eclipse.cdt.internal.core.pdom.dom.cpp.PDOMCPPUnknownMemberClassInstance; +import org.eclipse.core.runtime.CoreException; /** * Represents a partially instantiated C++ class template, declaration of which is not yet available. * * @author Sergey Prigogin */ -public class CPPUnknownClassInstance extends CPPUnknownClass implements ICPPUnknownClassInstance { +public class CPPUnknownClassInstance extends CPPUnknownMemberClass implements ICPPUnknownMemberClassInstance { private final ICPPTemplateArgument[] arguments; - public CPPUnknownClassInstance(ICPPUnknownBinding scopeBinding, char[] name, ICPPTemplateArgument[] arguments) { + public CPPUnknownClassInstance(IType scopeBinding, char[] name, ICPPTemplateArgument[] arguments) { super(scopeBinding, name); this.arguments = arguments; } @@ -50,8 +53,8 @@ public class CPPUnknownClassInstance extends CPPUnknownClass implements ICPPUnkn return type.isSameType(this); } - if (type instanceof ICPPUnknownClassInstance) { - ICPPUnknownClassInstance rhs= (ICPPUnknownClassInstance) type; + if (type instanceof ICPPUnknownMemberClassInstance) { + ICPPUnknownMemberClassInstance rhs= (ICPPUnknownMemberClassInstance) type; if (CharArrayUtils.equals(getNameCharArray(), rhs.getNameCharArray())) { ICPPTemplateArgument[] lhsArgs= getArguments(); ICPPTemplateArgument[] rhsArgs= rhs.getArguments(); @@ -67,13 +70,36 @@ public class CPPUnknownClassInstance extends CPPUnknownClass implements ICPPUnkn return false; } } - final IBinding lhsContainer = getOwner(); - final IBinding rhsContainer = rhs.getOwner(); - if (lhsContainer instanceof IType && rhsContainer instanceof IType) { - return (((IType)lhsContainer).isSameType((IType) rhsContainer)); + final IType lhsContainer = getOwnerType(); + final IType rhsContainer = rhs.getOwnerType(); + if (lhsContainer != null && rhsContainer != null) { + return (lhsContainer.isSameType(rhsContainer)); } } } return false; } + + @Override + public void marshal(ITypeMarshalBuffer buffer) throws CoreException { + int firstByte= ITypeMarshalBuffer.UNKNOWN_MEMBER_CLASS_INSTANCE; + buffer.putByte((byte) firstByte); + buffer.marshalType(getOwnerType()); + buffer.putCharArray(getNameCharArray()); + buffer.putShort((short) arguments.length); + for (ICPPTemplateArgument arg : arguments) { + buffer.marshalTemplateArgument(arg); + } + } + + public static ICPPUnknownMemberClassInstance unmarshal(IIndexFragment fragment, int firstByte, ITypeMarshalBuffer buffer) throws CoreException { + IType owner= buffer.unmarshalType(); + char[] name = buffer.getCharArray(); + int argcount= buffer.getShort() & 0xffff; + ICPPTemplateArgument[] args = new ICPPTemplateArgument[argcount]; + for (int i = 0; i < argcount; i++) { + args[i]= buffer.unmarshalTemplateArgument(); + } + return new PDOMCPPUnknownMemberClassInstance(fragment, owner, name, args); + } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownConstructor.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownConstructor.java index 4342c9035cb..0dd63fc488a 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownConstructor.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownConstructor.java @@ -18,7 +18,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor; * Represents a reference to a constructor (instance), which cannot be resolved because * it depends on a template parameter. A compiler would resolve it during instantiation. */ -public class CPPUnknownConstructor extends CPPUnknownFunction implements ICPPConstructor { +public class CPPUnknownConstructor extends CPPDeferredFunction implements ICPPConstructor { public CPPUnknownConstructor(ICPPClassType owner) { super(owner, owner.getNameCharArray()); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownField.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownField.java new file mode 100644 index 00000000000..7d6fde70206 --- /dev/null +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownField.java @@ -0,0 +1,88 @@ +/******************************************************************************* + * Copyright (c) 2008, 2012 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 + *******************************************************************************/ +package org.eclipse.cdt.internal.core.dom.parser.cpp; + +import org.eclipse.cdt.core.dom.ast.ICompositeType; +import org.eclipse.cdt.core.dom.ast.IType; +import org.eclipse.cdt.core.dom.ast.IValue; +import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType; +import org.eclipse.cdt.core.dom.ast.cpp.ICPPField; +import org.eclipse.cdt.internal.core.dom.parser.ProblemType; + +/** + * Represents a reference to a field, which cannot be resolved because the owner is + * unknown. A compiler would resolve it during instantiation. + */ +public class CPPUnknownField extends CPPUnknownMember implements ICPPField { + public CPPUnknownField(IType owner, char[] name) { + super(owner, name); + } + + @Override + public boolean isExternC() { + return false; + } + + @Override + public boolean isMutable() { + return false; + } + + @Override + public boolean isAuto() { + return false; + } + + @Override + public boolean isExtern() { + return false; + } + + @Override + public boolean isRegister() { + return false; + } + + @Override + public boolean isStatic() { + return false; + } + + @Override + public int getVisibility() { + return v_public; + } + @Override + public ICPPClassType getClassOwner() { + IType owner = getOwnerType(); + if (owner instanceof ICPPClassType) + return (ICPPClassType) owner; + return null; + } + + @Override + public ICompositeType getCompositeTypeOwner() { + IType owner = getOwnerType(); + if (owner instanceof ICompositeType) + return (ICompositeType) owner; + return null; + } + + @Override + public IType getType() { + return ProblemType.UNKNOWN_FOR_EXPRESSION; + } + + @Override + public IValue getInitialValue() { + return null; + } +} diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownMember.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownMember.java new file mode 100644 index 00000000000..0866fd3d83f --- /dev/null +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownMember.java @@ -0,0 +1,74 @@ +/******************************************************************************* + * Copyright (c) 2004, 2010 IBM Corporation 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: + * IBM Corporation - initial API and implementation + * Markus Schorn (Wind River Systems) + * Sergey Prigogin (Google) + *******************************************************************************/ +package org.eclipse.cdt.internal.core.dom.parser.cpp; + +import org.eclipse.cdt.core.dom.ast.IBinding; +import org.eclipse.cdt.core.dom.ast.IType; +import org.eclipse.cdt.core.dom.ast.cpp.ICPPField; +import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod; +import org.eclipse.cdt.internal.core.dom.parser.ISerializableType; +import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer; +import org.eclipse.cdt.internal.core.index.IIndexFragment; +import org.eclipse.cdt.internal.core.pdom.dom.cpp.PDOMCPPUnknownField; +import org.eclipse.cdt.internal.core.pdom.dom.cpp.PDOMCPPUnknownMemberClass; +import org.eclipse.cdt.internal.core.pdom.dom.cpp.PDOMCPPUnknownMethod; +import org.eclipse.core.runtime.CoreException; + +/** + * Represents a binding that is unknown because it depends on template arguments. + */ +public class CPPUnknownMember extends CPPUnknownBinding implements ICPPUnknownMember, ISerializableType { + protected IType fOwner; + + protected CPPUnknownMember(IType owner, char[] name) { + super(name); + fOwner= owner; + } + + @Override + public IBinding getOwner() { + if (fOwner instanceof IBinding) + return (IBinding) fOwner; + return null; + } + + @Override + public IType getOwnerType() { + return fOwner; + } + + @Override + public void marshal(ITypeMarshalBuffer buffer) throws CoreException { + int firstByte= ITypeMarshalBuffer.UNKNOWN_MEMBER; + if (this instanceof ICPPField) { + firstByte |= ITypeMarshalBuffer.FLAG1; + } else if (this instanceof ICPPMethod) { + firstByte |= ITypeMarshalBuffer.FLAG2; + } + + buffer.putByte((byte) firstByte); + buffer.marshalType(getOwnerType()); + buffer.putCharArray(getNameCharArray()); + } + + public static IBinding unmarshal(IIndexFragment fragment, int firstByte, ITypeMarshalBuffer buffer) throws CoreException { + IType owner= buffer.unmarshalType(); + char[] name = buffer.getCharArray(); + if ((firstByte & ITypeMarshalBuffer.FLAG1) != 0) { + return new PDOMCPPUnknownField(fragment, owner, name); + } else if ((firstByte & ITypeMarshalBuffer.FLAG2) != 0) { + return new PDOMCPPUnknownMethod(fragment, owner, name); + } + return new PDOMCPPUnknownMemberClass(fragment, owner, name); + } +} diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownClass.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownMemberClass.java similarity index 80% rename from core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownClass.java rename to core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownMemberClass.java index 4ee2e403c28..897c6c11e52 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownClass.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownMemberClass.java @@ -29,13 +29,12 @@ import org.eclipse.cdt.core.parser.util.CharArrayUtils; /** * Represents a C++ class, declaration of which is not yet available. */ -public class CPPUnknownClass extends CPPUnknownBinding implements ICPPUnknownClassType { - public static CPPUnknownClass createUnnamedInstance() { - return new CPPUnknownClass(null, CharArrayUtils.EMPTY); +public class CPPUnknownMemberClass extends CPPUnknownMember implements ICPPUnknownMemberClass { + public static CPPUnknownMemberClass createUnnamedInstance() { + return new CPPUnknownMemberClass(null, CharArrayUtils.EMPTY); } - - public CPPUnknownClass(IBinding binding, char[] name) { - super(binding, name); + public CPPUnknownMemberClass(IType owner, char[] name) { + super(owner, name); } @Override @@ -101,15 +100,13 @@ public class CPPUnknownClass extends CPPUnknownBinding implements ICPPUnknownCla if (type instanceof ITypedef) return type.isSameType(this); - if (type instanceof ICPPUnknownClassType - && !(type instanceof ICPPUnknownClassInstance) - && !(type instanceof ICPPDeferredClassInstance)) { - ICPPUnknownClassType rhs= (ICPPUnknownClassType) type; + if (type instanceof ICPPUnknownMemberClass && !(type instanceof ICPPUnknownMemberClassInstance)) { + ICPPUnknownMemberClass rhs= (ICPPUnknownMemberClass) type; if (CharArrayUtils.equals(getNameCharArray(), rhs.getNameCharArray())) { - final IBinding lhsContainer = getOwner(); - final IBinding rhsContainer = rhs.getOwner(); - if (lhsContainer instanceof IType && rhsContainer instanceof IType) { - return ((IType) lhsContainer).isSameType((IType) rhsContainer); + final IType lhsContainer = getOwnerType(); + final IType rhsContainer = rhs.getOwnerType(); + if (lhsContainer != null && rhsContainer != null) { + return lhsContainer.isSameType(rhsContainer); } } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownMethod.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownMethod.java new file mode 100644 index 00000000000..761461b1881 --- /dev/null +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownMethod.java @@ -0,0 +1,159 @@ +/******************************************************************************* + * Copyright (c) 2008, 2012 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 + *******************************************************************************/ +package org.eclipse.cdt.internal.core.dom.parser.cpp; + +import org.eclipse.cdt.core.dom.ast.IScope; +import org.eclipse.cdt.core.dom.ast.IType; +import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType; +import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionType; +import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod; +import org.eclipse.cdt.core.dom.ast.cpp.ICPPParameter; +import org.eclipse.cdt.internal.core.dom.parser.ProblemType; + +/** + * Represents a reference to a method (instance), which cannot be resolved because the owner is + * unknown. A compiler would resolve it during instantiation. + */ +public class CPPUnknownMethod extends CPPUnknownMember implements ICPPMethod { + private static final ICPPFunctionType FUNCTION_TYPE= + new CPPFunctionType(ProblemType.UNKNOWN_FOR_EXPRESSION, IType.EMPTY_TYPE_ARRAY); + + public CPPUnknownMethod(IType owner, char[] name) { + super(owner, name); + } + + @Override + public IType[] getExceptionSpecification() { + return null; + } + + @Override + public boolean isDeleted() { + return false; + } + + @Override + public boolean isExternC() { + return false; + } + + @Override + public boolean isInline() { + return false; + } + + @Override + public boolean isMutable() { + return false; + } + + @Override + public IScope getFunctionScope() { + return asScope(); + } + + @Override + public ICPPParameter[] getParameters() { + return ICPPParameter.EMPTY_CPPPARAMETER_ARRAY; + } + + @Override + public ICPPFunctionType getType() { + return FUNCTION_TYPE; + } + + @Override + public boolean isAuto() { + return false; + } + + @Override + public boolean isExtern() { + return false; + } + + @Override + public boolean isRegister() { + return false; + } + + @Override + public boolean isStatic() { + return false; + } + + @Override + public boolean takesVarArgs() { + return false; + } + + @Override + public boolean isNoReturn() { + return false; + } + + @Override + public int getRequiredArgumentCount() { + return 0; + } + + @Override + public boolean hasParameterPack() { + return false; + } + + @Override + public int getVisibility() { + return v_public; + } + @Override + public ICPPClassType getClassOwner() { + IType owner = getOwnerType(); + if (owner instanceof ICPPClassType) + return (ICPPClassType) owner; + return null; + } + + @Override + public boolean isVirtual() { + return false; + } + + @Override + public boolean isDestructor() { + return false; + } + + @Override + public boolean isImplicit() { + return false; + } + + @Override + public boolean isExplicit() { + return false; + } + + @Override + public boolean isPureVirtual() { + return false; + } + + @Override + public boolean isOverride() { + return false; + } + + @Override + public boolean isFinal() { + return false; + } +} diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownScope.java deleted file mode 100644 index 7ac1111aead..00000000000 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownScope.java +++ /dev/null @@ -1,71 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004, 2010 IBM Corporation 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 Niefer (IBM Corporation) - initial API and implementation - * Markus Schorn (Wind River Systems) - * Bryan Wilkinson (QNX) - * Sergey Prigogin (Google) - *******************************************************************************/ -package org.eclipse.cdt.internal.core.dom.parser.cpp; - -import org.eclipse.cdt.core.dom.ast.IASTName; -import org.eclipse.cdt.core.dom.ast.IASTNode; -import org.eclipse.cdt.core.dom.ast.IBinding; -import org.eclipse.cdt.core.parser.util.CharArrayObjectMap; - -/** - * Models the scope represented by an unknown binding such (e.g.: template type parameter). Used within - * the context of templates, only. - * For safe usage in index bindings, all fields need to be final or used in a thread-safe manner otherwise. - */ -public class CPPUnknownScope extends CPPUnknownTypeScope implements ICPPInternalUnknownScope { - /** - * This field needs to be protected when used in PDOMCPPUnknownScope, - * don't use it outside of {@link #getOrCreateBinding(IASTName, int)} - */ - private CharArrayObjectMap map; - - public CPPUnknownScope(ICPPUnknownBinding binding, IASTName name) { - super(name, binding); - } - - - @Override - public void addName(IASTName name) { - } - - @Override - protected IBinding getOrCreateBinding(final char[] name, int idx) { - if (map == null) - map = new CharArrayObjectMap(2); - - IBinding[] o = map.get(name); - if (o == null) { - o = new IBinding[3]; - map.put(name, o); - } - - IBinding result= o[idx]; - if (result == null) { - result= super.getOrCreateBinding(name, idx); - o[idx]= result; - } - return result; - } - - @Override - public void addBinding(IBinding binding) { - // do nothing, this is part of template magic and not a normal scope - } - - @Override - public void populateCache() {} - - @Override - public void removeNestedFromCache(IASTNode container) {} -} diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownTypeScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownTypeScope.java index 45f1bcdddcb..cb732f4d52b 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownTypeScope.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPUnknownTypeScope.java @@ -21,28 +21,33 @@ import org.eclipse.cdt.core.dom.ast.IASTName; import org.eclipse.cdt.core.dom.ast.IASTNode; import org.eclipse.cdt.core.dom.ast.IBinding; import org.eclipse.cdt.core.dom.ast.IScope; +import org.eclipse.cdt.core.dom.ast.IType; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.ICPPASTBaseSpecifier; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTConstructorChainInitializer; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamedTypeSpecifier; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTQualifiedName; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTTemplateId; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUsingDeclaration; -import org.eclipse.cdt.core.dom.ast.cpp.ICPPBinding; -import org.eclipse.cdt.core.dom.ast.cpp.ICPPScope; import org.eclipse.cdt.core.index.IIndexFileSet; +import org.eclipse.cdt.core.parser.util.CharArrayObjectMap; /** * Models the scope represented by an unknown type (e.g.: typeof(template type parameter)). Used within * the context of templates, only. * For safe usage in index bindings, all fields need to be final or used in a thread-safe manner otherwise. */ -public class CPPUnknownTypeScope implements ICPPScope { +public class CPPUnknownTypeScope implements ICPPInternalUnknownScope { private final IASTName fName; - private final ICPPBinding fScopeBinding; + private final IType fScopeType; + /** + * This field needs to be protected when used in PDOMCPPUnknownScope, + * don't use it outside of {@link #getOrCreateBinding(IASTName, int)} + */ + private CharArrayObjectMap map; - public CPPUnknownTypeScope(IASTName name, ICPPBinding scopeBinding) { + public CPPUnknownTypeScope(IType scopeType, IASTName name) { fName= name; - fScopeBinding= scopeBinding; + fScopeType= scopeType; } @Override @@ -50,6 +55,7 @@ public class CPPUnknownTypeScope implements ICPPScope { return EScopeKind.eClassType; } + @Override public IASTNode getPhysicalNode() { return fName; } @@ -59,9 +65,16 @@ public class CPPUnknownTypeScope implements ICPPScope { return fName; } + @Override + public IType getScopeType() { + return fScopeType; + } + @Override public IScope getParent() throws DOMException { - return fScopeBinding == null ? null : fScopeBinding.getScope(); + if (fScopeType instanceof IBinding) + return ((IBinding) fScopeType).getScope(); + return null; } @Override @@ -106,6 +119,7 @@ public class CPPUnknownTypeScope implements ICPPScope { } else if (parent instanceof ICPPASTUsingDeclaration) { ICPPASTUsingDeclaration ud= (ICPPASTUsingDeclaration) parent; type= ud.isTypename(); + function= true; } if (!type && parent.getPropertyInParent() == IASTFunctionCallExpression.FUNCTION_NAME) { @@ -120,22 +134,6 @@ public class CPPUnknownTypeScope implements ICPPScope { return result; } - protected IBinding getOrCreateBinding(final char[] name, int idx) { - IBinding result= null; - switch (idx) { - case 0: - result= new CPPUnknownClass(fScopeBinding, name); - break; - case 1: - result= new CPPUnknownFunction(fScopeBinding, name); - break; - case 2: - result= new CPPUnknownBinding(fScopeBinding, name); - break; - } - return result; - } - @Override @Deprecated public final IBinding[] getBindings(IASTName name, boolean resolve, boolean prefix) { return getBindings(name, resolve, prefix, IIndexFileSet.EMPTY); @@ -149,8 +147,8 @@ public class CPPUnknownTypeScope implements ICPPScope { @Override public final IBinding[] getBindings(ScopeLookupData lookup) { if (lookup.isPrefixLookup()) { - if (fScopeBinding instanceof ICPPDeferredClassInstance) { - ICPPDeferredClassInstance instance = (ICPPDeferredClassInstance) fScopeBinding; + if (fScopeType instanceof ICPPDeferredClassInstance) { + ICPPDeferredClassInstance instance = (ICPPDeferredClassInstance) fScopeType; IScope scope = instance.getClassTemplate().getCompositeScope(); if (scope != null) { return scope.getBindings(lookup); @@ -167,12 +165,52 @@ public class CPPUnknownTypeScope implements ICPPScope { return new IBinding[] {getOrCreateBinding(lookup.getLookupKey(), 0)}; } - public ICPPBinding getScopeBinding() { - return fScopeBinding; - } - @Override public String toString() { return fName.toString(); } + + @Override + public void addName(IASTName name) { + } + + protected IBinding getOrCreateBinding(final char[] name, int idx) { + if (map == null) + map = new CharArrayObjectMap(2); + + IBinding[] o = map.get(name); + if (o == null) { + o = new IBinding[3]; + map.put(name, o); + } + + IBinding result= o[idx]; + if (result == null) { + switch (idx) { + case 0: + result= new CPPUnknownMemberClass(fScopeType, name); + break; + case 1: + result= new CPPUnknownMethod(fScopeType, name); + break; + case 2: + result= new CPPUnknownField(fScopeType, name); + break; + } + o[idx]= result; + } + return result; + } + + @Override + public void addBinding(IBinding binding) { + // do nothing, this is part of template magic and not a normal scope + } + + @Override + public void populateCache() {} + + @Override + public void removeNestedFromCache(IASTNode container) {} + } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPDeferredClassInstance.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPDeferredClassInstance.java index c6017e6a0f4..a3926df5e41 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPDeferredClassInstance.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPDeferredClassInstance.java @@ -12,13 +12,14 @@ package org.eclipse.cdt.internal.core.dom.parser.cpp; 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.ICPPTemplateInstance; import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameterMap; /** * Interface for deferred class template instances. */ -public interface ICPPDeferredClassInstance extends ICPPUnknownClassType, ICPPTemplateInstance { +public interface ICPPDeferredClassInstance extends ICPPUnknownBinding, ICPPUnknownType, ICPPClassType, ICPPTemplateInstance { /** * Returns the class template for the deferred instantiation. */ diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPInternalUnknownScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPInternalUnknownScope.java index 53382f9d8f8..d5ad3680571 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPInternalUnknownScope.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPInternalUnknownScope.java @@ -11,7 +11,7 @@ *******************************************************************************/ package org.eclipse.cdt.internal.core.dom.parser.cpp; -import org.eclipse.cdt.core.dom.ast.cpp.ICPPBinding; +import org.eclipse.cdt.core.dom.ast.IType; /** * Scope corresponding to an unknown binding. @@ -21,5 +21,5 @@ public interface ICPPInternalUnknownScope extends ICPPASTInternalScope { /** * @return Returns the binding corresponding to the scope. */ - public abstract ICPPBinding getScopeBinding(); + public IType getScopeType(); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownBinding.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownBinding.java index 4d41e4df2f0..a18fb740290 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownBinding.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownBinding.java @@ -11,7 +11,6 @@ package org.eclipse.cdt.internal.core.dom.parser.cpp; import org.eclipse.cdt.core.dom.ast.DOMException; -import org.eclipse.cdt.core.dom.ast.IASTName; import org.eclipse.cdt.core.dom.ast.cpp.ICPPBinding; import org.eclipse.cdt.core.dom.ast.cpp.ICPPScope; @@ -26,10 +25,4 @@ public interface ICPPUnknownBinding extends ICPPBinding { * @throws DOMException */ public ICPPScope asScope() throws DOMException; - - /** - * Returns a the name of the unknown binding that has to be searched in the parent scope. - * The ast-node may not be rooted in an ast-tree. May be null. - */ - public IASTName getUnknownName(); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownMember.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownMember.java new file mode 100644 index 00000000000..71b57e75e12 --- /dev/null +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownMember.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright (c) 2008, 2009 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 + *******************************************************************************/ +package org.eclipse.cdt.internal.core.dom.parser.cpp; + +import org.eclipse.cdt.core.dom.ast.IType; + +/** + * Represents the binding for a dependent name within a template declaration. + */ +public interface ICPPUnknownMember extends ICPPUnknownBinding { + /** + * For unknown bindings the owner may just be an unknown type that is not yet resolved to a binding. + */ + public IType getOwnerType(); +} diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownClassType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownMemberClass.java similarity index 89% rename from core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownClassType.java rename to core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownMemberClass.java index aaecce2d77a..d1af9bfa31e 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownClassType.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownMemberClass.java @@ -19,5 +19,5 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType; * This interface should be made public. * @since 5.0 */ -public interface ICPPUnknownClassType extends ICPPUnknownBinding, ICPPUnknownType, ICPPClassType { +public interface ICPPUnknownMemberClass extends ICPPUnknownMember, ICPPUnknownType, ICPPClassType { } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownClassInstance.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownMemberClassInstance.java similarity index 92% rename from core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownClassInstance.java rename to core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownMemberClassInstance.java index daef1004737..b0d4a19d5a5 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownClassInstance.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/ICPPUnknownMemberClassInstance.java @@ -19,7 +19,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateArgument; * This interface should be made public. * @since 5.0 */ -public interface ICPPUnknownClassInstance extends ICPPUnknownClassType { +public interface ICPPUnknownMemberClassInstance extends ICPPUnknownMemberClass { /** * Returns the arguments of the instantiation */ diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/BaseClassLookup.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/BaseClassLookup.java index 35dd49ec54b..d12987b8e68 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/BaseClassLookup.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/BaseClassLookup.java @@ -255,7 +255,7 @@ class BaseClassLookup { if (nbase instanceof IProblemBinding) continue; - final IName nbaseName = nbase.getBaseClassSpecifierName(); + final IName nbaseName = nbase.getClassDefinitionName(); int cmp= baseName == null ? 0 : CPPSemantics.compareByRelevance(data, baseName, nbaseName); if (cmp <= 0) { if (cmp < 0) { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPFunctionSet.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPFunctionSet.java index f92fcf3d165..8d1842259e7 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPFunctionSet.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPFunctionSet.java @@ -20,7 +20,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateArgument; import org.eclipse.cdt.core.parser.util.ArrayUtil; import org.eclipse.cdt.internal.core.dom.Linkage; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTNameBase; -import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownFunction; +import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPDeferredFunction; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPTwoPhaseBinding; /** @@ -92,7 +92,7 @@ public class CPPFunctionSet implements ICPPTwoPhaseBinding { public void setToUnknown() { if (fName != null) { - fName.setBinding(new CPPUnknownFunction(null, fName.toCharArray())); + fName.setBinding(new CPPDeferredFunction(null, fName.toCharArray())); } } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java index 6fb0de1789f..98bcf4830b8 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPSemantics.java @@ -190,16 +190,17 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTTranslationUnit; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPBasicType; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPBuiltinParameter; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPCompositeBinding; +import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPDeferredFunction; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPFunctionType; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPImplicitFunction; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPNamespace; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPNamespaceScope; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPReferenceType; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPScope; -import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownBinding; -import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownClass; +import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPTemplateParameterMap; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownConstructor; -import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownFunction; +import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownMemberClass; +import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownMethod; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUsingDeclaration; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUsingDirective; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPVariable; @@ -211,7 +212,6 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalBinding; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalNamespaceScope; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownBinding; -import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownClassType; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownType; import org.eclipse.cdt.internal.core.dom.parser.cpp.OverloadableOperator; import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPTemplates.TypeSelection; @@ -446,12 +446,12 @@ public class CPPSemantics { final ASTNodeProperty namePropertyInParent = name.getPropertyInParent(); if (binding == null && data.skippedScope != null) { if (data.hasFunctionArguments()) { - binding= new CPPUnknownFunction(data.skippedScope, name.getSimpleID()); + binding= new CPPDeferredFunction(data.skippedScope, name.getSimpleID()); } else { if (namePropertyInParent == IASTNamedTypeSpecifier.NAME) { - binding= new CPPUnknownClass(data.skippedScope, name.getSimpleID()); + binding= new CPPUnknownMemberClass(data.skippedScope, name.getSimpleID()); } else { - binding= new CPPUnknownBinding(data.skippedScope, name.getSimpleID()); + binding= new CPPUnknownMethod(data.skippedScope, name.getSimpleID()); } } } @@ -2387,7 +2387,7 @@ public class CPPSemantics { if (viableCount == 1) return fns[0]; setTargetedFunctionsToUnknown(argTypes); - return CPPUnknownFunction.createForSample(fns[0]); + return CPPDeferredFunction.createForSample(fns[0]); } IFunction[] ambiguousFunctions= null; // ambiguity, 2 functions are equally good @@ -2447,7 +2447,7 @@ public class CPPSemantics { return null; setTargetedFunctionsToUnknown(argTypes); - return CPPUnknownFunction.createForSample(unknownFunction); + return CPPDeferredFunction.createForSample(unknownFunction); } if (ambiguousFunctions != null) { @@ -2496,13 +2496,20 @@ public class CPPSemantics { if (haveASTResult && fromIndex) break; + boolean isCandidate; if (f instanceof ICPPFunctionTemplate) { - // Works only if there are template arguments - if (args == null || result != null) - return null; - result= f; - haveASTResult= !fromIndex; - } else if (args == null) { + if (args == null) { + isCandidate= true; + } else { + // See 14.3-7 + final ICPPTemplateParameter[] tpars = ((ICPPFunctionTemplate) f).getTemplateParameters(); + final CPPTemplateParameterMap map = new CPPTemplateParameterMap(tpars.length); + isCandidate= TemplateArgumentDeduction.addExplicitArguments(tpars, args, map, point); + } + } else { + isCandidate= args == null; + } + if (isCandidate) { if (result != null) return null; result= f; @@ -3000,8 +3007,8 @@ public class CPPSemantics { return null; final IASTInitializerClause[] placement = expr.getPlacementArguments(); - final ICPPEvaluation arg1= new EvalUnary(IASTUnaryExpression.op_star, evaluation); - final ICPPEvaluation arg2= new EvalUnary(IASTUnaryExpression.op_sizeof, evaluation); + final ICPPEvaluation arg1= new EvalUnary(IASTUnaryExpression.op_star, evaluation, null); + final ICPPEvaluation arg2= new EvalUnary(IASTUnaryExpression.op_sizeof, evaluation, null); ICPPEvaluation[] args; if (placement == null) { @@ -3088,7 +3095,7 @@ public class CPPSemantics { type = SemanticUtil.getNestedType(((ICPPVariable) binding).getType(), TDEF | CVTYPE); if (!(type instanceof ICPPClassType)) return null; - if (type instanceof ICPPClassTemplate || type instanceof ICPPUnknownClassType || type instanceof ISemanticProblem) + if (type instanceof ICPPClassTemplate || type instanceof ICPPUnknownType || type instanceof ISemanticProblem) return null; final ICPPClassType classType = (ICPPClassType) type; @@ -3668,9 +3675,8 @@ public class CPPSemantics { } protected static IBinding resolveUnknownName(IScope scope, ICPPUnknownBinding unknown, IASTNode point) { - final IASTName unknownName = unknown.getUnknownName(); - LookupData data = unknownName.getTranslationUnit() != null ? - new LookupData(unknownName) : new LookupData(unknownName.getSimpleID(), null, point); + final char[] unknownName = unknown.getNameCharArray(); + LookupData data = new LookupData(unknownName, null, point); data.setIgnorePointOfDeclaration(true); data.typesOnly= unknown instanceof IType; @@ -3693,7 +3699,7 @@ public class CPPSemantics { } // 4: Normal post processing is not possible, because the name is not rooted in AST if (binding == null) - binding = new ProblemBinding(unknownName, point, IProblemBinding.SEMANTIC_NAME_NOT_FOUND); + binding = new ProblemBinding(new CPPASTName(unknownName), point, IProblemBinding.SEMANTIC_NAME_NOT_FOUND); return binding; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPTemplates.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPTemplates.java index 37f1bc4c148..59ad404d4ba 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPTemplates.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPTemplates.java @@ -41,7 +41,6 @@ import org.eclipse.cdt.core.dom.ast.IArrayType; import org.eclipse.cdt.core.dom.ast.IBinding; import org.eclipse.cdt.core.dom.ast.IEnumeration; import org.eclipse.cdt.core.dom.ast.IEnumerator; -import org.eclipse.cdt.core.dom.ast.IFunction; import org.eclipse.cdt.core.dom.ast.IFunctionType; import org.eclipse.cdt.core.dom.ast.IPointerType; import org.eclipse.cdt.core.dom.ast.IProblemBinding; @@ -102,6 +101,7 @@ import org.eclipse.cdt.internal.core.dom.parser.ITypeContainer; import org.eclipse.cdt.internal.core.dom.parser.ProblemBinding; import org.eclipse.cdt.internal.core.dom.parser.ProblemType; import org.eclipse.cdt.internal.core.dom.parser.Value; +import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTName; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPArrayType; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPClassInstance; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPClassSpecialization; @@ -112,6 +112,7 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPConstructorInstance; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPConstructorSpecialization; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPConstructorTemplateSpecialization; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPDeferredClassInstance; +import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPDeferredFunction; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPFieldSpecialization; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPFunctionInstance; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPFunctionSpecialization; @@ -131,10 +132,9 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPTemplateTemplateParameter import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPTemplateTypeArgument; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPTemplateTypeParameter; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPTypedefSpecialization; -import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownBinding; -import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownClass; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownClassInstance; -import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownFunction; +import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownMemberClass; +import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownMethod; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUsingDeclarationSpecialization; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPASTInternalTemplateDeclaration; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPDeferredClassInstance; @@ -143,8 +143,9 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInstanceCache; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalBinding; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalClassTemplate; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownBinding; -import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownClassInstance; -import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownClassType; +import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownMember; +import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownMemberClass; +import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownMemberClassInstance; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownType; import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.Conversions.Context; import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.Conversions.UDCMode; @@ -649,13 +650,11 @@ public class CPPTemplates { template= template.getOwner(); } - if (template instanceof ICPPUnknownClassType) { - IBinding owner= template.getOwner(); - if (owner instanceof ICPPUnknownBinding) { - ICPPTemplateArgument[] args= createTemplateArgumentArray(id); - args= SemanticUtil.getSimplifiedArguments(args); - return new CPPUnknownClassInstance((ICPPUnknownBinding) template.getOwner(), id.getSimpleID(), args); - } + if (template instanceof ICPPUnknownMemberClass) { + IType owner= ((ICPPUnknownMemberClass)template).getOwnerType(); + ICPPTemplateArgument[] args= createTemplateArgumentArray(id); + args= SemanticUtil.getSimplifiedArguments(args); + return new CPPUnknownClassInstance(owner, id.getSimpleID(), args); } if (!(template instanceof ICPPClassTemplate) || template instanceof ICPPClassTemplatePartialSpecialization) @@ -1143,29 +1142,7 @@ public class CPPTemplates { } if (type instanceof ICPPTemplateParameter) { - final ICPPTemplateParameter tpar = (ICPPTemplateParameter) type; - ICPPTemplateArgument arg= null; - if (tpar.isParameterPack()) { - if (packOffset >= 0) { - ICPPTemplateArgument[] args = tpMap.getPackExpansion(tpar); - if (args != null) { - if (packOffset >= args.length) { - return new ProblemBinding(point, IProblemBinding.SEMANTIC_INVALID_TYPE, - tpar.getNameCharArray()); - } - arg= args[packOffset]; - } - } - } else { - arg= tpMap.getArgument(tpar); - } - - if (arg != null) { - IType t= arg.getTypeValue(); - if (t != null) - return t; - } - return type; + return resolveTemplateTypeParameter((ICPPTemplateParameter) type, tpMap, packOffset, point); } if (type instanceof ICPPUnknownBinding) { @@ -1266,6 +1243,32 @@ public class CPPTemplates { } } + public static IType resolveTemplateTypeParameter(final ICPPTemplateParameter tpar, + ICPPTemplateParameterMap tpMap, int packOffset, IASTNode point) { + ICPPTemplateArgument arg= null; + if (tpar.isParameterPack()) { + if (packOffset >= 0) { + ICPPTemplateArgument[] args = tpMap.getPackExpansion(tpar); + if (args != null) { + if (packOffset >= args.length) { + return new ProblemBinding(point, IProblemBinding.SEMANTIC_INVALID_TYPE, + tpar.getNameCharArray()); + } + arg= args[packOffset]; + } + } + } else { + arg= tpMap.getArgument(tpar); + } + + if (arg != null) { + IType t= arg.getTypeValue(); + if (t != null) + return t; + } + return (IType) tpar; + } + /** * Checks whether a given name corresponds to a template declaration and returns the AST node * for it. This works for the name of a template-definition and also for a name needed to @@ -1700,11 +1703,11 @@ public class CPPTemplates { ICPPFunctionTemplate template= (ICPPFunctionTemplate) func; try { if (containsDependentType(fnArgs)) - return new ICPPFunction[] {CPPUnknownFunction.createForSample(template)}; + return new ICPPFunction[] {CPPDeferredFunction.createForSample(template)}; if (requireTemplate) { if (hasDependentArgument(tmplArgs)) - return new ICPPFunction[] {CPPUnknownFunction.createForSample(template)}; + return new ICPPFunction[] {CPPDeferredFunction.createForSample(template)}; } } catch (DOMException e) { return NO_FUNCTIONS; @@ -1776,7 +1779,7 @@ public class CPPTemplates { if (!checkedForDependentType) { try { if (isDependentType(conversionType)) { - inst= CPPUnknownFunction.createForSample(template); + inst= CPPDeferredFunction.createForSample(template); done= true; } checkedForDependentType= true; @@ -1840,7 +1843,7 @@ public class CPPTemplates { ICPPTemplateArgument[] args, IASTNode point) { try { if (target != null && isDependentType(target)) { - return CPPUnknownFunction.createForSample(template); + return CPPDeferredFunction.createForSample(template); } if (template instanceof ICPPConstructor || args == null) @@ -2412,47 +2415,57 @@ public class CPPTemplates { if (unknown instanceof ICPPDeferredClassInstance) { return resolveDeferredClassInstance((ICPPDeferredClassInstance) unknown, tpMap, packOffset, within, point); } - - final IBinding owner= unknown.getOwner(); - if (!(owner instanceof ICPPTemplateTypeParameter || owner instanceof ICPPUnknownClassType)) + if (unknown instanceof ICPPUnknownMember) { + return resolveUnknownMember((ICPPUnknownMember) unknown, tpMap, packOffset, within, point); + } + if (unknown instanceof ICPPTemplateParameter && unknown instanceof IType) { + IType type= resolveTemplateTypeParameter((ICPPTemplateParameter) unknown, tpMap, packOffset, point); + if (type instanceof IBinding) + return (IBinding) type; + } + return unknown; + } + + private static IBinding resolveUnknownMember(ICPPUnknownMember unknown, ICPPTemplateParameterMap tpMap, + int packOffset, ICPPClassSpecialization within, IASTNode point) throws DOMException { + final IType ot0= unknown.getOwnerType(); + if (ot0 == null) return unknown; IBinding result = unknown; - IType t = CPPTemplates.instantiateType((IType) owner, tpMap, packOffset, within, point); - if (t != null) { - t = SemanticUtil.getUltimateType(t, false); - if (t instanceof ICPPUnknownBinding) { - if (unknown instanceof ICPPUnknownClassInstance) { - ICPPUnknownClassInstance ucli= (ICPPUnknownClassInstance) unknown; - final ICPPTemplateArgument[] arguments = ucli.getArguments(); - ICPPTemplateArgument[] newArgs = CPPTemplates.instantiateArguments(arguments, tpMap, packOffset, within, point); - if (!t.equals(owner) && newArgs != arguments) { - newArgs= SemanticUtil.getSimplifiedArguments(newArgs); - result= new CPPUnknownClassInstance((ICPPUnknownBinding) t, ucli.getNameCharArray(), newArgs); + IType ot1 = CPPTemplates.instantiateType(ot0, tpMap, packOffset, within, point); + if (ot1 != null) { + ot1 = SemanticUtil.getUltimateType(ot1, false); + if (ot1 instanceof ICPPUnknownType) { + if (unknown instanceof ICPPUnknownMemberClassInstance) { + ICPPUnknownMemberClassInstance ucli= (ICPPUnknownMemberClassInstance) unknown; + ICPPTemplateArgument[] args0 = ucli.getArguments(); + ICPPTemplateArgument[] args1 = CPPTemplates.instantiateArguments(args0, tpMap, packOffset, within, point); + if (args0 != args1 || !ot1.isSameType(ot0)) { + args1= SemanticUtil.getSimplifiedArguments(args1); + result= new CPPUnknownClassInstance(ot1, ucli.getNameCharArray(), args1); } - } else if (!t.equals(owner)) { - if (unknown instanceof ICPPUnknownClassType) { - result= new CPPUnknownClass((ICPPUnknownBinding) t, unknown.getNameCharArray()); - } else if (unknown instanceof IFunction) { - result= new CPPUnknownClass((ICPPUnknownBinding) t, unknown.getNameCharArray()); + } else if (!ot1.isSameType(ot0)) { + if (unknown instanceof ICPPUnknownMemberClass) { + result= new CPPUnknownMemberClass(ot1, unknown.getNameCharArray()); } else { - result= new CPPUnknownBinding((ICPPUnknownBinding) t, unknown.getNameCharArray()); + result= new CPPUnknownMethod(ot1, unknown.getNameCharArray()); } } - } else if (t instanceof ICPPClassType) { - IScope s = ((ICPPClassType) t).getCompositeScope(); + } else if (ot1 instanceof ICPPClassType) { + IScope s = ((ICPPClassType) ot1).getCompositeScope(); if (s != null) { result= CPPSemantics.resolveUnknownName(s, unknown, point); - if (unknown instanceof ICPPUnknownClassInstance && result instanceof ICPPTemplateDefinition) { - ICPPTemplateArgument[] newArgs = CPPTemplates.instantiateArguments( - ((ICPPUnknownClassInstance) unknown).getArguments(), tpMap, packOffset, within, point); + if (unknown instanceof ICPPUnknownMemberClassInstance && result instanceof ICPPTemplateDefinition) { + ICPPTemplateArgument[] args1 = CPPTemplates.instantiateArguments( + ((ICPPUnknownMemberClassInstance) unknown).getArguments(), tpMap, packOffset, within, point); if (result instanceof ICPPClassTemplate) { - result = instantiate((ICPPClassTemplate) result, newArgs, point); + result = instantiate((ICPPClassTemplate) result, args1, point); } } } - } else if (t != owner) { - return new ProblemBinding(unknown.getUnknownName(), point, IProblemBinding.SEMANTIC_BAD_SCOPE); + } else if (ot1 != ot0) { + return new ProblemBinding(new CPPASTName(unknown.getNameCharArray()), point, IProblemBinding.SEMANTIC_BAD_SCOPE); } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPVisitor.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPVisitor.java index 156131e6509..31ad69b6196 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPVisitor.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/CPPVisitor.java @@ -235,8 +235,6 @@ public class CPPVisitor extends ASTQueries { return new HashSet(); } }; - private static final ICPPScope UNKNOWN_TYPE_SCOPE = new CPPUnknownTypeScope(new CPPASTName("".toCharArray()), null); //$NON-NLS-1$ - public static IBinding createBinding(IASTName name) { IASTNode parent = name.getParent(); IBinding binding = null; @@ -1226,7 +1224,7 @@ public class CPPVisitor extends ASTQueries { } else if (type instanceof ICPPUnknownBinding) { return ((ICPPUnknownBinding) type).asScope(); } else if (type instanceof ICPPUnknownType) { - return UNKNOWN_TYPE_SCOPE; + return new CPPUnknownTypeScope(type, null); } else { return new CPPScope.CPPScopeProblem(name, ISemanticProblem.TYPE_UNKNOWN_FOR_EXPRESSION); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalMemberAccess.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalMemberAccess.java index 7e164f70ecd..b453f05c653 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalMemberAccess.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalMemberAccess.java @@ -46,7 +46,7 @@ import org.eclipse.cdt.internal.core.dom.parser.ISerializableEvaluation; import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer; import org.eclipse.cdt.internal.core.dom.parser.ProblemType; import org.eclipse.cdt.internal.core.dom.parser.Value; -import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownClass; +import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownMemberClass; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalUnknownScope; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownBinding; @@ -194,7 +194,7 @@ public class EvalMemberAccess extends CPPEvaluation { } if (CPPTemplates.isDependentType(type)) - return returnUnnamed ? CPPUnknownClass.createUnnamedInstance() : null; + return returnUnnamed ? CPPUnknownMemberClass.createUnnamedInstance() : null; return new ProblemType(ISemanticProblem.TYPE_UNKNOWN_FOR_EXPRESSION); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalUnary.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalUnary.java index 6b287f62b1f..2d2caec9208 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalUnary.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/EvalUnary.java @@ -37,14 +37,17 @@ import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUti import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.REF; import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.TDEF; +import org.eclipse.cdt.core.dom.ast.DOMException; import org.eclipse.cdt.core.dom.ast.IASTExpression.ValueCategory; import org.eclipse.cdt.core.dom.ast.IASTNode; +import org.eclipse.cdt.core.dom.ast.IBinding; import org.eclipse.cdt.core.dom.ast.IPointerType; import org.eclipse.cdt.core.dom.ast.ISemanticProblem; import org.eclipse.cdt.core.dom.ast.IType; import org.eclipse.cdt.core.dom.ast.IValue; import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassSpecialization; import org.eclipse.cdt.core.dom.ast.cpp.ICPPFunction; +import org.eclipse.cdt.core.dom.ast.cpp.ICPPMember; import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameterMap; import org.eclipse.cdt.internal.core.dom.parser.ISerializableEvaluation; import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer; @@ -55,8 +58,10 @@ import org.eclipse.cdt.internal.core.dom.parser.Value; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPArithmeticConversion; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPBasicType; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPFunction; +import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPPointerToMemberType; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPPointerType; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation; +import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownBinding; import org.eclipse.cdt.internal.core.dom.parser.cpp.OverloadableOperator; import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPSemantics.LookupMode; import org.eclipse.core.runtime.CoreException; @@ -66,12 +71,14 @@ public class EvalUnary extends CPPEvaluation { private final int fOperator; private final ICPPEvaluation fArgument; + private final IBinding fAddressOfQualifiedNameBinding; private ICPPFunction fOverload= CPPFunction.UNINITIALIZED_FUNCTION; private IType fType; - public EvalUnary(int operator, ICPPEvaluation operand) { + public EvalUnary(int operator, ICPPEvaluation operand, IBinding addressOfQualifiedNameBinding) { fOperator= operator; fArgument= operand; + fAddressOfQualifiedNameBinding= addressOfQualifiedNameBinding; } public int getOperator() { @@ -82,6 +89,10 @@ public class EvalUnary extends CPPEvaluation { return fArgument; } + public IBinding getAddressOfQualifiedNameBinding() { + return fAddressOfQualifiedNameBinding; + } + @Override public boolean isInitializerList() { return false; @@ -142,6 +153,12 @@ public class EvalUnary extends CPPEvaluation { if (fArgument.isTypeDependent()) return null; + if (fAddressOfQualifiedNameBinding instanceof ICPPMember) { + ICPPMember member= (ICPPMember) fAddressOfQualifiedNameBinding; + if (!member.isStatic()) + return null; + } + IType type = fArgument.getTypeOrFunctionSet(point); type = SemanticUtil.getNestedType(type, TDEF | REF | CVTYPE); if (!CPPSemantics.isUserDefined(type)) @@ -180,6 +197,16 @@ public class EvalUnary extends CPPEvaluation { case op_throw: return CPPSemantics.VOID_TYPE; case op_amper: + if (fAddressOfQualifiedNameBinding instanceof ICPPMember) { + ICPPMember member= (ICPPMember) fAddressOfQualifiedNameBinding; + if (!member.isStatic()) { + try { + return new CPPPointerToMemberType(member.getType(), member.getClassOwner(), false, false, false); + } catch (DOMException e) { + return e.getProblem(); + } + } + } return new CPPPointerType(fArgument.getTypeOrFunctionSet(point)); case op_star: IType type= fArgument.getTypeOrFunctionSet(point); @@ -270,21 +297,31 @@ public class EvalUnary extends CPPEvaluation { buffer.putByte(ITypeMarshalBuffer.EVAL_UNARY); buffer.putByte((byte) fOperator); buffer.marshalEvaluation(fArgument, includeValue); + buffer.marshalBinding(fAddressOfQualifiedNameBinding); } public static ISerializableEvaluation unmarshal(int firstByte, ITypeMarshalBuffer buffer) throws CoreException { int op= buffer.getByte(); ICPPEvaluation arg= (ICPPEvaluation) buffer.unmarshalEvaluation(); - return new EvalUnary(op, arg); + IBinding binding= buffer.unmarshalBinding(); + return new EvalUnary(op, arg, binding); } @Override public ICPPEvaluation instantiate(ICPPTemplateParameterMap tpMap, int packOffset, ICPPClassSpecialization within, int maxdepth, IASTNode point) { ICPPEvaluation argument = fArgument.instantiate(tpMap, packOffset, within, maxdepth, point); - if (argument == fArgument) + IBinding aoqn = fAddressOfQualifiedNameBinding; + if (aoqn instanceof ICPPUnknownBinding) { + try { + aoqn= CPPTemplates.resolveUnknown((ICPPUnknownBinding) aoqn, tpMap, packOffset, within, point); + } catch (DOMException e) { + } + } + if (argument == fArgument && aoqn == fAddressOfQualifiedNameBinding) return this; - return new EvalUnary(fOperator, argument); + + return new EvalUnary(fOperator, argument, aoqn); } @Override diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TemplateArgumentDeduction.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TemplateArgumentDeduction.java index e921895e1fb..8b09603afdd 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TemplateArgumentDeduction.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/semantics/TemplateArgumentDeduction.java @@ -439,7 +439,7 @@ public class TemplateArgumentDeduction { /** * Adds the explicit arguments to the map. */ - private static boolean addExplicitArguments(final ICPPTemplateParameter[] tmplParams, + public static boolean addExplicitArguments(final ICPPTemplateParameter[] tmplParams, ICPPTemplateArgument[] tmplArgs, CPPTemplateParameterMap map, IASTNode point) { tmplArgs= SemanticUtil.getSimplifiedArguments(tmplArgs); ICPPTemplateParameter tmplParam= null; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/IIndexCPPBindingConstants.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/IIndexCPPBindingConstants.java index adc31d84c7b..ac8795b0018 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/IIndexCPPBindingConstants.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/IIndexCPPBindingConstants.java @@ -57,6 +57,7 @@ public interface IIndexCPPBindingConstants { int CPP_FRIEND_DECLARATION = IIndexBindingConstants.LAST_CONSTANT + 45; int CPP_TEMPLATE_TEMPLATE_PARAMETER= IIndexBindingConstants.LAST_CONSTANT + 46; int CPP_CLASS_TEMPLATE_PARTIAL_SPEC_SPEC = IIndexBindingConstants.LAST_CONSTANT + 47; - int CPP_UNKNOWN_BINDING = IIndexBindingConstants.LAST_CONSTANT + 48; + int CPP_UNKNOWN_FIELD = IIndexBindingConstants.LAST_CONSTANT + 48; int CPP_USING_DECLARATION_SPECIALIZATION= IIndexBindingConstants.LAST_CONSTANT + 49; + int CPP_UNKNOWN_METHOD = IIndexBindingConstants.LAST_CONSTANT + 50; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/IIndexFragmentBinding.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/IIndexFragmentBinding.java index 61f6e0ac56a..05621a776a3 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/IIndexFragmentBinding.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/IIndexFragmentBinding.java @@ -61,7 +61,7 @@ public interface IIndexFragmentBinding extends IIndexBinding { IIndexFragmentBinding getOwner(); /** - * Returns a unique id for the binding within the fragment + * Returns a unique id for the binding within the fragment, or null for unknown bindings. * @since 5.1 */ long getBindingID(); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/IndexCPPSignatureUtil.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/IndexCPPSignatureUtil.java index 21c2372beaa..daed2973029 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/IndexCPPSignatureUtil.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/IndexCPPSignatureUtil.java @@ -33,7 +33,7 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameter; import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateTemplateParameter; import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateTypeParameter; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPDeferredClassInstance; -import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownClassInstance; +import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownMemberClassInstance; import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil; import org.eclipse.core.runtime.CoreException; @@ -60,8 +60,8 @@ public class IndexCPPSignatureUtil { if (binding instanceof ICPPTemplateInstance) { ICPPTemplateInstance inst = (ICPPTemplateInstance) binding; buffer.append(getTemplateArgString(inst.getTemplateArguments(), true)); - } else if (binding instanceof ICPPUnknownClassInstance) { - ICPPUnknownClassInstance inst = (ICPPUnknownClassInstance) binding; + } else if (binding instanceof ICPPUnknownMemberClassInstance) { + ICPPUnknownMemberClassInstance inst = (ICPPUnknownMemberClassInstance) binding; buffer.append(getTemplateArgString(inst.getArguments(), true)); } else if (binding instanceof ICPPClassTemplatePartialSpecialization) { ICPPClassTemplatePartialSpecialization partial = (ICPPClassTemplatePartialSpecialization) binding; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/AbstractCompositeFactory.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/AbstractCompositeFactory.java index 0017b69df52..a1b125667a9 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/AbstractCompositeFactory.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/AbstractCompositeFactory.java @@ -31,7 +31,7 @@ import org.eclipse.core.runtime.CoreException; */ public abstract class AbstractCompositeFactory implements ICompositesFactory { protected IIndex index; - private Comparator fragmentComparator; + private final Comparator fragmentComparator; public AbstractCompositeFactory(IIndex index) { this.index= index; @@ -135,7 +135,7 @@ public abstract class AbstractCompositeFactory implements ICompositesFactory { } private static class FragmentBindingComparator implements Comparator { - private IIndexFragmentBindingComparator[] comparators; + private final IIndexFragmentBindingComparator[] comparators; FragmentBindingComparator(IIndexFragmentBindingComparator[] comparators) { this.comparators= comparators; 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 1108417de68..2c067f2bbab 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 @@ -12,7 +12,6 @@ package org.eclipse.cdt.internal.core.index.composite.cpp; import org.eclipse.cdt.core.CCorePlugin; -import org.eclipse.cdt.core.dom.ast.IASTName; import org.eclipse.cdt.core.dom.ast.IArrayType; import org.eclipse.cdt.core.dom.ast.IBasicType; import org.eclipse.cdt.core.dom.ast.IBinding; @@ -67,10 +66,10 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPReferenceType; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPClassSpecializationScope; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPDeferredClassInstance; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation; -import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalUnknownScope; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownBinding; -import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownClassInstance; -import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownClassType; +import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownMember; +import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownMemberClass; +import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownMemberClassInstance; import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPFunctionSet; import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalBinary; import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalBinaryTypeId; @@ -129,11 +128,6 @@ public class CPPCompositesFactory extends AbstractCompositeFactory { } return new CompositeCPPNamespaceScope(this, namespaces); } - if (rscope instanceof ICPPInternalUnknownScope) { - ICPPInternalUnknownScope uscope= (ICPPInternalUnknownScope) rscope; - final ICPPBinding binding = uscope.getScopeBinding(); - return new CompositeCPPUnknownScope((CompositeCPPBinding) getCompositeBinding((IIndexFragmentBinding) binding), (IASTName) uscope.getPhysicalNode()); - } throw new CompositingNotImplementedError(rscope.getClass().getName()); } catch(CoreException ce) { CCorePlugin.log(ce); @@ -334,7 +328,12 @@ public class CPPCompositesFactory extends AbstractCompositeFactory { ICPPTemplateArgument[] c = e.getTemplateArgs(); ICPPEvaluation a2 = getCompositeEvaluation(a); - IIndexBinding b2 = getCompositeBinding((IIndexFragmentBinding) b); + IBinding b2= b; + if (b instanceof IIndexFragmentBinding) { + b2 = getCompositeBinding((IIndexFragmentBinding) b); + } else if (b instanceof IType) { + b2 = (IBinding) getCompositeType((IType) b); + } ICPPTemplateArgument[] c2 = TemplateInstanceUtil.convert(this, c); if (a != a2 || b != b2 || c != c2) @@ -373,8 +372,10 @@ public class CPPCompositesFactory extends AbstractCompositeFactory { EvalUnary e= (EvalUnary) eval; ICPPEvaluation a = e.getArgument(); ICPPEvaluation a2 = getCompositeEvaluation(a); - if (a != a2) - e= new EvalUnary(e.getOperator(), a2); + IBinding b= e.getAddressOfQualifiedNameBinding(); + IBinding b2= getCompositeBinding((IIndexFragmentBinding) b); + if (a != a2 || b != b2) + e= new EvalUnary(e.getOperator(), a2, b2); return e; } if (eval instanceof EvalUnaryTypeID) { @@ -464,7 +465,13 @@ public class CPPCompositesFactory extends AbstractCompositeFactory { } else if (binding instanceof ICPPSpecialization) { if (binding instanceof ICPPTemplateInstance) { if (binding instanceof ICPPDeferredClassInstance) { - return new CompositeCPPDeferredClassInstance(this, (ICPPDeferredClassInstance) findOneBinding(binding)); + ICPPDeferredClassInstance def= (ICPPDeferredClassInstance) binding; + ICPPClassTemplate t0= def.getClassTemplate(); + ICPPTemplateArgument[] args0= def.getTemplateArguments(); + + ICPPClassTemplate t= (ICPPClassTemplate) getCompositeType(t0); + ICPPTemplateArgument[] args = TemplateInstanceUtil.convert(this, args0); + return new CompositeCPPDeferredClassInstance(t, args); } else { if (binding instanceof ICPPClassType) { return new CompositeCPPClassInstance(this, (ICPPClassType) findOneBinding(binding)); @@ -545,13 +552,24 @@ public class CPPCompositesFactory extends AbstractCompositeFactory { } else if (binding instanceof ICPPVariable) { result = new CompositeCPPVariable(this, (ICPPVariable) binding); } else if (binding instanceof ICPPUnknownBinding) { - if (binding instanceof ICPPUnknownClassInstance) { - result = new CompositeCPPUnknownClassInstance(this, (ICPPUnknownClassInstance) binding); - } else if (binding instanceof ICPPUnknownClassType) { - result = new CompositeCPPUnknownClassType(this, (ICPPUnknownClassType) binding); - } else { - result= new CompositeCPPUnknownBinding(this, (ICPPUnknownBinding) binding); + if (binding instanceof ICPPUnknownMember) { + ICPPUnknownMember def= (ICPPUnknownMember) binding; + IType b= getCompositeType(def.getOwnerType()); + if (binding instanceof ICPPUnknownMemberClass) { + if (binding instanceof ICPPUnknownMemberClassInstance) { + ICPPTemplateArgument[] args0= ((ICPPUnknownMemberClassInstance) binding).getArguments(); + ICPPTemplateArgument[] args = TemplateInstanceUtil.convert(this, args0); + return new CompositeCPPUnknownMemberClassInstance(b, def.getNameCharArray(), args); + } else { + return new CompositeCPPUnknownMemberClass(b, def.getNameCharArray()); + } + } else if (binding instanceof ICPPField) { + return new CompositeCPPUnknownField(b, def.getNameCharArray()); + } else if (binding instanceof ICPPMethod) { + return new CompositeCPPUnknownMethod(b, def.getNameCharArray()); + } } + throw new CompositingNotImplementedError("composite binding unavailable for " + binding + " " + binding.getClass()); //$NON-NLS-1$ //$NON-NLS-2$ } else if (binding instanceof ICPPClassType) { ICPPClassType def = (ICPPClassType) findOneBinding(binding); result = def == null ? null : new CompositeCPPClassType(this, def); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPClassType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPClassType.java index f1472722205..ed9cb9031c8 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPClassType.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPClassType.java @@ -13,6 +13,9 @@ *******************************************************************************/ package org.eclipse.cdt.internal.core.index.composite.cpp; +import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.TDEF; +import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.getNestedType; + import java.util.Arrays; import org.eclipse.cdt.core.dom.IName; @@ -51,9 +54,9 @@ class CompositeCPPClassType extends CompositeCPPBinding implements ICPPClassType } private class CPPBaseDelegate implements ICPPBase { - private ICPPBase base; - private IBinding baseClass; - private boolean writable; + private final ICPPBase base; + private IType baseClass; + private final boolean writable; CPPBaseDelegate(ICPPBase b) { this(b, false); @@ -66,17 +69,30 @@ class CompositeCPPClassType extends CompositeCPPBinding implements ICPPClassType @Override public IBinding getBaseClass() { - if (baseClass != null) { - return baseClass; - } else { - return cf.getCompositeBinding((IIndexFragmentBinding) base.getBaseClass()); - } + IType type= getBaseClassType(); + type = getNestedType(type, TDEF); + if (type instanceof IBinding) + return (IBinding) type; + return null; } @Override + public IType getBaseClassType() { + if (baseClass == null) { + baseClass= cf.getCompositeType(base.getBaseClassType()); + } + return baseClass; + } + + @Override @Deprecated public IName getBaseClassSpecifierName() { return base.getBaseClassSpecifierName(); } + + @Override + public IName getClassDefinitionName() { + return base.getClassDefinitionName(); + } @Override public int getVisibility() { @@ -90,13 +106,22 @@ class CompositeCPPClassType extends CompositeCPPBinding implements ICPPClassType @Override public void setBaseClass(IBinding binding) { + if (writable && binding instanceof IType) { + baseClass= (IType) binding; + } else { + base.setBaseClass(binding); + } + } + + @Override + public void setBaseClass(IType binding) { if (writable) { baseClass= binding; } else { base.setBaseClass(binding); } } - + @Override public ICPPBase clone(){ return new CPPBaseDelegate(base, true); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPDeferredClassInstance.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPDeferredClassInstance.java index 90c582a119a..1d88a2bd301 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPDeferredClassInstance.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPDeferredClassInstance.java @@ -1,102 +1,58 @@ /******************************************************************************* - * Copyright (c) 2007, 2010 Symbian Software Systems and others. + * Copyright (c) 2012 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: - * Andrew Ferguson (Symbian) - Initial implementation - * Markus Schorn (Wind River Systems) - *******************************************************************************/ + * Markus Schorn - initial API and implementation + *******************************************************************************/ + package org.eclipse.cdt.internal.core.index.composite.cpp; -import org.eclipse.cdt.core.dom.ast.IASTName; -import org.eclipse.cdt.core.dom.ast.IBinding; -import org.eclipse.cdt.core.dom.ast.IType; +import org.eclipse.cdt.core.dom.ast.DOMException; import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassTemplate; -import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor; -import org.eclipse.cdt.core.dom.ast.cpp.ICPPScope; import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateArgument; -import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateDefinition; -import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateInstance; -import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameterMap; -import org.eclipse.cdt.core.parser.util.ObjectMap; -import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPDeferredClassInstance; -import org.eclipse.cdt.internal.core.index.IIndexFragmentBinding; -import org.eclipse.cdt.internal.core.index.composite.ICompositesFactory; +import org.eclipse.cdt.core.index.IIndexBinding; +import org.eclipse.cdt.core.index.IIndexFile; +import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTName; +import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPDeferredClassInstance; +import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownTypeScope; +import org.eclipse.cdt.internal.core.index.IIndexScope; +import org.eclipse.core.runtime.CoreException; -public class CompositeCPPDeferredClassInstance extends CompositeCPPClassType implements ICPPDeferredClassInstance { - - private ICPPScope unknownScope; - - public CompositeCPPDeferredClassInstance(ICompositesFactory cf, ICPPDeferredClassInstance rbinding) { - super(cf, rbinding); +public class CompositeCPPDeferredClassInstance extends CPPDeferredClassInstance implements IIndexBinding { + public CompositeCPPDeferredClassInstance(ICPPClassTemplate template, ICPPTemplateArgument[] args) { + super(template, args); } @Override - public ICPPTemplateDefinition getTemplateDefinition() { - ICPPTemplateDefinition preresult= ((ICPPTemplateInstance)rbinding).getTemplateDefinition(); - return (ICPPTemplateDefinition) cf.getCompositeBinding((IIndexFragmentBinding)preresult); - } - - @Override - public ICPPConstructor[] getConstructors() { - return ICPPConstructor.EMPTY_CONSTRUCTOR_ARRAY; - } - - @Override - public ICPPTemplateParameterMap getTemplateParameterMap() { - return TemplateInstanceUtil.getTemplateParameterMap(cf, (ICPPTemplateInstance) rbinding); - } - - @Override - public IBinding getSpecializedBinding() { - return TemplateInstanceUtil.getSpecializedBinding(cf, rbinding); - } - - @Override - public IASTName getUnknownName() { - return ((ICPPDeferredClassInstance) rbinding).getUnknownName(); - } - - @Override - public ICPPScope getCompositeScope() { - return asScope(); - } - - @Override - public ICPPScope asScope() { - if (unknownScope == null) { - unknownScope= new CompositeCPPUnknownScope(this, getUnknownName()); - } - return unknownScope; - } - - @Override - public ICPPClassTemplate getClassTemplate() { - return (ICPPClassTemplate) cf.getCompositeBinding((IIndexFragmentBinding) ((ICPPDeferredClassInstance) rbinding).getClassTemplate()); - } - - @Override - public ICPPTemplateArgument[] getTemplateArguments() { - return TemplateInstanceUtil.getTemplateArguments(cf, (ICPPTemplateInstance) rbinding); - } - - @Override - public boolean isExplicitSpecialization() { + public boolean isFileLocal() throws CoreException { return false; } @Override - @Deprecated - public IType[] getArguments() { - return TemplateInstanceUtil.getArguments(cf, (ICPPTemplateInstance) rbinding); + public IIndexFile getLocalToFile() throws CoreException { + return null; } @Override - @Deprecated - public ObjectMap getArgumentMap() { - return TemplateInstanceUtil.getArgumentMap(cf, rbinding); + public IIndexBinding getOwner() { + return (IIndexBinding) super.getOwner(); + } + + @Override + public IIndexScope getScope() { + try { + return (IIndexScope) super.getScope(); + } catch (DOMException e) { + return null; + } + } + + @Override + protected CPPUnknownTypeScope createScope() { + return new CompositeCPPUnknownScope(this, new CPPASTName(getNameCharArray())); } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPTemplateTemplateParameter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPTemplateTemplateParameter.java index d7b1627364d..6bc1614d334 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPTemplateTemplateParameter.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPTemplateTemplateParameter.java @@ -13,7 +13,6 @@ package org.eclipse.cdt.internal.core.index.composite.cpp; 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.IField; import org.eclipse.cdt.core.dom.ast.IScope; @@ -82,15 +81,10 @@ public class CompositeCPPTemplateTemplateParameter extends CompositeCPPBinding @Override public ICPPScope asScope() { if (unknownScope == null) { - unknownScope= new CompositeCPPUnknownScope(this, getUnknownName()); + unknownScope= new CompositeCPPUnknownScope(this, new CPPASTName(getNameCharArray())); } return unknownScope; } - - @Override - public IASTName getUnknownName() { - return new CPPASTName(getNameCharArray()); - } @Override public ICPPTemplateArgument getDefaultValue() { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPTemplateTypeParameter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPTemplateTypeParameter.java index 858785c5604..61d65f32f65 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPTemplateTypeParameter.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPTemplateTypeParameter.java @@ -12,7 +12,6 @@ package org.eclipse.cdt.internal.core.index.composite.cpp; import org.eclipse.cdt.core.dom.ast.DOMException; -import org.eclipse.cdt.core.dom.ast.IASTName; import org.eclipse.cdt.core.dom.ast.IType; import org.eclipse.cdt.core.dom.ast.cpp.ICPPScope; import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateArgument; @@ -72,16 +71,11 @@ public class CompositeCPPTemplateTypeParameter extends CompositeCPPBinding @Override public ICPPScope asScope() { if (unknownScope == null) { - unknownScope= new CompositeCPPUnknownScope(this, getUnknownName()); + unknownScope= new CompositeCPPUnknownScope(this, new CPPASTName(getNameCharArray())); } return unknownScope; } - @Override - public IASTName getUnknownName() { - return new CPPASTName(getNameCharArray()); - } - @Override public ICPPTemplateArgument getDefaultValue() { try { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPUnknownBinding.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPUnknownBinding.java deleted file mode 100644 index 4d548c08151..00000000000 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPUnknownBinding.java +++ /dev/null @@ -1,37 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 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 (Wind River Systems) - *******************************************************************************/ -package org.eclipse.cdt.internal.core.index.composite.cpp; - -import org.eclipse.cdt.core.dom.ast.IASTName; -import org.eclipse.cdt.core.dom.ast.cpp.ICPPScope; -import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownBinding; -import org.eclipse.cdt.internal.core.index.composite.ICompositesFactory; - -class CompositeCPPUnknownBinding extends CompositeCPPBinding implements ICPPUnknownBinding { - public CompositeCPPUnknownBinding(ICompositesFactory cf, ICPPUnknownBinding rbinding) { - super(cf, rbinding); - } - - @Override - public Object clone() { - fail(); return null; - } - - @Override - public ICPPScope asScope() { - return null; - } - - @Override - public IASTName getUnknownName() { - return ((ICPPUnknownBinding) rbinding).getUnknownName(); - } -} diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPUnknownClassInstance.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPUnknownClassInstance.java deleted file mode 100644 index 78c5cb2d04e..00000000000 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPUnknownClassInstance.java +++ /dev/null @@ -1,34 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008 Google, 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: - * Sergey Prigogin (Google) - initial API and implementation - * Markus Schorn (Wind River Systems) - *******************************************************************************/ -package org.eclipse.cdt.internal.core.index.composite.cpp; - -import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateArgument; -import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownClassInstance; -import org.eclipse.cdt.internal.core.index.composite.ICompositesFactory; - -/** - * @author Sergey Prigogin - */ -class CompositeCPPUnknownClassInstance extends CompositeCPPUnknownClassType - implements ICPPUnknownClassInstance { - - public CompositeCPPUnknownClassInstance(ICompositesFactory cf, - ICPPUnknownClassInstance rbinding) { - super(cf, rbinding); - } - - @Override - public ICPPTemplateArgument[] getArguments() { - ICPPTemplateArgument[] arguments = ((ICPPUnknownClassInstance) rbinding).getArguments(); - return TemplateInstanceUtil.convert(cf, arguments); - } -} diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPUnknownClassType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPUnknownClassType.java deleted file mode 100644 index 0cb08498daa..00000000000 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPUnknownClassType.java +++ /dev/null @@ -1,149 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2012 Google, 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: - * Sergey Prigogin (Google) - initial API and implementation - * Markus Schorn (Wind River Systems) - * Thomas Corbat (IFS) - *******************************************************************************/ -package org.eclipse.cdt.internal.core.index.composite.cpp; - -import org.eclipse.cdt.core.dom.ast.IBinding; -import org.eclipse.cdt.core.dom.ast.IField; -import org.eclipse.cdt.core.dom.ast.IScope; -import org.eclipse.cdt.core.dom.ast.IType; -import org.eclipse.cdt.core.dom.ast.cpp.ICPPBase; -import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType; -import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor; -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.ICPPScope; -import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownClassType; -import org.eclipse.cdt.internal.core.index.IIndexFragmentBinding; -import org.eclipse.cdt.internal.core.index.IIndexType; -import org.eclipse.cdt.internal.core.index.composite.ICompositesFactory; - - -class CompositeCPPUnknownClassType extends CompositeCPPUnknownBinding implements ICPPUnknownClassType, IIndexType { - private ICPPScope unknownScope; - - public CompositeCPPUnknownClassType(ICompositesFactory cf, ICPPUnknownClassType rbinding) { - super(cf, rbinding); - } - - @Override - public IField findField(String name) { - IField preResult = ((ICPPClassType) rbinding).findField(name); - return (IField) cf.getCompositeBinding((IIndexFragmentBinding)preResult); - } - - /* (non-Javadoc) - * @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getBases() - */ - @Override - public ICPPBase[] getBases() { - return ICPPBase.EMPTY_BASE_ARRAY; - } - - /* (non-Javadoc) - * @see org.eclipse.cdt.core.dom.ast.ICompositeType#getFields() - */ - @Override - public IField[] getFields() { - return IField.EMPTY_FIELD_ARRAY; - } - - /* (non-Javadoc) - * @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getDeclaredFields() - */ - @Override - public ICPPField[] getDeclaredFields() { - return ICPPField.EMPTY_CPPFIELD_ARRAY; - } - - /* (non-Javadoc) - * @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getMethods() - */ - @Override - public ICPPMethod[] getMethods() { - return ICPPMethod.EMPTY_CPPMETHOD_ARRAY; - } - - /* (non-Javadoc) - * @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getAllDeclaredMethods() - */ - @Override - public ICPPMethod[] getAllDeclaredMethods() { - return ICPPMethod.EMPTY_CPPMETHOD_ARRAY; - } - - /* (non-Javadoc) - * @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getDeclaredMethods() - */ - @Override - public ICPPMethod[] getDeclaredMethods() { - return ICPPMethod.EMPTY_CPPMETHOD_ARRAY; - } - - /* (non-Javadoc) - * @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getConstructors() - */ - @Override - public ICPPConstructor[] getConstructors() { - return ICPPConstructor.EMPTY_CONSTRUCTOR_ARRAY; - } - - /* (non-Javadoc) - * @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getFriends() - */ - @Override - public IBinding[] getFriends() { - return IBinding.EMPTY_BINDING_ARRAY; - } - - @Override - public ICPPClassType[] getNestedClasses() { - ICPPClassType[] result = ((ICPPClassType) rbinding).getNestedClasses(); - for (int i = 0; i < result.length; i++) { - result[i] = (ICPPClassType) cf.getCompositeBinding((IIndexFragmentBinding) result[i]); - } - return result; - } - - @Override - public IScope getCompositeScope() { - return new CompositeCPPClassScope(cf, rbinding); - } - - @Override - public int getKey() { - return ((ICPPClassType) rbinding).getKey(); - } - - @Override - public boolean isSameType(IType type) { - return ((ICPPClassType) rbinding).isSameType(type); - } - - @Override - public ICPPScope asScope() { - if (unknownScope == null) { - unknownScope= new CompositeCPPUnknownScope(this, getUnknownName()); - } - return unknownScope; - } - - @Override - public boolean isAnonymous() { - return false; - } - - @Override - public boolean isFinal() { - return false; - } -} diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPUnknownField.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPUnknownField.java new file mode 100644 index 00000000000..4e8af167b2b --- /dev/null +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPUnknownField.java @@ -0,0 +1,51 @@ +/******************************************************************************* + * Copyright (c) 2012 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 + *******************************************************************************/ + +package org.eclipse.cdt.internal.core.index.composite.cpp; + +import org.eclipse.cdt.core.dom.ast.DOMException; +import org.eclipse.cdt.core.dom.ast.IType; +import org.eclipse.cdt.core.index.IIndexBinding; +import org.eclipse.cdt.core.index.IIndexFile; +import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownField; +import org.eclipse.cdt.internal.core.index.IIndexFragmentBinding; +import org.eclipse.cdt.internal.core.index.IIndexScope; +import org.eclipse.core.runtime.CoreException; + +public class CompositeCPPUnknownField extends CPPUnknownField implements IIndexBinding { + public CompositeCPPUnknownField(IType owner, char[] name) { + super(owner, name); + } + + @Override + public boolean isFileLocal() throws CoreException { + return false; + } + + @Override + public IIndexFile getLocalToFile() throws CoreException { + return null; + } + + @Override + public IIndexFragmentBinding getOwner() { + return (IIndexFragmentBinding) super.getOwner(); + } + + @Override + public IIndexScope getScope() { + try { + return (IIndexScope) super.getScope(); + } catch (DOMException e) { + return null; + } + } +} diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPUnknownMemberClass.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPUnknownMemberClass.java new file mode 100644 index 00000000000..275c7517b4c --- /dev/null +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPUnknownMemberClass.java @@ -0,0 +1,57 @@ +/******************************************************************************* + * Copyright (c) 2012 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 + *******************************************************************************/ + +package org.eclipse.cdt.internal.core.index.composite.cpp; + +import org.eclipse.cdt.core.dom.ast.DOMException; +import org.eclipse.cdt.core.dom.ast.IType; +import org.eclipse.cdt.core.index.IIndexBinding; +import org.eclipse.cdt.core.index.IIndexFile; +import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTName; +import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownMemberClass; +import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownTypeScope; +import org.eclipse.cdt.internal.core.index.IIndexScope; +import org.eclipse.core.runtime.CoreException; + +public class CompositeCPPUnknownMemberClass extends CPPUnknownMemberClass implements IIndexBinding { + public CompositeCPPUnknownMemberClass(IType owner, char[] name) { + super(owner, name); + } + + @Override + public boolean isFileLocal() throws CoreException { + return false; + } + + @Override + public IIndexFile getLocalToFile() throws CoreException { + return null; + } + + @Override + public IIndexBinding getOwner() { + return (IIndexBinding) super.getOwner(); + } + + @Override + public IIndexScope getScope() { + try { + return (IIndexScope) super.getScope(); + } catch (DOMException e) { + return null; + } + } + + @Override + protected CPPUnknownTypeScope createScope() { + return new CompositeCPPUnknownScope(this, new CPPASTName(getNameCharArray())); + } +} diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPUnknownMemberClassInstance.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPUnknownMemberClassInstance.java new file mode 100644 index 00000000000..ce35ef5af39 --- /dev/null +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPUnknownMemberClassInstance.java @@ -0,0 +1,58 @@ +/******************************************************************************* + * Copyright (c) 2012 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 + *******************************************************************************/ + +package org.eclipse.cdt.internal.core.index.composite.cpp; + +import org.eclipse.cdt.core.dom.ast.DOMException; +import org.eclipse.cdt.core.dom.ast.IType; +import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateArgument; +import org.eclipse.cdt.core.index.IIndexBinding; +import org.eclipse.cdt.core.index.IIndexFile; +import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTName; +import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownClassInstance; +import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownTypeScope; +import org.eclipse.cdt.internal.core.index.IIndexScope; +import org.eclipse.core.runtime.CoreException; + +public class CompositeCPPUnknownMemberClassInstance extends CPPUnknownClassInstance implements IIndexBinding { + public CompositeCPPUnknownMemberClassInstance(IType owner, char[] name, ICPPTemplateArgument[] arguments) { + super(owner, name, arguments); + } + + @Override + public boolean isFileLocal() throws CoreException { + return false; + } + + @Override + public IIndexFile getLocalToFile() throws CoreException { + return null; + } + + @Override + public IIndexBinding getOwner() { + return (IIndexBinding) super.getOwner(); + } + + @Override + public IIndexScope getScope() { + try { + return (IIndexScope) super.getScope(); + } catch (DOMException e) { + return null; + } + } + + @Override + protected CPPUnknownTypeScope createScope() { + return new CompositeCPPUnknownScope(this, new CPPASTName(getNameCharArray())); + } +} diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPUnknownMethod.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPUnknownMethod.java new file mode 100644 index 00000000000..b35884f6327 --- /dev/null +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPUnknownMethod.java @@ -0,0 +1,51 @@ +/******************************************************************************* + * Copyright (c) 2012 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 + *******************************************************************************/ + +package org.eclipse.cdt.internal.core.index.composite.cpp; + +import org.eclipse.cdt.core.dom.ast.DOMException; +import org.eclipse.cdt.core.dom.ast.IType; +import org.eclipse.cdt.core.index.IIndexBinding; +import org.eclipse.cdt.core.index.IIndexFile; +import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownMethod; +import org.eclipse.cdt.internal.core.index.IIndexFragmentBinding; +import org.eclipse.cdt.internal.core.index.IIndexScope; +import org.eclipse.core.runtime.CoreException; + +public class CompositeCPPUnknownMethod extends CPPUnknownMethod implements IIndexBinding { + public CompositeCPPUnknownMethod(IType owner, char[] name) { + super(owner, name); + } + + @Override + public boolean isFileLocal() throws CoreException { + return false; + } + + @Override + public IIndexFile getLocalToFile() throws CoreException { + return null; + } + + @Override + public IIndexFragmentBinding getOwner() { + return (IIndexFragmentBinding) super.getOwner(); + } + + @Override + public IIndexScope getScope() { + try { + return (IIndexScope) super.getScope(); + } catch (DOMException e) { + return null; + } + } +} diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPUnknownScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPUnknownScope.java index 482841690d6..ea6a860f7e1 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPUnknownScope.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPUnknownScope.java @@ -10,18 +10,18 @@ *******************************************************************************/ package org.eclipse.cdt.internal.core.index.composite.cpp; +import org.eclipse.cdt.core.dom.ast.DOMException; import org.eclipse.cdt.core.dom.ast.IASTName; +import org.eclipse.cdt.core.dom.ast.IType; +import org.eclipse.cdt.core.index.IIndexBinding; import org.eclipse.cdt.core.index.IIndexName; -import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownScope; -import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownBinding; +import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownTypeScope; import org.eclipse.cdt.internal.core.index.IIndexScope; -public class CompositeCPPUnknownScope extends CPPUnknownScope implements IIndexScope { - private CompositeCPPBinding fBinding; +public class CompositeCPPUnknownScope extends CPPUnknownTypeScope implements IIndexScope { - public CompositeCPPUnknownScope(CompositeCPPBinding binding, IASTName name) { - super((ICPPUnknownBinding) binding, name); - fBinding= binding; + public CompositeCPPUnknownScope(IIndexBinding binding, IASTName name) { + super((IType) binding, name); } @Override @@ -31,11 +31,15 @@ public class CompositeCPPUnknownScope extends CPPUnknownScope implements IIndexS @Override public IIndexScope getParent() { - return fBinding.getScope(); + try { + return (IIndexScope) super.getParent(); + } catch (DOMException e) { + return null; + } } @Override - public CompositeCPPBinding getScopeBinding() { - return fBinding; + public IIndexBinding getScopeBinding() { + return (IIndexBinding) super.getScopeType(); } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPUsingDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPUsingDeclaration.java index 4bcd5c33fd7..78afb4f99b5 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPUsingDeclaration.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/index/composite/cpp/CompositeCPPUsingDeclaration.java @@ -31,8 +31,7 @@ class CompositeCPPUsingDeclaration extends CompositeCPPBinding implements ICPPUs IBinding[] delegates = ((ICPPUsingDeclaration) rbinding).getDelegates(); IBinding[] composites = new IBinding[delegates.length]; int j = 0; - for (int i = 0; i < delegates.length; i++) { - IBinding binding = delegates[i]; + for (IBinding binding : delegates) { if (binding instanceof IIndexFragmentBinding) { composites[j++] = cf.getCompositeBinding((IIndexFragmentBinding) binding); } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOM.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOM.java index 77a02465976..6365dcb2aac 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOM.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOM.java @@ -223,10 +223,12 @@ public class PDOM extends PlatformObject implements IPDOM { * 131.0 - Dependent expressions part 2, bug 299911. * 132.0 - Explicit virtual overrides, bug 380623. * 133.0 - Storing template arguments via direct marshalling, bug 299911. + * 134.0 - Storing unknown bindings via direct marshalling, bug 381824. + * 135.0 - Changed marshalling of EvalUnary, bug 391001. */ - private static final int MIN_SUPPORTED_VERSION= version(133, 0); - private static final int MAX_SUPPORTED_VERSION= version(133, Short.MAX_VALUE); - private static final int DEFAULT_VERSION = version(133, 0); + private static final int MIN_SUPPORTED_VERSION= version(135, 0); + private static final int MAX_SUPPORTED_VERSION= version(135, Short.MAX_VALUE); + private static final int DEFAULT_VERSION = version(135, 0); private static int version(int major, int minor) { return (major << 16) + minor; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOMFileSet.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOMFileSet.java index fa9c9d3068a..9eabd64065c 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOMFileSet.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/PDOMFileSet.java @@ -20,7 +20,7 @@ import org.eclipse.cdt.internal.core.pdom.dom.PDOMFile; import org.eclipse.core.runtime.CoreException; public class PDOMFileSet implements IIndexFragmentFileSet { - private HashSet fFileIDs= new HashSet(); + private final HashSet fFileIDs= new HashSet(); @Override public void add(IIndexFragmentFile fragFile) { @@ -36,8 +36,11 @@ public class PDOMFileSet implements IIndexFragmentFileSet { @Override public boolean containsFileOfLocalBinding(IIndexFragmentBinding fb) throws CoreException { - PDOMBinding pdomBinding= (PDOMBinding) fb; - return fFileIDs.contains(pdomBinding.getLocalToFileRec()); + if (fb instanceof PDOMBinding) { + PDOMBinding pdomBinding= (PDOMBinding) fb; + return fFileIDs.contains(pdomBinding.getLocalToFileRec()); + } + return false; } @Override diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/TypeMarshalBuffer.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/TypeMarshalBuffer.java index 2fc3456dc6d..ec1c02b650e 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/TypeMarshalBuffer.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/db/TypeMarshalBuffer.java @@ -106,11 +106,7 @@ public class TypeMarshalBuffer implements ITypeMarshalBuffer { return null; } - IType type= fLinkage.unmarshalType(this); - if (type == null || type instanceof IBinding) - return (IBinding) type; - - throw unmarshallingError(); + return fLinkage.unmarshalBinding(this); } @Override diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMBinding.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMBinding.java index cdaa9d00180..769d7a0071f 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMBinding.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMBinding.java @@ -102,7 +102,7 @@ public abstract class PDOMBinding extends PDOMNamedNode implements IPDOMBinding return hasDeclaration != 0; } - public void addDeclaration(PDOMName name) throws CoreException { + public final void addDeclaration(PDOMName name) throws CoreException { PDOMName first = getFirstDeclaration(); if (first != null) { first.setPrevInBinding(name); @@ -111,7 +111,7 @@ public abstract class PDOMBinding extends PDOMNamedNode implements IPDOMBinding setFirstDeclaration(name); } - public void addDefinition(PDOMName name) throws CoreException { + public final void addDefinition(PDOMName name) throws CoreException { PDOMName first = getFirstDefinition(); if (first != null) { first.setPrevInBinding(name); @@ -120,7 +120,7 @@ public abstract class PDOMBinding extends PDOMNamedNode implements IPDOMBinding setFirstDefinition(name); } - public void addReference(PDOMName name) throws CoreException { + public final void addReference(PDOMName name) throws CoreException { PDOMName first = getFirstReference(); if (first != null) { first.setPrevInBinding(name); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMLinkage.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMLinkage.java index 9a03c49a423..ef857541949 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMLinkage.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/PDOMLinkage.java @@ -28,6 +28,7 @@ import org.eclipse.cdt.core.dom.ast.IField; import org.eclipse.cdt.core.dom.ast.IFunction; import org.eclipse.cdt.core.dom.ast.IParameter; import org.eclipse.cdt.core.dom.ast.IProblemBinding; +import org.eclipse.cdt.core.dom.ast.ISemanticProblem; import org.eclipse.cdt.core.dom.ast.IType; import org.eclipse.cdt.core.dom.ast.ITypedef; import org.eclipse.cdt.core.dom.ast.IValue; @@ -39,6 +40,7 @@ import org.eclipse.cdt.core.parser.util.CharArrayMap; import org.eclipse.cdt.internal.core.dom.parser.ASTInternal; import org.eclipse.cdt.internal.core.dom.parser.ISerializableEvaluation; import org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer; +import org.eclipse.cdt.internal.core.dom.parser.ProblemBinding; import org.eclipse.cdt.internal.core.index.IIndexBindingConstants; import org.eclipse.cdt.internal.core.index.IIndexScope; import org.eclipse.cdt.internal.core.pdom.PDOM; @@ -386,15 +388,6 @@ public abstract class PDOMLinkage extends PDOMNamedNode implements IIndexLinkage return getLinkageName(); } - /** - * Usually bindings are added on behalf of a name, only. For unknown values or using declarations - * we need to add further bindings. - * @throws CoreException - */ - public PDOMBinding addPotentiallyUnknownBinding(IBinding binding) throws CoreException { - return null; - } - /** * Returns the list of global bindings for the given name. * @throws CoreException @@ -432,6 +425,7 @@ public abstract class PDOMLinkage extends PDOMNamedNode implements IIndexLinkage public abstract PDOMBinding addTypeBinding(IBinding type) throws CoreException; public abstract IType unmarshalType(ITypeMarshalBuffer buffer) throws CoreException; + public abstract IBinding unmarshalBinding(ITypeMarshalBuffer buffer) throws CoreException; public abstract ISerializableEvaluation unmarshalEvaluation(ITypeMarshalBuffer typeMarshalBuffer) throws CoreException; public void storeType(long offset, IType type) throws CoreException { @@ -497,6 +491,69 @@ public abstract class PDOMLinkage extends PDOMNamedNode implements IIndexLinkage return new TypeMarshalBuffer(this, data).unmarshalType(); } + public void storeBinding(long offset, IBinding binding) throws CoreException { + final Database db= getDB(); + deleteBinding(db, offset); + storeBinding(db, offset, binding); + } + + private void storeBinding(Database db, long offset, IBinding binding) throws CoreException { + if (binding != null) { + TypeMarshalBuffer bc= new TypeMarshalBuffer(this); + bc.marshalBinding(binding); + int len= bc.getPosition(); + if (len > 0) { + if (len <= Database.TYPE_SIZE) { + db.putBytes(offset, bc.getBuffer(), len); + } else if (len <= Database.MAX_MALLOC_SIZE-2){ + long ptr= db.malloc(len+2); + db.putShort(ptr, (short) len); + db.putBytes(ptr+2, bc.getBuffer(), len); + db.putByte(offset, TypeMarshalBuffer.INDIRECT_TYPE); + db.putRecPtr(offset+2, ptr); + } + } + } + } + + private void deleteBinding(Database db, long offset) throws CoreException { + byte firstByte= db.getByte(offset); + if (firstByte == TypeMarshalBuffer.INDIRECT_TYPE) { + long ptr= db.getRecPtr(offset+2); + clearBinding(db, offset); + db.free(ptr); + } else { + clearBinding(db, offset); + } + } + + private void clearBinding(Database db, long offset) throws CoreException { + db.clearBytes(offset, Database.TYPE_SIZE); + } + + public IBinding loadBinding(long offset) throws CoreException { + final Database db= getDB(); + final byte firstByte= db.getByte(offset); + byte[] data= null; + switch(firstByte) { + case TypeMarshalBuffer.INDIRECT_TYPE: + long ptr= db.getRecPtr(offset+2); + int len= db.getShort(ptr) & 0xffff; + data= new byte[len]; + db.getBytes(ptr+2, data); + break; + case TypeMarshalBuffer.UNSTORABLE_TYPE: + return new ProblemBinding(null, ISemanticProblem.TYPE_NOT_PERSISTED); + case TypeMarshalBuffer.NULL_TYPE: + return null; + default: + data= new byte[Database.TYPE_SIZE]; + db.getBytes(offset, data); + break; + } + return new TypeMarshalBuffer(this, data).unmarshalBinding(); + } + public void storeTemplateArgument(long offset, ICPPTemplateArgument arg) throws CoreException { final Database db= getDB(); deleteArgument(db, offset); diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCLinkage.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCLinkage.java index 9640f88b0c7..dd7be434ab3 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCLinkage.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/c/PDOMCLinkage.java @@ -325,6 +325,10 @@ class PDOMCLinkage extends PDOMLinkage implements IIndexCBindingConstants { return addBinding(type, null); } + @Override + public IBinding unmarshalBinding(ITypeMarshalBuffer buffer) throws CoreException { + throw new CoreException(CCorePlugin.createStatus("Cannot unmarshal a binding, first byte=" + buffer.getByte())); //$NON-NLS-1$ + } @Override public IType unmarshalType(ITypeMarshalBuffer buffer) throws CoreException { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPBase.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPBase.java index 7fea377b174..ca112bfc0c0 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPBase.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPBase.java @@ -11,13 +11,18 @@ *******************************************************************************/ package org.eclipse.cdt.internal.core.pdom.dom.cpp; +import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.TDEF; +import static org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil.getNestedType; + import org.eclipse.cdt.core.CCorePlugin; import org.eclipse.cdt.core.dom.IName; import org.eclipse.cdt.core.dom.ast.IBinding; +import org.eclipse.cdt.core.dom.ast.ISemanticProblem; +import org.eclipse.cdt.core.dom.ast.IType; import org.eclipse.cdt.core.dom.ast.cpp.ICPPBase; +import org.eclipse.cdt.internal.core.dom.parser.ProblemType; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalBase; import org.eclipse.cdt.internal.core.pdom.db.Database; -import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding; import org.eclipse.cdt.internal.core.pdom.dom.PDOMLinkage; import org.eclipse.cdt.internal.core.pdom.dom.PDOMName; import org.eclipse.core.runtime.CoreException; @@ -26,32 +31,31 @@ import org.eclipse.core.runtime.CoreException; * @author Doug Schaefer */ class PDOMCPPBase implements ICPPBase, ICPPInternalBase { - private static final int BASECLASS_SPECIFIER = 0; - private static final int NEXTBASE = 4; - private static final int FLAGS = 8; + static final int CLASS_DEFINITION = 0; + private static final int BASECLASS_TYPE = CLASS_DEFINITION + Database.PTR_SIZE; + private static final int NEXTBASE = BASECLASS_TYPE + Database.TYPE_SIZE; + private static final int FLAGS = NEXTBASE + Database.PTR_SIZE; - protected static final int RECORD_SIZE = 9; + protected static final int RECORD_SIZE = FLAGS + 1; private final PDOMLinkage linkage; private final long record; - private PDOMBinding fCachedBaseClass; + private IType fCachedBaseClass; public PDOMCPPBase(PDOMLinkage linkage, long record) { this.linkage = linkage; this.record = record; } - public PDOMCPPBase(PDOMLinkage linkage, PDOMName baseClassSpec, boolean isVirtual, int visibility) - throws CoreException { + public PDOMCPPBase(PDOMLinkage linkage, ICPPBase base, PDOMName classDefName) throws CoreException { + Database db = linkage.getDB(); this.linkage = linkage; - Database db = getDB(); this.record = db.malloc(RECORD_SIZE); + db.putRecPtr(record + CLASS_DEFINITION, classDefName.getRecord()); + linkage.storeType(record+BASECLASS_TYPE, base.getBaseClassType()); - long baserec = baseClassSpec != null ? baseClassSpec.getRecord() : 0; - db.putRecPtr(record + BASECLASS_SPECIFIER, baserec); - - byte flags = (byte)(visibility | (isVirtual ? 4 : 0)); + byte flags = (byte)(base.getVisibility() | (base.isVirtual() ? 4 : 0)); db.putByte(record + FLAGS, flags); } @@ -79,8 +83,13 @@ class PDOMCPPBase implements ICPPBase, ICPPInternalBase { @Override public PDOMName getBaseClassSpecifierName() { + return null; + } + + @Override + public PDOMName getClassDefinitionName() { try { - long rec = getDB().getRecPtr(record + BASECLASS_SPECIFIER); + long rec = getDB().getRecPtr(record + CLASS_DEFINITION); if (rec != 0) { return new PDOMName(linkage, rec); } @@ -91,22 +100,23 @@ class PDOMCPPBase implements ICPPBase, ICPPInternalBase { } @Override - public IBinding getBaseClass() { - if (fCachedBaseClass != null) - return fCachedBaseClass; - - try { - PDOMName name= getBaseClassSpecifierName(); - if (name != null) { - PDOMBinding b = name.getBinding(); - while (b instanceof PDOMCPPTypedef && ((PDOMCPPTypedef) b).getType() instanceof PDOMBinding) { - b = (PDOMBinding) ((PDOMCPPTypedef) b).getType(); - } - return fCachedBaseClass= b; - } - } catch (CoreException e) { - CCorePlugin.log(e); + public IType getBaseClassType() { + if (fCachedBaseClass == null) { + try { + fCachedBaseClass= linkage.loadType(record + BASECLASS_TYPE); + } catch (CoreException e) { + fCachedBaseClass= new ProblemType(ISemanticProblem.TYPE_NOT_PERSISTED); + } } + return fCachedBaseClass; + } + + @Override + public IBinding getBaseClass() { + IType type= getBaseClassType(); + type = getNestedType(type, TDEF); + if (type instanceof IBinding) + return (IBinding) type; return null; } @@ -139,6 +149,10 @@ class PDOMCPPBase implements ICPPBase, ICPPInternalBase { public void setBaseClass(IBinding binding) { throw new UnsupportedOperationException(); } + @Override + public void setBaseClass(IType binding) { + throw new UnsupportedOperationException(); + } @Override public ICPPBase clone() { @@ -146,23 +160,37 @@ class PDOMCPPBase implements ICPPBase, ICPPInternalBase { } private static class PDOMCPPBaseClone implements ICPPBase, ICPPInternalBase { - private ICPPBase base; - private IBinding baseClass = null; + private final ICPPBase base; + private IType baseClass = null; public PDOMCPPBaseClone(ICPPBase base) { this.base = base; } @Override public IBinding getBaseClass() { + IType type= getBaseClassType(); + type = getNestedType(type, TDEF); + if (type instanceof IBinding) + return (IBinding) type; + return null; + } + @Override + public IType getBaseClassType() { if (baseClass == null) { - return base.getBaseClass(); + baseClass= base.getBaseClassType(); } return baseClass; } - @Override + + @Override @Deprecated public IName getBaseClassSpecifierName() { return base.getBaseClassSpecifierName(); } + @Override + public IName getClassDefinitionName() { + return base.getClassDefinitionName(); + } + @Override public int getVisibility() { return base.getVisibility(); @@ -173,6 +201,11 @@ class PDOMCPPBase implements ICPPBase, ICPPInternalBase { } @Override public void setBaseClass(IBinding binding) { + if (binding instanceof IType) + baseClass = (IType) binding; + } + @Override + public void setBaseClass(IType binding) { baseClass = binding; } @Override diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPClassScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPClassScope.java index 0be176e51d3..a3a8017e8da 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPClassScope.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPClassScope.java @@ -30,6 +30,7 @@ import org.eclipse.cdt.core.dom.ast.IBinding; import org.eclipse.cdt.core.dom.ast.ICompositeType; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTConversionName; import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassScope; +import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassSpecialization; import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType; import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor; import org.eclipse.cdt.core.dom.ast.cpp.ICPPMethod; @@ -159,7 +160,10 @@ class PDOMCPPClassScope implements ICPPClassScope, IIndexScope { if (!lookup.isPrefixLookup()) { if (CharArrayUtils.equals(fBinding.getNameCharArray(), nameChars)) { if (CPPClassScope.shallReturnConstructors(lookup.getLookupName(), false)){ - return fBinding.getConstructors(); + if (fBinding instanceof ICPPClassSpecialization) { + return ((ICPPClassSpecialization) fBinding).getConstructors(lookup.getLookupPoint()); + } + return fBinding.getConstructors(); } return new IBinding[] {getClassNameBinding()}; } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPClassSpecialization.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPClassSpecialization.java index 82e2b9f87ce..70207f3a2ff 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPClassSpecialization.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPClassSpecialization.java @@ -188,33 +188,47 @@ class PDOMCPPClassSpecialization extends PDOMCPPSpecialization implements getDB().putRecPtr(record + FIRST_BASE, rec); } - public void addBase(PDOMCPPBase base) throws CoreException { - getPDOM().removeCachedResult(record + PDOMCPPLinkage.CACHE_BASES); + public void addBases(PDOMName classDefName, ICPPBase[] bases) throws CoreException { + getPDOM().removeCachedResult(record+PDOMCPPLinkage.CACHE_BASES); + final PDOMLinkage linkage = getLinkage(); PDOMCPPBase firstBase = getFirstBase(); - base.setNextBase(firstBase); - setFirstBase(base); + for (ICPPBase base : bases) { + PDOMCPPBase nextBase= new PDOMCPPBase(linkage, base, classDefName); + nextBase.setNextBase(firstBase); + firstBase= nextBase; + } + setFirstBase(firstBase); } - public void removeBase(PDOMName pdomName) throws CoreException { - getPDOM().removeCachedResult(record + PDOMCPPLinkage.CACHE_BASES); + public void removeBases(PDOMName classDefName) throws CoreException { + getPDOM().removeCachedResult(record+PDOMCPPLinkage.CACHE_BASES); PDOMCPPBase base= getFirstBase(); PDOMCPPBase predecessor= null; - long nameRec= pdomName.getRecord(); + long nameRec= classDefName.getRecord(); + boolean deleted= false; while (base != null) { - PDOMName name = base.getBaseClassSpecifierName(); - if (name != null && name.getRecord() == nameRec) { - break; + PDOMCPPBase nextBase = base.getNextBase(); + long classDefRec= getDB().getRecPtr(base.getRecord() + PDOMCPPBase.CLASS_DEFINITION); + if (classDefRec == nameRec) { + deleted= true; + base.delete(); + } else if (deleted) { + deleted= false; + if (predecessor == null) { + setFirstBase(base); + } else { + predecessor.setNextBase(base); + } + predecessor= base; } - predecessor= base; - base= base.getNextBase(); + base= nextBase; } - if (base != null) { - if (predecessor != null) { - predecessor.setNextBase(base.getNextBase()); + if (deleted) { + if (predecessor == null) { + setFirstBase(null); } else { - setFirstBase(base.getNextBase()); + predecessor.setNextBase(null); } - base.delete(); } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPClassType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPClassType.java index c62e295109f..bbe9d762471 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPClassType.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPClassType.java @@ -37,6 +37,8 @@ import org.eclipse.cdt.internal.core.dom.parser.ProblemBinding; import org.eclipse.cdt.internal.core.dom.parser.cpp.ClassTypeHelper; import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil; import org.eclipse.cdt.internal.core.index.IIndexCPPBindingConstants; +import org.eclipse.cdt.internal.core.pdom.PDOM; +import org.eclipse.cdt.internal.core.pdom.db.Database; import org.eclipse.cdt.internal.core.pdom.db.PDOMNodeLinkedList; import org.eclipse.cdt.internal.core.pdom.dom.IPDOMMemberOwner; import org.eclipse.cdt.internal.core.pdom.dom.PDOMLinkage; @@ -141,35 +143,53 @@ class PDOMCPPClassType extends PDOMCPPBinding implements IPDOMCPPClassType, IPDO long rec = base != null ? base.getRecord() : 0; getDB().putRecPtr(record + FIRSTBASE, rec); } - - public void addBase(PDOMCPPBase base) throws CoreException { + + public void addBases(PDOMName classDefName, ICPPBase[] bases) throws CoreException { getPDOM().removeCachedResult(record+PDOMCPPLinkage.CACHE_BASES); + final PDOMLinkage linkage = getLinkage(); PDOMCPPBase firstBase = getFirstBase(); - base.setNextBase(firstBase); - setFirstBase(base); + for (ICPPBase base : bases) { + PDOMCPPBase nextBase= new PDOMCPPBase(linkage, base, classDefName); + nextBase.setNextBase(firstBase); + firstBase= nextBase; + } + setFirstBase(firstBase); } - public void removeBase(PDOMName pdomName) throws CoreException { - getPDOM().removeCachedResult(record+PDOMCPPLinkage.CACHE_BASES); - + public void removeBases(PDOMName classDefName) throws CoreException { + final PDOM pdom = getPDOM(); + final Database db = getDB(); + pdom.removeCachedResult(record+PDOMCPPLinkage.CACHE_BASES); + PDOMCPPBase base= getFirstBase(); - PDOMCPPBase predecessor= null; - long nameRec= pdomName.getRecord(); + PDOMCPPBase prevBase= null; + long nameRec= classDefName.getRecord(); + boolean deleted= false; while (base != null) { - PDOMName name = base.getBaseClassSpecifierName(); - if (name != null && name.getRecord() == nameRec) { - break; - } - predecessor= base; - base= base.getNextBase(); - } - if (base != null) { - if (predecessor != null) { - predecessor.setNextBase(base.getNextBase()); + PDOMCPPBase nextBase = base.getNextBase(); + long classDefRec= db.getRecPtr(base.getRecord() + PDOMCPPBase.CLASS_DEFINITION); + if (classDefRec == nameRec) { + deleted= true; + base.delete(); } else { - setFirstBase(base.getNextBase()); + if (deleted) { + deleted= false; + if (prevBase == null) { + setFirstBase(base); + } else { + prevBase.setNextBase(base); + } + } + prevBase= base; + } + base= nextBase; + } + if (deleted) { + if (prevBase == null) { + setFirstBase(null); + } else { + prevBase.setNextBase(null); } - base.delete(); } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPDeferredClassInstance.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPDeferredClassInstance.java index e64d8f92751..e0c502aa3de 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPDeferredClassInstance.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPDeferredClassInstance.java @@ -1,253 +1,88 @@ /******************************************************************************* - * Copyright (c) 2007, 2012 QNX Software Systems and others. + * Copyright (c) 2012 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: - * Bryan Wilkinson (QNX) - Initial API and implementation - * Markus Schorn (Wind River Systems) - * Thomas Corbat (IFS) - *******************************************************************************/ + * Markus Schorn - initial API and implementation + *******************************************************************************/ + package org.eclipse.cdt.internal.core.pdom.dom.cpp; -import org.eclipse.cdt.core.CCorePlugin; -import org.eclipse.cdt.core.dom.IPDOMVisitor; -import org.eclipse.cdt.core.dom.ast.IASTName; -import org.eclipse.cdt.core.dom.ast.IBinding; -import org.eclipse.cdt.core.dom.ast.IField; -import org.eclipse.cdt.core.dom.ast.IScope; -import org.eclipse.cdt.core.dom.ast.IType; -import org.eclipse.cdt.core.dom.ast.ITypedef; -import org.eclipse.cdt.core.dom.ast.cpp.ICPPBase; +import org.eclipse.cdt.core.dom.ast.DOMException; 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.ICPPConstructor; -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.ICPPScope; import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateArgument; -import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateDefinition; -import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateParameter; +import org.eclipse.cdt.core.index.IIndexFile; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTName; -import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPTemplateParameterMap; -import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPDeferredClassInstance; -import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPTemplates; +import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPDeferredClassInstance; +import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownTypeScope; import org.eclipse.cdt.internal.core.index.IIndexCPPBindingConstants; -import org.eclipse.cdt.internal.core.index.IIndexType; -import org.eclipse.cdt.internal.core.pdom.db.PDOMNodeLinkedList; -import org.eclipse.cdt.internal.core.pdom.dom.IPDOMMemberOwner; -import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding; -import org.eclipse.cdt.internal.core.pdom.dom.PDOMLinkage; -import org.eclipse.cdt.internal.core.pdom.dom.PDOMNode; +import org.eclipse.cdt.internal.core.index.IIndexFragment; +import org.eclipse.cdt.internal.core.index.IIndexFragmentBinding; +import org.eclipse.cdt.internal.core.index.IIndexScope; import org.eclipse.core.runtime.CoreException; -/** - * Deferred class instances collect information about an instantiation until it can be - * carried out. - */ -class PDOMCPPDeferredClassInstance extends PDOMCPPSpecialization - implements ICPPDeferredClassInstance, IPDOMMemberOwner, IIndexType { - private static final int MEMBERLIST = PDOMCPPSpecialization.RECORD_SIZE + 0; - private static final int ARGUMENTS = PDOMCPPSpecialization.RECORD_SIZE + 4; - /** - * The size in bytes of a PDOMCPPDeferredClassInstance record in the database. - */ - @SuppressWarnings("hiding") - protected static final int RECORD_SIZE = PDOMCPPSpecialization.RECORD_SIZE + 8; +public class PDOMCPPDeferredClassInstance extends CPPDeferredClassInstance implements IIndexFragmentBinding { + private final IIndexFragment fFragment; - private PDOMCPPUnknownScope unknownScope; // No need for volatile, PDOMCPPUnknownScope protects its fields. - - public PDOMCPPDeferredClassInstance(PDOMLinkage linkage, PDOMNode parent, - ICPPDeferredClassInstance classType, PDOMBinding instantiated) throws CoreException { - super(linkage, parent, classType, instantiated); - - final ICPPTemplateArgument[] args= classType.getTemplateArguments(); - final long argListRec= PDOMCPPArgumentList.putArguments(this, args); - getDB().putRecPtr(record+ARGUMENTS, argListRec); - } - - public PDOMCPPDeferredClassInstance(PDOMLinkage linkage, long bindingRecord) { - super(linkage, bindingRecord); - } - - @Override - protected int getRecordSize() { - return RECORD_SIZE; + public PDOMCPPDeferredClassInstance(IIndexFragment frag, ICPPClassTemplate template, ICPPTemplateArgument[] args) { + super(template, args); + fFragment= frag; } @Override - public int getNodeType() { + public boolean isFileLocal() throws CoreException { + return false; + } + + @Override + public IIndexFile getLocalToFile() throws CoreException { + return null; + } + + @Override + public IIndexFragment getFragment() { + return fFragment; + } + + @Override + public boolean hasDefinition() throws CoreException { + return false; + } + + @Override + public boolean hasDeclaration() throws CoreException { + return true; + } + + @Override + public int getBindingConstant() { return IIndexCPPBindingConstants.CPP_DEFERRED_CLASS_INSTANCE; } - - @Override - public boolean isExplicitSpecialization() { - return false; - } @Override - public IScope getCompositeScope() { - return asScope(); - } - - @Override - public boolean isSameType(IType type) { - if (type instanceof ITypedef) { - return type.isSameType(this); - } - if (type instanceof PDOMNode) { - PDOMNode node = (PDOMNode) type; - if (node.getPDOM() == getPDOM()) { - return node.getRecord() == getRecord(); - } - } - - ICPPClassTemplate classTemplate = getClassTemplate(); - - if (type instanceof ICPPDeferredClassInstance) { - final ICPPDeferredClassInstance rhs = (ICPPDeferredClassInstance) type; - if (!classTemplate.isSameType((IType) rhs.getSpecializedBinding())) - return false; - - return CPPTemplates.haveSameArguments(this, rhs); - } - return false; - } - - @Override - public ICPPClassTemplate getClassTemplate() { - return (ICPPClassTemplate) getSpecializedBinding(); - } - - @Override - public void addChild(PDOMNode member) throws CoreException { - PDOMNodeLinkedList list = new PDOMNodeLinkedList(getLinkage(), record + MEMBERLIST); - list.addMember(member); + public long getBindingID() { + return 0; } @Override - public void accept(IPDOMVisitor visitor) throws CoreException { - super.accept(visitor); - PDOMNodeLinkedList list = new PDOMNodeLinkedList(getLinkage(), record + MEMBERLIST); - list.accept(visitor); - } - - @Override - public ICPPBase[] getBases() { - return ICPPBase.EMPTY_BASE_ARRAY; - } - - @Override - public IField[] getFields() { - return IField.EMPTY_FIELD_ARRAY; - } - - @Override - public IField findField(String name) { - return null; - } - - @Override - public ICPPField[] getDeclaredFields() { - return ICPPField.EMPTY_CPPFIELD_ARRAY; - } - - @Override - public ICPPMethod[] getMethods() { - return ICPPMethod.EMPTY_CPPMETHOD_ARRAY; - } - - @Override - public ICPPMethod[] getAllDeclaredMethods() { - return ICPPMethod.EMPTY_CPPMETHOD_ARRAY; - } - - @Override - public ICPPMethod[] getDeclaredMethods() { - return ICPPMethod.EMPTY_CPPMETHOD_ARRAY; - } - - @Override - public ICPPConstructor[] getConstructors() { - return ICPPConstructor.EMPTY_CONSTRUCTOR_ARRAY; - } - - @Override - public IBinding[] getFriends() { - return IBinding.EMPTY_BINDING_ARRAY; - } - - @Override - public ICPPClassType[] getNestedClasses() { - return ICPPClassType.EMPTY_CLASS_ARRAY; - } - - @Override - public int getKey(){ - return getClassTemplate().getKey(); - } - - @Override - public Object clone() { - throw new UnsupportedOperationException(); - } - - @Override - public ICPPScope asScope() { - if (unknownScope == null) { - unknownScope= new PDOMCPPUnknownScope(this, getUnknownName()); - } - return unknownScope; - } - - @Override - public IASTName getUnknownName() { - return new CPPASTName(getNameCharArray()); - } - - @Override - public ICPPTemplateDefinition getTemplateDefinition() { - return (ICPPTemplateDefinition) getSpecializedBinding(); + public IIndexFragmentBinding getOwner() { + return (IIndexFragmentBinding) super.getOwner(); } @Override - public boolean isFinal() { - return getClassTemplate().isFinal(); - } - - @Override - public ICPPTemplateArgument[] getTemplateArguments() { + public IIndexScope getScope() { try { - final long rec= getPDOM().getDB().getRecPtr(record+ARGUMENTS); - return PDOMCPPArgumentList.getArguments(this, rec); - } catch (CoreException e) { - CCorePlugin.log(e); - return ICPPTemplateArgument.EMPTY_ARGUMENTS; + return (IIndexScope) super.getScope(); + } catch (DOMException e) { + return null; } } - - @Override - public boolean isAnonymous() { - return false; - } @Override - public CPPTemplateParameterMap getTemplateParameterMap() { - ICPPTemplateParameter[] params = getClassTemplate().getTemplateParameters(); - ICPPTemplateArgument[] args = getTemplateArguments(); - int size = Math.min(args.length, params.length); - CPPTemplateParameterMap map = new CPPTemplateParameterMap(size); - for (int i = 0; i < size; i++) { - map.put(params[i], args[i]); - } - return map; - } - - @Override - @Deprecated - public IType[] getArguments() { - return CPPTemplates.getArguments(getTemplateArguments()); + protected CPPUnknownTypeScope createScope() { + return new PDOMCPPUnknownScope(this, new CPPASTName(getNameCharArray())); } } diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage.java index 1e15385117e..0160143f331 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage.java @@ -33,6 +33,7 @@ import org.eclipse.cdt.core.dom.ast.IProblemBinding; import org.eclipse.cdt.core.dom.ast.IScope; import org.eclipse.cdt.core.dom.ast.IType; import org.eclipse.cdt.core.dom.ast.ITypedef; +import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTCompositeTypeSpecifier.ICPPASTBaseSpecifier; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTDeclSpecifier; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTElaboratedTypeSpecifier; @@ -40,7 +41,9 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTFunctionDeclarator; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTNamespaceDefinition; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTQualifiedName; import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTUsingDirective; +import org.eclipse.cdt.core.dom.ast.cpp.ICPPBase; import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassScope; +import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassSpecialization; import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassTemplate; import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassTemplatePartialSpecialization; import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassTemplatePartialSpecializationSpecialization; @@ -76,17 +79,18 @@ import org.eclipse.cdt.internal.core.dom.parser.ProblemType; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPArrayType; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPBasicType; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPClosureType; +import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPDeferredClassInstance; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPFunctionType; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPParameterPackType; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPPointerToMemberType; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPPointerType; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPQualifierType; import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPReferenceType; +import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownClassInstance; +import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownMember; import org.eclipse.cdt.internal.core.dom.parser.cpp.ClassTypeHelper; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPDeferredClassInstance; import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownBinding; -import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownClassInstance; -import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownClassType; import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor; import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalBinary; import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalBinaryTypeId; @@ -261,11 +265,6 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants { return pdomBinding; } - @Override - public PDOMBinding addPotentiallyUnknownBinding(IBinding binding) throws CoreException { - return addBinding(binding, null); - } - /** * Adds or returns existing binding for the given one. If fromName is not null * then an existing binding is updated with the properties of the name. @@ -352,6 +351,8 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants { // template parameters are created directly by their owners. if (binding instanceof ICPPTemplateParameter) return null; + if (binding instanceof ICPPUnknownBinding) + return null; if (binding instanceof ICPPSpecialization) { IBinding specialized = ((ICPPSpecialization) binding).getSpecializedBinding(); @@ -367,15 +368,7 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants { } else if (binding instanceof ICPPClassTemplate) { pdomBinding= new PDOMCPPClassTemplate(this, parent, (ICPPClassTemplate) binding); } else if (binding instanceof ICPPClassType) { - if (binding instanceof ICPPUnknownClassInstance) { - pdomBinding= new PDOMCPPUnknownClassInstance(this, parent, (ICPPUnknownClassInstance) binding); - } else if (binding instanceof ICPPUnknownClassType) { - pdomBinding= new PDOMCPPUnknownClassType(this, parent, (ICPPUnknownClassType) binding); - } else { - pdomBinding= new PDOMCPPClassType(this, parent, (ICPPClassType) binding); - } - } else if (binding instanceof ICPPUnknownBinding) { - pdomBinding= new PDOMCPPUnknownBinding(this, parent, (ICPPUnknownBinding) binding); + pdomBinding= new PDOMCPPClassType(this, parent, (ICPPClassType) binding); } else if (binding instanceof ICPPVariable) { ICPPVariable var= (ICPPVariable) binding; pdomBinding = new PDOMCPPVariable(this, parent, var); @@ -443,11 +436,7 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants { private PDOMBinding createSpecialization(PDOMNode parent, PDOMBinding orig, IBinding special) throws CoreException, DOMException { PDOMBinding result= null; - if (special instanceof ICPPDeferredClassInstance) { - if (orig instanceof ICPPClassTemplate) { - result= new PDOMCPPDeferredClassInstance(this, parent, (ICPPDeferredClassInstance) special, orig); - } - } else if (special instanceof ICPPTemplateInstance) { + if (special instanceof ICPPTemplateInstance) { if (special instanceof ICPPConstructor && orig instanceof ICPPConstructor) { result= new PDOMCPPConstructorInstance(this, parent, (ICPPConstructor) special, orig); } else if (special instanceof ICPPMethod && orig instanceof ICPPMethod) { @@ -527,7 +516,7 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants { if (binding instanceof ICPPSpecialization) { if (binding instanceof ICPPTemplateInstance) { if (binding instanceof ICPPDeferredClassInstance) { - return CPP_DEFERRED_CLASS_INSTANCE; + return 0; } else if (binding instanceof ICPPConstructor) { return CPP_CONSTRUCTOR_INSTANCE; } else if (binding instanceof ICPPMethod) { @@ -594,11 +583,7 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants { } else if (binding instanceof ICPPFunction) { return CPPFUNCTION; } else if (binding instanceof ICPPUnknownBinding) { - if (binding instanceof ICPPUnknownClassInstance) { - return CPP_UNKNOWN_CLASS_INSTANCE; - } else if (binding instanceof ICPPUnknownClassType) { - return CPP_UNKNOWN_CLASS_TYPE; - } + return 0; } else if (binding instanceof ICPPClassTemplate) { // this must be before class type return CPP_CLASS_TEMPLATE; @@ -812,14 +797,6 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants { return new PDOMCPPConstructorInstance(this, record); case CPP_CLASS_INSTANCE: return new PDOMCPPClassInstance(this, record); - case CPP_DEFERRED_CLASS_INSTANCE: - return new PDOMCPPDeferredClassInstance(this, record); - case CPP_UNKNOWN_BINDING: - return new PDOMCPPUnknownBinding(this, record); - case CPP_UNKNOWN_CLASS_TYPE: - return new PDOMCPPUnknownClassType(this, record); - case CPP_UNKNOWN_CLASS_INSTANCE: - return new PDOMCPPUnknownClassInstance(this, record); case CPP_TEMPLATE_TYPE_PARAMETER: return new PDOMCPPTemplateTypeParameter(this, record); case CPP_TEMPLATE_TEMPLATE_PARAMETER: @@ -869,24 +846,7 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants { parentNode = parentNode.getParent(); } if (parentNode instanceof ICPPASTBaseSpecifier) { - PDOMName derivedClassName= (PDOMName) pdomName.getEnclosingDefinition(); - if (derivedClassName != null) { - ICPPASTBaseSpecifier baseNode= (ICPPASTBaseSpecifier) parentNode; - PDOMBinding derivedClassBinding= derivedClassName.getBinding(); - if (derivedClassBinding instanceof PDOMCPPClassType) { - PDOMCPPClassType ownerClass = (PDOMCPPClassType) derivedClassBinding; - PDOMCPPBase pdomBase = new PDOMCPPBase(this, pdomName, baseNode.isVirtual(), - baseNode.getVisibility()); - ownerClass.addBase(pdomBase); - pdomName.setIsBaseSpecifier(); - } else if (derivedClassBinding instanceof PDOMCPPClassSpecialization) { - PDOMCPPClassSpecialization ownerClass = (PDOMCPPClassSpecialization) derivedClassBinding; - PDOMCPPBase pdomBase = new PDOMCPPBase(this, pdomName, baseNode.isVirtual(), - baseNode.getVisibility()); - ownerClass.addBase(pdomBase); - pdomName.setIsBaseSpecifier(); - } - } + pdomName.setIsBaseSpecifier(); } else if (parentNode instanceof ICPPASTUsingDirective) { IASTNode parent= name.getParent(); if (parent instanceof ICPPASTQualifiedName) { @@ -899,8 +859,7 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants { IASTNode node= ASTInternal.getPhysicalNodeOfScope(container); if (node instanceof IASTTranslationUnit) { doit= true; - } - else if (node instanceof ICPPASTNamespaceDefinition) { + } else if (node instanceof ICPPASTNamespaceDefinition) { ICPPASTNamespaceDefinition nsDef= (ICPPASTNamespaceDefinition) node; IASTName nsContainerName= nsDef.getName(); if (nsContainerName != null) { @@ -950,6 +909,24 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants { if (nsdef.isInline()) { pdomName.setIsInlineNamespace(); } + } else if (parentNode instanceof ICPPASTCompositeTypeSpecifier) { + IBinding classBinding = name.resolveBinding(); + if (classBinding instanceof ICPPClassType) { + ICPPBase[] bases; + if (classBinding instanceof ICPPClassSpecialization) { + bases= ((ICPPClassSpecialization) classBinding).getBases(name); + } else { + bases= ((ICPPClassType) classBinding).getBases(); + } + if (bases.length > 0) { + PDOMBinding pdomBinding = pdomName.getBinding(); + if (pdomBinding instanceof PDOMCPPClassType) { + ((PDOMCPPClassType) pdomBinding).addBases(pdomName, bases); + } else if (pdomBinding instanceof PDOMCPPClassSpecialization) { + ((PDOMCPPClassSpecialization) pdomBinding).addBases(pdomName, bases); + } + } + } } } @@ -972,20 +949,6 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants { @Override public void onDeleteName(PDOMName pdomName) throws CoreException { super.onDeleteName(pdomName); - - if (pdomName.isBaseSpecifier()) { - PDOMName derivedClassName= (PDOMName) pdomName.getEnclosingDefinition(); - if (derivedClassName != null) { - PDOMBinding derivedClassBinding= derivedClassName.getBinding(); - if (derivedClassBinding instanceof PDOMCPPClassType) { - PDOMCPPClassType ownerClass = (PDOMCPPClassType)derivedClassBinding; - ownerClass.removeBase(pdomName); - } else if (derivedClassBinding instanceof PDOMCPPClassSpecialization) { - PDOMCPPClassSpecialization ownerClass = (PDOMCPPClassSpecialization)derivedClassBinding; - ownerClass.removeBase(pdomName); - } - } - } if (pdomName.isFriendSpecifier()) { PDOMName enclClassName = (PDOMName) pdomName.getEnclosingDefinition(); if (enclClassName != null) { @@ -995,6 +958,13 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants { ownerClass.removeFriend(pdomName); } } + } else if (pdomName.isDefinition()) { + PDOMBinding binding = pdomName.getBinding(); + if (binding instanceof PDOMCPPClassType) { + ((PDOMCPPClassType) binding).removeBases(pdomName); + } else if (binding instanceof PDOMCPPClassSpecialization) { + ((PDOMCPPClassSpecialization) binding).removeBases(pdomName); + } } } @@ -1065,6 +1035,30 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants { return CPPPointerToMemberType.unmarshal(firstByte, buffer); case ITypeMarshalBuffer.DEPENDENT_EXPRESSION_TYPE: return TypeOfDependentExpression.unmarshal(firstByte, buffer); + case ITypeMarshalBuffer.UNKNOWN_MEMBER: + IBinding binding= CPPUnknownMember.unmarshal(getPDOM(), firstByte, buffer); + if (binding instanceof IType) + return (IType) binding; + break; + case ITypeMarshalBuffer.UNKNOWN_MEMBER_CLASS_INSTANCE: + return CPPUnknownClassInstance.unmarshal(getPDOM(), firstByte, buffer); + case ITypeMarshalBuffer.DEFERRED_CLASS_INSTANCE: + return CPPDeferredClassInstance.unmarshal(getPDOM(), firstByte, buffer); + } + + throw new CoreException(CCorePlugin.createStatus("Cannot unmarshal a type, first byte=" + firstByte)); //$NON-NLS-1$ + } + + @Override + public IBinding unmarshalBinding(ITypeMarshalBuffer buffer) throws CoreException { + int firstByte= buffer.getByte(); + switch ((firstByte & ITypeMarshalBuffer.KIND_MASK)) { + case ITypeMarshalBuffer.UNKNOWN_MEMBER: + return CPPUnknownMember.unmarshal(getPDOM(), firstByte, buffer); + case ITypeMarshalBuffer.UNKNOWN_MEMBER_CLASS_INSTANCE: + return CPPUnknownClassInstance.unmarshal(getPDOM(), firstByte, buffer); + case ITypeMarshalBuffer.DEFERRED_CLASS_INSTANCE: + return CPPDeferredClassInstance.unmarshal(getPDOM(), firstByte, buffer); } throw new CoreException(CCorePlugin.createStatus("Cannot unmarshal a type, first byte=" + firstByte)); //$NON-NLS-1$ diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPTemplateTemplateParameter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPTemplateTemplateParameter.java index 5d011795f8a..8f4ab194471 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPTemplateTemplateParameter.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPTemplateTemplateParameter.java @@ -14,7 +14,6 @@ package org.eclipse.cdt.internal.core.pdom.dom.cpp; import org.eclipse.cdt.core.CCorePlugin; import org.eclipse.cdt.core.dom.IPDOMVisitor; 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.IField; import org.eclipse.cdt.core.dom.ast.IScope; @@ -186,11 +185,6 @@ public class PDOMCPPTemplateTemplateParameter extends PDOMCPPBinding return fUnknownScope; } - @Override - public IASTName getUnknownName() { - return new CPPASTName(getNameCharArray()); - } - @Override public void configure(ICPPTemplateParameter param) { try { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPTemplateTypeParameter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPTemplateTypeParameter.java index 2ebf0ac7c52..2dd5571cb97 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPTemplateTypeParameter.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPTemplateTypeParameter.java @@ -15,7 +15,6 @@ package org.eclipse.cdt.internal.core.pdom.dom.cpp; import org.eclipse.cdt.core.CCorePlugin; import org.eclipse.cdt.core.dom.IPDOMVisitor; 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.IType; import org.eclipse.cdt.core.dom.ast.ITypedef; @@ -171,11 +170,6 @@ class PDOMCPPTemplateTypeParameter extends PDOMCPPBinding implements IPDOMMember return fUnknownScope; } - @Override - public IASTName getUnknownName() { - return new CPPASTName(getNameCharArray()); - } - @Override public void configure(ICPPTemplateParameter param) { try { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUnknownBinding.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUnknownBinding.java deleted file mode 100644 index c3fd0884c7a..00000000000 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUnknownBinding.java +++ /dev/null @@ -1,62 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2009 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 (Wind River Systems) - initial API and implementation - *******************************************************************************/ -package org.eclipse.cdt.internal.core.pdom.dom.cpp; - -import org.eclipse.cdt.core.dom.ast.IASTName; -import org.eclipse.cdt.core.dom.ast.cpp.ICPPScope; -import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTName; -import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownBinding; -import org.eclipse.cdt.internal.core.index.IIndexCPPBindingConstants; -import org.eclipse.cdt.internal.core.pdom.dom.PDOMLinkage; -import org.eclipse.cdt.internal.core.pdom.dom.PDOMNode; -import org.eclipse.core.runtime.CoreException; - -/** - * Models unknown bindings. The class is directly used for objects (variables, functions, ...) and - * serves as a base for unknown types. - */ -class PDOMCPPUnknownBinding extends PDOMCPPBinding implements ICPPUnknownBinding { - @SuppressWarnings("hiding") - protected static final int RECORD_SIZE = PDOMCPPBinding.RECORD_SIZE; - - public PDOMCPPUnknownBinding(PDOMLinkage linkage, PDOMNode parent, ICPPUnknownBinding binding) throws CoreException { - super(linkage, parent, binding.getNameCharArray()); - } - - public PDOMCPPUnknownBinding(PDOMLinkage linkage, long bindingRecord) { - super(linkage, bindingRecord); - } - - @Override - protected int getRecordSize() { - return RECORD_SIZE; - } - - @Override - public int getNodeType() { - return IIndexCPPBindingConstants.CPP_UNKNOWN_BINDING; - } - - @Override - public ICPPScope asScope() { - return null; - } - - @Override - public boolean mayHaveChildren() { - return false; - } - - @Override - public IASTName getUnknownName() { - return new CPPASTName(getNameCharArray()); - } -} diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUnknownClassInstance.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUnknownClassInstance.java deleted file mode 100644 index ffa71595578..00000000000 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUnknownClassInstance.java +++ /dev/null @@ -1,132 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2011 Google, 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: - * Sergey Prigogin (Google) - initial API and implementation - * Markus Schorn (Wind River Systems) - *******************************************************************************/ -package org.eclipse.cdt.internal.core.pdom.dom.cpp; - -import org.eclipse.cdt.core.CCorePlugin; -import org.eclipse.cdt.core.dom.ast.DOMException; -import org.eclipse.cdt.core.dom.ast.IBinding; -import org.eclipse.cdt.core.dom.ast.IType; -import org.eclipse.cdt.core.dom.ast.ITypedef; -import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateArgument; -import org.eclipse.cdt.core.parser.util.CharArrayUtils; -import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownClassInstance; -import org.eclipse.cdt.internal.core.index.IIndexCPPBindingConstants; -import org.eclipse.cdt.internal.core.index.IndexCPPSignatureUtil; -import org.eclipse.cdt.internal.core.pdom.db.Database; -import org.eclipse.cdt.internal.core.pdom.dom.IPDOMOverloader; -import org.eclipse.cdt.internal.core.pdom.dom.PDOMLinkage; -import org.eclipse.cdt.internal.core.pdom.dom.PDOMNode; -import org.eclipse.core.runtime.CoreException; - -/** - * @author Sergey Prigogin - */ -class PDOMCPPUnknownClassInstance extends PDOMCPPUnknownClassType implements ICPPUnknownClassInstance, IPDOMOverloader { - private static final int ARGUMENTS = PDOMCPPUnknownClassType.RECORD_SIZE + 0; - private static final int SIGNATURE_HASH = ARGUMENTS + 4; - - @SuppressWarnings("hiding") - protected static final int RECORD_SIZE = SIGNATURE_HASH + 4; - - // Cached values. - private volatile ICPPTemplateArgument[] arguments; - - public PDOMCPPUnknownClassInstance(PDOMLinkage linkage, PDOMNode parent, ICPPUnknownClassInstance classInstance) - throws CoreException { - super(linkage, parent, classInstance); - - final ICPPTemplateArgument[] args= classInstance.getArguments(); - long rec= PDOMCPPArgumentList.putArguments(this, args); - final Database db = getDB(); - db.putRecPtr(record + ARGUMENTS, rec); - try { - Integer sigHash = IndexCPPSignatureUtil.getSignatureHash(classInstance); - db.putInt(record + SIGNATURE_HASH, sigHash != null ? sigHash.intValue() : 0); - } catch (DOMException e) { - } - } - - public PDOMCPPUnknownClassInstance(PDOMLinkage linkage, long bindingRecord) { - super(linkage, bindingRecord); - } - - @Override - protected int getRecordSize() { - return RECORD_SIZE; - } - - @Override - public int getNodeType() { - return IIndexCPPBindingConstants.CPP_UNKNOWN_CLASS_INSTANCE; - } - - @Override - public int getSignatureHash() throws CoreException { - return getDB().getInt(record + SIGNATURE_HASH); - } - - @Override - public ICPPTemplateArgument[] getArguments() { - if (arguments == null) { - try { - final long rec= getPDOM().getDB().getRecPtr(record + ARGUMENTS); - arguments= PDOMCPPArgumentList.getArguments(this, rec); - } catch (CoreException e) { - CCorePlugin.log(e); - arguments= ICPPTemplateArgument.EMPTY_ARGUMENTS; - } - } - return arguments; - } - - @Override - public boolean isSameType(IType type) { - if (type instanceof ITypedef) { - return type.isSameType(this); - } - - if (type instanceof PDOMNode) { - PDOMNode node= (PDOMNode) type; - // Different PDOM bindings may result in equal types if a parent - // turns out to be a template parameter. - if (node.getPDOM() == getPDOM() && node.getRecord() == getRecord()) { - return true; - } - } - - if (type instanceof ICPPUnknownClassInstance) { - ICPPUnknownClassInstance rhs= (ICPPUnknownClassInstance) type; - if (CharArrayUtils.equals(getNameCharArray(), rhs.getNameCharArray())) { - ICPPTemplateArgument[] lhsArgs= getArguments(); - ICPPTemplateArgument[] rhsArgs= rhs.getArguments(); - if (lhsArgs != rhsArgs) { - if (lhsArgs == null || rhsArgs == null) - return false; - - if (lhsArgs.length != rhsArgs.length) - return false; - - for (int i= 0; i < lhsArgs.length; i++) { - if (!lhsArgs[i].isSameValue(rhsArgs[i])) - return false; - } - } - final IBinding lhsContainer= getOwner(); - final IBinding rhsContainer= rhs.getOwner(); - if (lhsContainer instanceof IType && rhsContainer instanceof IType) { - return (((IType) lhsContainer).isSameType((IType) rhsContainer)); - } - } - } - return false; - } -} diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUnknownClassType.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUnknownClassType.java deleted file mode 100644 index 5fc6fbb3b07..00000000000 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUnknownClassType.java +++ /dev/null @@ -1,294 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2008, 2012 Google, 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: - * Sergey Prigogin (Google) - initial API and implementation - * Markus Schorn (Wind River Systems) - * Thomas Corbat (IFS) - *******************************************************************************/ -package org.eclipse.cdt.internal.core.pdom.dom.cpp; - -import org.eclipse.cdt.core.dom.IPDOMVisitor; -import org.eclipse.cdt.core.dom.ast.EScopeKind; -import org.eclipse.cdt.core.dom.ast.IASTName; -import org.eclipse.cdt.core.dom.ast.IBinding; -import org.eclipse.cdt.core.dom.ast.IField; -import org.eclipse.cdt.core.dom.ast.IScope; -import org.eclipse.cdt.core.dom.ast.IType; -import org.eclipse.cdt.core.dom.ast.ITypedef; -import org.eclipse.cdt.core.dom.ast.cpp.ICPPBase; -import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassScope; -import org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType; -import org.eclipse.cdt.core.dom.ast.cpp.ICPPConstructor; -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.ICPPScope; -import org.eclipse.cdt.core.index.IIndexBinding; -import org.eclipse.cdt.core.index.IIndexFileSet; -import org.eclipse.cdt.core.parser.util.CharArrayUtils; -import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPDeferredClassInstance; -import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownClassInstance; -import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownClassType; -import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPSemantics; -import org.eclipse.cdt.internal.core.index.IIndexCPPBindingConstants; -import org.eclipse.cdt.internal.core.index.IIndexScope; -import org.eclipse.cdt.internal.core.index.IIndexType; -import org.eclipse.cdt.internal.core.pdom.db.PDOMNodeLinkedList; -import org.eclipse.cdt.internal.core.pdom.dom.IPDOMMemberOwner; -import org.eclipse.cdt.internal.core.pdom.dom.PDOMLinkage; -import org.eclipse.cdt.internal.core.pdom.dom.PDOMNode; -import org.eclipse.core.runtime.CoreException; - -/** - * @author Sergey Prigogin - */ -class PDOMCPPUnknownClassType extends PDOMCPPUnknownBinding - implements ICPPClassScope, ICPPUnknownClassType, IPDOMMemberOwner, IIndexType, IIndexScope { - private static final int KEY = PDOMCPPBinding.RECORD_SIZE + 0; // byte - private static final int MEMBERLIST = PDOMCPPBinding.RECORD_SIZE + 4; - @SuppressWarnings("hiding") - protected static final int RECORD_SIZE = PDOMCPPUnknownBinding.RECORD_SIZE + 8; - - private PDOMCPPUnknownScope unknownScope; // No need for volatile, PDOMCPPUnknownScope protects its fields - - public PDOMCPPUnknownClassType(PDOMLinkage linkage, PDOMNode parent, ICPPUnknownClassType classType) throws CoreException { - super(linkage, parent, classType); - - setKind(classType); - // Linked list is initialized by storage being zero'd by malloc - } - - public PDOMCPPUnknownClassType(PDOMLinkage linkage, long bindingRecord) { - super(linkage, bindingRecord); - } - - @Override - public EScopeKind getKind() { - return EScopeKind.eClassType; - } - - @Override - public void update(PDOMLinkage linkage, IBinding newBinding) throws CoreException { - if (newBinding instanceof ICPPClassType) { - ICPPClassType ct= (ICPPClassType) newBinding; - setKind(ct); - super.update(linkage, newBinding); - } - } - - private void setKind(ICPPClassType ct) throws CoreException { - getDB().putByte(record + KEY, (byte) ct.getKey()); - } - - @Override - public void addChild(PDOMNode member) throws CoreException { - PDOMNodeLinkedList list = new PDOMNodeLinkedList(getLinkage(), record + MEMBERLIST); - list.addMember(member); - } - - @Override - protected int getRecordSize() { - return RECORD_SIZE; - } - - @Override - public int getNodeType() { - return IIndexCPPBindingConstants.CPP_UNKNOWN_CLASS_TYPE; - } - - @Override - public void accept(IPDOMVisitor visitor) throws CoreException { - super.accept(visitor); - PDOMNodeLinkedList list = new PDOMNodeLinkedList(getLinkage(), record + MEMBERLIST); - list.accept(visitor); - } - - @Override - public ICPPMethod[] getImplicitMethods() { - return ICPPMethod.EMPTY_CPPMETHOD_ARRAY; - } - - @Override - public IScope getCompositeScope() { - return this; - } - - @Override - public ICPPScope asScope() { - if (unknownScope == null) { - unknownScope= new PDOMCPPUnknownScope(this, getUnknownName()); - } - return unknownScope; - } - - @Override - public IIndexBinding getScopeBinding() { - return this; - } - - @Override - public ICPPClassType getClassType() { - return this; - } - - @Override - public IBinding getBinding(IASTName name, boolean resolve, IIndexFileSet fileSet) { - return null; - } - - @Deprecated @Override - public IBinding[] getBindings(IASTName name, boolean resolve, boolean prefixLookup, IIndexFileSet fileSet) { - return IBinding.EMPTY_BINDING_ARRAY; - } - - @Override - public IBinding[] getBindings(ScopeLookupData lookup) { - return IBinding.EMPTY_BINDING_ARRAY; - } - - @Override - public IBinding[] find(String name) { - return CPPSemantics.findBindings(this, name, false); - } - - // Not implemented - - @Override - public Object clone() { - throw new UnsupportedOperationException(); - } - - @Override - public IField findField(String name) { - return null; - } - - @Override - public boolean mayHaveChildren() { - return true; - } - - /* (non-Javadoc) - * @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getBases() - */ - @Override - public ICPPBase[] getBases() { - return ICPPBase.EMPTY_BASE_ARRAY; - } - - /* (non-Javadoc) - * @see org.eclipse.cdt.core.dom.ast.ICompositeType#getFields() - */ - @Override - public IField[] getFields() { - return IField.EMPTY_FIELD_ARRAY; - } - - /* (non-Javadoc) - * @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getDeclaredFields() - */ - @Override - public ICPPField[] getDeclaredFields() { - return ICPPField.EMPTY_CPPFIELD_ARRAY; - } - - /* (non-Javadoc) - * @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getMethods() - */ - @Override - public ICPPMethod[] getMethods() { - return ICPPMethod.EMPTY_CPPMETHOD_ARRAY; - } - - /* (non-Javadoc) - * @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getAllDeclaredMethods() - */ - @Override - public ICPPMethod[] getAllDeclaredMethods() { - return ICPPMethod.EMPTY_CPPMETHOD_ARRAY; - } - - /* (non-Javadoc) - * @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getDeclaredMethods() - */ - @Override - public ICPPMethod[] getDeclaredMethods() { - return ICPPMethod.EMPTY_CPPMETHOD_ARRAY; - } - - /* (non-Javadoc) - * @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getConstructors() - */ - @Override - public ICPPConstructor[] getConstructors() { - return ICPPConstructor.EMPTY_CONSTRUCTOR_ARRAY; - } - - /* (non-Javadoc) - * @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassType#getFriends() - */ - @Override - public IBinding[] getFriends() { - return IBinding.EMPTY_BINDING_ARRAY; - } - - /* (non-Javadoc) - * @see org.eclipse.cdt.core.dom.ast.ICompositeType#getKey() - */ - @Override - public int getKey() { - return 0; - } - - /* (non-Javadoc) - * @see IType#isSameType(IType) - */ - @Override - public boolean isSameType(IType type) { - if (type instanceof ITypedef) { - return type.isSameType(this); - } - - if (type instanceof PDOMNode) { - PDOMNode node= (PDOMNode) type; - // Different PDOM bindings may result in equal types if a parent - // turns out to be a template parameter. - if (node.getPDOM() == getPDOM() && node.getRecord() == getRecord()) { - return true; - } - } - - if (type instanceof ICPPUnknownClassType - && !(type instanceof ICPPUnknownClassInstance) - && !(type instanceof ICPPDeferredClassInstance)) { - ICPPUnknownClassType rhs= (ICPPUnknownClassType) type; - if (CharArrayUtils.equals(getNameCharArray(), rhs.getNameCharArray())) { - final IBinding lhsContainer = getOwner(); - final IBinding rhsContainer = rhs.getOwner(); - if (lhsContainer instanceof IType && rhsContainer instanceof IType) { - return ((IType)lhsContainer).isSameType((IType) rhsContainer); - } - } - } - return false; - } - - @Override - public ICPPClassType[] getNestedClasses() { - return ICPPClassType.EMPTY_CLASS_ARRAY; - } - - @Override - public boolean isAnonymous() { - return false; - } - - @Override - public boolean isFinal() { - return false; - } -} diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUnknownField.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUnknownField.java new file mode 100644 index 00000000000..6c557933dee --- /dev/null +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUnknownField.java @@ -0,0 +1,80 @@ +/******************************************************************************* + * Copyright (c) 2012 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 + *******************************************************************************/ + +package org.eclipse.cdt.internal.core.pdom.dom.cpp; + +import org.eclipse.cdt.core.dom.ast.DOMException; +import org.eclipse.cdt.core.dom.ast.IType; +import org.eclipse.cdt.core.index.IIndexFile; +import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownField; +import org.eclipse.cdt.internal.core.index.IIndexCPPBindingConstants; +import org.eclipse.cdt.internal.core.index.IIndexFragment; +import org.eclipse.cdt.internal.core.index.IIndexFragmentBinding; +import org.eclipse.cdt.internal.core.index.IIndexScope; +import org.eclipse.core.runtime.CoreException; + +public class PDOMCPPUnknownField extends CPPUnknownField implements IIndexFragmentBinding { + private final IIndexFragment fFragment; + + public PDOMCPPUnknownField(IIndexFragment frag, IType owner, char[] name) { + super(owner, name); + fFragment= frag; + } + + @Override + public boolean isFileLocal() throws CoreException { + return false; + } + + @Override + public IIndexFile getLocalToFile() throws CoreException { + return null; + } + + @Override + public IIndexFragment getFragment() { + return fFragment; + } + + @Override + public boolean hasDefinition() throws CoreException { + return false; + } + + @Override + public boolean hasDeclaration() throws CoreException { + return true; + } + + @Override + public int getBindingConstant() { + return IIndexCPPBindingConstants.CPP_UNKNOWN_FIELD; + } + + @Override + public long getBindingID() { + return 0; + } + + @Override + public IIndexFragmentBinding getOwner() { + return (IIndexFragmentBinding) super.getOwner(); + } + + @Override + public IIndexScope getScope() { + try { + return (IIndexScope) super.getScope(); + } catch (DOMException e) { + return null; + } + } +} diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUnknownMemberClass.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUnknownMemberClass.java new file mode 100644 index 00000000000..e1527ac55dd --- /dev/null +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUnknownMemberClass.java @@ -0,0 +1,87 @@ +/******************************************************************************* + * Copyright (c) 2012 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 + *******************************************************************************/ + +package org.eclipse.cdt.internal.core.pdom.dom.cpp; + +import org.eclipse.cdt.core.dom.ast.DOMException; +import org.eclipse.cdt.core.dom.ast.IType; +import org.eclipse.cdt.core.index.IIndexFile; +import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTName; +import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownMemberClass; +import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownTypeScope; +import org.eclipse.cdt.internal.core.index.IIndexCPPBindingConstants; +import org.eclipse.cdt.internal.core.index.IIndexFragment; +import org.eclipse.cdt.internal.core.index.IIndexFragmentBinding; +import org.eclipse.cdt.internal.core.index.IIndexScope; +import org.eclipse.core.runtime.CoreException; + +public class PDOMCPPUnknownMemberClass extends CPPUnknownMemberClass implements IIndexFragmentBinding { + private final IIndexFragment fFragment; + + public PDOMCPPUnknownMemberClass(IIndexFragment frag, IType owner, char[] name) { + super(owner, name); + fFragment= frag; + } + + @Override + public boolean isFileLocal() throws CoreException { + return false; + } + + @Override + public IIndexFile getLocalToFile() throws CoreException { + return null; + } + + @Override + public IIndexFragment getFragment() { + return fFragment; + } + + @Override + public boolean hasDefinition() throws CoreException { + return false; + } + + @Override + public boolean hasDeclaration() throws CoreException { + return true; + } + + @Override + public int getBindingConstant() { + return IIndexCPPBindingConstants.CPP_UNKNOWN_CLASS_TYPE; + } + + @Override + public long getBindingID() { + return 0; + } + + @Override + public IIndexFragmentBinding getOwner() { + return (IIndexFragmentBinding) super.getOwner(); + } + + @Override + public IIndexScope getScope() { + try { + return (IIndexScope) super.getScope(); + } catch (DOMException e) { + return null; + } + } + + @Override + protected CPPUnknownTypeScope createScope() { + return new PDOMCPPUnknownScope(this, new CPPASTName(getNameCharArray())); + } +} diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUnknownMemberClassInstance.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUnknownMemberClassInstance.java new file mode 100644 index 00000000000..8af3674f232 --- /dev/null +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUnknownMemberClassInstance.java @@ -0,0 +1,88 @@ +/******************************************************************************* + * Copyright (c) 2012 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 + *******************************************************************************/ + +package org.eclipse.cdt.internal.core.pdom.dom.cpp; + +import org.eclipse.cdt.core.dom.ast.DOMException; +import org.eclipse.cdt.core.dom.ast.IType; +import org.eclipse.cdt.core.dom.ast.cpp.ICPPTemplateArgument; +import org.eclipse.cdt.core.index.IIndexFile; +import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTName; +import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownClassInstance; +import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownTypeScope; +import org.eclipse.cdt.internal.core.index.IIndexCPPBindingConstants; +import org.eclipse.cdt.internal.core.index.IIndexFragment; +import org.eclipse.cdt.internal.core.index.IIndexFragmentBinding; +import org.eclipse.cdt.internal.core.index.IIndexScope; +import org.eclipse.core.runtime.CoreException; + +public class PDOMCPPUnknownMemberClassInstance extends CPPUnknownClassInstance implements IIndexFragmentBinding { + private final IIndexFragment fFragment; + + public PDOMCPPUnknownMemberClassInstance(IIndexFragment frag, IType owner, char[] name, ICPPTemplateArgument[] arguments) { + super(owner, name, arguments); + fFragment= frag; + } + + @Override + public boolean isFileLocal() throws CoreException { + return false; + } + + @Override + public IIndexFile getLocalToFile() throws CoreException { + return null; + } + + @Override + public IIndexFragment getFragment() { + return fFragment; + } + + @Override + public boolean hasDefinition() throws CoreException { + return false; + } + + @Override + public boolean hasDeclaration() throws CoreException { + return true; + } + + @Override + public int getBindingConstant() { + return IIndexCPPBindingConstants.CPP_UNKNOWN_CLASS_INSTANCE; + } + + @Override + public long getBindingID() { + return 0; + } + + @Override + public IIndexFragmentBinding getOwner() { + return (IIndexFragmentBinding) super.getOwner(); + } + + @Override + public IIndexScope getScope() { + try { + return (IIndexScope) super.getScope(); + } catch (DOMException e) { + return null; + } + } + + @Override + protected CPPUnknownTypeScope createScope() { + return new PDOMCPPUnknownScope(this, new CPPASTName(getNameCharArray())); + } +} diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUnknownMethod.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUnknownMethod.java new file mode 100644 index 00000000000..9744ff7a9a0 --- /dev/null +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUnknownMethod.java @@ -0,0 +1,80 @@ +/******************************************************************************* + * Copyright (c) 2012 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 + *******************************************************************************/ + +package org.eclipse.cdt.internal.core.pdom.dom.cpp; + +import org.eclipse.cdt.core.dom.ast.DOMException; +import org.eclipse.cdt.core.dom.ast.IType; +import org.eclipse.cdt.core.index.IIndexFile; +import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownMethod; +import org.eclipse.cdt.internal.core.index.IIndexCPPBindingConstants; +import org.eclipse.cdt.internal.core.index.IIndexFragment; +import org.eclipse.cdt.internal.core.index.IIndexFragmentBinding; +import org.eclipse.cdt.internal.core.index.IIndexScope; +import org.eclipse.core.runtime.CoreException; + +public class PDOMCPPUnknownMethod extends CPPUnknownMethod implements IIndexFragmentBinding { + private final IIndexFragment fFragment; + + public PDOMCPPUnknownMethod(IIndexFragment frag, IType owner, char[] name) { + super(owner, name); + fFragment= frag; + } + + @Override + public boolean isFileLocal() throws CoreException { + return false; + } + + @Override + public IIndexFile getLocalToFile() throws CoreException { + return null; + } + + @Override + public IIndexFragment getFragment() { + return fFragment; + } + + @Override + public boolean hasDefinition() throws CoreException { + return false; + } + + @Override + public boolean hasDeclaration() throws CoreException { + return true; + } + + @Override + public int getBindingConstant() { + return IIndexCPPBindingConstants.CPP_UNKNOWN_METHOD; + } + + @Override + public long getBindingID() { + return 0; + } + + @Override + public IIndexFragmentBinding getOwner() { + return (IIndexFragmentBinding) super.getOwner(); + } + + @Override + public IIndexScope getScope() { + try { + return (IIndexScope) super.getScope(); + } catch (DOMException e) { + return null; + } + } +} diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUnknownScope.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUnknownScope.java index 77ed17ec565..48fd252ae74 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUnknownScope.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUnknownScope.java @@ -13,15 +13,16 @@ package org.eclipse.cdt.internal.core.pdom.dom.cpp; import org.eclipse.cdt.core.dom.ast.IASTName; import org.eclipse.cdt.core.dom.ast.IBinding; +import org.eclipse.cdt.core.dom.ast.IType; import org.eclipse.cdt.core.index.IIndexName; -import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownScope; -import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPUnknownBinding; +import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPUnknownTypeScope; +import org.eclipse.cdt.internal.core.index.IIndexFragmentBinding; import org.eclipse.cdt.internal.core.index.IIndexScope; -public class PDOMCPPUnknownScope extends CPPUnknownScope implements IIndexScope { +public class PDOMCPPUnknownScope extends CPPUnknownTypeScope implements IIndexScope { - public PDOMCPPUnknownScope(PDOMCPPBinding binding, IASTName name) { - super((ICPPUnknownBinding) binding, name); + public PDOMCPPUnknownScope(IIndexFragmentBinding binding, IASTName name) { + super((IType) binding, name); } @Override @@ -35,8 +36,8 @@ public class PDOMCPPUnknownScope extends CPPUnknownScope implements IIndexScope } @Override - public PDOMCPPBinding getScopeBinding() { - return (PDOMCPPBinding) super.getScopeBinding(); + public IIndexFragmentBinding getScopeBinding() { + return (IIndexFragmentBinding) super.getScopeType(); } @Override diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUsingDeclaration.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUsingDeclaration.java index dc777af3e20..16d09920afe 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUsingDeclaration.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPUsingDeclaration.java @@ -11,16 +11,12 @@ *******************************************************************************/ package org.eclipse.cdt.internal.core.pdom.dom.cpp; -import java.util.LinkedHashSet; -import java.util.Set; - import org.eclipse.cdt.core.CCorePlugin; import org.eclipse.cdt.core.dom.ast.IBinding; import org.eclipse.cdt.core.dom.ast.cpp.ICPPUsingDeclaration; import org.eclipse.cdt.core.parser.util.ArrayUtil; import org.eclipse.cdt.internal.core.index.IIndexCPPBindingConstants; import org.eclipse.cdt.internal.core.pdom.db.Database; -import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding; import org.eclipse.cdt.internal.core.pdom.dom.PDOMLinkage; import org.eclipse.cdt.internal.core.pdom.dom.PDOMNode; import org.eclipse.core.runtime.CoreException; @@ -33,14 +29,14 @@ import org.eclipse.core.runtime.CoreException; * @see ICPPUsingDeclaration */ class PDOMCPPUsingDeclaration extends PDOMCPPBinding implements ICPPUsingDeclaration { - private static final int TARGET_BINDING = PDOMCPPBinding.RECORD_SIZE + 0; + private static final int TARGET_BINDING = PDOMCPPBinding.RECORD_SIZE; // Using declarations for functions may have multiple delegates. We model such case // by creating a chain of PDOMCPPUsingDeclaration objects linked by NEXT_DELEGATE field. - private static final int NEXT_DELEGATE = PDOMCPPBinding.RECORD_SIZE + 4; + private static final int NEXT_DELEGATE = TARGET_BINDING + Database.TYPE_SIZE; @SuppressWarnings("hiding") - protected static final int RECORD_SIZE = PDOMCPPBinding.RECORD_SIZE + 8; + protected static final int RECORD_SIZE = NEXT_DELEGATE + Database.PTR_SIZE; private volatile IBinding[] delegates; @@ -50,17 +46,15 @@ class PDOMCPPUsingDeclaration extends PDOMCPPBinding implements ICPPUsingDeclara final Database db = getDB(); final char[] name = using.getNameCharArray(); - Set targets= new LinkedHashSet(); PDOMCPPUsingDeclaration last= null; for (IBinding delegate : using.getDelegates()) { - PDOMBinding target = getLinkage().addPotentiallyUnknownBinding(delegate); - if (target != null && targets.add(target)) { + if (delegate != null) { if (last == null) { - setTargetBinding(linkage, target); + setTargetBinding(linkage, delegate); last= this; } else { PDOMCPPUsingDeclaration next= new PDOMCPPUsingDeclaration(linkage, parent, name); - next.setTargetBinding(linkage, target); + next.setTargetBinding(linkage, delegate); db.putRecPtr(last.getRecord() + NEXT_DELEGATE, next.record); last= next; } @@ -76,8 +70,8 @@ class PDOMCPPUsingDeclaration extends PDOMCPPBinding implements ICPPUsingDeclara super(linkage, parent, name); } - private void setTargetBinding(PDOMLinkage linkage, PDOMBinding delegate) throws CoreException { - getDB().putRecPtr(record + TARGET_BINDING, delegate != null ? delegate.getRecord() : 0); + private void setTargetBinding(PDOMLinkage linkage, IBinding delegate) throws CoreException { + getLinkage().storeBinding(record + TARGET_BINDING, delegate); } @Override @@ -118,8 +112,7 @@ class PDOMCPPUsingDeclaration extends PDOMCPPBinding implements ICPPUsingDeclara private IBinding getBinding() { try { - return (IBinding) getLinkage().getNode( - getPDOM().getDB().getRecPtr(record + TARGET_BINDING)); + return getLinkage().loadBinding(record + TARGET_BINDING); } catch (CoreException e) { CCorePlugin.log(e); } diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/IAddress.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/IAddress.java index 59bb8c76129..54d572d7ad6 100644 --- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/IAddress.java +++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/IAddress.java @@ -33,8 +33,8 @@ public interface IAddress extends Comparable { /** * Adds offset to address and returns new address object * which is the result - *

Note: This method has an offset limit of Long.MAX and Long.MIN, which under some addressing schems - * may impose an unnesseary limitation, see IAddressa.add(BigInteger offset) to handle larger offsets. + *

Note: This method has an offset limit of Long.MAX and Long.MIN, which under some addressing schemes + * may impose an unnecessary limitation, see IAddress.add(BigInteger offset) to handle larger offsets. * @param offset to add * @return the new address */ @@ -42,7 +42,7 @@ public interface IAddress extends Comparable { /** * Returns maximal offset possible for address. The offset - * should be Identicall for all addresses of given class. + * should be identical for all addresses of given class. * @return the max offset for this address class */ BigInteger getMaxOffset(); @@ -83,7 +83,7 @@ public interface IAddress extends Comparable { /** * Converts address to string as an unsigned number with given radix - * @param radix to use for strng conversion + * @param radix to use for string conversion * @return a string representation of address */ String toString(int radix); @@ -113,9 +113,9 @@ public interface IAddress extends Comparable { /** * Returns amount of symbols in hex representation. Is identical to - * toHexAddressString().length(). It is present for perfomance purpose. + * toHexAddressString().length(). It is present for performance purpose. * - * @return the nmber os chararcter symbols to represent this address in hex. + * @return the number of character symbols to represent this address in hex. */ int getCharsNum(); diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/AutomatedSuite.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/AutomatedSuite.java index cb45f1e99c3..b00b0aa71ab 100644 --- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/AutomatedSuite.java +++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/AutomatedSuite.java @@ -1,117 +1,108 @@ -/******************************************************************************* - * Copyright (c) 2000, 2010 IBM Corporation 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: - * IBM - Initial API and implementation - * Anton Leherbauer (Wind River Systems) - * Markus Schorn (Wind River Systems) - *******************************************************************************/ -package org.eclipse.cdt.ui.tests; - -import junit.framework.Test; -import junit.framework.TestSuite; - -import org.eclipse.cdt.ui.tests.buildconsole.BuildConsoleTests; -import org.eclipse.cdt.ui.tests.callhierarchy.CallHierarchyTestSuite; -import org.eclipse.cdt.ui.tests.chelp.CHelpTest; -import org.eclipse.cdt.ui.tests.includebrowser.IncludeBrowserTestSuite; -import org.eclipse.cdt.ui.tests.misc.MiscTestSuite; -import org.eclipse.cdt.ui.tests.outline.OutlineTestSuite; -import org.eclipse.cdt.ui.tests.quickfix.AssistQuickFixTest; -import org.eclipse.cdt.ui.tests.refactoring.RefactoringTestSuite; -import org.eclipse.cdt.ui.tests.search.SearchTestSuite; -import org.eclipse.cdt.ui.tests.templateengine.AllTemplateEngineTests; -import org.eclipse.cdt.ui.tests.text.TextTestSuite; -import org.eclipse.cdt.ui.tests.text.contentassist.ContentAssistTestSuite; -import org.eclipse.cdt.ui.tests.text.contentassist2.ContentAssist2TestSuite; -import org.eclipse.cdt.ui.tests.text.selection.SelectionTestSuite; -import org.eclipse.cdt.ui.tests.typehierarchy.TypeHierarchyTestSuite; -import org.eclipse.cdt.ui.tests.viewsupport.ViewSupportTestSuite; -import org.eclipse.cdt.ui.tests.wizards.classwizard.ClassWizardTestSuite; -import org.eclipse.cdt.ui.tests.wizards.settingswizards.SettingsWizardTestSuite; - -/** - * Test all areas of the UI. - */ -public class AutomatedSuite extends TestSuite { - - /** - * Returns the suite. This is required to - * use the JUnit Launcher. - */ - public static Test suite() throws Exception { - return new AutomatedSuite(); - } - - /** - * Construct the test suite. - */ - public AutomatedSuite() throws Exception { - - // tests from package org.eclipse.cdt.ui.tests.text - addTest(TextTestSuite.suite()); - - // tests from package org.eclipse.cdt.ui.tests.outline - addTest(OutlineTestSuite.suite()); - - // tests for package org.eclipse.cdt.ui.tests.viewsupport - addTest(ViewSupportTestSuite.suite()); - - // Has intermittent failures - if (System.getProperty("cdt.skip.known.test.failures") == null) { //$NON-NLS-1$ - // tests for package org.eclipse.cdt.ui.tests.callhierarchy - addTest(CallHierarchyTestSuite.suite()); - } - - // tests for package org.eclipse.cdt.ui.tests.typehierarchy - addTest(TypeHierarchyTestSuite.suite()); - - // tests for package org.eclipse.cdt.ui.tests.includebrowser - addTest(IncludeBrowserTestSuite.suite()); - - // tests from package org.eclipse.cdt.ui.tests.text.contentAssist - addTest(ContentAssistTestSuite.suite()); - - // tests from package org.eclipse.cdt.ui.tests.text.contentAssist2 - addTest(ContentAssist2TestSuite.suite()); - - // Has intermittent failures - if (System.getProperty("cdt.skip.known.test.failures") == null) { //$NON-NLS-1$ - // tests from package org.eclipse.cdt.ui.tests.text.selection - addTest(SelectionTestSuite.suite()); - } - - // tests from package org.eclipse.cdt.ui.tests.quickfix - addTest(AssistQuickFixTest.suite()); - - // tests from package org.eclipse.cdt.ui.tests.buildconsole - addTest(BuildConsoleTests.suite()); - - // tests from package org.eclipse.cdt.ui.tests.search - addTest(SearchTestSuite.suite()); - - // Has intermittent failures - if (System.getProperty("cdt.skip.known.test.failures") == null) { //$NON-NLS-1$ - // tests from package org.eclipse.cdt.ui.tests.refactoring - addTest(RefactoringTestSuite.suite()); - } - - // tests from package org.eclipse.cdt.ui.tests.chelp - addTest(CHelpTest.suite()); - - // tests from package org.eclipse.cdt.ui.tests.wizards.classwizard - addTest(ClassWizardTestSuite.suite()); - - // tests from package org.eclipse.cdt.ui.tests.wizards.settingswizards - addTest(SettingsWizardTestSuite.suite()); - - // tests from package org.eclipse.cdt.ui.tests.misc - addTest(MiscTestSuite.suite()); - - addTest(AllTemplateEngineTests.suite()); - } -} +/******************************************************************************* + * Copyright (c) 2000, 2010 IBM Corporation 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: + * IBM - Initial API and implementation + * Anton Leherbauer (Wind River Systems) + * Markus Schorn (Wind River Systems) + *******************************************************************************/ +package org.eclipse.cdt.ui.tests; + +import junit.framework.Test; +import junit.framework.TestSuite; + +import org.eclipse.cdt.ui.tests.buildconsole.BuildConsoleTests; +import org.eclipse.cdt.ui.tests.callhierarchy.CallHierarchyTestSuite; +import org.eclipse.cdt.ui.tests.chelp.CHelpTest; +import org.eclipse.cdt.ui.tests.includebrowser.IncludeBrowserTestSuite; +import org.eclipse.cdt.ui.tests.misc.MiscTestSuite; +import org.eclipse.cdt.ui.tests.outline.OutlineTestSuite; +import org.eclipse.cdt.ui.tests.quickfix.AssistQuickFixTest; +import org.eclipse.cdt.ui.tests.refactoring.RefactoringTestSuite; +import org.eclipse.cdt.ui.tests.search.SearchTestSuite; +import org.eclipse.cdt.ui.tests.templateengine.AllTemplateEngineTests; +import org.eclipse.cdt.ui.tests.text.TextTestSuite; +import org.eclipse.cdt.ui.tests.text.contentassist.ContentAssistTestSuite; +import org.eclipse.cdt.ui.tests.text.contentassist2.ContentAssist2TestSuite; +import org.eclipse.cdt.ui.tests.text.selection.SelectionTestSuite; +import org.eclipse.cdt.ui.tests.typehierarchy.TypeHierarchyTestSuite; +import org.eclipse.cdt.ui.tests.viewsupport.ViewSupportTestSuite; +import org.eclipse.cdt.ui.tests.wizards.classwizard.ClassWizardTestSuite; +import org.eclipse.cdt.ui.tests.wizards.settingswizards.SettingsWizardTestSuite; + +/** + * Test all areas of the UI. + */ +public class AutomatedSuite extends TestSuite { + + /** + * Returns the suite. This is required to + * use the JUnit Launcher. + */ + public static Test suite() throws Exception { + return new AutomatedSuite(); + } + + /** + * Construct the test suite. + */ + public AutomatedSuite() throws Exception { + + // tests from package org.eclipse.cdt.ui.tests.text + addTest(TextTestSuite.suite()); + + // tests from package org.eclipse.cdt.ui.tests.outline + addTest(OutlineTestSuite.suite()); + + // tests for package org.eclipse.cdt.ui.tests.viewsupport + addTest(ViewSupportTestSuite.suite()); + + // tests for package org.eclipse.cdt.ui.tests.callhierarchy + addTest(CallHierarchyTestSuite.suite()); + + // tests for package org.eclipse.cdt.ui.tests.typehierarchy + addTest(TypeHierarchyTestSuite.suite()); + + // tests for package org.eclipse.cdt.ui.tests.includebrowser + addTest(IncludeBrowserTestSuite.suite()); + + // tests from package org.eclipse.cdt.ui.tests.text.contentAssist + addTest(ContentAssistTestSuite.suite()); + + // tests from package org.eclipse.cdt.ui.tests.text.contentAssist2 + addTest(ContentAssist2TestSuite.suite()); + + // tests from package org.eclipse.cdt.ui.tests.text.selection + addTest(SelectionTestSuite.suite()); + + // tests from package org.eclipse.cdt.ui.tests.quickfix + addTest(AssistQuickFixTest.suite()); + + // tests from package org.eclipse.cdt.ui.tests.buildconsole + addTest(BuildConsoleTests.suite()); + + // tests from package org.eclipse.cdt.ui.tests.search + addTest(SearchTestSuite.suite()); + + // tests from package org.eclipse.cdt.ui.tests.refactoring + addTest(RefactoringTestSuite.suite()); + + // tests from package org.eclipse.cdt.ui.tests.chelp + addTest(CHelpTest.suite()); + + // tests from package org.eclipse.cdt.ui.tests.wizards.classwizard + addTest(ClassWizardTestSuite.suite()); + + // tests from package org.eclipse.cdt.ui.tests.wizards.settingswizards + addTest(SettingsWizardTestSuite.suite()); + + // tests from package org.eclipse.cdt.ui.tests.misc + addTest(MiscTestSuite.suite()); + + addTest(AllTemplateEngineTests.suite()); + } +} diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CPPSelectionTestsAnyIndexer.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CPPSelectionTestsAnyIndexer.java index c56a72f0917..bc2aab7d1fe 100644 --- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CPPSelectionTestsAnyIndexer.java +++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CPPSelectionTestsAnyIndexer.java @@ -770,6 +770,9 @@ public abstract class CPPSelectionTestsAnyIndexer extends BaseSelectionTestsInde // return x; // } public void testBug103697() throws Exception { + if (System.getProperty("cdt.skip.known.test.failures") == null) { + return; + } StringBuilder[] buffers= getContents(2); String hcode= buffers[0].toString(); String scode= buffers[1].toString(); diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/typehierarchy/TypeHierarchyAcrossProjectsTest.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/typehierarchy/TypeHierarchyAcrossProjectsTest.java index 24979d81737..a2fca90c9fc 100644 --- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/typehierarchy/TypeHierarchyAcrossProjectsTest.java +++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/typehierarchy/TypeHierarchyAcrossProjectsTest.java @@ -89,6 +89,7 @@ public class TypeHierarchyAcrossProjectsTest extends TypeHierarchyBaseTest { String header= content[0].toString(); String source = content[1].toString(); IFile headerFile= createFile(fCProject.getProject(), "simpleHeader.h", header); + waitUntilFileIsIndexed(fIndex, headerFile); IFile sourceFile= createFile(fCProject2.getProject(), "simple.cpp", source); waitUntilFileIsIndexed(fIndex, sourceFile); diff --git a/core/org.eclipse.cdt.ui/plugin.xml b/core/org.eclipse.cdt.ui/plugin.xml index 1d1a934f178..94270588d84 100644 --- a/core/org.eclipse.cdt.ui/plugin.xml +++ b/core/org.eclipse.cdt.ui/plugin.xml @@ -4392,53 +4392,45 @@ label="%ResourceConfigurations.menu"> - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - -

About This Content

+
+

About This Content

June 22, 2007

License

@@ -23,6 +24,6 @@ apply to your use of any object code in the Content. Check the Redistributor's provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise indicated below, the terms and conditions of the EPL still apply to any source code in the Content and such source code may be obtained at http://www.eclipse.org.

- +
\ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_before_you_begin.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_before_you_begin.htm index af5dd46f540..f73c2bcdbc8 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_before_you_begin.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_before_you_begin.htm @@ -8,7 +8,8 @@ -

Before you begin

+
+

Before you begin

Depending on how you obtained the CDT, you might have also received a toolchain with a built-in CDT integration. @@ -70,6 +71,7 @@ on your platform, see your platform vendor.

QNX Copyright Statement

+
\ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_brkpnts.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_brkpnts.htm index 9f3eff0614c..605a7a7360b 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_brkpnts.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_brkpnts.htm @@ -9,7 +9,8 @@ -

Breakpoints

+
+

Breakpoints

A breakpoint suspends the execution of a program at the location where the breakpoint is set. To set a line breakpoint, right-click in the marker bar area on the left side of an editor beside @@ -56,7 +57,7 @@ from the menu bar choose Run > Debug. Red Hat Statement
IBM Copyright Statement

- +
\ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_build_over.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_build_over.htm index 50de1e1a503..82365073e1d 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_build_over.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_build_over.htm @@ -7,7 +7,8 @@ -

Building C/C++ projects

+
+

Building C/C++ projects

The CDT relies on an external make utility, such as GNU make, to build a project. The CDT can generate makefiles automatically when you create a Managed Make C project or a Managed Make C++ project. You have @@ -156,5 +157,6 @@ Targets view.

Red Hat Copyright Statement
IBM Copyright Statement

+
diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_comments.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_comments.htm index 70c806c7379..96a45629250 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_comments.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_comments.htm @@ -9,8 +9,8 @@ - -

Comments

+
+

Comments

Comments are lines in a source file that have been marked to be ignored by the compiler. Two styles of comments are supported by current C/C++ compilers:

    @@ -60,7 +60,7 @@ Type com+Ctrl+Space, and the following code is e Red Hat Copyright Statement
     IBM Copyright Statement

    - +
\ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_content_assist.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_content_assist.htm index 56c451e45ff..714d7094d69 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_content_assist.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_content_assist.htm @@ -9,8 +9,8 @@ - -

Content Assist

+
+

Content Assist

Content Assist is a set of tools built into the CDT that can reduce the number of keystrokes you must type to create your code. The Content Assist plug-in consists of several components that forecast what @@ -92,7 +92,7 @@ main(int argc, char **argv) {

IBM Copyright Statement

- +
diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_dbg_info.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_dbg_info.htm index 1544d0e8150..91e8a017742 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_dbg_info.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_dbg_info.htm @@ -11,8 +11,8 @@ - -

Debug information

+
+

Debug information

The Debug perspective lets you manage the debugging or running of a program in the Workbench. You can control the execution of your program by setting @@ -82,7 +82,7 @@ debugger handles each one.

Debug views

IBM Copyright Statement

- +
\ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_discovery_options.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_discovery_options.htm index 3bcbe5ccb38..7e466d64120 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_discovery_options.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_discovery_options.htm @@ -9,7 +9,8 @@ -

Discovery options

+
+

Discovery options

For projects where the IDE generates a makefile to build the project automatically, the IDE has more information about the internal build state of the make project compared to those projects where you provide a makefile to build the project. @@ -47,6 +48,7 @@ Red Hat Copyright Statement
 IBM Copyright Statement

+
diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_editor.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_editor.htm index 8316ece83db..1ebbfc266be 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_editor.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_editor.htm @@ -8,7 +8,8 @@ -

C/C++ editor

+
+

C/C++ editor

The CDT provides an editor that gives you specific support for editing C/C++ code. This C/C++ editor is invoked automatically when you edit a C/C++ source file.

@@ -45,5 +46,6 @@ This C/C++ editor is invoked automatically when you edit a C/C++ source file.


 IBM Copyright Statement

+
\ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_indexer.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_indexer.htm index 1734becf5f1..faf05baebbe 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_indexer.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_indexer.htm @@ -7,7 +7,8 @@ -

C/C++ Indexer

+
+

C/C++ Indexer

The C/C++ indexer uses the parser to create a database of your source and header files that provides the basis for C/C++ search, navigation features and parts of content assist.

@@ -58,5 +59,6 @@ dialog box

 

IBM Copyright Statement +
diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_indexer_fullindexer.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_indexer_fullindexer.htm index 573ea07f901..c2ce9f3f0cd 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_indexer_fullindexer.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_indexer_fullindexer.htm @@ -7,7 +7,8 @@ -

Full C/C++ Indexer

+
+

Full C/C++ Indexer

The Full C/C++ Indexer is a new indexer for CDT 3.0 which makes use of the new DOM. It creates a full index of the project's source providing both declaration and cross reference information to the @@ -41,5 +42,6 @@ dialog box

 

IBM Copyright Statement +
diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_indexer_prog_bar.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_indexer_prog_bar.htm index 5c8ffaf0bd0..6bc6fce8233 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_indexer_prog_bar.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_indexer_prog_bar.htm @@ -7,7 +7,8 @@ -

C/C++ Indexer Progress Bar

+
+

C/C++ Indexer Progress Bar

The indexer progress bar shows the progress status of the indexing jobs in the progress views.

The indexing jobs can be temporarily paused by pressing the stop @@ -40,5 +41,6 @@ dialog box

 

IBM Copyright Statement +
diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_makefile.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_makefile.htm index ac03a1366f8..50279d69968 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_makefile.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_makefile.htm @@ -9,7 +9,8 @@ -

Makefile

+
+

Makefile

A makefile is a text file that is referenced by the make command that describes the building of targets, and contains information such as source-level dependencies and build-order dependencies.

The CDT can generate a makefile for you, such projects are called Managed Make projects. Some projects, known as Standard Make projects, allow you to define your own makefile.

@@ -181,6 +182,6 @@ clean :

IBM Copyright Statement

- +
\ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_open_declarations.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_open_declarations.htm index d88dd8e295d..6af3575e76a 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_open_declarations.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_open_declarations.htm @@ -9,8 +9,8 @@ - -

Open Declaration

+
+

Open Declaration

You can select an element name in your code and quickly navigate to its declaration.

@@ -34,7 +34,7 @@ If for any reason open declaration cannot find the declaration, it will display Searching for C/C++ elements

IBM Copyright Statement

- +
\ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_outlineview.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_outlineview.htm index 99a663ecc10..28b23746941 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_outlineview.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_outlineview.htm @@ -9,8 +9,8 @@ - -

Outline view

+
+

Outline view

The Outline view displays an outline of a structured C/C++ file that is currently open in the editor area, by listing the structural elements.

@@ -125,7 +125,7 @@ Project Explorer view
 

IBM Copyright Statement - +
\ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_over_cdt.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_over_cdt.htm index 2ebe7b3290d..d941daca15f 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_over_cdt.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_over_cdt.htm @@ -7,8 +7,8 @@ - -

CDT Overview

+
+

CDT Overview

The C/C++ Development Toolkit (CDT) is a set of Eclipse plug-ins that provide C and C++ extensions to the Eclipse workbench. For more information about Eclipse, see Workbench User Guide > Concepts > Workbench.

@@ -78,7 +78,7 @@ This is the main source for information around CDT. Views

IBM Copyright Statement - +
\ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_over_dbg.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_over_dbg.htm index 0c315d4190b..f9c292a6a93 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_over_dbg.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_over_dbg.htm @@ -11,8 +11,8 @@ - -

Debug overview

+
+

Debug overview

The debugger lets you see what's going on "inside" a program while it executes.

@@ -40,7 +40,7 @@ trace.

Run and Debug dialog box

IBM Copyright Statement

- +
\ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_perspectives.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_perspectives.htm index ecb5a0b3e1a..fafd54e5e0c 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_perspectives.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_perspectives.htm @@ -8,8 +8,8 @@ - -

Perspectives available to C/C++ developers

+
+

Perspectives available to C/C++ developers

A perspective is a layout of views (development tools) in the Workbench window. Each type of perspective is a combination of views, menus, and toolbars that enable you to perform a particular task. @@ -85,5 +85,6 @@ Eclipse also has perspectives that are tuned to other types of development: Red Hat Copyright Statement
 IBM Copyright Statement

+
\ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_proj_file_views.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_proj_file_views.htm index 164906ffb1c..c61f88c12b9 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_proj_file_views.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_proj_file_views.htm @@ -9,8 +9,8 @@ - -

Project file views

+
+

Project file views

Projects files and elements are displayed in the C/C++ Projects view and in the ProjectExplorer view.

@@ -59,7 +59,7 @@ item does, select an item and press F1.

IBM Corporation Statement

- +
\ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_projects.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_projects.htm index 5088f770ea1..2769b85ce52 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_projects.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_projects.htm @@ -8,8 +8,8 @@ - -

CDT projects

+
+

CDT projects

Before you can work in the CDT, you must create a project to store your source code, makefiles, binaries, and related files. C/C++ projects are displayed @@ -98,7 +98,7 @@ hello.c are separate files in UNIX but overwrite each other in Windows. IBM Copyright Statement - +

\ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_search.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_search.htm index 703120fbc4e..4f98525d80a 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_search.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_search.htm @@ -9,8 +9,8 @@ - -

C/C++ search

+
+

C/C++ search

You can conduct a fully or partially qualified name search. Further qualifying a search increases the accuracy and relevance of search results. The @@ -269,7 +269,7 @@ your last search.

C/C++ perspective icons

IBM Copyright Statement

- +
\ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_templates.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_templates.htm index e1c9c889062..a7fe1c6e8ca 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_templates.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_templates.htm @@ -8,8 +8,8 @@ - -

Templates

+
+

Templates

Templates are sections of code that occur frequently enough that you would like to be able to insert them with a few keystrokes. @@ -43,6 +43,6 @@ The templates that begin with that character appear. Double-click on a template Red Hat Copyright Statement
 IBM Copyright Statement

- +
\ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_views.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_views.htm index a9301bd3823..ff773014b6c 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_views.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_views.htm @@ -9,7 +9,8 @@ -

Views in the C/C++ perspective

+
+

Views in the C/C++ perspective

The C/C++ views are panels that help you perform the tasks involved in creating C/C++ programs. The C/C++ perspective displays these panels in a single Eclipse window.

@@ -48,6 +49,7 @@ The C/C++ perspective displays these panels Red Hat Copyright Statement
 IBM Copyright Statement

+
\ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_whatsnew.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_whatsnew.htm index 0138c88a688..a46e6c19c7c 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_whatsnew.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_whatsnew.htm @@ -9,7 +9,8 @@ -

CDT 8.1 - New and Noteworthy

+
+

CDT 8.1 - New and Noteworthy

See What's new in CDT 8.1 on the CDT Wiki which may contain more recent information.

@@ -166,7 +167,7 @@

Image:VisualizerSnapshot.png

Note that the Multicore Visualizer will only work using a Linux target; it will not work debugging on a Windows or Mac target. This is a current limitation of GDB which does not provide information about cores, for those targets (at writing, GDB is at version 7.4).

This feature was completed on February 10th, 2012. For details see Bug 335027 -

The Multicore Visualizer is an optional feature of the CDT and must be installed manually. The feature is called "C/C++ Multicore Visualizer". Installing it will install both the Multicore Visualizer and the Visualizer Framework. If you only want to install the Visualizer Framework (to build your own visualizer), you can install that feature by itself; it is called "CDT Visualizer Framework". Once the features are installed, you can access the Multicore Visualizer (or any other visualizer) by opening the view called "Visualizer". +

The Multicore Visualizer is an optional feature of the CDT and must be installed manually. The feature is called C/C++ Multicore Visualizer. Installing it will install both the Multicore Visualizer and the Visualizer Framework. If you only want to install the Visualizer Framework (to build your own visualizer), you can install that feature by itself; it is called CDT Visualizer Framework. Once the features are installed, you can access the Multicore Visualizer (or any other visualizer) by opening the view called Visualizer.

Partitioning of large arrays

CDT now displays large arrays as collections of partitions. @@ -248,8 +249,9 @@

  • If both thread(s) and process(es) are selected, and the resume/suspend operation is triggered, each selected process will be resumed/suspended, and each selected thread which is not part of any selected process will be resumed/suspended. The idea is that if a process is being resumed/suspended, each of its threads will be automatically resumed/suspended, and therefore, should not be resumed/suspended a second time because it is also selected.
  • As hinted above, CDT takes a permissive approach to multi-select resume/suspend. This means that if a multi-selection includes both stopped and running threads, a resume operation is still allowed, and only the suspended threads will be resumed; similarly, on such a multi-selection, a suspend operation is allowed, and only the running threads will be suspended. -

    Example -

    Image:MultiSelectRunControl.png +

    +

    Example

    +

    Image:MultiSelectRunControl.png

    In the above screenshot if the user were to press the Resume button with the current multi-selection the following would happen:

    1. The Consumer process node is selected, therefore the entire process will be resumed. This means that the suspended threads 7 and 9 will be resumed, while threads 6, 8 and 10 will be ignored, as they are already running. @@ -392,6 +394,6 @@ CDT 8.1 bug fixes

      Back to Top

       

      - +
    diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_whatsnew_60.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_whatsnew_60.htm index 7b3971d6ce9..e90d4300006 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_whatsnew_60.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_whatsnew_60.htm @@ -14,8 +14,8 @@ tr {vertical-align: top;} CDT 6.0 New and Noteworthy - -

    CDT 6.0 - New and Noteworthy

    +
    +

    CDT 6.0 - New and Noteworthy

    Note: "New and Noteworthy" for previous versions is at the bottom of this file.

    See What's new in CDT 6.0 on the CDT wiki; may contain other information. @@ -460,7 +460,7 @@ See What's New in CDT 5.0

    CDT 6.0 - New and Noteworthy

    CDT 5.0 - New and Noteworthy

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_whatsnew_70.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_whatsnew_70.htm index f00abe79b3a..0a6852755ee 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_whatsnew_70.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_whatsnew_70.htm @@ -14,8 +14,8 @@ tr {vertical-align: top;} CDT 7.0 New and Noteworthy - -

    CDT 7.0 - New and Noteworthy

    +
    +

    CDT 7.0 - New and Noteworthy

    See What's new in CDT 7.0 on the CDT wiki which may contain more recent information.

    @@ -344,7 +344,7 @@ which may contain more recent information.

    Back to Top

     

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_whatsnew_80.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_whatsnew_80.htm index 0ff1521945f..2aaf44afac1 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_whatsnew_80.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_c_whatsnew_80.htm @@ -14,8 +14,8 @@ tr {vertical-align: top;} CDT 8.0 New and Noteworthy - -

    CDT 8.0 - New and Noteworthy

    +
    +

    CDT 8.0 - New and Noteworthy

    See What's new in CDT 8.0 on the CDT Wiki which may contain more recent information.

    @@ -550,7 +550,7 @@ end

    Back to Top

     

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_o_build_conc.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_o_build_conc.htm index 572034835f0..c170436a50b 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_o_build_conc.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_o_build_conc.htm @@ -9,14 +9,15 @@ - -

    Build

    +
    +

    Build

    This section describes the build views and terminology.

    Building C/C++ Projects

    IBM Copyright Statement

    +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_o_code_entry.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_o_code_entry.htm index edfbe1fcc24..d3b80448f14 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_o_code_entry.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_o_code_entry.htm @@ -9,8 +9,8 @@ - -

    Coding aids

    +
    +

    Coding aids

    This section provides information on code entry aids.

    Comments
    @@ -18,6 +18,6 @@ Templates

    IBM Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_o_concepts.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_o_concepts.htm index 888cc208407..67696fbb174 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_o_concepts.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_o_concepts.htm @@ -9,8 +9,8 @@ - -

    Concepts

    +
    +

    Concepts

    Provides background information for CDT components, tasks and objectives.

    @@ -54,6 +54,7 @@ C/C++ Indexer Progress Bar

    IBM Corporation Statement

    +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_o_dbg_concepts.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_o_dbg_concepts.htm index 31836ceed8a..3259ac0acd5 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_o_dbg_concepts.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_o_dbg_concepts.htm @@ -9,8 +9,8 @@ - -

    Debug

    +
    +

    Debug

    This section describes CDT debug concepts.

    Breakpoints
    @@ -18,6 +18,6 @@ Debug information

    IBM Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_o_edit.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_o_edit.htm index 74b1aa0d6d6..fc22a9fed55 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_o_edit.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_o_edit.htm @@ -9,13 +9,13 @@ - -

    Editing C/C++ Files

    +
    +

    Editing C/C++ Files

    This section provides information on editing C/C++ files.

    C/C++ editor
    Makefile

    IBM Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_o_home.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_o_home.htm index d4d85b27755..ea5e422bc4d 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_o_home.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_o_home.htm @@ -8,8 +8,8 @@ - -

    C/C++ Development User Guide

    +
    +

    C/C++ Development User Guide

    The C/C++ Development Toolkit (CDT) is a collection of Eclipse-based features that provides the capability to create, edit, navigate, build, and debug projects that use C and/or C++ as a programming language.

    @@ -31,6 +31,6 @@ not, the base CDT does provide support for integration with the GNU tools for bu Reference

    What's new
    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/concepts/cdt_o_nav.htm b/doc/org.eclipse.cdt.doc.user/concepts/cdt_o_nav.htm index d7099d39d31..7d02f027365 100644 --- a/doc/org.eclipse.cdt.doc.user/concepts/cdt_o_nav.htm +++ b/doc/org.eclipse.cdt.doc.user/concepts/cdt_o_nav.htm @@ -9,8 +9,8 @@ - -

    Navigation Aids

    +
    +

    Navigation Aids

    This section provides information on navigating through the C/C++ Perspective.

    Outline View
    Project File views
    @@ -24,6 +24,6 @@ Make Targets View
    -->

    IBM Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/contexts_CDT_DEBUGGER_DSFGDB.xml b/doc/org.eclipse.cdt.doc.user/contexts_CDT_DEBUGGER_DSFGDB.xml index f5fe3e23822..1130ab9c6a6 100644 --- a/doc/org.eclipse.cdt.doc.user/contexts_CDT_DEBUGGER_DSFGDB.xml +++ b/doc/org.eclipse.cdt.doc.user/contexts_CDT_DEBUGGER_DSFGDB.xml @@ -2,7 +2,7 @@ - + ]> @@ -12,12 +12,10 @@ label="&defaultCSHelp;"/> - Control the behavior of the C/C++ debugger when debugging with GDB, specifically when using a GDB (DSF) launcher. - + Control the behavior of the C/C++ debugger when debugging with GDB, specifically when using a GDB (DSF) launcher. Click below to see detailed help. + This checkbox controls whether the CDT debugger will ask gdb for the target program's thread list on each suspend event (breakpoint-hit, step, etc). Normally, this isn't necessary, as GDB sends notifications in realtime when a thread is created or destroyed. However, some lightweight GDB remote stubs won't send these notifications. As such, the CDT debugger doesn't find out about new or destroyed threads unless it polls gdb. Turn on this option if you are debugging such a target (typically an embedded one). - - diff --git a/doc/org.eclipse.cdt.doc.user/getting_started/cdt_o_tutorial.htm b/doc/org.eclipse.cdt.doc.user/getting_started/cdt_o_tutorial.htm index b4604a5faec..e56c2d384de 100644 --- a/doc/org.eclipse.cdt.doc.user/getting_started/cdt_o_tutorial.htm +++ b/doc/org.eclipse.cdt.doc.user/getting_started/cdt_o_tutorial.htm @@ -7,7 +7,8 @@ -

    Getting Started

    +
    +

    Getting Started

    The following tutorials guide you through the process of using the C/C++ Development Toolkit (CDT) to:

    @@ -42,6 +43,7 @@ CDT Home

    QNX Software Systems Copyright Statement

    +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_basic.htm b/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_basic.htm index 0ff6ed3bb5d..9db5c363982 100644 --- a/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_basic.htm +++ b/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_basic.htm @@ -13,7 +13,7 @@ function newWin(url) { --> -

    Tutorial: Creating a simple application

    +

    Tutorial: Creating a simple application

    In this tutorial, you will use the CDT to create a simple 'Hello World' application. This tutorial describes the process of creating a new C++ project where the build is @@ -162,5 +162,5 @@ The Console also shows which application is running in a title


    QNX Software Systems Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_build.htm b/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_build.htm index e29e21fc1be..dde9e59c20c 100644 --- a/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_build.htm +++ b/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_build.htm @@ -14,7 +14,7 @@ function newWin(url) { --> -

    Building a project

    +

    Building a project

    The make output and build progress information displays in the Console view. The Make Targets view displays makefile actions, and the @@ -61,5 +61,5 @@ C/C++ Properties window
    href="cdt_w_newmake.htm">Back: Creating a makefile

    QNX Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_debug.htm b/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_debug.htm index 0cfecec6297..998b070f848 100644 --- a/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_debug.htm +++ b/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_debug.htm @@ -10,7 +10,7 @@ -

    Debugging a project

    +

    Debugging a project

    The debugger lets you control the execution of your program by setting breakpoints, suspending executed programs, stepping through your code, and @@ -69,7 +69,7 @@ examining the contents of variables.

  • In the left margin of the main.cpp window, double-click to set a breakpoint on:

    -  cout << "You just entered" +  cout << You just entered

    You'll see a blue circle (Breakpoint) there indicating the breakpoint is set.
    @@ -127,6 +127,6 @@ examining the contents of variables.

     

    QNX Copyright Statement - +

  • \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_existing_code.htm b/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_existing_code.htm index 8cf61e38716..ca040c2624a 100644 --- a/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_existing_code.htm +++ b/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_existing_code.htm @@ -9,7 +9,7 @@ -

    Importing your C/C++ source files into Eclipse

    +

    Importing your C/C++ source files into Eclipse

    Using the CVS Repository Exploring perspective, you can check out modules or directories into existing projects, or create new @@ -206,6 +206,6 @@ appropriate "root folder" to import from.

    QNX Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_import.htm b/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_import.htm index 06da44a03f6..5afd41bd604 100644 --- a/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_import.htm +++ b/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_import.htm @@ -13,7 +13,7 @@ function newWin(url) { -

    Tutorial: Importing an existing project

    +

    Tutorial: Importing an existing project

    The following tutorial takes you though the process of importing a 'legacy' application using the CDT.

    @@ -86,7 +86,7 @@ function newWin(url) {
    • Open the project properties (right mouse on project name in the Project Explorer view and select Properties at the bottom on the context menu).
    • -
    • On the C/C++ Build Page, on its Builder Settings tab, uncheck "Use default build command" +
    • On the C/C++ Build Page, on its Builder Settings tab, uncheck Use default build command and change the make command to make -f hello.mak since our makefile is not named the default makefile.

      Click @@ -132,7 +132,7 @@ name, hello.e because that's what our makefile hello.makClick here to see an illustration (displayed in a separate window).

        -
      • If you see the error "[Debugger]: No debugger available", select the Debugger tab +
      • If you see the error [Debugger]: No debugger available, select the Debugger tab and choose a valid debugger for your platform (e.g. gdb/mi).
      @@ -144,5 +144,5 @@ name, hello.e because that's what our makefile hello.makThe application runs in the Console view. The Console also shows which application it is currently running in the title bar. You can configure the view to display different elements, such as user input elements using different colors.

      QNX Copyright Statement - +
    diff --git a/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_install_cdt.htm b/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_install_cdt.htm index 9eb9c82ed27..d8a575c4c7d 100644 --- a/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_install_cdt.htm +++ b/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_install_cdt.htm @@ -25,7 +25,7 @@ function newWin(url) { -

    Installing and updating the CDT

    +

    Installing and updating the CDT

    You can use the Software Updates manager to quickly install or update the CDT directly from the Eclipse workbench using your internet connection.

    @@ -82,6 +82,6 @@ function newWin(url) { QNX Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_newcpp.htm b/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_newcpp.htm index 681baa8e4f0..0f980701660 100644 --- a/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_newcpp.htm +++ b/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_newcpp.htm @@ -10,7 +10,7 @@ -

    Creating your C++ file

    +

    Creating your C++ file

    You can begin coding your HelloWorld program. The .cpp file that you create will be saved in the project folder you just created @@ -34,7 +34,7 @@ bar, displays icons for items such as bookmarks, breakpoints, and compiler erro folder, and select New > Source File.

  • In the Source file: field, type main.cpp.
    By default the source folder should be your project folder. -
    The template selected is probably "Default C/C++ Source Template." +
    The template selected is probably Default C/C++ Source Template.
  • Click Finish.
  • A Comment template probably appears at the top of an otherwise empty file. @@ -48,13 +48,13 @@ using namespace std; int main () { // Say Hello five times for (int index = 0; index < 5; ++index) - cout << "HelloWorld!" << endl; + cout << HelloWorld! << endl; char input = 'i'; - cout << "To exit, press 'm'" << endl; + cout << To exit, press 'm' << endl; while(input != 'm') { cin >> input; - cout << "You just entered " << input - << " you need to enter m to exit." << endl; + cout << You just entered << input + << you need to enter m to exit. << endl; } exit(0); } @@ -91,6 +91,6 @@ can build your HelloWorld project, you must create a makefile.

    IBM Copyright Statement - +

  • diff --git a/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_newmake.htm b/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_newmake.htm index 0841251c4cf..927698d91b7 100644 --- a/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_newmake.htm +++ b/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_newmake.htm @@ -15,7 +15,7 @@ function newWin(url) { -

    Creating a makefile

    +

    Creating a makefile

    For the purpose of this tutorial, you were instructed to create a C++ Project which requires you to create a makefile.

    @@ -78,6 +78,6 @@ contains main.cpp and makefile. You can now build your HelloWorld project.

    IBM Copyright Statement - +

    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_newproj.htm b/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_newproj.htm index cfe4829423b..48dec435d7d 100644 --- a/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_newproj.htm +++ b/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_newproj.htm @@ -13,7 +13,7 @@ function newWin(url) { -

    Creating a Makefile project

    +

    Creating a Makefile project

    This tutorial describes the process of creating a new C++ project that includes a makefile, and debugging the program.

    @@ -116,5 +116,5 @@ href="../reference/cdt_o_proj_prop_pages.htm">C/C++ Projects view

    QNX Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_prepare_workbench.htm b/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_prepare_workbench.htm index 01be64da5b3..cb38ccad617 100644 --- a/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_prepare_workbench.htm +++ b/doc/org.eclipse.cdt.doc.user/getting_started/cdt_w_prepare_workbench.htm @@ -15,7 +15,7 @@ function newWin(url) { -

    Preparing the Workbench

    +

    Preparing the Workbench

    This tutorial will get you started using the C/C++ Development Toolkit (CDT) in the Workbench.

    First, you will verify that the workbench is properly configured for C/C++ development. It is assumed that:

    @@ -67,5 +67,5 @@ To reset the current perspective to its original layout, from the menu bar selec

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/getting_started/hw_example.htm b/doc/org.eclipse.cdt.doc.user/getting_started/hw_example.htm index 4dc9597f92d..f5abc5c17bd 100644 --- a/doc/org.eclipse.cdt.doc.user/getting_started/hw_example.htm +++ b/doc/org.eclipse.cdt.doc.user/getting_started/hw_example.htm @@ -6,7 +6,8 @@ C++ Hello World example -

    Copy the code below and paste it into the main.cpp file in the Editor view:

    +
    +Copy the code below and paste it into the main.cpp file in the Editor view:

     #include <iostream>
    @@ -26,5 +27,5 @@ int main()
     
     
    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/getting_started/make_example.htm b/doc/org.eclipse.cdt.doc.user/getting_started/make_example.htm index bfb6452b470..86a51a138a0 100644 --- a/doc/org.eclipse.cdt.doc.user/getting_started/make_example.htm +++ b/doc/org.eclipse.cdt.doc.user/getting_started/make_example.htm @@ -6,7 +6,8 @@ C++ Makefile example -

    Copy the script below and paste it into the makefile file in the Editor view:

    +
    +

    Copy the script below and paste it into the makefile file in the Editor view:

     all: hello
    @@ -22,5 +23,5 @@ main.o: main.cpp
     
     
    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/images/cdt_dsfgdb_preferences_page.png b/doc/org.eclipse.cdt.doc.user/images/cdt_dsfgdb_preferences_page.png index c810b8743c8..73e67454fb4 100644 Binary files a/doc/org.eclipse.cdt.doc.user/images/cdt_dsfgdb_preferences_page.png and b/doc/org.eclipse.cdt.doc.user/images/cdt_dsfgdb_preferences_page.png differ diff --git a/doc/org.eclipse.cdt.doc.user/notices.html b/doc/org.eclipse.cdt.doc.user/notices.html index 03889381610..af4b9ab03cd 100644 --- a/doc/org.eclipse.cdt.doc.user/notices.html +++ b/doc/org.eclipse.cdt.doc.user/notices.html @@ -8,7 +8,8 @@ Legal Notices -

    +
    +

    Notices

    The material in this guide is Copyright (c) IBM Corporation and others @@ -18,5 +19,6 @@ The material in this guide is Copyright (c) IBM Corporation and others Terms and conditions regarding the use of this guide.

    +
    diff --git a/doc/org.eclipse.cdt.doc.user/pom.xml b/doc/org.eclipse.cdt.doc.user/pom.xml index 337e431b85e..5c69a990f52 100644 --- a/doc/org.eclipse.cdt.doc.user/pom.xml +++ b/doc/org.eclipse.cdt.doc.user/pom.xml @@ -10,7 +10,7 @@ ../../pom.xml - 5.2.0-SNAPSHOT + 5.3.0-SNAPSHOT org.eclipse.cdt.doc.user eclipse-plugin diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_o_ceditor_pref.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_o_ceditor_pref.htm index d439040fa1b..7606aa07820 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_o_ceditor_pref.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_o_ceditor_pref.htm @@ -10,7 +10,7 @@ -

    C/C++ editor preferences

    +

    C/C++ editor preferences

    This section describes how to set preferences for the C/C++ editor.

    @@ -29,5 +29,5 @@

    IBM Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_o_dbg_view.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_o_dbg_view.htm index 15f079afc08..dcfda0acf28 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_o_dbg_view.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_o_dbg_view.htm @@ -10,7 +10,7 @@ -

    Debug views

    +

    Debug views

    This section describes debug views.

    @@ -25,6 +25,6 @@

    IBM Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_o_menu.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_o_menu.htm index 25c86453bc8..18cf71e4c7f 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_o_menu.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_o_menu.htm @@ -9,7 +9,7 @@ -

    C/C++ Menubar

    +

    C/C++ Menubar

    This section describes the menubar options available from the C/C++ perspective.

    CDT main menu @@ -32,5 +32,5 @@ alt="CDT main menu"> Window Menu actions

    IBM Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_o_mproj_pref.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_o_mproj_pref.htm index 13229e69e2b..2f6f6ebd98e 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_o_mproj_pref.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_o_mproj_pref.htm @@ -10,7 +10,7 @@ -

    Managed Make Project preferences

    +

    Managed Make Project preferences

    Customizes the managed make project settings for the entire workspace.

    @@ -25,5 +25,5 @@ entire workspace.

    Settings

    Intel Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_o_mproj_pref_macro.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_o_mproj_pref_macro.htm index 5978b031e29..10d80c4d2c1 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_o_mproj_pref_macro.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_o_mproj_pref_macro.htm @@ -10,7 +10,7 @@ -

    Managed Make Project preferences, Build Macros

    +

    Managed Make Project preferences, Build Macros

    Customizes the build macros for all managed make projects in the workspace.

    Managed Build Macros Preference page

    @@ -37,5 +37,5 @@ Project Properties, Managed, C/C++ Build, Macros

    Managed Build Project preferences, Environment

    Intel Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_o_new_mproj.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_o_new_mproj.htm index 775f2f423c1..893fe8ede21 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_o_new_mproj.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_o_new_mproj.htm @@ -10,7 +10,7 @@ -

    C/C++ New Project Wizard, Managed Make Project

    +

    C/C++ New Project Wizard, Managed Make Project

    This section describes properties for creating a Managed make project in the C/C++ New Project Wizard.

    Name
    Select a @@ -21,5 +21,5 @@ Project Type

    IBM Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_o_new_sproj.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_o_new_sproj.htm index f6816658376..4f6d95f3b21 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_o_new_sproj.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_o_new_sproj.htm @@ -10,7 +10,7 @@ -

    C/C++ New Project Wizard, Standard Make Project

    +

    C/C++ New Project Wizard, Standard Make Project

    This section describes properties for creating a Standard make project in the C/C++ New Project Wizard.

    Name
    Referenced Projects
    @@ -22,5 +22,5 @@

    IBM Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_o_proj_prop_pages.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_o_proj_prop_pages.htm index 6ed1fda8c69..c9950c52934 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_o_proj_prop_pages.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_o_proj_prop_pages.htm @@ -10,7 +10,7 @@ -

    New CDT Project Wizard

    +

    New CDT Project Wizard

    In this section, learn about the C/C++ New CDT Project Wizard.

    New CDT Project Wizard preferences
    @@ -23,5 +23,5 @@

    Nokia Copyright Statement
    IBM Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_o_prop_file.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_o_prop_file.htm index 24738825642..f2546bb3592 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_o_prop_file.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_o_prop_file.htm @@ -10,7 +10,7 @@ -

    C/C++ File Properties

    +

    C/C++ File Properties

    This section describes properties for a Source Files in CDT project

    Intel Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_o_prop_folder.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_o_prop_folder.htm index 5e78a2538c0..61a608335c5 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_o_prop_folder.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_o_prop_folder.htm @@ -10,7 +10,7 @@ -

    C/C++ Folder Properties

    +

    C/C++ Folder Properties

    This section describes properties for a CDT project Folder

    Intel Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_o_prop_proj.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_o_prop_proj.htm index 1f7f08e3a47..07d61f51a60 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_o_prop_proj.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_o_prop_proj.htm @@ -10,7 +10,7 @@ -

    Project Properties

    +

    Project Properties

    This section describes C/C++ Project Properties. To select project properties, right click a project and select Properties.

    @@ -76,5 +76,5 @@ To select project properties, right click a project and select Propertie

    Intel Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_o_ref.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_o_ref.htm index 749ffa3c5ed..a0b8005d768 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_o_ref.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_o_ref.htm @@ -9,7 +9,7 @@ -

    Reference

    +

    Reference

    This section describes the Views, Windows, Dialog Boxes, and Preference Panels available from the C/C++ perspective.

    C/C++ Views and Editors
    @@ -111,5 +111,5 @@ Nokia Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_o_run_dbg_pages.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_o_run_dbg_pages.htm index de31bae42ab..0e0ce4ac300 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_o_run_dbg_pages.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_o_run_dbg_pages.htm @@ -10,7 +10,7 @@ -

    Run and Debug

    +

    Run and Debug

    Types of Launch configurations supported by CDT

    C/C++ Local Application - run application on local host
    @@ -27,5 +27,5 @@

    IBM Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_o_views.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_o_views.htm index b2bbe1d9765..c831898a898 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_o_views.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_o_views.htm @@ -10,7 +10,7 @@ -

    C/C++ Views and Editors

    +

    C/C++ Views and Editors

    This section describes views and editors of the C/C++ perspective.

    Selecting Views and Editors
    @@ -41,5 +41,5 @@

    IBM Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_appearance_pref.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_appearance_pref.htm index 7ae389775f2..d91759b2631 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_appearance_pref.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_appearance_pref.htm @@ -11,7 +11,7 @@ -

    Appearance preferences

    +

    Appearance preferences

    Use the Appearance panel of the Preferences window to customize the appearance of C elements in the viewers. Click Window > Preferences > C/C++ > Appearance to open.

    Appearance Preference

    @@ -69,6 +69,6 @@

    Nokia Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_code_style_pref.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_code_style_pref.htm index 8becabb4803..ce3bf383019 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_code_style_pref.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_code_style_pref.htm @@ -10,7 +10,7 @@ -

    Code Style preferences

    +

    Code Style preferences

    Use the Code Style preference panel to configure your global code style profiles for smart typing features, like auto-indentation and formatting. Click Window > Preferences > C/C++ > Code Style to make changes.

    Code Style Preferences

    @@ -80,6 +80,6 @@ C/C++ editor preferences

    IBM Copyright Statement - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_code_templates_pref.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_code_templates_pref.htm index 5235c658260..7172549b879 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_code_templates_pref.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_code_templates_pref.htm @@ -10,7 +10,7 @@ -

    +

    Code templates

    The @@ -323,5 +323,5 @@ The New File from Template wizard can be used to create new files based on one o C/C++ editor preferences

    IBM Copyright Statement - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_color.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_color.htm index 349e3454fd1..22f42c5b90e 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_color.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_color.htm @@ -11,7 +11,7 @@ -

    Syntax Coloring preferences

    +

    Syntax Coloring preferences

    Use the Syntax Coloring preference panel to specify how C/C++ source code is rendered. Each element category (Code, Comments, and Preprocessor) contains a list of language elements that may be rendered with its own color and style.

    Note that general text editor settings such as the background color can be configured on the general Text Editors preference pages. Fonts may be configured on the general Colors and Fonts preference page

    @@ -72,6 +72,6 @@
    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_con_assist.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_con_assist.htm index 993e6d26ebf..5c78ca61823 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_con_assist.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_con_assist.htm @@ -10,7 +10,7 @@ -

    Content Assist preferences

    +

    Content Assist preferences

    Use the Content Assist panel to customize the Content Assist feature in C/C++ editors.

    Content Assist Preferences Dialog Box

    @@ -72,6 +72,6 @@ C/C++ editor preferences

    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_con_assist_adv.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_con_assist_adv.htm index 20314995e58..de97d0b9307 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_con_assist_adv.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_con_assist_adv.htm @@ -10,7 +10,7 @@ -

    Advanced preferences

    +

    Advanced preferences

    Use the Advanced panel in the Preferences window to configure the behavior of the Content Assist (Ctrl+Space) command.

    Content Assist Preferences Dialog Box

    @@ -65,6 +65,6 @@ C/C++ editor preferences

    IBM Copyright Statement - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_folding.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_folding.htm index d43ae6ff49f..8ca3d5755d2 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_folding.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_folding.htm @@ -10,7 +10,7 @@ -

    Folding preferences

    +

    Folding preferences

    Use the Folding preference panel to customize the C/C++ editor folding behavior.

    Editor Folding Preferences Window

    @@ -95,6 +95,6 @@ C/C++ editor preferences

    IBM Copyright Statement - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_gen.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_gen.htm index 9dcb520d7b6..bc4e3f6f780 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_gen.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_gen.htm @@ -10,7 +10,7 @@ -

    Editor preferences

    +

    Editor preferences

    Use the Editor preference panel to control the appearance of text highlighting in C/C++ editors.

    Editor Preferences Panel

    @@ -67,6 +67,6 @@
    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_hov.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_hov.htm index 1e306889336..1497669e64f 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_hov.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_hov.htm @@ -10,7 +10,7 @@ -

    Hovers preferences

    +

    Hovers preferences

    Use the Hovers preference panel to customize the C/C++ editor hover behavior.

    Editor Hover Preferences Panel

    @@ -59,6 +59,6 @@ C/C++ editor preferences

    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_mark_occurrences.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_mark_occurrences.htm index bce0bca2779..3323d3dbb9f 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_mark_occurrences.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_mark_occurrences.htm @@ -9,7 +9,7 @@ -

    Mark Occurrences preferences

    +

    Mark Occurrences preferences

    Use the Mark Occurrences preference panel to set annotations for the C/C++ Editor view.

    Mark Occurrences Preference Panel

    @@ -57,5 +57,5 @@
    C/C++ editor preferences

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_save_actions.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_save_actions.htm index 6eca520e957..04483eaec55 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_save_actions.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_save_actions.htm @@ -10,7 +10,7 @@ -

    Save actions

    +

    Save actions

    Use the Save Actions preference panel to configure actions performed by the C/C++ editor while saving a file.

    Save Actions Preferences

    @@ -52,6 +52,6 @@
    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_scalability.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_scalability.htm index b0272dc0288..bd2fb26d32c 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_scalability.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_scalability.htm @@ -10,7 +10,7 @@ -

    Scalability preferences

    +

    Scalability preferences

    Use the Scalability preference panel to configure options for dealing with large source files.

    Scalability Preferences

    @@ -78,6 +78,6 @@ Code Style preferences

    IBM Copyright Statement - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_typing.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_typing.htm index 07c2aa75e7c..4ffc6217287 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_typing.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_editor_typing.htm @@ -10,7 +10,7 @@ -

    Typing preferences

    +

    Typing preferences

    Use the Typing preference panel to assist in formatting input as you type.

    Typing Preferences

    @@ -80,6 +80,6 @@ Code Style preferences

    IBM Copyright Statement - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_file_types.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_file_types.htm index beb50cc2c79..eedccb3ae1f 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_file_types.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_file_types.htm @@ -10,7 +10,7 @@ -

    File Types preference (C/C++)

    +

    File Types preference (C/C++)

    Use the File Types preference panel to define which file extensions are linked to specific languages.

    File Types Preference Panel

    @@ -47,6 +47,6 @@ C/C++ editor preferences

    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_pref.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_pref.htm index 6d682b68236..005234b3f0a 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_pref.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_c_pref.htm @@ -10,7 +10,7 @@ -

    C/C++ preferences

    +

    C/C++ preferences

    The C/C++ preference panel allows you to make changes to your C/C++ environment. Click Window > Preferences > C/C++ to view.

    C/C++ Main Preferences Window

    @@ -54,6 +54,6 @@ Views

    Intel Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_call_hierarchy_view.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_call_hierarchy_view.htm index 72ac6f8f195..4246b9787cb 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_call_hierarchy_view.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_call_hierarchy_view.htm @@ -10,7 +10,7 @@ -

    Call Hierarchy view

    +

    Call Hierarchy view

    The Call Hierarchy view shows the loaded callers and callees for a selected C/C++ function. Right-click a function name in a source file and select Open Call Hierarchy to open a Call Hierarchy view, if none is open, and show the function's callers.

    @@ -115,6 +115,6 @@ Views


    Nokia Copyright Statement - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_code_temp.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_code_temp.htm index 327b7f707b6..a5c448fea02 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_code_temp.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_code_temp.htm @@ -10,7 +10,7 @@ -

    Templates preferences

    +

    Templates preferences

    Use the Templates preference panel to manipulate any of the common templates predefined within CDT or create your own. To modify, delete, export, import, or create your own templates click Window > Preferences > C/C++ > Templates.

    @@ -74,6 +74,6 @@ import, or create your own templates click Window > Preferences > C/C++ editor preferences

    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_console_pref.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_console_pref.htm index 7490d39cc26..6ed08182645 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_console_pref.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_console_pref.htm @@ -11,7 +11,7 @@ -

    Console preferences

    +

    Console preferences

    Use the Console preference panel to customize the appearance of messages that appear in the Console view.

    Console Preferences Panel

    @@ -88,6 +88,6 @@
    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_console_view.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_console_view.htm index f93e0060619..d601d90e68b 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_console_view.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_console_view.htm @@ -9,7 +9,7 @@ -

    Console view

    +

    Console view

    The Console view displays the output of a process and allows you to provide keyboard input to a process. There are numerous consoles available, see the Open Console dropdown list for those available to you.

    Console View

    @@ -149,5 +149,5 @@ you see one or more of the following options in a context menu depending on the Red Hat Copyright Statement
    IBM Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_cproj_view.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_cproj_view.htm index efb83cf0cca..161d8db37cb 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_cproj_view.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_cproj_view.htm @@ -10,7 +10,7 @@ -

    C/C++ Projects view

    +

    C/C++ Projects view

    Note: This view is not supported anymore. It is recommended to use the Project Explorer view.

    The C/C++ Project view displays, in a tree structure, only elements relevant to C and C++ project files, similar to the Project Explorer view. In this view you can do the following: @@ -243,5 +243,5 @@ This view is not supported anymore. It is recommended to use the

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_create_make_target.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_create_make_target.htm index 1b62ebd1acb..db8623f83be 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_create_make_target.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_create_make_target.htm @@ -9,7 +9,7 @@ -

    Create a Make Target

    +

    Create a Make Target

    Use the Create a Make Target dialog box to define build settings when creating a Make Target.

    @@ -65,6 +65,6 @@ IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_dbg_breadcrumb.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_dbg_breadcrumb.htm index 3af5ca9e8ae..f5e7addcbd6 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_dbg_breadcrumb.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_dbg_breadcrumb.htm @@ -8,7 +8,7 @@ -

    Debug Breadcrumb

    +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_dbg_brkpt_actions.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_dbg_brkpt_actions.htm index 1273d8a39b5..944c102afe2 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_dbg_brkpt_actions.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_dbg_brkpt_actions.htm @@ -10,7 +10,7 @@ -

    Breakpoint Actions preferences

    +

    Breakpoint Actions preferences

    Use the Breakpoint Actions page in the Preferences window to create, edit, and remove breakpoint actions. The breakpoint actions defined here are available to all projects in the current workspace.

    Breakpoint Actions preference page

    @@ -50,6 +50,6 @@
    Nokia Copyright Statement - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_dbg_pref.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_dbg_pref.htm index de013804f14..308a788d9db 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_dbg_pref.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_dbg_pref.htm @@ -9,7 +9,7 @@ -

    Debug preferences

    +

    Debug preferences

    The C/C++ Debug panel controls general settings for C/C++ debugging.

    C/C++ Debug preferences panel

    @@ -62,6 +62,6 @@ Views

    Nokia Copyright Statement
    IBM Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_dbg_src.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_dbg_src.htm index dbf2329503b..a6e5346907a 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_dbg_src.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_dbg_src.htm @@ -10,7 +10,7 @@ -

    Source Lookup Path preference

    +

    Source Lookup Path preference

    Use the Source Lookup Path preference page to add or remove source containers.

    @@ -66,6 +66,6 @@

    Nokia Copyright Statement
    IBM Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_dbg_view.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_dbg_view.htm index 621605e0671..9b0eabb53c0 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_dbg_view.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_dbg_view.htm @@ -11,7 +11,7 @@ -

    Debug view

    +

    Debug view

    The Debug view shows the target debugging information in a tree hierarchy.

    Debug view

    @@ -333,6 +333,6 @@ debugging attached processes). Nokia Copyright Statement
    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_debug.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_debug.htm index df0f3b6e848..7fbad746f99 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_debug.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_debug.htm @@ -10,7 +10,7 @@ -

    Debug preferences

    +

    Debug preferences

    Use the Debug preference panel in the Preferences window to manage common globally defined debug settings.

    Debug Preferences @@ -63,5 +63,5 @@

    IBM Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_discovery_preferences.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_discovery_preferences.htm index 92411733d6b..8e44c338ed3 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_discovery_preferences.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_discovery_preferences.htm @@ -9,7 +9,7 @@ -

    Discovery Options page, C/C++ Preferences window

    +

    Discovery Options page, C/C++ Preferences window

    You can define the discovery options on the Discovery Options page of a C/C++ Preferences window.

    @@ -30,6 +30,6 @@

    IBM Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_dissassembly_view.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_dissassembly_view.htm index 4cc2773ac5e..9939e553839 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_dissassembly_view.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_dissassembly_view.htm @@ -10,7 +10,7 @@ -

    Disassembly view

    +

    Disassembly view

    The Disassembly view shows the loaded program as assembler instructions mixed with source code for comparison. The currently executing line is indicated by an arrow marker and highlighted in the view. You can do the following tasks in the Disassembly view:

    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_dsfgdb.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_dsfgdb.htm index f07bf3a3a33..cf041783ff3 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_dsfgdb.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_dsfgdb.htm @@ -10,9 +10,9 @@ -

    GDB Debugging Preferences

    +

    GDB Debugging Preferences

    -

    Use the GDB preferences panel to control how the CDT debugger behaves when debugging with GDB, +

    Use this preferences panel to control how the CDT debugger behaves when debugging with GDB, specifically when using a GDB (DSF) launcher.

    GDB preferences panel

    @@ -20,34 +20,124 @@ specifically when using a GDB (DSF) launcher.

    - - + + + + - + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + +
    GDB Preference Panel Options
    Category Option Description
    Enable GDB tracesWhen checked, the debug session will produce an additional console which will contain all the gdb/mi activity. Basically, this details the - interaction between the CDT debugger and GDB. This information is often critical when the debugger is not behaving as you expect. Turn this on and submit - the console output when submitting a bugzilla report against the CDT debugger.Debug Configurations Defaults
    GDB debuggerSpecifies the GDB debugger binary that will be used by default for each + newly created debug launch. Using an absolute path will directly point to the binary (e.g, /home/user/myGdb), + while using a binary name will have CDT look through the PATH variable for that binary (e.g., myGdb). This can + be useful of your GDB binary is not named 'gdb'. Each launch configuration allows to override this setting in + the Debugger tab.
    GDB command fileSpecifies the GDB debugger command file that will be used by default for each + newly created debug launch. This can be useful if you often/always want to use a GDB command file for your launches. + Each launch configuration allows to override this setting in the Debugger tab.
    Stop on startupWhen checked, the CDT debugger will stop execution at the specified symbol when + launching or re-starting a process. By default, this setting makes the CDT debugger stop when entering 'main'.
    Command timeoutWhen checked, the CDT debugger will abort the debug session if any command sent + to GDB does not get an answer before the specified timeout. Using this can prevent debug sessions from hanging forever + when debugging un-reliable targets. +

    + Using the Advanced... button allows to set a different timeout for individual commands. A value of zero can be + used to specify "no timeout" for a particular command. MI commands must start with a hyphen ('-'). + For example, '-target-select'.

    Non-stop modeWhen checked, the CDT debugger will run in non-stop mode for each newly created + debug launch. Non-stop mode allows each thread of a debug session to be controlled independently. This allows to stop + one or more threads while leaving others running. In contrast, all-stop mode interrupts and resumes all threads at the + same time. Note that non-stop mode is only available starting with GDB 7.0.
    General Behavior
    Terminate GDB when last process exitsWhen checked, the CDT debugger will terminate the GDB host process after all the target processes it is debugging have terminated. Otherwise it will leave it running.When checked, the CDT debugger will terminate the GDB + process (on the host) after all the target processes it is debugging have terminated. Otherwise it + will leave it running. It can be useful to keep GDB running if you expect to want to attach or create + new processes to debug after the previously debugged processes have terminated.
    Use enhanced debug hoverWhen checked, hovering over an expression in the editor during a debug session will bring up an enhanced expression evaluation control. Otherwise, a more basic control is used. This, of course, assumes that you have the debugger's hovering capability turned on in C/C++ > Editor > Hovers. If not, this checkbox has no effect.
    - debug hover modes
    When checked, hovering over an expression in the editor during a + debug session will bring up an enhanced expression evaluation control. Otherwise, a more basic + control is used. This, of course, assumes that you have the debugger's hovering capability turned on in + C/C++ > Editor > Hovers. If not, this checkbox has no effect.
    + debug hover modes
    Show only suspended threads in the Debug viewWhen checked, the Debug view will only show threads that are suspended. + When dealing with a large number of threads, this helps focus on the threads being inspected. Obviously, + this option is only valuable in non-stop mode, where some threads can run while others are stopped.
    Enable GDB tracesWhen checked, the debug session will produce an additional console which + will contain all the gdb/mi activity. Basically, this details the interaction between the CDT debugger and GDB. + This information is often critical when the debugger is not behaving as you expect. Include this console output + when submitting a bugzilla report against the CDT debugger. It is recommended to keep this setting enabled at + all times, as it does not cause any negative effect.
    Pretty Printing
    Enable pretty printers in variable/expression treeWhen checked, the CDT Debugger will display STL types in a user-friendly + fashion. This can be seen in the Variables and Expressions views, as well as in the advanced editor hover. + For example, Maps, Lists and Vectors will be shown in an array-style format instead of showing the + details of the actual implementation of the data struture. Note that pretty printing requires a GDB that + has python support enabled and the user of STL pretty-printers.
    For collections, initially limit child count toWhen using pretty printing, collections (e.g., Maps, Lists, etc) can contain + a large number of elements. Trying to display all this children at once can cause very poor responsiveness. This + value will limit the number of children displayed initially, while allowing the user to manually request more + children directly from the view.

    Related reference
    -GDB MI Debug preferences


    IBM Copyright Statement

    - +
    - \ No newline at end of file + diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_editor_view.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_editor_view.htm index 73263253d65..9ba6e6a9027 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_editor_view.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_editor_view.htm @@ -9,7 +9,7 @@ -

    Editor view

    +

    Editor view

    The C/C++ editor provides specialized features for editing C/C++ related files.

    C/C++ Editor

    Associated with the editor is a C/C++-specific Outline view, @@ -34,6 +34,6 @@ and key binding actions.

    IBM Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_environment_pref.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_environment_pref.htm index 93e6d4e482b..e136a355b13 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_environment_pref.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_environment_pref.htm @@ -11,7 +11,7 @@ -

    Environment preferences

    +

    Environment preferences

    Use the Environment preference panel to define environment variables and their use.

    Environment Preference

    @@ -65,6 +65,6 @@

    Nokia Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fileprop_discovery.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fileprop_discovery.htm index 48c38725e58..1c31cec923e 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fileprop_discovery.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fileprop_discovery.htm @@ -7,7 +7,7 @@ -

    C/C++ File Properties, Discovery Options

    +

    C/C++ File Properties, Discovery Options

    Use the Discovery Options property panel to define the discovery option properties of a C/C++ file's.

    @@ -125,5 +125,5 @@

    Intel Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fileprop_inc.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fileprop_inc.htm index c15d6e5f16a..0cbc6ee74cd 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fileprop_inc.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fileprop_inc.htm @@ -9,7 +9,7 @@ -

    C/C++ File Properties, Paths and Symbols, Includes

    +

    C/C++ File Properties, Paths and Symbols, Includes

    Use the Paths and Symbols properties panel Includes tab to modify the list of included paths and change the order in which they are referenced.

    C/C++ File Properties, Paths and Symbols, Includes

    @@ -105,6 +105,6 @@

    Intel Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fileprop_lang_mapp.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fileprop_lang_mapp.htm index faaedfdf111..950e1ce217c 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fileprop_lang_mapp.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fileprop_lang_mapp.htm @@ -10,7 +10,7 @@ -

    Language Mappings preferences

    +

    Language Mappings preferences

    Use the Language Mappings properties panel to customize the use of C/C++ language associations for the file.

    Language Mappings preference page

    @@ -52,6 +52,6 @@

    Nokia Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fileprop_lng.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fileprop_lng.htm index eb4d794bb7d..3b2b06bd6b1 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fileprop_lng.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fileprop_lng.htm @@ -7,7 +7,7 @@ -

    C/C++ File Properties, Language mappings

    +

    C/C++ File Properties, Language mappings

    Customize the use of C/C++ language associations in the Language Mappings preference panel for individual files.

    C/C++ Project Properties, Language mapping

    @@ -34,5 +34,5 @@

    IBM Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fileprop_steps.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fileprop_steps.htm index 0c6c80302e6..76290364f82 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fileprop_steps.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fileprop_steps.htm @@ -7,7 +7,7 @@ -

    C/C++ File Properties, Build, Settings, Build Steps tab

    +

    C/C++ File Properties, Build, Settings, Build Steps tab

    Use the Build Steps properties panel to customize the selected build configuration allowing the specification of user defined build command steps, as well as a descriptive message to be displayed in the build output, immediately prior to and immediately after normal build processing executes. @@ -80,5 +80,5 @@ build output, immediately prior to and immediately after normal build processing

    Intel Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fileprop_sym.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fileprop_sym.htm index 63d8e8a10ca..3b089bed81d 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fileprop_sym.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fileprop_sym.htm @@ -9,7 +9,7 @@ -

    C/C++ File Properties, Paths and Symbols, Symbols

    +

    C/C++ File Properties, Paths and Symbols, Symbols

    Use the Paths and Symbols properties panel # Symbols tab to modify the list of preprocessor symbols.

    C/C++ File Properties, Paths and Symbols, Symbols

    @@ -99,6 +99,6 @@

    Intel Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fileprop_toolsettings.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fileprop_toolsettings.htm index da159460849..7beb016d754 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fileprop_toolsettings.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fileprop_toolsettings.htm @@ -7,7 +7,7 @@ -

    C/C++ File Properties, Build, Settings, Tool settings tab

    +

    C/C++ File Properties, Build, Settings, Tool settings tab

    Customizes the tools and tool options used in your build configuration.

    C/C++ File Properties, Build, Settings, Tool Settings tab

    @@ -106,5 +106,5 @@ Customizes the tools and tool options used in your build configuration.

    Intel Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_find_replace.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_find_replace.htm index 725820aa63e..382b6d017e5 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_find_replace.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_find_replace.htm @@ -7,7 +7,7 @@ C/C++ Find/Replace -

    C/C++ Find/Replace

    +

    C/C++ Find/Replace

    Ctrl+F (or Edit > Find/Replace) displays the Find/Replace dialog. Here you can specify text to search for and optionally text with which to replace it.

    @@ -54,5 +54,5 @@ of incremental find in the Status Line.

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fprop_discovery.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fprop_discovery.htm index cef94f6d29d..19954c90c84 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fprop_discovery.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fprop_discovery.htm @@ -7,7 +7,7 @@ -

    C/C++ Folder Properties, Discovery Options

    +

    C/C++ Folder Properties, Discovery Options

    You can define the discovery options on the Discovery Options page of a C/C++ project's properties window.

    @@ -126,5 +126,5 @@ of a C/C++ project's properties window.

    Intel Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fprop_resource.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fprop_resource.htm index d04b42e252d..638a498617a 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fprop_resource.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fprop_resource.htm @@ -7,7 +7,7 @@ -

    C/C++ Folder Properties, Resource

    +

    C/C++ Folder Properties, Resource

    C/C++ Folder Properties, Resource

    @@ -58,5 +58,5 @@

    Intel Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fprop_toolsettings.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fprop_toolsettings.htm index 210b968ddc6..7843918ff5e 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fprop_toolsettings.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_fprop_toolsettings.htm @@ -7,7 +7,7 @@ -

    C/C++ Folder Properties, Build, Settings, Tool settings tab

    +

    C/C++ Folder Properties, Build, Settings, Tool settings tab

    Customizes the tools and tool options used in your build configuration.

    C/C++ Folder Properties, Build, Settings, Tool settings tab

    @@ -110,5 +110,5 @@ Customizes the tools and tool options used in your build configuration.

    Intel Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_gdb_mi.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_gdb_mi.htm index 47cd52f3ee5..05f0e859ed1 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_gdb_mi.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_gdb_mi.htm @@ -11,7 +11,7 @@ -

    Debug GDB MI page, Preferences window

    +

    Debug GDB MI page, Preferences window

    Use the GDB MI preference panel to manipulate certain GDB timeout settings.

    Debug GDB MI Preferences

    @@ -51,6 +51,6 @@ GDB Debugging preferences


    IBM Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_icons.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_icons.htm index 4915f85da61..1b4a1683a90 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_icons.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_icons.htm @@ -12,7 +12,7 @@ Provides a structural view of your code. END INFOPOP--> -

    C/C++ Icons

    +

    C/C++ Icons

    The table below lists the icons displayed in the C/C++ perspective.

    @@ -134,6 +134,6 @@ C/C++ Projects view


    Views

    IBM Copyright Statement. - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_include_browser_view.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_include_browser_view.htm index f193e688329..33ecf67ad38 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_include_browser_view.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_include_browser_view.htm @@ -8,7 +8,7 @@ -

    +

    Include Browser view

    @@ -169,5 +169,5 @@


    Nokia Copyright Statement - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_indexer_preference.html b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_indexer_preference.html index 6d104f54cf8..95fc083c56f 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_indexer_preference.html +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_indexer_preference.html @@ -8,7 +8,7 @@ -

    Indexer preferences (C/C++)

    +

    Indexer preferences (C/C++)

    Use the Indexer preference panel to select the indexer used by default for new projects and configure its behavior.

    Indexer Preferences Window

    @@ -117,5 +117,5 @@ editor

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_language_mapping_pref.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_language_mapping_pref.htm index 67b72aa973c..d9d93139c2e 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_language_mapping_pref.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_language_mapping_pref.htm @@ -11,7 +11,7 @@ -

    Language Mappings preferences

    +

    Language Mappings preferences

    Use the Language Mappings preference panel to customize the use of C/C++ language associations for the workspace.

    Language Mappings preferences

    @@ -65,6 +65,6 @@

    Nokia Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_m_edit.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_m_edit.htm index 48c3bb35ee6..2e5fe91a171 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_m_edit.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_m_edit.htm @@ -8,7 +8,7 @@ -

    Edit Menu actions

    +

    Edit Menu actions

    Selecting Edit Menu

    @@ -192,5 +192,5 @@

    IBM Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_m_file.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_m_file.htm index b7059223524..2ef7d4914e5 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_m_file.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_m_file.htm @@ -10,7 +10,7 @@ -

    File Menu actions

    +

    File Menu actions

    Selecting File Menu

    @@ -137,5 +137,5 @@

    IBM Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_m_navigate.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_m_navigate.htm index 95628b33111..bad8cc190da 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_m_navigate.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_m_navigate.htm @@ -9,7 +9,7 @@ -

    Navigate Menu actions

    +

    Navigate Menu actions

    Selecting Navigate Menu

    @@ -146,5 +146,5 @@ Refer to the Java Development User Guide for details.

    IBM Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_m_project.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_m_project.htm index 760cdce0079..3ee5ce890cd 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_m_project.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_m_project.htm @@ -9,7 +9,7 @@ -

    Project Menu actions

    +

    Project Menu actions

    Selecting Project Menu

    @@ -86,5 +86,5 @@

    IBM Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_m_refactor.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_m_refactor.htm index af9c8eeb6c0..f9046de7912 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_m_refactor.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_m_refactor.htm @@ -9,7 +9,7 @@ -

    Refactor Menu actions

    +

    Refactor Menu actions

    Selecting Refactor Menu

    @@ -26,5 +26,5 @@

    Intel Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_m_run.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_m_run.htm index 614672e5b20..8bb92c2fecb 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_m_run.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_m_run.htm @@ -10,7 +10,7 @@ -

    Run Menu actions

    +

    Run Menu actions

    Run Menu

    @@ -75,5 +75,5 @@

    IBM Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_m_search.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_m_search.htm index ec109c8c366..c9fac4ae3ec 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_m_search.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_m_search.htm @@ -8,7 +8,7 @@ -

    Search Menu actions

    +

    Search Menu actions

    Search menu commands open the search dialog. There are specialized tabs on the general Search dialog to help you search for:

    • Files, or for text in files
    • @@ -64,5 +64,5 @@

      IBM Copyright Statement

      - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_m_window.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_m_window.htm index 0042ff84b13..00118d4304c 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_m_window.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_m_window.htm @@ -8,7 +8,7 @@ -

    Window Menu actions

    +

    Window Menu actions

    Window Menu

    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_make_pref.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_make_pref.htm index 7a29bb38036..6ca13f56343 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_make_pref.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_make_pref.htm @@ -11,7 +11,7 @@ -

    Make Targets preferences

    +

    Make Targets preferences

    Use the Make Targets preference panel in the Preferences window to set make target options.

    @@ -68,6 +68,6 @@

    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_make_settings_pref.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_make_settings_pref.htm index 9288da3666a..aa6b95aae94 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_make_settings_pref.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_make_settings_pref.htm @@ -11,7 +11,7 @@ -

    Settings preferences

    +

    Settings preferences

    Use the Settings preference panel in the Preferences window to specify the Makefile style and include directories.

    @@ -66,6 +66,6 @@
    IBM Copyright Statement - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_make_targets_view.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_make_targets_view.htm index 0d3cf783e6f..b817fca4628 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_make_targets_view.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_make_targets_view.htm @@ -10,7 +10,7 @@ -

    Make Targets view

    +

    Make Targets view

    Use the Make Targets view to select the make targets you want to build in your workspace.

    @@ -79,5 +79,5 @@ IBM Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_makefile_settings_pref.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_makefile_settings_pref.htm index 2b5f8d253b5..247a92778fb 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_makefile_settings_pref.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_makefile_settings_pref.htm @@ -11,7 +11,7 @@ -

    Makefile Editor preferences

    +

    Makefile Editor preferences

    Use the Makefile Editor preference panel in the Preferences window to set syntax and folding options for the Makefile editor.

    @@ -73,6 +73,6 @@
    IBM Copyright Statement - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_mem_view_pref.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_mem_view_pref.htm index 14bbabff111..5144f141186 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_mem_view_pref.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_mem_view_pref.htm @@ -13,7 +13,7 @@ -

    Traditional Memory Rendering preferences

    +

    Traditional Memory Rendering preferences

    Use the Traditional Memory Rendering preference panel to change the appearance of the Memory view when displaying memory in traditional mode.

    C/C++ Projects View

    @@ -96,6 +96,6 @@ IBM Copyright Statement
    Nokia Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_memoryview.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_memoryview.htm index c739594b74d..814ffca12ad 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_memoryview.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_memoryview.htm @@ -12,7 +12,7 @@ -

    Memory view

    +

    Memory view

    The Memory view of the Debug perspective lets you monitor and modify your process memory. The process memory @@ -218,6 +218,6 @@ configured to display two renderings simultaneously.


    IBM Copyright Statement - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_mfile_build.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_mfile_build.htm index 052658032ce..9c22813f53b 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_mfile_build.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_mfile_build.htm @@ -7,7 +7,7 @@ -

    C/C++ Project Properties, Managed Make File, C/C++ Build

    +

    C/C++ Project Properties, Managed Make File, C/C++ Build

    Customizes the options used for a specific file in your build configuration. Select a tab in the Resource Configuration settings area to set a specific category of options. @@ -38,5 +38,5 @@ File, Info
    Build

    IBM Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_mfile_info.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_mfile_info.htm index b8714b93d36..1bd158d2144 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_mfile_info.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_mfile_info.htm @@ -7,7 +7,7 @@ -

    C/C++ Project Properties, Managed Make File, Info

    +

    C/C++ Project Properties, Managed Make File, Info

    C/C++ Project Properties, Managed Make File, Info

    @@ -31,5 +31,5 @@ File, C/C++ Build
    C++ Project Properties, Managed, Info

    IBM Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_mfile_rcbs.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_mfile_rcbs.htm index 06c623ae5d7..2651d23743f 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_mfile_rcbs.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_mfile_rcbs.htm @@ -7,7 +7,7 @@ -

    C/C++ Project Properties, Managed Make File, C/C++ Build, Custom +

    C/C++ Project Properties, Managed Make File, C/C++ Build, Custom Build Steps

    Customizes the selected build configuration allowing the specification of a user defined build command step @@ -62,5 +62,5 @@ File, Info
    C++ Project Properties, Managed, C/C++ Build, Tool Settings

    Intel Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_mfile_tool_settings.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_mfile_tool_settings.htm index e91ce49025b..7716667fefd 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_mfile_tool_settings.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_mfile_tool_settings.htm @@ -7,7 +7,7 @@ -

    C/C++ Project Properties, Managed Make File, C/C++ Build, Tool +

    C/C++ Project Properties, Managed Make File, C/C++ Build, Tool Settings

    Customizes the tools and tool options used by the selected file in your build configuration. @@ -36,5 +36,5 @@ File, Info
    Managed, C/C++ Build, Tool Settings

    IBM Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_modules_view.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_modules_view.htm index 3798cfaca37..4bafd780f89 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_modules_view.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_modules_view.htm @@ -13,7 +13,7 @@ -

    Modules view

    +

    Modules view

    The Modules view of the Debug perspective lets you view information about the modules loaded in the current @@ -77,6 +77,6 @@ source files, etc.

    IBM Copyright Statement
    Nokia Copyright Statement - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_navigator_view.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_navigator_view.htm index c6e20e44460..0c40db17a6f 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_navigator_view.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_navigator_view.htm @@ -10,7 +10,7 @@ -

    Navigator view

    +

    Navigator view

    The Navigator view provides a hierarchical view of the resources in the Workbench including hidden files.

    Navigator View

    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_new_proj_wiz.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_new_proj_wiz.htm index ceb99d54f51..18d725ce476 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_new_proj_wiz.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_new_proj_wiz.htm @@ -7,7 +7,7 @@ New Project Wizard -

    New Project Wizard

    +

    New Project Wizard

    The New Project wizard helps you create a new C or C++ project in the workbench. To access the wizard, from the menu bar select File > New > Project. @@ -51,5 +51,5 @@ ALT="Related concepts" width="143" height="21">
    Intel Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_new_proj_wiz_config.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_new_proj_wiz_config.htm index 4d0b97945c5..992b2887cf3 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_new_proj_wiz_config.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_new_proj_wiz_config.htm @@ -7,7 +7,7 @@ -

    New Project Wizard, Select configurations

    +

    New Project Wizard, Select configurations

    You can select configuration(s) from this page of the wizard.

    New Project Wizard, Select configurations

    @@ -67,5 +67,5 @@ ALT="Related concepts" width="143" height="21">
    Intel Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_new_proj_wiz_name.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_new_proj_wiz_name.htm index 5b24ca9e0d0..d7dbb81e2ab 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_new_proj_wiz_name.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_new_proj_wiz_name.htm @@ -7,7 +7,7 @@ -

    New Project Wizard - Select Name and Location

    +

    New Project Wizard - Select Name and Location

    Select a name for the project. You can also enter a new path for your project by deselecting the Use Default Location checkbox and entering the new path in the Location text box.

    @@ -57,5 +57,5 @@ ALT="Related concepts" width="143" height="21">

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_new_proj_wiz_toolchain.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_new_proj_wiz_toolchain.htm index 44e8917909e..febc2023cba 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_new_proj_wiz_toolchain.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_new_proj_wiz_toolchain.htm @@ -7,7 +7,7 @@ -

    New Project Wizard, Select a toolchain

    +

    New Project Wizard, Select a toolchain

    You can select toolchain(s) from this page of the wizard. A toolchain is a set of tools (such as a compiler, linker, and assembler) intended to build your project. Additional tools, such as a debugger, can be associated with a toolchain. There can be several toolchains available, depending on the project type you specify, and the compilers installed on your system.

    @@ -53,5 +53,5 @@ ALT="Related concepts" width="143" height="21">
    Intel Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_new_proj_wiz_type.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_new_proj_wiz_type.htm index b4c655c1f7d..4990b4c3846 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_new_proj_wiz_type.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_new_proj_wiz_type.htm @@ -7,7 +7,7 @@ -

    New Project Wizard, Select a Project Type

    +

    New Project Wizard, Select a Project Type

    You can select a type of project from this page of the wizard. This project type will determine the toolchain and data, and tabs that the CDT uses. Once created, C/C++ projects display in the C/C++ Projects view.

    New Project Wizard, Select a Project Type

    @@ -52,5 +52,5 @@ ALT="Related concepts" width="143" height="21">
    Intel Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_newproj_behavior.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_newproj_behavior.htm index 9dde37f9e99..abd1cdd37f3 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_newproj_behavior.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_newproj_behavior.htm @@ -9,7 +9,7 @@ -

    Makefile Project - Behavior page

    +

    Makefile Project - Behavior page

    Use the Behavior page in the Makefile Projects preference panel to define build behavior.

    Makefile project - behavior page

    @@ -73,6 +73,6 @@ IBM Copyright Statement
    Nokia Copyright Statement - + diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_newproj_buildset.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_newproj_buildset.htm index 1a8cedd586a..bf296fc0785 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_newproj_buildset.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_newproj_buildset.htm @@ -10,7 +10,7 @@ -

    Makefile Project - Builder Settings page

    +

    Makefile Project - Builder Settings page

    Use the Builder Settings page in the Makefile Projects preference panel to define build settings.

    Make Builder Preferences window

    @@ -65,6 +65,6 @@
    IBM Copyright Statement
    Nokia Copyright Statement - + diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_newproj_def_symb.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_newproj_def_symb.htm index 44a90c5be86..8cb2779458f 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_newproj_def_symb.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_newproj_def_symb.htm @@ -21,7 +21,7 @@ END INFOPOP--> -

    Manage defined symbols dialog box

    +

    Manage defined symbols dialog box

    You can manage preprocessor symbols from the Manage defined symbols dialog box.

    Project properties

    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_newproj_discovery_options.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_newproj_discovery_options.htm index f7dc3c311e1..8cfdf7bdaa5 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_newproj_discovery_options.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_newproj_discovery_options.htm @@ -10,7 +10,7 @@ -

    Makefile Project - Discovery Options page

    +

    Makefile Project - Discovery Options page

    Use the Discovery Options page in the Makefile Projects preference panel to configure various options for the scanner configuration.

    Makefile project - discovery options page

    @@ -76,6 +76,6 @@ IBM Copyright Statement
    Nokia Copyright Statement - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_newproj_parser_binary.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_newproj_parser_binary.htm index 6b26022882b..1f7d673711a 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_newproj_parser_binary.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_newproj_parser_binary.htm @@ -11,7 +11,7 @@ -

    Makefile Project - Binary Parsers page

    +

    Makefile Project - Binary Parsers page

    Use the Binary Parser page in the Makefile Project preference panel to manage the binary parsers available to projects.

    Binary Parser Preferences Panel

    @@ -59,6 +59,6 @@
    IBM Copyright Statement
    Nokia Copyright Statement - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_newproj_parser_error.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_newproj_parser_error.htm index 890c002e21f..7380d82f057 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_newproj_parser_error.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_newproj_parser_error.htm @@ -11,7 +11,7 @@ -

    Makefile Project - Error Parsers page

    +

    Makefile Project - Error Parsers page

    Use the Error Parsers page in the @@ -76,6 +76,6 @@ IBM Copyright Statement
    Nokia Copyright Statement - +

    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_newproj_platf.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_newproj_platf.htm index 76666253f96..10589223153 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_newproj_platf.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_newproj_platf.htm @@ -11,7 +11,7 @@ -

    Target platform, C/C++ Properties window

    +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_open_element.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_open_element.htm index 6644fb36c5f..d236ba46f22 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_open_element.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_open_element.htm @@ -9,7 +9,7 @@ -

    Open Element

    +

    Open Element

    Use Open Element to open up the declaration of C/C++ classes, structures, unions, typedefs, enumerations, namespaces, functions, methods and variables.

    @@ -20,6 +20,6 @@

    IBM Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_outline_view.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_outline_view.htm index 84b5413056d..097ece4ca95 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_outline_view.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_outline_view.htm @@ -10,7 +10,7 @@ -

    Outline view

    +

    Outline view

    The Outline view displays an outline of a structured C/C++ file that is currently open in the editor area, by listing the structural elements.

    @@ -165,6 +165,6 @@ C/C++ Projects view

    Views


    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_pref_build.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_pref_build.htm index 593750ab3c2..6bb4a8609a1 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_pref_build.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_pref_build.htm @@ -11,7 +11,7 @@ -

    Build preferences

    +

    Build preferences

    Use the Build preference panel to define build options.

    @@ -28,6 +28,6 @@ IBM Copyright Statement
    Nokia Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_pref_build_error_parsers.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_pref_build_error_parsers.htm index b51ef9cf239..d32a8ce53b5 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_pref_build_error_parsers.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_pref_build_error_parsers.htm @@ -11,7 +11,7 @@ -

    Error Parser Options

    +

    Error Parser Options

    Use the Error Parsers Tab on Build preference panel to define global error parsing options. @@ -141,6 +141,6 @@ IBM Copyright Statement
    Nokia Copyright Statement - +

    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_pref_build_vars.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_pref_build_vars.htm index a31c04e56c7..b9ab714f60e 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_pref_build_vars.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_pref_build_vars.htm @@ -11,7 +11,7 @@ -

    Build Variables preferences

    +

    Build Variables preferences

    Use the Build Variables preference panel to add, edit, or remove local build variables. Local build variables are displayed in bold text.

    Build Variables Preferences Page

    @@ -55,6 +55,6 @@
    Nokia Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_pref_multi_cfg.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_pref_multi_cfg.htm index f0d3c37378b..c3bca8e9479 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_pref_multi_cfg.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_pref_multi_cfg.htm @@ -10,7 +10,7 @@ -

    Multi-Configuration Edit preferences

    +

    Multi-Configuration Edit preferences

    Use the Multi-Configuration Edit preference panel to simultaneously edit properties for multiple project configurations. Its possible to select one or more configurations for editing.

    But, then we deal with string list property values, it is not obvious how to concatenate them, if they differ.

    Multi-Configuration Edit preferences tab

    @@ -63,6 +63,6 @@

    Related reference
    Property Pages Settings preferences

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_pref_prop_pages.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_pref_prop_pages.htm index 233b5a14abb..ab469cff846 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_pref_prop_pages.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_pref_prop_pages.htm @@ -10,7 +10,7 @@ -

    Property Pages Settings preferences

    +

    Property Pages Settings preferences

    Use the Property Pages Settings preference panel to set the behaviors of CDT property pages.

    Property Pages Settings Preference Panel

    @@ -79,6 +79,6 @@

    Related reference
    Multi-Configuration Edit preferences

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_pref_task_tags.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_pref_task_tags.htm index 825f4be97a8..eff22be6717 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_pref_task_tags.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_pref_task_tags.htm @@ -10,7 +10,7 @@ -

    Task Tags preferences

    +

    Task Tags preferences

    Use the Task Tags preference panel to configure global todo tags for C/C++ editor views.

    Task Tags Preferences

    @@ -74,6 +74,6 @@
    Nokia Copyright Statement - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_pref_wizard_defaults.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_pref_wizard_defaults.htm index edcd21623a7..e5b9b46ffc0 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_pref_wizard_defaults.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_pref_wizard_defaults.htm @@ -9,7 +9,7 @@ -

    CDT Project Wizard Defaults preferences

    +

    CDT Project Wizard Defaults preferences

    These settings affect CDT New Project Wizard behaviour.

    CDT Project Wizard Defaults preferences tab

    @@ -29,6 +29,6 @@
    Saves current settings.
    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_pref_wizard_toolchains.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_pref_wizard_toolchains.htm index 11e94f71968..dc774ebdab1 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_pref_wizard_toolchains.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_pref_wizard_toolchains.htm @@ -10,7 +10,7 @@ -

    New CDT Project Wizard preferences

    +

    New CDT Project Wizard preferences

    Use the New CDT Project Wizard to define which toolchains are selected in New CDT Project Wizard by default.

    CDT Project Wizard Toolchains preferences tab

    @@ -58,6 +58,6 @@
    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_problems_view.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_problems_view.htm index 21726fd8e02..96afc19ae83 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_problems_view.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_problems_view.htm @@ -10,7 +10,7 @@ -

    Problems view (C/C++)

    +

    Problems view (C/C++)

    Use the Problems view to display any errors encountered during a build.

    Problems View

    @@ -50,6 +50,6 @@ If you select an error the associated file will open in a C/C++ Editor
    Nokia Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_project_explorer_view.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_project_explorer_view.htm index 5811f8892e1..0847ce1cc3b 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_project_explorer_view.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_project_explorer_view.htm @@ -10,7 +10,7 @@ -

    Project Explorer view

    +

    Project Explorer view

    The Project Explorer view displays, in a tree structure similar to the C/C++ Projects view, but it is not limited to C and C++ projects. In this view you can do the following:

    • Browse the elements of C/C++ source files
    • @@ -228,5 +228,5 @@ IBM Copyright Statement

      - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_all.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_all.htm index 4e38cf20622..ed3577ac324 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_all.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_all.htm @@ -7,7 +7,7 @@ -

    C/C++ Project Properties, Configuration management

    +

    C/C++ Project Properties, Configuration management

    All CDT-specific property pages have unified controls to handle configurations. @@ -83,5 +83,5 @@ to handle configurations.

    Intel Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build.htm index a1e6bd17524..e446b5934fa 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build.htm @@ -9,7 +9,7 @@ -

    C/C++ Project Properties, C/C++ Build

    +

    C/C++ Project Properties, C/C++ Build

    This page serves as the main window that contains all builder-specific property pages. In addition, directly from this window you can define preferences for the Builder settings and Behaviour properties.

    @@ -211,6 +211,6 @@ and, moreover, change the visibility of other property pages.

    Intel Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_discovery.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_discovery.htm index 0f979e5de2e..82c33e43722 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_discovery.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_discovery.htm @@ -8,11 +8,11 @@ -

    Discovery Options properties

    +

    Discovery Options properties

    Use the Discovery Options properties panel to control how information required to build your project is discovered, enhance search and Content Assist functionality, and automatically enhance your makefile, such as include paths and symbol definitions.

    Discovery options preference page

    - +
    @@ -172,5 +172,5 @@ the entire project (configuration). This means that both the project and per-fil


    QNX Copyright Statement

    - + diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_environment.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_environment.htm index 0c9ef687baa..e6acfc1efc1 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_environment.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_environment.htm @@ -8,7 +8,7 @@ -

    C/C++ Project Properties, Environment

    +

    C/C++ Project Properties, Environment

    Use the Environment property page to customize the build environment for all projects in the workspace; it lets you control the environment variables used by the build.

    C/C++ Project Properties, Environment

    @@ -143,5 +143,5 @@ Use the Environment property page to customize the build enviro

    Intel Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_settings_artifact.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_settings_artifact.htm index 8e1e8358804..94b36ef1be3 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_settings_artifact.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_settings_artifact.htm @@ -8,7 +8,7 @@ -

    C/C++ Properties, Build, Settings, Build Artifact tab

    +

    C/C++ Properties, Build, Settings, Build Artifact tab

    Use the Build Artifacts properties tab to specify build artifact information, such as the type and name, that gets built by the selected build configuration.

    C/C++ Properties, Build, Settings, Build Artifact tab

    @@ -115,5 +115,5 @@

    Intel Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_settings_binparser.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_settings_binparser.htm index 4bce46d8fcd..2fc03874cad 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_settings_binparser.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_settings_binparser.htm @@ -7,7 +7,7 @@ -

    C/C++ Project Properties, Build, Settings, Binary Parser

    +

    C/C++ Project Properties, Build, Settings, Binary Parser

    Use the Binary Parsers properties tab to ensure the accuracy of the Project Explorer and C/C++ Projects views, and to successfully run and debug your programs. After you select the correct parser for your @@ -125,5 +125,5 @@ symbols of the object file using the C/C++ Projects view.


    Intel Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_settings_errparser.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_settings_errparser.htm index a299ed0a2e1..566c8c54473 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_settings_errparser.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_settings_errparser.htm @@ -7,7 +7,7 @@ -

    C/C++ Project Properties, Build, Settings, Error Parsers

    +

    C/C++ Project Properties, Build, Settings, Error Parsers

    Use the Error Parsers properties tab to customize the list of parsers that detect error messages in the build output log.


    Intel Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_settings_steps.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_settings_steps.htm index ee75529c28b..39c3a44e902 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_settings_steps.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_settings_steps.htm @@ -7,7 +7,7 @@ -

    C/C++ Properties, Build, Settings, Build Steps tab

    +

    C/C++ Properties, Build, Settings, Build Steps tab

    Use the Build Steps properties tab to customize the selected build configuration allowing for the specification of user defined build command steps, as well displaying a descriptive message in the build output, immediately before and after, normal build @@ -139,5 +139,5 @@ including pre-build or post-build steps.


    Intel Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_settings_tool.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_settings_tool.htm index 95f71fef0a3..7d0a6d548a2 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_settings_tool.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_settings_tool.htm @@ -7,7 +7,7 @@ -

    C/C++ Project Properties, Build, Settings, Tool settings tab

    +

    C/C++ Project Properties, Build, Settings, Tool settings tab

    Use the Tool Settings properties tab to customize the tools and tool options used in your build configuration.

    C/C++ Project Properties, Build, Settings, Tool Settings tab

    @@ -105,5 +105,5 @@ Use the Tool Settings properties tab to customize the tools and

    Intel Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_toolchain.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_toolchain.htm index 67ce82d5288..73483b5c4aa 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_toolchain.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_toolchain.htm @@ -7,7 +7,7 @@ -

    Tool chain editor preferences (C/C++ Project Properties)

    +

    Tool chain editor preferences (C/C++ Project Properties)


    Customizes the toolchain used in your build configuration; it lets you specify which tools the builder needs to include when it builds the project for a specified toolchain and configuration.

    @@ -101,5 +101,5 @@ you specify which tools the builder needs to include when it builds the project

    Intel Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_variables.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_variables.htm index dd8b24fd2bc..5fcd7f794bc 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_variables.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_build_variables.htm @@ -7,7 +7,7 @@ -

    Variables properties (C/C++ Project Properties)

    +

    Variables properties (C/C++ Project Properties)

    Customizes the Eclipse CDT build environment variables for all projects in the workspace; it lets you control the environment variables used by the build to for the purposes of building the selected configuration.

    Intel Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_builders.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_builders.htm index 88967501b1c..55c061fb216 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_builders.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_builders.htm @@ -7,7 +7,7 @@ -

    C/C++ Project Properties, Builders

    +

    C/C++ Project Properties, Builders

    You can select which Builders to enable for this project and in which order they are used.

    Intel Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_cfg_dialog.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_cfg_dialog.htm index 9172eab6f53..c57a4769c07 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_cfg_dialog.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_cfg_dialog.htm @@ -7,7 +7,7 @@ -

    C/C++ Project Properties, Configurations management.

    +

    C/C++ Project Properties, Configurations management.

    All CDT-specific property pages have unified controls to handle configurations. @@ -81,5 +81,5 @@ Selected configuration would not be made Active configuration (used to build pro

    Intel Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general.htm index 11b706bc851..13467635e4c 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general.htm @@ -7,7 +7,7 @@ -

    C/C++ Project Properties, C/C++ General

    +

    C/C++ Project Properties, C/C++ General

    General project properties

    C/C++ Project Properties, C/C++ General

    @@ -79,5 +79,5 @@

    Intel Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_doc.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_doc.htm index 4d59cabeb73..b35b4cbeb05 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_doc.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_doc.htm @@ -7,7 +7,7 @@ -

    C/C++ Project Properties, C/C++ Documentation

    +

    C/C++ Project Properties, C/C++ Documentation

    You can select which installed documentation to use for your project.

    C/C++ Project Properties, C/C++ Documentation

    @@ -80,5 +80,5 @@

    Intel Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_exp.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_exp.htm index 1d23c041b20..6135ef5de5b 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_exp.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_exp.htm @@ -9,7 +9,7 @@ -

    C/C++ Project Properties, General, Export page

    +

    C/C++ Project Properties, General, Export page

    You can modify the list of exported elements (include paths, symbols, libraries, library paths)

    @@ -100,6 +100,6 @@ There are 2 ways to make value exported: - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_idx.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_idx.htm index 0cabb335c04..0f685bc8c11 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_idx.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_idx.htm @@ -7,7 +7,7 @@ -

    C/C++ Project Properties, C/C++ Indexer

    +

    C/C++ Project Properties, C/C++ Indexer

    You can select which C/C++ Indexer to use for your project. The indexer is necessary for search and related features, like content assist.

    @@ -87,5 +87,5 @@ disables indexing. Every indexer may have its own set of options.

    Intel Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_lng.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_lng.htm index de9eda93e19..880573824f0 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_lng.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_lng.htm @@ -7,7 +7,7 @@ -

    C/C++ Project Properties, Language mappings

    +

    C/C++ Project Properties, Language mappings

    Customize the use of C/C++ language associations in the Language Mappings preference panel for a project.

    C/C++ Project Properties, Language mapping

    @@ -40,5 +40,5 @@

    Intel Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_pns_hier.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_pns_hier.htm index 5c13bca6ef4..ed36a943444 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_pns_hier.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_pns_hier.htm @@ -9,7 +9,7 @@ -

    C/C++ Properties, Include Paths and Symbols, Data hierarchy tab

    +

    C/C++ Properties, Include Paths and Symbols, Data hierarchy tab

    Use the Data Hierarchy tab in the Paths and Symbols properties panel to inspect all data related to Project/Configuration description.

    This tab is optional, it can be enabled/disabled in Preferences.

    @@ -112,6 +112,6 @@ width="143" height="21">
    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_pns_inc.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_pns_inc.htm index 2bfd8f9230a..4e037ac29d5 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_pns_inc.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_pns_inc.htm @@ -9,7 +9,7 @@ -

    C/C++ Project Properties, Paths and Symbols, Includes

    +

    C/C++ Project Properties, Paths and Symbols, Includes

    You can modify the list of included paths and change the order in which they are referenced.

    C/C++ Project Properties, Paths and Symbols, Includes

    Intel Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_pns_lib.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_pns_lib.htm index 5ee6b721c2c..dbfc5d5705b 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_pns_lib.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_pns_lib.htm @@ -9,7 +9,7 @@ -

    C/C++ Project Properties, Paths and Symbols, Libraries

    +

    C/C++ Project Properties, Paths and Symbols, Libraries

    You can modify the list of libraries and change the order in which they are referenced.

    C/C++ Project Properties, Paths and Symbols, Libraries - +

    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_pns_libpath.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_pns_libpath.htm index 7d24b36ce60..cb8e601caad 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_pns_libpath.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_pns_libpath.htm @@ -9,7 +9,7 @@ -

    C/C++ Project Properties, Paths and Symbols, Library paths

    +

    C/C++ Project Properties, Paths and Symbols, Library paths

    You can modify the list of library paths and change the order in which they are referenced.

    C/C++ Project Properties, Paths and Symbols, Library paths

    Intel Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_pns_out.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_pns_out.htm index 0eedd0cb70e..c4a24c3fba9 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_pns_out.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_pns_out.htm @@ -9,7 +9,7 @@ -

    C/C++ Project Properties, Paths and Symbols, Output location

    +

    C/C++ Project Properties, Paths and Symbols, Output location

    You can modify a list of project output entries effective in given configuration.

    @@ -88,6 +88,6 @@ alt="C/C++ Project Properties, Paths and Symbols, Output location">

    Intel Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_pns_ref.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_pns_ref.htm index 3be8e44f4be..f41bff2605a 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_pns_ref.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_pns_ref.htm @@ -7,7 +7,7 @@ -

    C/C++ Project Properties, Paths and Symbols, Project References

    +

    C/C++ Project Properties, Paths and Symbols, Project References

    Project references are a powerful way of expressing dependencies between Build configurations in different projects. Specifically they perform 2 roles: @@ -121,5 +121,5 @@ up the Include paths and Library link lines.

    Intel Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_pns_src.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_pns_src.htm index 9a51f68ef23..e4f160c757c 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_pns_src.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_pns_src.htm @@ -9,7 +9,7 @@ -

    C/C++ Project Properties, Paths and Symbols, Source location

    +

    C/C++ Project Properties, Paths and Symbols, Source location

    You can modify a list of project source entries effective in given configuration.

    @@ -88,6 +88,6 @@ alt="C/C++ Project Properties, Paths and Symbols, Source location">

    Intel Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_pns_sym.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_pns_sym.htm index 2fca8bb6a74..0d602479909 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_pns_sym.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_pns_sym.htm @@ -9,7 +9,7 @@ -

    C/C++ Project Properties, Paths and Symbols, Symbols

    +

    C/C++ Project Properties, Paths and Symbols, Symbols

    You can modify the list of preprocessor symbols.

    C/C++ Project Properties, Paths and Symbols, Symbols

    Intel Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_typ.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_typ.htm index 6008f5e24c9..72d3ba3a9f7 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_typ.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_general_typ.htm @@ -7,7 +7,7 @@ -

    C/C++ Project Properties, File Types

    +

    C/C++ Project Properties, File Types

    You can view a list of file types on the File Types page of a C/C++ project's properties window.

    Intel Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_manage_dialog.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_manage_dialog.htm index e86f046329f..340c0372df7 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_manage_dialog.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_manage_dialog.htm @@ -9,7 +9,7 @@ -

    C/C++ Project Properties, Manage Configuration Dialog

    +

    C/C++ Project Properties, Manage Configuration Dialog

    Manages the configurations defined for the project. Select a button to add, rename, remove configuration or set it active. @@ -90,6 +90,6 @@ alt="C/C++ Project Properties, Manage Configuration Dialog">

    Intel Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_manage_newdialog.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_manage_newdialog.htm index 42c5a7deb22..d18a4129d22 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_manage_newdialog.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_manage_newdialog.htm @@ -9,7 +9,7 @@ -

    C/C++ Project Properties, New Configuration Dialog

    +

    C/C++ Project Properties, New Configuration Dialog

    Creates a new configuration based on either an existing configuration or a default configuration. @@ -86,6 +86,6 @@ alt="C/C++ Project Properties, New Configuration Dialog">

    Intel Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_manage_rendialog.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_manage_rendialog.htm index f3b65777cb0..e26a615281e 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_manage_rendialog.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_manage_rendialog.htm @@ -9,7 +9,7 @@ -

    C/C++ Project Properties, Rename Configuration Dialog

    +

    C/C++ Project Properties, Rename Configuration Dialog

    Renames the name and the description of the existing configuration. @@ -80,6 +80,6 @@ alt="C/C++ Project Properties, Rename Configuration Dialog">

    Intel Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_ref.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_ref.htm index 20b9e2d8b73..19220ca59bb 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_ref.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_ref.htm @@ -7,7 +7,7 @@ -

    C/C++ Project Properties, Project References

    +

    C/C++ Project Properties, Project References

    C/C++ Project, Project References

    @@ -75,5 +75,5 @@

    Intel Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_refactoring_history.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_refactoring_history.htm index f3222cc112d..7d6f30c7383 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_refactoring_history.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_refactoring_history.htm @@ -7,7 +7,7 @@ -

    C/C++ Project Properties, Refactoring History

    +

    C/C++ Project Properties, Refactoring History

    Lets you explore the entire refactoring history for the currently selected project.

    C/C++ Project, Managed, Refactoring History

    @@ -83,5 +83,5 @@ Group by Date: Refactorings are grouped by date. The refactoring history dialog

    Intel Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_resource.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_resource.htm index 38a9decf5e0..93ac011a1ea 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_resource.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_resource.htm @@ -7,7 +7,7 @@ -

    C/C++ Project Properties, Resource

    +

    C/C++ Project Properties, Resource

    Shows resource information for the selected type.


    Intel Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_rundebug.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_rundebug.htm index f021ef04d12..3d0fda4dcf9 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_rundebug.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_prop_rundebug.htm @@ -7,7 +7,7 @@ -

    C/C++ Properties Run and Debug settings

    +

    C/C++ Properties Run and Debug settings

    Run/Debug settings are mostly applicable to Java projects, not to CDT ones. @@ -77,5 +77,5 @@ Run/Debug settings are mostly applicable to Java projects, not to CDT ones.

    Intel Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_properties.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_properties.htm index 55d7cd4db0a..8e30ce883ea 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_properties.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_properties.htm @@ -10,7 +10,7 @@ -

    CDT Properties

    +

    CDT Properties

    This section describes C/C++ Properties.

    Properties can be obtained for CDT projects, folders and separate files. To select object properties, right click on object in view and select Properties.

    @@ -79,5 +79,5 @@ To select object properties, right click on object in view and select Pr

    Intel Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_properties_view.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_properties_view.htm index 0825996d1cb..94cec5ee083 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_properties_view.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_properties_view.htm @@ -10,7 +10,7 @@ -

    Properties view

    +

    Properties view

    The Properties view displays property names and values for a selected item such as a resource.

    Properties View

    Toolbar buttons allow you to toggle to display properties by category or to filter advanced properties. Another toolbar button allows you to restore the selected property to its default value.

    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_registersview.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_registersview.htm index b7030f4324b..569a880fc90 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_registersview.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_registersview.htm @@ -12,7 +12,7 @@ -

    Registers view

    +

    Registers view

    The Registers view of the Debug perspective lists information about the registers in a selected stack frame. Values that have changed are highlighted in the Registers view when your program @@ -186,6 +186,6 @@ stops.


    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_run_dbg_arg.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_run_dbg_arg.htm index 13d5b56d8d7..e22bab5c5fd 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_run_dbg_arg.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_run_dbg_arg.htm @@ -11,7 +11,7 @@ -

    Arguments page, Run or Debug dialog boxes

    +

    Arguments page, Run or Debug dialog boxes

    The Arguments page of the Run or Debug dialog box lets you specify the program arguments that an application uses and the working directory for a run or debug configuration.

    @@ -43,6 +43,6 @@ that an application uses and the working directory for a run or debug configurat Run and Debug dialog box

    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_run_dbg_comm.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_run_dbg_comm.htm index c3dc2c6994b..d53384739f4 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_run_dbg_comm.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_run_dbg_comm.htm @@ -11,7 +11,7 @@ -

    Common page, Run or Debug dialog box

    +

    Common page, Run or Debug dialog box

    The Common page of the Run and Debug dialog boxes lets you specify the location in which to store your run configuration and how you access it, how standard input and output is handled, and if background launches are enabled or not.

    @@ -47,6 +47,6 @@ the location in which to store your run configuration and how you access it, how Run and Debug dialog box

    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_run_dbg_dbg.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_run_dbg_dbg.htm index 26925b43891..96a090fd041 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_run_dbg_dbg.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_run_dbg_dbg.htm @@ -11,7 +11,7 @@ -

    Debugger page, Run or Debug dialog box

    +

    Debugger page, Run or Debug dialog box

    The Debugger page of the Run and Debug dialog boxes lets you select a debugger to use when debugging an application.

    @@ -41,6 +41,6 @@ alt="Advanced Options dialog"> Run and Debug dialog box

    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_run_dbg_env.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_run_dbg_env.htm index 5638b8e727e..c3c88273d59 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_run_dbg_env.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_run_dbg_env.htm @@ -11,7 +11,7 @@ -

    Environment page, Run or Debug dialog box

    +

    Environment page, Run or Debug dialog box

    The Environment page of the Run and Debug dialog boxes lets you set environment variables and values to use when an application runs.

    @@ -44,6 +44,6 @@ set environment variables and values to use when an application runs.

    Run and Debug dialog box

    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_run_dbg_launch_group.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_run_dbg_launch_group.htm index 6359d557c29..b8559e891c5 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_run_dbg_launch_group.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_run_dbg_launch_group.htm @@ -11,7 +11,7 @@ -

    Launch Group

    +

    Launch Group

    The user can launch multiple applications at the same time or in sequential order. This is made possible by the launch configuration type: Launch Group.

    @@ -51,11 +51,16 @@ The Common tab lets you select where the configuration is stored, see <
    Discovery Options preferences
    - @@ -113,6 +118,6 @@ There are several actions available that control what should be done after each Run and Debug dialog box

    IBM Copyright Statement - + diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_run_dbg_main.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_run_dbg_main.htm index 4b2b493e8c9..3ebb7382f52 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_run_dbg_main.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_run_dbg_main.htm @@ -11,7 +11,7 @@ -

    Main page, Run or Debug dialog boxes

    +

    Main page, Run or Debug dialog boxes

    The Main page of the Run dialog box and the Debug dialog box, identifies the project and application you want to run or debug.

    @@ -39,6 +39,6 @@ Run and Debug dialog box

    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_run_dbg_srce.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_run_dbg_srce.htm index 4c2a78080b1..c1d51fb4923 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_run_dbg_srce.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_run_dbg_srce.htm @@ -11,7 +11,7 @@ -

    Source page, Run or Debug dialog box

    +

    Source page, Run or Debug dialog box

    The Source page of the Run and Debug dialog boxes lets you specify the location of source files used when debugging a C or C++ application. By default, this information is taken from the build path of your project.

    @@ -44,6 +44,6 @@ application. By default, this information is taken from the build path of your p Run and Debug dialog box

    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_scanner_cfg_disc.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_scanner_cfg_disc.htm index e945f0bdab1..e67e7bc9afd 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_scanner_cfg_disc.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_scanner_cfg_disc.htm @@ -9,7 +9,7 @@ -

    Scanner Configuration Discovery

    +

    Scanner Configuration Discovery

    You can configure various options for the scanner configuration on the Scanner Configuration Discovery page of the C/C++ Properties window.

    Editor General Preferences Window

    @@ -40,6 +40,6 @@ Project properties

    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_search.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_search.htm index 3ffafd9a8fa..43d0109e04d 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_search.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_search.htm @@ -7,7 +7,7 @@ -

    C/C++ search

    +

    C/C++ search

    Search Dialog Box

    @@ -198,5 +198,5 @@ editor

    Red Hat Copyright Statement
    IBM Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_search_view.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_search_view.htm index f9d308f0fa5..52520558114 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_search_view.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_search_view.htm @@ -10,7 +10,7 @@ -

    Search view

    +

    Search view

    Any matches are reported in the Search view.

    Search View

    @@ -121,6 +121,6 @@ you can put the focus on that view and get more options on the IBM Copyright Statement
    Nokia Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_signals_view.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_signals_view.htm index 21a7ad2b197..3fd2ea50d07 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_signals_view.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_signals_view.htm @@ -12,7 +12,7 @@ -

    Signals view

    +

    Signals view

    The Signals view of the Debug perspective lets you view the signals defined on the selected debug target and how the debugger handles each one.

    @@ -106,6 +106,6 @@ debugger handles each one.

    IBM Copyright Statement
    Nokia Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_tasks_view.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_tasks_view.htm index 507b09a496a..c2068ac641a 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_tasks_view.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_tasks_view.htm @@ -12,7 +12,7 @@ -

    Tasks View

    +

    Tasks View

    The Tasks view lets you create your own tasks. In addition to having the Tasks view automatically add TODO and FIXME tasks from comments in code, @@ -39,6 +39,6 @@ handling routines that you want to verify.


    IBM Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_toolbar.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_toolbar.htm index cd237e76169..e51d948bea9 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_toolbar.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_toolbar.htm @@ -9,7 +9,7 @@ -

    C/C++ Toolbar

    +

    C/C++ Toolbar

    C/C++ Toolbar

    C/C++ Toolbar icons

    @@ -152,6 +152,6 @@

    IBM Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_type_hierarchy_view.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_type_hierarchy_view.htm index 71f3c2ba651..844d7503639 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_type_hierarchy_view.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_type_hierarchy_view.htm @@ -9,7 +9,7 @@ -

    +

    Type Hierarchy view

    @@ -224,5 +224,5 @@


    Nokia Copyright Statement - +
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_view_executables.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_view_executables.htm index c8415357b48..fe975a16a0f 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_view_executables.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_view_executables.htm @@ -10,7 +10,7 @@ -

    Executables view

    +

    Executables view

    The Executables view provides a dynamic list of executables and their related source files. The Executables view makes it easy to:

    • target all binaries for debugging because the symbolics are automatically loaded when a bld.inf is imported or a project is created from a template
    • @@ -96,5 +96,5 @@ Views


      - Nokia Copyright Statement + Nokia Copyright Statement
    diff --git a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_views.htm b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_views.htm index 211cd383ab6..1ce552d77ef 100644 --- a/doc/org.eclipse.cdt.doc.user/reference/cdt_u_views.htm +++ b/doc/org.eclipse.cdt.doc.user/reference/cdt_u_views.htm @@ -9,7 +9,7 @@ -

    Selecting Views and Editors

    +

    Selecting Views and Editors

    To see a list of all views, from the menu bar choose Window > Show View > Others.

    Show View Dialog Box

    @@ -46,5 +46,5 @@ The Editor view is not listed under Window > Show View IBM Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_brkpnts_watch.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_brkpnts_watch.htm index 6afafcd224f..6a64116ea1a 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_brkpnts_watch.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_brkpnts_watch.htm @@ -10,7 +10,7 @@ -

    Using breakpoints, watchpoints, and breakpoint actions

    +

    Using breakpoints, watchpoints, and breakpoint actions

    The following topics explain how to use breakpoints, watchpoints, and breakpoint actions:

    @@ -23,6 +23,6 @@

    QNX Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_build_task.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_build_task.htm index 04508437546..2211edbf908 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_build_task.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_build_task.htm @@ -9,7 +9,7 @@ -

    Building projects

    +

    Building projects

    The following topics explain how to build a project, and to manage compile errors:

    Renaming a project
    Defining Project Build settings
    @@ -30,6 +30,6 @@

    QNX Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_builderrors.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_builderrors.htm index 0d1451e8827..bb6d4b439ed 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_builderrors.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_builderrors.htm @@ -10,7 +10,7 @@ -

    Tracking down compilation errors

    +

    Tracking down compilation errors

    After a build finishes, CDT displays the build output in the Console View. The build output shows the result of build and a user can inspect it to find out if it was successful or not. To assist with that @@ -56,6 +56,6 @@ generated on "Error Parsers" Preference page.

    QNX Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_con_assist.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_con_assist.htm index c3da02edaa3..650f32b4797 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_con_assist.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_con_assist.htm @@ -10,7 +10,7 @@ -

    Working with Content Assist

    +

    Working with Content Assist

    The following topics provide information about code entry aids:

    Using Content Assist
    Creating and editing templates
    @@ -18,6 +18,6 @@

    QNX Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_debug.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_debug.htm index 9f3ffd470f7..83024519892 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_debug.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_debug.htm @@ -10,7 +10,7 @@ -

    Debugging

    +

    Debugging

    The following topics explain how to debug your project:

    @@ -30,6 +30,6 @@

    QNX Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_proj_files.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_proj_files.htm index 81c30efc8de..2ca76f76d3b 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_proj_files.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_proj_files.htm @@ -10,7 +10,7 @@ -

    Working with C/C++ project files

    +

    Working with C/C++ project files

    The following topics explain how to create and manage project files:

    Displaying C/C++ file components in the C/C++ Projects view
    Converting a C or C++ nature for a project
    @@ -23,6 +23,6 @@ Set Discovery Options

    QNX Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_run.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_run.htm index e0e463ac752..e51ce30b95b 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_run.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_run.htm @@ -10,7 +10,7 @@ -

    Running and debugging projects

    +

    Running and debugging projects

    The following topics explain how to run a C or C++ application using an existing run configuration, and how to create a new run configuration.

    Creating or editing a run/debug configuration
    Selecting a run or debug configuration
    @@ -37,6 +37,6 @@

    QNX Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_run_config.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_run_config.htm index 69a5bed09fa..5e7f33d1ea3 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_run_config.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_run_config.htm @@ -10,7 +10,7 @@ -

    Creating or editing a run/debug configuration

    +

    Creating or editing a run/debug configuration

    You can run an application by right-clicking the file and clicking Open With > System Editor, or you can create a run configure a run environment with which to run your application.

    @@ -34,6 +34,6 @@ which to run your application.

     

    QNX Copyright Statement - +

    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_tasks.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_tasks.htm index e2396de0c7a..4131e4ce55d 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_tasks.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_tasks.htm @@ -10,7 +10,7 @@ -

    Tasks

    +

    Tasks

    The following topics provide step-by-step procedural instructions to help you perform various activities with the CDT:

    Creating a project
    @@ -81,6 +81,6 @@ Setting Source Folders

    QNX Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_write_code.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_write_code.htm index 79c57a06b5b..c508b936f6e 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_write_code.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_o_write_code.htm @@ -10,7 +10,7 @@ -

    Writing code

    +

    Writing code

    The following topics explain how to work with the C/C++ editor:

    Customizing the C/C++ editor
    Commenting out code
    @@ -26,6 +26,6 @@ Rename
    Toggle Function Definition

    QNX Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_add_brk_action.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_add_brk_action.htm index c8952394a6a..cab9e8f382a 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_add_brk_action.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_add_brk_action.htm @@ -10,7 +10,7 @@ -

    Adding breakpoint actions

    +

    Adding breakpoint actions

    To add a new breakpoint action:

      @@ -44,6 +44,6 @@
      Nokia Copyright Statement - +
    diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_add_brkpnts.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_add_brkpnts.htm index c8a044dce09..e0297a338d0 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_add_brkpnts.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_add_brkpnts.htm @@ -18,7 +18,7 @@ function changeSize(theImage,wd,ht) { -

    Adding breakpoints

    +

    Adding breakpoints

    A breakpoint is set on an executable line of a program. If the breakpoint is enabled when you debug, the execution suspends before that line of code @@ -46,6 +46,6 @@ marker bar.

    Run and Debug dialog box

    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_add_build_var.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_add_build_var.htm index 2b60a869ade..77a55d45012 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_add_build_var.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_add_build_var.htm @@ -13,7 +13,7 @@ -

    Adding and Editing Build Variables

    +

    Adding and Editing Build Variables

    Use the Define a New Build Variable dialog box to add local build variables or the Edit Existing Build Variable dialog box to edit a previously defined variable. Both are accessible from the Build Variables preference panel.

    @@ -76,6 +76,6 @@ dialog box to edit a previously defined variable. Both are accessible from the <
    Nokia Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_add_codetemp.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_add_codetemp.htm index c3525f108f7..2138bc6becc 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_add_codetemp.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_add_codetemp.htm @@ -10,7 +10,7 @@ -

    Creating and editing templates

    +

    Creating and editing templates

    Content Assist uses templates to enable you to quickly make use of commonly used code segments.

    To create a template:

    @@ -69,6 +69,6 @@

    QNX Copyright Statement - +

    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_add_custom_persp.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_add_custom_persp.htm index fc675443daa..92b1e7e9b74 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_add_custom_persp.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_add_custom_persp.htm @@ -10,7 +10,7 @@ -

    Adding Convert to a C/C++ Project to the New menu

    +

    Adding Convert to a C/C++ Project to the New menu

    If Convert to a C/C++ Project is not available in your menubar, you can add it by clicking Window > Customize Perspective

    NOTE: This feature can update some managed make projects created by earlier versions of CDT.

    @@ -30,6 +30,6 @@

    IBM Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_add_watch.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_add_watch.htm index 96d1c04b1ed..dc543ca28cf 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_add_watch.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_add_watch.htm @@ -12,7 +12,7 @@ -

    Adding watchpoints

    +

    Adding watchpoints

    A watchpoint is a special breakpoint that stops the execution of an application whenever the value of a given expression changes, without specifying @@ -47,6 +47,6 @@ true, regardless of when or where it occurred. You can set a watchpoint on a glo QNX Copyright Statement - +

    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_addmaketarget.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_addmaketarget.htm index 5cab099a34d..99da47437af 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_addmaketarget.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_addmaketarget.htm @@ -10,7 +10,7 @@ -

    Creating a make target

    +

    Creating a make target

    To create a make target:

    @@ -35,6 +35,6 @@
    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_addrmv_brk_action.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_addrmv_brk_action.htm index 69469470c75..3e6c573a510 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_addrmv_brk_action.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_addrmv_brk_action.htm @@ -10,7 +10,7 @@ -

    Attaching or removing breakpoint actions

    +

    Attaching or removing breakpoint actions

    You can attach one or more breakpoint actions to a single breakpoint. For example, when the breakpoint is hit you could both log a message and play a sound. Actions are executed in the order they appear in the Actions for this breakpoint list.

    To attach or remove a breakpoint action from a breakpoint:

    @@ -49,6 +49,6 @@
    Nokia Copyright Statement - +
    diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_autobuild.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_autobuild.htm index a6c7a5f195d..56e650a51cd 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_autobuild.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_autobuild.htm @@ -7,7 +7,7 @@ -

    Disabling the Build Automatically option

    +

    Disabling the Build Automatically option

    By default, the Eclipse workbench is configured to build projects automatically. However, for C/C++ development you should disable this option, otherwise your entire project will be rebuilt whenever, for example, @@ -32,5 +32,5 @@ checkmark beside the Build Automatically menu item.

    Make Builder page, C/C++ Properties window

    IBM Copyright Statement - +
    diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_autosave.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_autosave.htm index 1b1a7aae8ee..ece0b7ea303 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_autosave.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_autosave.htm @@ -9,7 +9,7 @@ -

    Autosaving on a build

    +

    Autosaving on a build

    You can let Eclipse save modified files whenever you perform a manual build. The files are saved before the build is performed so that the latest @@ -39,6 +39,6 @@ utility in the Console view.

    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_build_process.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_build_process.htm index a6b911c6e0a..3e97596c007 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_build_process.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_build_process.htm @@ -12,7 +12,7 @@ -

    Building a CDT project

    +

    Building a CDT project

    Provide roadmap whereby a link is provided to each build setting-related task.

    @@ -30,6 +30,6 @@ task.

    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_cbuild_pref.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_cbuild_pref.htm index 25bb27ff93f..acbe5d95dd2 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_cbuild_pref.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_cbuild_pref.htm @@ -7,7 +7,7 @@ -

    Customizing the Console view

    +

    Customizing the Console view

    The Console view displays the output of the utilities invoked when building a project or the programs output when running/debugging.

    To set Console view preferences

    @@ -37,5 +37,5 @@ building a project or the programs output when running/debugging.

    Views


    IBM Copyright Statement - +
    diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_comment_out.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_comment_out.htm index 1daa2fec1a2..d1829f923a7 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_comment_out.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_comment_out.htm @@ -10,7 +10,7 @@ -

    Commenting out code

    +

    Commenting out code

    You can comment out one or more lines of code in any C/C++ editor view. The leading characters // are added to the beginning of each line when commenting one or more lines of code. @@ -52,6 +52,6 @@ described above.


    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_contentassist.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_contentassist.htm index 1f3392994f0..68a0c1a02c7 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_contentassist.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_contentassist.htm @@ -10,7 +10,7 @@ -

    Using Content Assist

    +

    Using Content Assist

    Use Content Assist to insert C/C++ elements of your project, and templates into your code. You can insert a template into your source code rather than retyping commonly-used snippets of code.

    @@ -65,6 +65,6 @@ commonly-used snippets of code.

    IBM Copyright Statement - +

    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_controldebug.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_controldebug.htm index 23cb5107baa..a12ec534194 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_controldebug.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_controldebug.htm @@ -12,7 +12,7 @@ -

    Controlling debug execution

    +

    Controlling debug execution

    The debug execution controls are superceded by breakpoints. For example, if you attempt to step over a function and the program hits a breakpoint, @@ -47,6 +47,6 @@ core set of debug controls.

    Debug view

    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_conv_proj.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_conv_proj.htm index 26e49018212..a043680dbc4 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_conv_proj.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_conv_proj.htm @@ -10,7 +10,7 @@ -

    Converting a C or C++ nature for a project

    +

    Converting a C or C++ nature for a project

    Use the Convert to a C/C++ Project wizard to assign a C nature to a C++ project or vice versa.

    @@ -41,6 +41,6 @@
    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_convert_cdt_proj.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_convert_cdt_proj.htm index 29321900f7c..1d98ac8e6f4 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_convert_cdt_proj.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_convert_cdt_proj.htm @@ -10,7 +10,7 @@ -

    Converting CDT 1.x Projects

    +

    Converting CDT 1.x Projects

    How you update your CDT 1.x project to the current CDT project format depends upon whether the project is a Standard Make project or a Managed Make project. For a Standard @@ -46,6 +46,6 @@ See Set Discovery Options for details.

    IBM Copyright Statement

    - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_convert_mbs20_proj.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_convert_mbs20_proj.htm index 1bcfced6464..3b16481f6ae 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_convert_mbs20_proj.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_convert_mbs20_proj.htm @@ -10,7 +10,7 @@ -

    Converting CDT 2.x Managed Make Projects

    +

    Converting CDT 2.x Managed Make Projects

    For a CDT 2.x Managed Make project, the Managed Build system will prompt you to convert your project when it attempts to read the Managed Build project @@ -27,6 +27,6 @@ or exit Eclipse.

    IBM Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_create_make_target.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_create_make_target.htm index 9105aea7625..74560a7a15c 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_create_make_target.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_create_make_target.htm @@ -10,7 +10,7 @@ -

    Creating a Make Target

    +

    Creating a Make Target

    To create a make target:

      @@ -33,6 +33,6 @@ Make Target View


      IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_cust_cpp_editor.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_cust_cpp_editor.htm index d6215bf838e..763b6a242f7 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_cust_cpp_editor.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_cust_cpp_editor.htm @@ -19,7 +19,7 @@ Customize the appearance of the C/C++ Editor. END INFOPOP--> -

    Customizing the C/C++ editor

    +

    Customizing the C/C++ editor

    You can change many of the C/C++ editor preferences.

    @@ -50,6 +50,6 @@ END INFOPOP--> C/C++ editor preferences

    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_debug_exes.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_debug_exes.htm index 927129c26c4..65c7cff9cba 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_debug_exes.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_debug_exes.htm @@ -13,7 +13,7 @@ ul, li { padding: 3px 0px} -

    Debugging an Existing Executable

    +

    Debugging an Existing Executable

    Use the import feature to import and debug an executable you have already built. This feature will automatically create a project and debug configuration for you. This is helpful if you have an executable built with debug symbols but may not have the project used to build the executable.

    Importing Executables for Debugging

    @@ -62,5 +62,5 @@ ul, li { padding: 3px 0px} Run and Debug dialog box


    Nokia Copyright Statement - +
    diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_debug_prog.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_debug_prog.htm index 42527b889cd..490a2c4bf15 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_debug_prog.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_debug_prog.htm @@ -12,7 +12,7 @@ -

    Debugging a program

    +

    Debugging a program

    You must create a debug launch configuration the first time you debug your program.

    @@ -75,6 +75,6 @@ program.

    Run and Debug dialog box

    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_disassembly.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_disassembly.htm index d00068669a8..8a7d8effc47 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_disassembly.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_disassembly.htm @@ -12,7 +12,7 @@ -

    Stepping into disassembled code

    +

    Stepping into disassembled code

    The Disassembly view lets you examine your program as it steps into disassembled code. This is useful when the instruction pointer enters a function for which it does not have the source. @@ -36,6 +36,6 @@ when the Disassembly view has focus.


    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_discovery.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_discovery.htm index 64c67288509..6e3c0cbc4f2 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_discovery.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_discovery.htm @@ -7,7 +7,7 @@ -

    Set Discovery Options

    +

    Set Discovery Options

    For most make projects, you will want to parse the output of the build to populate your paths and symbols tables.

    To populate your tables:

    @@ -42,5 +42,5 @@ button.
    C/C++ Project Properties, Discovery Options

    QNX Copyright Statement - +
    diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_endis_able_brk_wtch.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_endis_able_brk_wtch.htm index 141386bcbf3..38c1d87183a 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_endis_able_brk_wtch.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_endis_able_brk_wtch.htm @@ -12,7 +12,7 @@ -

    Enabling and disabling breakpoints and watchpoints

    +

    Enabling and disabling breakpoints and watchpoints

    You can temporarily disable a breakpoint or watchpoint without losing the information it contains.

    @@ -44,6 +44,6 @@ information it contains.

    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_expressions.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_expressions.htm index 8f435fa2620..83a9ba183a4 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_expressions.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_expressions.htm @@ -12,7 +12,7 @@ -

    Adding expressions

    +

    Adding expressions

    You can add and view expressions in the Expressions view. The Expressions view is part of the Debug perspective.

    @@ -39,6 +39,6 @@ view is part of the Debug perspective.

    Debug views

    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_filtererror.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_filtererror.htm index 84568557881..d71b0bba1b4 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_filtererror.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_filtererror.htm @@ -12,7 +12,7 @@ -

    Filtering the Problems view

    +

    Filtering the Problems view

    Depending on the complexity and stage of your program, an overwhelming number of errors can be generated. You can customize Problems view to only view certain types of errors.

    @@ -43,6 +43,6 @@ IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_imp_code_temp.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_imp_code_temp.htm index 18aa4261bdb..bc23bff3271 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_imp_code_temp.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_imp_code_temp.htm @@ -9,7 +9,7 @@ -

    Importing and exporting templates

    +

    Importing and exporting templates

    You can import and export templates.

    @@ -55,5 +55,5 @@ IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_jumperror.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_jumperror.htm index fa5ae341213..aaf286536a6 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_jumperror.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_jumperror.htm @@ -12,7 +12,7 @@ -

    Jumping to errors

    +

    Jumping to errors

    The CDT will parse the output from the make and compiler/linker. If the CDT can determine an error or a warning, the line is highlighted in the Console view and added @@ -53,6 +53,6 @@ Informational messages are marked with Info IBM Copyright Statement - +

    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_manualbuild.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_manualbuild.htm index 23c9cee5aea..3c6545e0f06 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_manualbuild.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_manualbuild.htm @@ -7,7 +7,7 @@ -

    Building Manually

    +

    Building Manually

    Manual builds let you choose the scope of a build, as well as options for building, or rebuilding projects. You can view the output of the make utility in the console.

    @@ -56,5 +56,5 @@ Build
    .

    Make Builder page, C/C++ Properties window

    IBM Copyright Statement - +
    diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_memory.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_memory.htm index 382273cf74e..971fa708642 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_memory.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_memory.htm @@ -12,7 +12,7 @@ -

    Working with memory

    +

    Working with memory

    You can inspect and change process memory.

    @@ -37,8 +37,8 @@ independently.

  • In the Debug view, select a debug session. Selecting a thread or stack frame automatically selects the associated session.
  • -
  • Select "Add Memory Monitor" in the context menu of the Memory Monitors pane. -The "Memory Monitor" dialog appears.
  • +
  • Select Add Memory Monitor in the context menu of the Memory Monitors pane. +The Memory Monitor dialog appears.
  • Type the address or expression that specifies the memory section you want to monitor and press "OK". The monitor appears in the monitor list and the Memory Renderings @@ -47,8 +47,8 @@ pane displays the contents of memory locations beginning at the specified addres

    To view memory in a different rendering:

      -
    1. Select "Add Rendering" in the context menu of the Memory Renderings pane. -The "Add Memory Rendering" dialog appears.
    2. +
    3. Select Add Rendering in the context menu of the Memory Renderings pane. +The Add Memory Rendering dialog appears.
    4. Select renderings from the list and press "OK".
    @@ -77,6 +77,6 @@ Changing process memory can cause a program to crash.

    Debug views

    IBM Copyright Statement - +
  • diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_new_cpp.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_new_cpp.htm index 5bfedd7194a..d929a1ffd67 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_new_cpp.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_new_cpp.htm @@ -15,7 +15,7 @@ function changeSize(theImage,wd,ht) { -

    Creating a C/C++ file

    +

    Creating a C/C++ file

    Files are edited in the C/C++ editor that is, by default, located in the editor area to the right of the Project Explorer or C/C++ Projects views.

    The marker bar on the left margin of the C/C++ editor, displays @@ -60,5 +60,5 @@ Projects view


    IBM Copyright Statement

    - +
    diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_new_make.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_new_make.htm index 23f6d21295a..d465916f26c 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_new_make.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_new_make.htm @@ -18,7 +18,7 @@ function changeSize(theImage,wd,ht) { -

    Creating a makefile

    +

    Creating a makefile

    If you have created a Standard Make C/C++ Project, you need to provide a makefile.

    @@ -51,7 +51,7 @@ view


    Views

    -IBM Copyright Statement - +IBM Copyright Statement

    + \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_new_run_config.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_new_run_config.htm index b89df2b1272..e583eec999f 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_new_run_config.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_new_run_config.htm @@ -9,7 +9,7 @@ -

    Creating a run or debug configuration

    +

    Creating a run or debug configuration

    You can create customized run configuration which you can save for reuse.

    @@ -38,6 +38,6 @@ Run and Debug dialog box

    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_open_declarations.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_open_declarations.htm index a93c3efcbcf..4a71dcc5ee0 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_open_declarations.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_open_declarations.htm @@ -10,7 +10,7 @@ -

    Navigating to C/C++ declarations

    +

    Navigating to C/C++ declarations

    The Open Declaration feature lets you navigate to the declaration that matches a selected element in the C/C++ editor. It is recommended that you look for @@ -43,6 +43,6 @@ element declarations on successfully compiled programs.

    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_build_set.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_build_set.htm index fcefbdcbfeb..f6b7dfefec7 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_build_set.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_build_set.htm @@ -7,7 +7,7 @@ -

    Defining Project Build settings

    +

    Defining Project Build settings

    The Builder Settings page lets you:

    diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_error_parser.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_error_parser.htm index a443ece3df7..94932cbc4e3 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_error_parser.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_error_parser.htm @@ -12,7 +12,7 @@ -

    Tuning Error Parsers

    +

    Tuning Error Parsers

    Error Parsers scan build output line by line looking for errors and warnings (also for certain informational messages). They generate Problem Markers @@ -90,6 +90,6 @@ Note that that kind of parser needs to be the first to be able to provide the CW QNX Copyright Statement - +

    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_new.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_new.htm index 15405b6cd85..0965ff7bc8c 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_new.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_new.htm @@ -10,7 +10,7 @@ -

    Creating a project

    +

    Creating a project

    You can create a standard make or managed make C or C++ project.

    @@ -66,6 +66,6 @@ IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_new_with_template.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_new_with_template.htm index 8c99b54ad0d..f35eae834a9 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_new_with_template.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_new_with_template.htm @@ -10,7 +10,7 @@ -

    Creating a project via a project template

    +

    Creating a project via a project template

    From CDT 4.0 its possible to create projects based upon templates defined by the IDE supplier. What this means is that you can easily create a project which contains customized source code and is ready for use in a few clicks. Some @@ -86,6 +86,6 @@ aspects of the generated project may be customized by the user as part of the ne
    Views

    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_parser.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_parser.htm index bb036314de7..7145c077d62 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_parser.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_parser.htm @@ -7,7 +7,7 @@ -

    Selecting a binary parser

    +

    Selecting a binary parser

    Selecting the correct binary parser is important to ensure the accuracy of the C/C++ Projects view and to successfully run and debug your programs. Windows users should select the PE Windows Parser. UNIX @@ -59,5 +59,5 @@ for binary parser are got from Preferences during project creation.

    Binary Parser, C/C++ Properties window

    IBM Copyright Statement - +
    diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_paths.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_paths.htm index 9b79328b8ee..914011066cf 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_paths.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_paths.htm @@ -12,7 +12,7 @@ function newWin(url) { -

    Adding Include paths and symbols

    +

    Adding Include paths and symbols

    For CDT projects, you can define include paths and preprocessor symbols for the parser. This lets the parser understand the contents of the C/C++ source code so that you can more effectively use the search and code completion features.

    @@ -51,5 +51,5 @@ within your make project and select
    Working with C/C++ project files

    QNX Copyright Statement - +
    diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_platf.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_platf.htm index 378e7ee5da3..a09359294e6 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_platf.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_platf.htm @@ -12,7 +12,7 @@ -

    Selecting a project type

    +

    Selecting a project type

    While creating CDT project project, you need to select its type. @@ -57,6 +57,6 @@ While creating CDT project project, you need to select its type. IBM Copyright Statement - +

    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_referenced_configs.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_referenced_configs.htm index 17d6eb6665b..f1b9d93d960 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_referenced_configs.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_referenced_configs.htm @@ -10,7 +10,7 @@ -

    Project References

    +

    Project References

    Project References are a powerful way of expressing dependencies between your CDT projects, allowing you to write modular software built with CDT's managedbuild. @@ -48,6 +48,6 @@ are propagated and kept in sync for you. Project References Page
    Export Settings Page - +

    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_rename.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_rename.htm index 69e600ec889..3e613571405 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_rename.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_rename.htm @@ -10,7 +10,7 @@ -

    Renaming a project

    +

    Renaming a project

    You can rename a project, and have all references changed using the refactoring engine.

    @@ -48,6 +48,6 @@ This can take a significant amount of time for very large projects. The new name QNX Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_prvw_hide_files.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_prvw_hide_files.htm index 224db0c5f5d..a83e4c9b6ef 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_prvw_hide_files.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_prvw_hide_files.htm @@ -10,7 +10,7 @@ -

    Hiding files by type in the C/C++ Projects view

    +

    Hiding files by type in the C/C++ Projects view

    You can hide files by type that you do not want to see in the C/C++ Projects view.

    @@ -40,6 +40,6 @@ view

    Views

    IBM Copyright Statement - +

    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_refactoring.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_refactoring.htm index a5bc99f99a3..8852cb5de93 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_refactoring.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_refactoring.htm @@ -10,7 +10,7 @@ -

    Refactoring

    +

    Refactoring

    The following topics provide information about refactoring:

    Rename Refactoring
    @@ -21,6 +21,6 @@ IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_registers.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_registers.htm index e7a3ed13f9c..d4a6052b4de 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_registers.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_registers.htm @@ -12,7 +12,7 @@ -

    Working with registers

    +

    Working with registers

    You can modify registers in the Registers view.

    @@ -50,6 +50,6 @@ Debug views

    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_rem_wtch_brk.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_rem_wtch_brk.htm index b3a7bfe83ec..6eace510a5a 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_rem_wtch_brk.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_rem_wtch_brk.htm @@ -12,7 +12,7 @@ -

    Removing breakpoints and watchpoints

    +

    Removing breakpoints and watchpoints

    When you remove a breakpoint or watchpoint, the corresponding icon is removed from the marker bar where it was inserted and the Breakpoints view.

    @@ -45,6 +45,6 @@ marker bar.

    Run and Debug dialog box

    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_rename.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_rename.htm index 691011d8b52..adbc2c21532 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_rename.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_rename.htm @@ -10,7 +10,7 @@ -

    Rename Refactoring

    +

    Rename Refactoring

    Use the C/C++ Projects, Outline, or the Editor view Refactor > Rename context menu to refactor class & type names, methods, function & member names.

    @@ -34,6 +34,6 @@ IBM Copyright Statement - +
    diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_run_arg.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_run_arg.htm index 94928d66092..853382a89bd 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_run_arg.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_run_arg.htm @@ -10,7 +10,7 @@ -

    Specifying execution arguments

    +

    Specifying execution arguments

    You can specify the execution arguments that an application uses and the working directory for a run configuration.

    @@ -56,6 +56,6 @@ for a run configuration.

    Run and Debug dialog box

    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_run_com.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_run_com.htm index d53abeebd37..b54f753670e 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_run_com.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_run_com.htm @@ -10,7 +10,7 @@ -

    Specifying the location of the run configuration

    +

    Specifying the location of the run configuration

    When you create a run configuration, it is saved with the extension .launch in org.eclipse.debug.core. You can specify an alternate location in which to store your run configuration. You can @@ -60,6 +60,6 @@ perspective to open when running an application.

    Run and Debug dialog box

    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_run_config.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_run_config.htm index 6b4257bcbf0..eb9832b4b8b 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_run_config.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_run_config.htm @@ -10,7 +10,7 @@ -

    Selecting a run or debug configuration

    +

    Selecting a run or debug configuration

    You can select an existing run configuration to use to run your program.

    @@ -38,6 +38,6 @@ Run and Debug dialog box

    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_run_dbg.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_run_dbg.htm index 8f99ea70170..c7a9b32be62 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_run_dbg.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_run_dbg.htm @@ -18,7 +18,7 @@ function changeSize(theImage,wd,ht) { -

    Defining debug settings

    +

    Defining debug settings

    Select a debugger to use when debugging an application.

    @@ -63,6 +63,6 @@ function changeSize(theImage,wd,ht) { Run and Debug dialog box

    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_run_env.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_run_env.htm index 1c981b6f702..a4e1545371f 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_run_env.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_run_env.htm @@ -10,7 +10,7 @@ -

    Setting environment variables

    +

    Setting environment variables

    You can set the environment variables and values to use when an application runs.

    @@ -60,6 +60,6 @@ runs.

    Run and Debug dialog box

    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_run_main.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_run_main.htm index eee321c3a0e..e70817004a2 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_run_main.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_run_main.htm @@ -11,7 +11,7 @@ -

    Selecting an application to run or debug

    +

    Selecting an application to run or debug

    You need to specify the project or program that you want to run or debug for this run configuration.

    @@ -60,6 +60,6 @@ this run configuration.

    Run and Debug dialog box

    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_run_source.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_run_source.htm index be4177caaba..223c18fafa8 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_run_source.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_run_source.htm @@ -11,7 +11,7 @@ -

    Specifying the location of source files

    +

    Specifying the location of source files

    You can specify the locations of source files used when debugging a C or C++ application. By default, this information is taken from your project.

    @@ -48,6 +48,6 @@ application. By default, this information is taken from your project.

    Run and Debug dialog box

    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_search.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_search.htm index 70ded2d36ed..44b8ad2805e 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_search.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_search.htm @@ -10,7 +10,7 @@ -

    Searching for C/C++ elements

    +

    Searching for C/C++ elements

    It is recommended that you perform searches on successfully compiled programs to ensure the accuracy of search results. It is important to familiarize yourself with the correct search syntax @@ -33,7 +33,7 @@ include paths and symbols are correctly defined. For more information, see The info required to do a search is: -

    ComponentDescription
    Launch ModeThe Launch Mode combobox at the top of the dialog serves a dual purpose.
    - 1. It dictates the desired mode for the launch configuration being added, -and
    - 2. It establishes a 'mode' filter for the launch configurations that are -exposed to the user (for selection) in the area below the combobox
    +
    The Launch Mode combobox at the top of the dialog serves a dual purpose. +
      +
    1. + It dictates the desired mode for the launch configuration being added, +and
    2. +
    3. + It establishes a 'mode' filter for the launch configurations that are +exposed to the user (for selection) in the area below the combobox +
    4. +

    For example, when the 'debug' mode is selected, (1) only launch configurations that support being invoked in 'debug' mode appear. Also, (2) when the launch @@ -73,12 +78,12 @@ needs some clarification. First, realize that a launch configuration can be invoked from either the 'Debug' or the 'Run' actions (and some comparable 'profile' action in certain Eclipse configurations/products). That means, the launch group itself can be launched either in debug or run mode. When you check -the "Use default..." checkbox, you're saying: "launch this particular child -configuration in the mode that the parent (launch group) is launched with." If +the Use default... checkbox, you're saying: launch this particular child +configuration in the mode that the parent (launch group) is launched with. If you do not have that checkbox checked, then the child configurations will be invoked in whatever mode each individual child is configured with.

    -Note that "Use default..." control can allow you to create a launch group +Note that Use default... control can allow you to create a launch group that will not be successful. For example when one or more launch configurations selected cannot be launched in the mode dictated by launch group mode.

    +
    @@ -148,6 +148,6 @@ The info required to do a search is: C/C++ search page, Search dialog box


    IBM Copyright Statement - + \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_sel_search.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_sel_search.htm index 41a1bd98395..f43ec999a97 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_sel_search.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_sel_search.htm @@ -10,7 +10,7 @@ -

    Selection Searching for C/C++ elements

    +

    Selection Searching for C/C++ elements

    It is recommended that you perform searches on successfully compiled programs to ensure the accuracy of search results. It is important to familiarize yourself with the correct search syntax @@ -59,6 +59,6 @@ include paths and symbols are correctly defined. For more information, see

     

    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_set_src_fold.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_set_src_fold.htm index 88c51b5e61c..d70f6e4d9e8 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_set_src_fold.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_set_src_fold.htm @@ -7,7 +7,7 @@ -

    Setting Source Folders

    +

    Setting Source Folders

    Note that source folders can only be currently used with Standard Make projects. Managed Make projects treat the entire project as a source folder.

    @@ -60,5 +60,5 @@ dialog box

     

    IBM Copyright Statement - +
    diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_shift_code.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_shift_code.htm index 9c106e5f028..840c8ec11b6 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_shift_code.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_shift_code.htm @@ -10,7 +10,7 @@ -

    Shifting lines of code to the right or left

    +

    Shifting lines of code to the right or left

    You can shift lines of code to the left or right in the C/C++ editor. You can change the tab width in the C/C++ editor preferences window. For more @@ -41,6 +41,6 @@ editor.

    C/C++ editor preferences

    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_show_proj_files.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_show_proj_files.htm index 7e68ffbeefc..a11845cf30d 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_show_proj_files.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_show_proj_files.htm @@ -10,7 +10,7 @@ -

    Displaying C/C++ file components in the C/C++ Projects view

    +

    Displaying C/C++ file components in the C/C++ Projects view

    File components are displayed in the C/C++ Projects view and in the Outline view. You can display or hide all file components in the C/C++ Projects view.

    @@ -49,6 +49,6 @@ view
    C/C++ editor preferences


    IBM Copyright Statement - +
    \ No newline at end of file diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_toggle.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_toggle.htm index c5caa0508d8..1571d6a35df 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_toggle.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_toggle.htm @@ -10,7 +10,7 @@ -

    Toggle Function Definition

    +

    Toggle Function Definition

    Toggle Function Definition moves a function definition inside an C/C++ source editor from one position to another and preserves correctness.

    @@ -31,6 +31,6 @@ the function definition (without comments) is considered valid for toggling.

    IBM Copyright Statement - +
    diff --git a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_variables.htm b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_variables.htm index 30b2fc5787e..0302356be57 100644 --- a/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_variables.htm +++ b/doc/org.eclipse.cdt.doc.user/tasks/cdt_t_variables.htm @@ -12,7 +12,7 @@ -

    Working with variables

    +

    Working with variables

    During a debug session, you can display variable types, and change or disable variable values.

    @@ -57,6 +57,6 @@ variable is specified as volatile.

    IBM Copyright Statement - +

    \ No newline at end of file diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/META-INF/MANIFEST.MF b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/META-INF/MANIFEST.MF index d4e6cc44ddc..8d3a7df5824 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/META-INF/MANIFEST.MF +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/META-INF/MANIFEST.MF @@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-Vendor: %providerName Bundle-SymbolicName: org.eclipse.cdt.dsf.gdb.ui;singleton:=true -Bundle-Version: 2.3.0.qualifier +Bundle-Version: 2.4.0.qualifier Bundle-Activator: org.eclipse.cdt.dsf.gdb.internal.ui.GdbUIPlugin Bundle-Localization: plugin Require-Bundle: org.eclipse.ui, @@ -32,6 +32,7 @@ Export-Package: org.eclipse.cdt.dsf.gdb.internal.ui;x-internal:=true, org.eclipse.cdt.dsf.gdb.internal.ui.commands;x-internal:=true, org.eclipse.cdt.dsf.gdb.internal.ui.console;x-internal:=true, org.eclipse.cdt.dsf.gdb.internal.ui.launching;x-friends:="org.eclipse.cdt.debug.gdbjtag.ui", + org.eclipse.cdt.dsf.gdb.internal.ui.osview;x-internal:=true, org.eclipse.cdt.dsf.gdb.internal.ui.preferences;x-internal:=true, org.eclipse.cdt.dsf.gdb.internal.ui.tracepointactions;x-internal:=true, org.eclipse.cdt.dsf.gdb.internal.ui.tracepoints;x-internal:=true, diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/icons/full/view16/osresources_view.gif b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/icons/full/view16/osresources_view.gif new file mode 100644 index 00000000000..71fc0a4f941 Binary files /dev/null and b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/icons/full/view16/osresources_view.gif differ diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/plugin.properties b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/plugin.properties index 6248385f21a..219fa516a90 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/plugin.properties +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/plugin.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2008, 2010 Ericsson and others. +# Copyright (c) 2008, 2012 Ericsson 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 @@ -9,6 +9,7 @@ # Ericsson - initial API and implementation # IBM Corporation # Jens Elmenthaler (Verigy) - Added Full GDB pretty-printing support (bug 302121) +# Vladimir Prus (Mentor Graphics) - OS Resources view (bug 360314) ############################################################################### pluginName=GDB DSF Debugger Integration UI providerName=Eclipse CDT @@ -47,3 +48,6 @@ activity.name = CDT DSF-GDB - GDB Debugging # Pretty Printing action.fetchMoreChildren.label=Fetch More Children + +# OS view +view.osresources.name=OS Resources diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/plugin.xml b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/plugin.xml index b59f15537b5..81593486d9a 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/plugin.xml +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/plugin.xml @@ -263,6 +263,13 @@ id="org.eclipse.cdt.dsf.gdb.ui.tracecontrol.view" name="%view.traceControl.name"> + + diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/pom.xml b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/pom.xml index a418ced7299..16b88d43c30 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/pom.xml +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/pom.xml @@ -11,7 +11,7 @@ ../../pom.xml - 2.3.0-SNAPSHOT + 2.4.0-SNAPSHOT org.eclipse.cdt.dsf.gdb.ui eclipse-plugin diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/osview/ColumnLayout.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/osview/ColumnLayout.java new file mode 100644 index 00000000000..f8727623645 --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/osview/ColumnLayout.java @@ -0,0 +1,143 @@ +/******************************************************************************* + * Copyright (c) 2011, 2012 Mentor Graphics 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: + * Vladimir Prus (Mentor Graphics) - initial API and implementation + *******************************************************************************/ + +package org.eclipse.cdt.dsf.gdb.internal.ui.osview; + +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.cdt.dsf.gdb.internal.ui.GdbUIPlugin; +import org.eclipse.jface.dialogs.IDialogSettings; + +/* Hold information about which columns in a table are visible, and what + * width they have. Stores that information inside preferences store. + */ +class ColumnLayout +{ + private String fResourceClass; + private Map fVisible = new HashMap(); + private Map fWidth = new HashMap(); + private Integer fSortColumn = null; + private Integer fSortDirection = null; + + private static IDialogSettings settings; + private static IDialogSettings getDialogSettings() + { + if (settings != null) + return settings; + + IDialogSettings topSettings = GdbUIPlugin.getDefault().getDialogSettings(); + settings = topSettings.getSection(ResourceClassContributionItem.class.getName()); + if (settings == null) { + settings = topSettings.addNewSection(ResourceClassContributionItem.class.getName()); + } + return settings; + } + + private static void setDefaultSetting(String key, boolean value) + { + IDialogSettings s = getDialogSettings(); + if (s.get(key) == null) + s.put(key, value); + } + + private static void setDefaultSetting(String key, int value) + { + IDialogSettings s = getDialogSettings(); + if (s.get(key) == null) + s.put(key, value); + } + + public ColumnLayout(String resourceClass) + { + fResourceClass = resourceClass; + } + + public boolean getVisible(String column) + { + if (fVisible.containsKey(column)) + return fVisible.get(column); + else + { + setDefaultSetting(columnKey(column, "v"), true); //$NON-NLS-1$ + boolean b = getDialogSettings().getBoolean(columnKey(column, "v")); //$NON-NLS-1$ + fVisible.put(column, b); + return b; + } + } + + public void setVisible(String column, boolean visible) + { + fVisible.put(column, visible); + getDialogSettings().put(columnKey(column, "v"), visible); //$NON-NLS-1$ + } + + public int getWidth(String column) + { + if (fWidth.containsKey(column)) + return fWidth.get(column); + else + { + setDefaultSetting(columnKey(column, "w"), -1); //$NON-NLS-1$ + int w = getDialogSettings().getInt(columnKey(column, "w")); //$NON-NLS-1$ + fWidth.put(column, w); + return w; + } + } + + public void setWidth(String column, int width) + { + fWidth.put(column, width); + getDialogSettings().put(columnKey(column, "w"), width); //$NON-NLS-1$ + } + + public int getSortColumn() + { + if (fSortColumn == null) + { + setDefaultSetting(globalKey("sortColumn"), 0); //$NON-NLS-1$ + fSortColumn = getDialogSettings().getInt(globalKey("sortColumn")); //$NON-NLS-1$ + } + return fSortColumn; + } + + public void setSortColumn(int column) + { + fSortColumn = column; + getDialogSettings().put(globalKey("sortColumn"), fSortColumn); //$NON-NLS-1$ + } + + public int getSortDirection() + { + if (fSortDirection == null) + { + setDefaultSetting(globalKey("sortDirection"), 1); //$NON-NLS-1$ + fSortDirection = getDialogSettings().getInt(globalKey("sortDirection")); //$NON-NLS-1$ + } + return fSortDirection; + } + + public void setSortDirection(int direction) + { + fSortDirection = direction; + getDialogSettings().put(globalKey("sortDirection"), fSortDirection); //$NON-NLS-1$ + } + + private String columnKey(String column, String what) + { + return "columnLayout." + fResourceClass + "." + column + "." + what; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + } + + private String globalKey(String what) + { + return "columnLayout." + fResourceClass + "." + what; //$NON-NLS-1$ //$NON-NLS-2$ + } +} diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/osview/ContentLabelProviderWrapper.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/osview/ContentLabelProviderWrapper.java new file mode 100644 index 00000000000..d322b096fd7 --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/osview/ContentLabelProviderWrapper.java @@ -0,0 +1,88 @@ +/******************************************************************************* + * Copyright (c) 2011, 2012 Mentor Graphics 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: + * Vladimir Prus (Mentor Graphics) - initial API and implementation + *******************************************************************************/ + +package org.eclipse.cdt.dsf.gdb.internal.ui.osview; + +import org.eclipse.jface.viewers.ILabelProviderListener; +import org.eclipse.jface.viewers.IStructuredContentProvider; +import org.eclipse.jface.viewers.ITableLabelProvider; +import org.eclipse.jface.viewers.Viewer; +import org.eclipse.swt.graphics.Image; + +/** Helper class to change table and label provider of a TreeViewer in an atomic fashion. + * + * Suppose we want to change both content and label provider of existing TreeViewer. Right now, + * if we set either, TreeViewer will try a refresh, using one new provider and one old. This + * is obviously nonsensical -- for example if we set set new content provider, then old label provider + * will be asked to provide labels for elements it has no idea what to do with, or for columns beyond + * its range, etc. + * + * This class is wrapping our real content provider, and can be retargeted in one call -- after which + * refresh of TreeViewer sees consistent data. + * + * @since 2.4 + * */ +public class ContentLabelProviderWrapper +implements ITableLabelProvider, IStructuredContentProvider +{ + + public ContentLabelProviderWrapper(U realProvider) + { + this.realProvider = realProvider; + } + + public void setData(U realProvider) + { + this.realProvider = realProvider; + } + + @Override + public Image getColumnImage(Object obj, int index) { + return realProvider.getColumnImage(obj, index); + } + + @Override + public void addListener(ILabelProviderListener listener) { + realProvider.addListener(listener); + } + + @Override + public boolean isLabelProperty(Object element, String property) { + return realProvider.isLabelProperty(element, property); + } + + @Override + public void removeListener(ILabelProviderListener listener) { + realProvider.removeListener(listener); + } + + @Override + public String getColumnText(Object obj, int index) { + return realProvider.getColumnText(obj, index); + } + + @Override + public void inputChanged(Viewer v, Object oldInput, Object newInput) { + realProvider.inputChanged(v, oldInput, newInput); + } + + @Override + public void dispose() { + realProvider.dispose(); + } + + @Override + public Object[] getElements(Object parent) { + return realProvider.getElements(parent); + } + + private U realProvider; +} diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/osview/Messages.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/osview/Messages.java new file mode 100644 index 00000000000..ae708ab7f14 --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/osview/Messages.java @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright (c) 2011, 2012 Mentor Graphics 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: + * Vladimir Prus (Mentor Graphics) - initial API and implementation + *******************************************************************************/ + +package org.eclipse.cdt.dsf.gdb.internal.ui.osview; + +import org.eclipse.osgi.util.NLS; + +/** + * @since 2.4 + */ +public class Messages extends NLS { + public static String OSView_3; + public static String OSView_4; + public static String OSView_5; + public static String OSView_6; + public static String OSView_7; + public static String OSView_8; + public static String OSView_9; + public static String OSView_10; + public static String OSView_11; + public static String OSView_12; + public static String OSView_13; + public static String OSView_14; + static { + // initialize resource bundle + NLS.initializeMessages(Messages.class.getName(), Messages.class); + } + + private Messages() { + } +} diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/osview/Messages.properties b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/osview/Messages.properties new file mode 100644 index 00000000000..79bea302796 --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/osview/Messages.properties @@ -0,0 +1,22 @@ +############################################################################### +# Copyright (c) 2011, 2012 Mentor Graphics 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: +# Vladimir Prus (Mentor Graphics) - initial API and implementation +############################################################################### +OSView_3=Refresh +OSView_4=Invalid debug session selected. +OSView_5=Please select resource class. +OSView_6=Fetching data... +OSView_7=No data has been fetched yet. Fetch now. +OSView_8='Refresh (last fetched on' h:mm:ss ')' +OSView_9=Updating OS resources view +OSView_10=OS resources are not available using your target and GDB. +OSView_11=Determining available OS resource classes... +OSView_12=No data has been fetched yet. Target is busy. +OSView_13=Waiting for the debug session to initialize. +OSView_14=Objects from different debug sessions are selected. diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/osview/OSData.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/osview/OSData.java new file mode 100644 index 00000000000..0bbad09af74 --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/osview/OSData.java @@ -0,0 +1,148 @@ +/******************************************************************************* + * Copyright (c) 2011, 2012 Mentor Graphics 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: + * Vladimir Prus (Mentor Graphics) - initial API and implementation + *******************************************************************************/ + +package org.eclipse.cdt.dsf.gdb.internal.ui.osview; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.cdt.dsf.gdb.service.IGDBHardwareAndOS2.IResourcesInformation; +import org.eclipse.jface.viewers.IStructuredContentProvider; +import org.eclipse.jface.viewers.ITableLabelProvider; +import org.eclipse.jface.viewers.LabelProvider; +import org.eclipse.jface.viewers.Viewer; +import org.eclipse.swt.graphics.Image; + +/* Table data provider that exposes information about OS resources + * of specific class. Constructed from MI output. Once constructed, + * this class is immutable. + */ +class OSData +extends LabelProvider +implements ITableLabelProvider, IStructuredContentProvider +{ + private IResourcesInformation data; + private boolean[] columnIsInteger; + private List remap; + + public OSData(String resourceClass, IResourcesInformation data) { + this.data = data; + determineColumnTypes(); + + remap = new ArrayList(data.getColumnNames().length); + for (int i = 0; i < data.getColumnNames().length; ++i) + remap.add(i); + + if (resourceClass.equals("processes")) //$NON-NLS-1$ + sendToEnd("Command"); //$NON-NLS-1$ + + if (resourceClass.equals("threads")) //$NON-NLS-1$ + sendToEnd("Command"); //$NON-NLS-1$ + + if (resourceClass.equals("modules")) //$NON-NLS-1$ + sendToEnd("Dependencies"); //$NON-NLS-1$ + } + + // Determine column types, for the purpose of proper sorting + private void determineColumnTypes() + { + String[] columnNames = data.getColumnNames(); + String[][] content = data.getContent(); + + columnIsInteger = new boolean[columnNames.length]; + + boolean[] columnHasInteger = new boolean[columnNames.length]; + boolean[] columnHasOther = new boolean[columnNames.length]; + + for (int i = 0; i < content.length; ++i) { + for (int j = 0; j < content[i].length; ++j) { + if (!columnHasOther[j]) + { + try { + Integer.parseInt(content[i][j]); + columnHasInteger[j] = true; + } + catch(NumberFormatException e) { + columnHasOther[j] = true; + } + catch(Throwable e) { + e.printStackTrace(); + } + } + + } + } + + for (int j = 0; j < data.getColumnNames().length; ++j) { + columnIsInteger[j] = columnHasInteger[j] && !columnHasOther[j]; + } + } + + /* Make column named 'column' appear last in UI. */ + private void sendToEnd(String column) + { + // Find index in the remap array (which is equal to index in UI) + // at which column named 'column' is found. + int index = -1; + for (int i = 0; i < remap.size(); ++i) + if (data.getColumnNames()[remap.get(i)].equals(column)) { + index = i; + break; + } + if (index == -1) + return; + + // Move the element to the end of the list + remap.add(remap.remove(index)); + } + + public int getColumnCount() + { + return remap.size(); + } + + public String getColumnName(int i) + { + return data.getColumnNames()[remap.get(i)]; + } + + public boolean getColumnIsInteger(int j) { + return columnIsInteger[remap.get(j)]; + } + + @Override + public String getColumnText(Object obj, int index) { + return ((String[]) obj)[remap.get(index)]; + } + + @Override + public Image getColumnImage(Object obj, int index) { + return getImage(obj); + } + + @Override + public Image getImage(Object obj) { + return null; + } + + @Override + public void inputChanged(Viewer v, Object oldInput, Object newInput) { + } + + @Override + public void dispose() { + } + + @Override + public Object[] getElements(Object parent) { + return data.getContent(); + } +} diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/osview/OSResourcesView.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/osview/OSResourcesView.java new file mode 100644 index 00000000000..5e5f2a7cc5a --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/osview/OSResourcesView.java @@ -0,0 +1,641 @@ +/******************************************************************************* + * Copyright (c) 2011, 2012 Mentor Graphics 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: + * Vladimir Prus (Mentor Graphics) - initial API and implementation + *******************************************************************************/ + +package org.eclipse.cdt.dsf.gdb.internal.ui.osview; + +import java.net.URL; +import java.text.SimpleDateFormat; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; + +import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor; +import org.eclipse.cdt.dsf.concurrent.Query; +import org.eclipse.cdt.dsf.datamodel.DMContexts; +import org.eclipse.cdt.dsf.datamodel.IDMContext; +import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService; +import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService.ICommandControlDMContext; +import org.eclipse.cdt.dsf.gdb.internal.GdbPlugin; +import org.eclipse.cdt.dsf.gdb.launching.GdbLaunch; +import org.eclipse.cdt.dsf.service.DsfServicesTracker; +import org.eclipse.cdt.dsf.service.DsfSession; +import org.eclipse.cdt.dsf.ui.viewmodel.datamodel.IDMVMContext; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.jobs.Job; +import org.eclipse.debug.ui.DebugUITools; +import org.eclipse.debug.ui.contexts.DebugContextEvent; +import org.eclipse.debug.ui.contexts.IDebugContextListener; +import org.eclipse.debug.ui.contexts.IDebugContextManager; +import org.eclipse.debug.ui.contexts.IDebugContextService; +import org.eclipse.jface.action.Action; +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.TableViewer; +import org.eclipse.jface.viewers.Viewer; +import org.eclipse.jface.viewers.ViewerComparator; +import org.eclipse.osgi.util.NLS; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Event; +import org.eclipse.swt.widgets.Link; +import org.eclipse.swt.widgets.Listener; +import org.eclipse.swt.widgets.Table; +import org.eclipse.swt.widgets.TableColumn; +import org.eclipse.ui.IActionBars; +import org.eclipse.ui.part.ViewPart; +import org.eclipse.ui.progress.UIJob; +import org.osgi.framework.Bundle; + +/** + * @since 2.4 + */ +public class OSResourcesView extends ViewPart implements DsfSession.SessionEndedListener { + + private final static String FETCH_LINK_TAG = "fetch"; //$NON-NLS-1$ + + // The data model for the selected session, or null if no session is + // selected. + private SessionOSData fSessionData; + private Map fSessionDataCache = new HashMap(); + // The data presently shown by table viewer. + private OSData fTableShownData = null; + // The data which was used to populate column selector menu + private OSData fMenuShownData = null; + private String fResourceClass = null; + + // Indicates that we've selected objects from different debug sessions. + boolean fMultiple = false; + + + // UI objects + private TableViewer fViewer; + private Comparator fComparator; + private Composite fNothingLabelContainer; + private Link fNothingLabel; + private ResourceClassContributionItem fResourceClassEditor; + private Action fRefreshAction; + + // Map from resource class name to table column layout. + private Map fColumnLayouts = new HashMap(); + + private ColumnLayout fColumnLayout = null; + + private IDebugContextListener fDebugContextListener; + + @Override + public void createPartControl(Composite xparent) { + + Composite parent = new Composite(xparent, SWT.NONE); + GridLayout topLayout = new GridLayout(1, false); + topLayout.marginWidth = 0; + topLayout.marginHeight = 0; + parent.setLayout(topLayout); + + fViewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL + | SWT.V_SCROLL); + GridData viewerData = new GridData(GridData.FILL_BOTH); + viewerData.exclude = true; + fViewer.getControl().setLayoutData(viewerData); + + fViewer.setComparator(fComparator = new Comparator()); + + Table table = fViewer.getTable(); + table.setHeaderVisible(true); + table.setVisible(false); + + fNothingLabelContainer = new Composite(parent, SWT.NONE); + + GridData nothingLayout = new GridData(SWT.FILL, SWT.FILL, true, true); + fNothingLabelContainer.setLayoutData(nothingLayout); + + GridLayout containerLayout = new GridLayout(1, false); + fNothingLabelContainer.setLayout(containerLayout); + + fNothingLabel = new Link(fNothingLabelContainer, SWT.BORDER); + fNothingLabel.setText(Messages.OSView_4); + fNothingLabel.setBackground(fNothingLabel.getDisplay().getSystemColor( + SWT.COLOR_LIST_BACKGROUND)); + fNothingLabel.addListener (SWT.Selection, new Listener () { + @Override + public void handleEvent(Event event) { + if (event.text.equals("fetch")) //$NON-NLS-1$ + if (fSessionData != null && fResourceClass != null) + fSessionData.fetchData(fResourceClass); + } + }); + fNothingLabelContainer.setBackground(fNothingLabel.getBackground()); + + GridData nothingLabelLayout = new GridData(SWT.CENTER, SWT.TOP, true, false); + fNothingLabel.setLayoutData(nothingLabelLayout); + + fResourceClassEditor = new ResourceClassContributionItem(); + fResourceClassEditor.setListener(new ResourceClassContributionItem.Listener() { + + @Override + public void resourceClassChanged(String newClass) { + fResourceClass = newClass; + // Since user explicitly changed the class, initiate fetch immediately. + fSessionData.fetchData(fResourceClass); + // Do not call 'update()' here. fetchData call above will notify + // us at necessary moments. + } + }); + IActionBars bars = getViewSite().getActionBars(); + bars.getToolBarManager().add(fResourceClassEditor); + + fRefreshAction = new Action() { + @Override + public void run() { + if (fSessionData != null && fResourceClass != null) + fSessionData.fetchData(fResourceClass); + } + }; + fRefreshAction.setText(Messages.OSView_3); + fRefreshAction.setToolTipText(Messages.OSView_3); + try { + Bundle bundle= Platform.getBundle("org.eclipse.ui"); //$NON-NLS-1$ + URL url = bundle.getEntry("/"); //$NON-NLS-1$ + url = new URL(url, "icons/full/elcl16/refresh_nav.gif"); //$NON-NLS-1$ + ImageDescriptor candidate = ImageDescriptor.createFromURL(url); + if (candidate != null && candidate.getImageData() != null) { + fRefreshAction.setImageDescriptor(candidate); + } + } catch (Exception e) { + } + bars.getToolBarManager().add(fRefreshAction); + bars.updateActionBars(); + + fResourceClass = fResourceClassEditor.getResourceClassId(); + + setupContextListener(); + DsfSession.addSessionEndedListener(this); + } + + private void setupContextListener() { + IDebugContextManager contextManager = DebugUITools.getDebugContextManager(); + IDebugContextService contextService = contextManager + .getContextService(getSite().getWorkbenchWindow()); + + fDebugContextListener = new IDebugContextListener() { + + @Override + public void debugContextChanged(DebugContextEvent event) { + + if ((event.getFlags() & DebugContextEvent.ACTIVATED) != 0) { + ISelection s = event.getContext(); + setDebugContext(s); + } + } + }; + contextService.addDebugContextListener(fDebugContextListener); + setDebugContext(contextService.getActiveContext()); + } + + @Override + public void dispose() { + super.dispose(); + + IDebugContextManager contextManager = DebugUITools.getDebugContextManager(); + IDebugContextService contextService = contextManager + .getContextService(getSite().getWorkbenchWindow()); + contextService.removeDebugContextListener(fDebugContextListener); + + setDebugContext((ICommandControlDMContext)null); + DsfSession.removeSessionEndedListener(this); + } + + private void setDebugContext(ISelection s) { + + ICommandControlDMContext context = null; + fMultiple = false; + if (s instanceof IStructuredSelection) { + IStructuredSelection ss = (IStructuredSelection) s; + if (ss.size() > 0) { + @SuppressWarnings("rawtypes") + Iterator i = ss.iterator(); + context = getCommandControlContext(i.next()); + while (i.hasNext()) { + ICommandControlDMContext nextContext = getCommandControlContext(i.next()); + if (nextContext == null && context != null + || nextContext != null && context == null + || nextContext != null && context != null && !nextContext.equals(context)) + { + context = null; + fMultiple = true; + break; + } + } + } + } + + setDebugContext(context); + } + + private ICommandControlDMContext getCommandControlContext(Object obj) { + IDMContext context = null; + if (obj instanceof IDMVMContext) + context = ((IDMVMContext)obj).getDMContext(); + else if (obj instanceof GdbLaunch) { + GdbLaunch l = (GdbLaunch)obj; + final DsfServicesTracker tracker = new DsfServicesTracker(GdbPlugin.getBundleContext(), l.getSession().getId()); + Query contextQuery = new Query() { + @Override + protected void execute(DataRequestMonitor rm) { + ICommandControlService commandControl = tracker.getService(ICommandControlService.class); + tracker.dispose(); + if (commandControl != null) + { + rm.setData(commandControl.getContext()); + } + rm.done(); + } + }; + l.getSession().getExecutor().submit(contextQuery); + try { + context = contextQuery.get(); + } catch (Exception e) { + } + } + return DMContexts.getAncestorOfType(context, ICommandControlDMContext.class); + } + + private void setDebugContext(ICommandControlDMContext context) + { + DsfSession newSession = null; + SessionOSData newSessionData = null; + + if (context != null) + { + newSession = DsfSession.getSession(context.getSessionId()); + } + + if (newSession != null) + { + newSessionData = fSessionDataCache.get(newSession.getId()); + if (newSessionData == null) + { + newSessionData = new SessionOSData(newSession, context); + fSessionDataCache.put(newSession.getId(), newSessionData); + + newSessionData.setUIListener(new SessionOSData.Listener() { + + @Override + public void update() { + // Note that fSessionData always calls the listener in + // UI thread, so we can directly call 'update' here. + OSResourcesView.this.update(); + } + }, fViewer.getControl()); + } + } + + + if (newSessionData != fSessionData) + { + fSessionData = newSessionData; + update(); + } + } + + @Override + public void sessionEnded(DsfSession session) { + String id = session.getId(); + SessionOSData data = fSessionDataCache.remove(id); + if (data != null) { + data.dispose(); + } + } + + private void update() { + + if (fViewer == null || fViewer.getControl() == null) + return; + + if (fViewer.getControl().isDisposed()) + return; + + if (fSessionData == null) + { + hideTable(fMultiple ? Messages.OSView_14 : Messages.OSView_4); + fResourceClassEditor.setEnabled(false); + fRefreshAction.setEnabled(false); + return; + } + + boolean enable = fSessionData.canFetchData(); + fRefreshAction.setEnabled(enable); + fResourceClass = fResourceClassEditor.updateClasses(fSessionData.getResourceClasses()); + fResourceClassEditor.setEnabled(enable); + + if (!fSessionData.osResourcesSupported()) { + fRefreshAction.setEnabled(false); + fResourceClassEditor.setEnabled(false); + hideTable(Messages.OSView_10); + return; + } + + if (fSessionData.waitingForSessionInitialization()) { + fRefreshAction.setEnabled(false); + fResourceClassEditor.setEnabled(false); + hideTable(Messages.OSView_13); + return; + } + + if (fSessionData.fetchingClasses()) { + fRefreshAction.setEnabled(false); + fResourceClassEditor.setEnabled(false); + hideTable(Messages.OSView_11); + return; + } + + if (fResourceClass == null) + { + fRefreshAction.setEnabled(false); + fResourceClassEditor.setEnabled(true); + hideTable(Messages.OSView_5); + return; + } + + + final OSData data = fSessionData.existingData(fResourceClass); + + if (fSessionData.fetchingContent()) + { + hideTable(Messages.OSView_6); + } + else if (data == null) + { + if (fSessionData.canFetchData()) + hideTable(NLS.bind(Messages.OSView_7, FETCH_LINK_TAG)); + else + hideTable(Messages.OSView_12); + } + else + { + SimpleDateFormat format = new SimpleDateFormat(Messages.OSView_8); + fRefreshAction.setToolTipText(format.format(fSessionData.timestamp(fResourceClass))); + if (data != fTableShownData) + { + Job job = new UIJob(Messages.OSView_9) { + @Override + public IStatus runInUIThread(IProgressMonitor monitor) { + fTableShownData = data; + populateTable(data); + showTable(); + return Status.OK_STATUS; + } + + }; + job.setPriority(Job.INTERACTIVE); + job.schedule(); + } + else + { + assert fViewer.getTable().getColumnCount() == data.getColumnCount(); + showTable(); + } + } + fRefreshAction.setEnabled(fSessionData.canFetchData()); + fResourceClassEditor.setEnabled(fSessionData.canFetchData()); + + } + + /* Hide the table that would show OS awareness data if it were available. Display + * 'message' instead. + */ + private void hideTable(String message) { + setContentDescription(""); //$NON-NLS-1$ + fViewer.getControl().setVisible(false); + ((GridData) fViewer.getControl().getLayoutData()).exclude = true; + fNothingLabelContainer.setVisible(true); + ((GridData) fNothingLabelContainer.getLayoutData()).exclude = false; + fNothingLabelContainer.getParent().layout(); + fNothingLabel.setText(message); + fNothingLabelContainer.layout(); + + // If the table is not shown, we don't want the menu to have stale + // list of columns to select from. + IActionBars bars = getViewSite().getActionBars(); + bars.getMenuManager().removeAll(); + bars.updateActionBars(); + fMenuShownData = null; + } + + private void showTable() { + assert fTableShownData != null; + + fViewer.getControl().setVisible(true); + ((GridData) fViewer.getControl().getLayoutData()).exclude = false; + fNothingLabelContainer.setVisible(false); + ((GridData) fNothingLabelContainer.getLayoutData()).exclude = true; + fNothingLabelContainer.getParent().layout(); + + populateViewMenu(fTableShownData); + } + + private void populateTable(final OSData data) + { + final Table table = fViewer.getTable(); + + while (table.getColumnCount() > 0) + table.getColumns()[0].dispose(); + + fColumnLayout = fColumnLayouts.get(fResourceClass); + if (fColumnLayout == null) + { + fColumnLayout = new ColumnLayout(fResourceClass); + fColumnLayouts.put(fResourceClass, fColumnLayout); + } + + for (int i = 0; i < data.getColumnCount(); ++i) { + final String cn = data.getColumnName(i); + final TableColumn c = new TableColumn(table, SWT.LEFT); + c.setText(cn); + + c.addListener(SWT.Resize, new Listener() { + + @Override + public void handleEvent(Event event) { + fColumnLayout.setWidth(cn, c.getWidth()); + } + }); + + final int final_index = i; + c.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + int dir = table.getSortDirection(); + if (table.getSortColumn() == c) { + dir = dir == SWT.UP ? SWT.DOWN : SWT.UP; + } else { + dir = SWT.DOWN; + } + table.setSortDirection(dir); + table.setSortColumn(c); + fComparator.configure(final_index, data); + fComparator.setDirection(dir == SWT.DOWN ? 1 : -1); + fColumnLayout.setSortColumn(final_index); + fColumnLayout.setSortDirection(dir == SWT.DOWN ? 1 : -1); + fViewer.refresh(); + } + }); + } + + populateViewMenu(data); + + int sortColumn = fColumnLayout.getSortColumn(); + if (sortColumn < data.getColumnCount()) + { + fComparator.configure(sortColumn, data); + } + fComparator.setDirection(fColumnLayout.getSortDirection()); + + fViewer.getTable().setEnabled(true); + + + if (fViewer.getContentProvider() == null) + { + ContentLabelProviderWrapper wrapper = + new ContentLabelProviderWrapper(data); + fViewer.setContentProvider(wrapper); + fViewer.setLabelProvider(wrapper); + } + else + { + // Retarget current content/label providers in atomic fashion. See comments + // on ContentLabelProviderWrapper. + @SuppressWarnings("unchecked") + ContentLabelProviderWrapper wrapper = (ContentLabelProviderWrapper)fViewer.getContentProvider(); + wrapper.setData(data); + } + fViewer.setInput(getViewSite()); + fViewer.getControl().setVisible(true); + + for (int i = 0; i < fViewer.getTable().getColumnCount(); ++i) + { + TableColumn col = fViewer.getTable().getColumns()[i]; + String cn = col.getText(); + + if (i == sortColumn) { + table.setSortDirection(fColumnLayout.getSortDirection() == 1 ? SWT.DOWN : SWT.UP); + table.setSortColumn(col); + } + + if (fColumnLayout.getVisible(cn)) + { + int w = fColumnLayout.getWidth(cn); + if (w > 0) + col.setWidth(w); + else + col.pack(); + } + else + { + col.setWidth(0); + col.setResizable(false); + } + } + } + + private void populateViewMenu(final OSData data) { + + assert data.getColumnCount() == fViewer.getTable().getColumnCount(); + + if (data == fMenuShownData) + return; + + IActionBars bars = getViewSite().getActionBars(); + bars.getMenuManager().setVisible(true); + bars.getMenuManager().removeAll(); + + for (int i = 0; i < data.getColumnCount(); ++i) { + final String cn = data.getColumnName(i); + final TableColumn c = fViewer.getTable().getColumns()[i]; + + Action a = new Action(cn, IAction.AS_CHECK_BOX) { + @Override + public void run() { + if (isChecked()) { + int w = fColumnLayout.getWidth(cn); + if (w > 0) + c.setWidth(w); + else + c.pack(); + c.setResizable(true); + } else { + int w = c.getWidth(); + c.setWidth(0); + // Make sure we remember the width the column + // had before hiding. + fColumnLayout.setWidth(cn, w); + c.setResizable(false); + } + fColumnLayout.setVisible(cn, isChecked()); + } + }; + a.setChecked(fColumnLayout.getVisible(cn)); + a.setText(cn); + bars.getMenuManager().add(a); + } + bars.updateActionBars(); + + fMenuShownData = data; + } + + class Comparator extends ViewerComparator + { + private int fColumn = 0; + private OSData fData; + private boolean fInteger = false; + private int fDirection = 1; + + public void configure(int column, OSData data) + { + fColumn = column; + fData = data; + fInteger = data.getColumnIsInteger(column); + } + + public void setDirection(int direction) + { + assert direction == 1 || direction == -1; + fDirection = direction; + } + + @Override + public int compare(Viewer viewer, Object xe1, Object xe2) { + + String v1 = fData.getColumnText(xe1, fColumn); + String v2 = fData.getColumnText(xe2, fColumn); + if (fInteger) { + Integer i1 = Integer.parseInt(v1); + Integer i2 = Integer.parseInt(v2); + return fDirection*(i1 - i2); + } else { + return fDirection*(v1.compareTo(v2)); + } + } + }; + + @Override + public void setFocus() { + fViewer.getControl().setFocus(); + } +} diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/osview/ResourceClassContributionItem.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/osview/ResourceClassContributionItem.java new file mode 100644 index 00000000000..68c37dfd91a --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/osview/ResourceClassContributionItem.java @@ -0,0 +1,210 @@ +/******************************************************************************* + * Copyright (c) 2011, 2012 Mentor Graphics 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: + * Vladimir Prus (Mentor Graphics) - initial API and implementation + *******************************************************************************/ + +package org.eclipse.cdt.dsf.gdb.internal.ui.osview; + +import org.eclipse.cdt.dsf.gdb.internal.ui.GdbUIPlugin; +import org.eclipse.cdt.dsf.gdb.service.IGDBHardwareAndOS2.IResourceClass; +import org.eclipse.jface.action.ContributionItem; +import org.eclipse.jface.dialogs.IDialogSettings; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.events.SelectionListener; +import org.eclipse.swt.graphics.GC; +import org.eclipse.swt.widgets.Combo; +import org.eclipse.swt.widgets.ToolBar; +import org.eclipse.swt.widgets.ToolItem; + +/** + * @since 2.4 + */ +public class ResourceClassContributionItem extends ContributionItem { + + // In some places below, we are trying to determine size hint for Combo, given the list of + // content. However, while we can determine width of content, we don't know how much width + // the combobox itself is adding. This constant is our guess. + private static final int COMBO_TRIM_WIDTH = 64; + + interface Listener + { + void resourceClassChanged(String newClass); + } + + private Combo fResourceClassCombo; + private IResourceClass[] resourceClasses = new IResourceClass[0]; + private String fResourceClassId = null; + + private Listener fListener; + private boolean blockListener = false; + private ToolItem toolItem; + + private boolean enabled = true; + + private static IDialogSettings settings; + private static IDialogSettings getDialogSettings() + { + if (settings != null) + return settings; + + IDialogSettings topSettings = GdbUIPlugin.getDefault().getDialogSettings(); + settings = topSettings.getSection(ResourceClassContributionItem.class.getName()); + if (settings == null) { + settings = topSettings.addNewSection(ResourceClassContributionItem.class.getName()); + } + return settings; + } + + public void setListener(Listener listener) { + + fListener = listener; + } + + public void setEnabled(boolean enable) { + // It appears that every update of action bars will call 'fill' action below, creating + // combo. So, we want to keep 'enabled' state as member variable, to make sure it is kept + // if combo is recreated. + enabled = enable; + if (fResourceClassCombo != null) + fResourceClassCombo.setEnabled(enable); + } + + public String updateClasses(IResourceClass[] resourceClasses) { + + boolean different = false; + if (this.resourceClasses.length != resourceClasses.length) + different = true; + else for (int i = 0; i < this.resourceClasses.length; ++i) { + if (!this.resourceClasses[i].getId().equals(resourceClasses[i].getId()) + || !this.resourceClasses[i].getHumanDescription().equals(resourceClasses[i].getHumanDescription())) + { + different = true; + break; + } + } + + if (!different) + return fResourceClassId; + + this.resourceClasses = resourceClasses; + + fResourceClassCombo.removeAll(); + final int width = populateCombo(); + // Now change the width. Call to setWidth causes relayout automatically. + // IMPORTANT: the visibility check is critical. Without it, we appear to have hit + // an SWT/Gtk bug whenever a debug session and a previously use OS resources view + // is not shown. The bug manifests by 100% CPU consumption inside event loop, and + // it further blocks asyncExec runnables from ever executing. I suppose it might + // be specific to relayout of invisible toolbar. + + // If we're invisible, we don't arrange for relayout to happen when the view becomes + // available, because it is not exactly trivial (we need to events on the right control) + // and it only matters when we start a new session and it has a different set of + // resource classes and that requires longer combobox. + if (toolItem.getParent().isVisible()) + toolItem.setWidth(width); + + return fResourceClassId; + } + + /** Populate the combobox with resource classes. Return the width the + * combobox must have, including any trim. If there are no resource classes, + * returns some reasonable default width. + */ + private int populateCombo() { + + int width = 0; + String lastResourceClassId = getDialogSettings().get("resourceClass"); //$NON-NLS-1$ + int index = -1; + int i = 0; + GC gc = new GC(fResourceClassCombo); + for (i = 0; i < resourceClasses.length; ++i) { + String description = resourceClasses[i].getHumanDescription(); + width = Math.max(width, gc.textExtent(description).x); + fResourceClassCombo.add(description); + if (resourceClasses[i].getId().equals(lastResourceClassId)) + index = i; + } + + + + if (index != -1) { + fResourceClassId = lastResourceClassId; + blockListener = true; + fResourceClassCombo.select(index); + blockListener = false; + } + + if (width == 0) { + // We have some hints what the longest element in combo will be. Even if it's different + // in new GDB version, no problem -- the combo will be resized when it's populated. + width = gc.textExtent("Shared memory regions").x; //$NON-NLS-1$ + } + + // Because there's no way whatsoever to set the width + // of the combobox list, only complete length, we just add + // random padding. + width = width + COMBO_TRIM_WIDTH; + + return width; + } + + + public String getResourceClassId() { + return fResourceClassId; + } + + @Override + public void fill(ToolBar parent, int toolbarItemIndex) { + + fResourceClassCombo = new Combo(parent, SWT.NONE); + fResourceClassCombo.setEnabled(enabled); + int width = populateCombo(); + + fResourceClassCombo.addSelectionListener(new SelectionListener() { + + @SuppressWarnings({ "null"}) + @Override + public void widgetSelected(SelectionEvent e) { + String description = fResourceClassCombo.getText(); + String id = null; + for (int i = 0; i < resourceClasses.length; ++i) + if (resourceClasses[i].getHumanDescription().equals(description)) { + id = resourceClasses[i].getId(); + break; + } + + // id is never null here, unless we messed up our data structures. + assert id != null; + if (id != null && !id.equals(fResourceClassId)) + { + fResourceClassId = id; + getDialogSettings().put("resourceClass", id); //$NON-NLS-1$ + if (fListener != null && !blockListener) + fListener.resourceClassChanged(fResourceClassId); + } + } + + @Override + public void widgetDefaultSelected(SelectionEvent e) { + } + }); + + + toolItem = new ToolItem(parent, SWT.SEPARATOR); + toolItem.setControl(fResourceClassCombo); + toolItem.setWidth(width); + } + + @Override + public boolean isDynamic() { + return false; + } +} diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/osview/SessionOSData.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/osview/SessionOSData.java new file mode 100644 index 00000000000..bfcbed340ea --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/osview/SessionOSData.java @@ -0,0 +1,292 @@ +/******************************************************************************* + * Copyright (c) 2011, 2012 Mentor Graphics 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: + * Vladimir Prus (Mentor Graphics) - initial API and implementation + *******************************************************************************/ + +package org.eclipse.cdt.dsf.gdb.internal.ui.osview; + +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.cdt.dsf.concurrent.ConfinedToDsfExecutor; +import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor; +import org.eclipse.cdt.dsf.concurrent.DsfExecutor; +import org.eclipse.cdt.dsf.concurrent.DsfRunnable; +import org.eclipse.cdt.dsf.datamodel.DataModelInitializedEvent; +import org.eclipse.cdt.dsf.debug.service.IRunControl.IContainerResumedDMEvent; +import org.eclipse.cdt.dsf.debug.service.IRunControl.IContainerSuspendedDMEvent; +import org.eclipse.cdt.dsf.debug.service.IRunControl.IResumedDMEvent; +import org.eclipse.cdt.dsf.debug.service.IRunControl.ISuspendedDMEvent; +import org.eclipse.cdt.dsf.debug.service.command.ICommandControlService.ICommandControlDMContext; +import org.eclipse.cdt.dsf.gdb.internal.ui.GdbUIPlugin; +import org.eclipse.cdt.dsf.gdb.service.IGDBHardwareAndOS2; +import org.eclipse.cdt.dsf.mi.service.IMIRunControl; +import org.eclipse.cdt.dsf.service.DsfServiceEventHandler; +import org.eclipse.cdt.dsf.service.DsfServicesTracker; +import org.eclipse.cdt.dsf.service.DsfSession; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.statushandlers.StatusManager; +import org.osgi.framework.BundleContext; + +/** Responsible for fetching and storing OS awareness data for a + * specific DSF session. + * + * @since 2.4 + */ +public class SessionOSData { + + private DsfSession fSession; + private DsfServicesTracker fTracker; + private IGDBHardwareAndOS2 fHardwareOs; + private ICommandControlDMContext fContext; + + private IGDBHardwareAndOS2.IResourceClass[] fResourceClasses = new IGDBHardwareAndOS2.IResourceClass[0]; + private Map fExistingData = new HashMap(); + private Map fTimestamp = new HashMap(); + + private Listener fUIListener; + private Control fUIControl; + + private boolean fWaitingForSession = true; + private boolean fSupported = true; + private boolean fAcceptingCommands = false; + private boolean fFetchingClasses = false; + private boolean fFetchingContent = false; + + + public SessionOSData(DsfSession session, final ICommandControlDMContext executionContext) + { + fSession = session; + BundleContext c = GdbUIPlugin.getDefault().getBundle().getBundleContext(); + fTracker = new DsfServicesTracker(c, fSession.getId()); + fContext = executionContext; + + final DsfExecutor executor = fSession.getExecutor(); + executor.submit(new DsfRunnable() { + + @Override + public void run() { + + IMIRunControl runControl = fTracker.getService(IMIRunControl.class); + fAcceptingCommands = runControl.isTargetAcceptingCommands(); + + fSession.addServiceEventListener(SessionOSData.this, null); + + fHardwareOs = fTracker.getService(IGDBHardwareAndOS2.class); + + if (fHardwareOs == null) { + fSupported = false; + notifyUI(); + return; + } + + if (fHardwareOs.isAvailable()) { + fetchClasses(); + } + } + }); + } + + @ConfinedToDsfExecutor("") + private void fetchClasses() + { + fWaitingForSession = false; + fFetchingClasses = true; + fHardwareOs.getResourceClasses(fContext, new DataRequestMonitor(fSession.getExecutor(), null) { + @Override + @ConfinedToDsfExecutor("fExecutor") + protected void handleCompleted() { + + if (isSuccess()) + { + fResourceClasses = getData(); + if (fResourceClasses.length == 0) + fSupported = false; + } + else + { + fSupported = false; + } + fFetchingClasses = false; + notifyUI(); + } + }); + } + + @DsfServiceEventHandler + public void eventDispatched(DataModelInitializedEvent e) { + // If we see this event, it necessary means that by the time we've set event listener, + // isAvailable() was returning false, so we need to fetch classes now. + if (fHardwareOs != null) + fetchClasses(); + } + + public boolean waitingForSessionInitialization() + { + return fWaitingForSession; + } + + public boolean osResourcesSupported() + { + return fSupported; + } + + public void dispose() + { + fSession.removeServiceEventListener(SessionOSData.this); + fTracker.dispose(); + } + + public IGDBHardwareAndOS2.IResourceClass[] getResourceClasses() + { + return fResourceClasses; + } + + /** Returns OS awareness data for given resource class that + * was previously fetched, or null if none was ever fetched. + */ + public OSData existingData(String resourceClass) + { + return fExistingData.get(resourceClass); + } + + /** Returns the timestamp at which data for 'resourceClass' have + * been obtained. + * @pre existingData(resourceClass) != null + */ + public Date timestamp(String resourceClass) + { + return fTimestamp.get(resourceClass); + } + + /** Returns true if fresh data can be fetched at this time. + * Generally, it's possible if we're not fetching data already, + * and if GDB is accepting commands right now. + * + */ + public boolean canFetchData() + { + return fAcceptingCommands && !fFetchingContent; + } + + public boolean fetchingClasses() + { + return fFetchingClasses; + } + + /** Returns true if we're presently fetching data. This can + * be used to provide some feedback to the user. + */ + public boolean fetchingContent() + { + return fFetchingContent; + } + + /** Fetches up-to-date data for resourceClass. Listeners will be + * informed when the new data is available. */ + public void fetchData(final String resourceClass) + { + fFetchingContent = true; + notifyUI(); + + final DsfExecutor executor = fSession.getExecutor(); + executor.submit(new DsfRunnable() { + + @Override + public void run() { + fHardwareOs.getResourcesInformation(fContext, resourceClass, new DataRequestMonitor(executor, null) { + + @Override + @ConfinedToDsfExecutor("fExecutor") + protected void handleCompleted() { + + fFetchingContent = false; + + if (isSuccess()) + { + OSData data = new OSData(resourceClass, getData()); + fExistingData.put(resourceClass, data); + fTimestamp.put(resourceClass, new Date()); + } + else + { + StatusManager.getManager().handle(getStatus(), StatusManager.BLOCK); + } + notifyUI(); + } + }); + } + }); + + + } + + public interface Listener + { + void update(); + } + + /** Setup the listener that will be notified whenever externally + * visible state changes. The listener will always be invoked + * in the UI thread. 'control' is the control associated with + * the listener. The listener will not be called if the control + * is disposed. + */ + public void setUIListener(Listener listener, Control control) + { + fUIListener = listener; + fUIControl = control; + } + + private void notifyUI() + { + + final Control c = fUIControl; + if (c != null && !c.isDisposed()) + // There be dragons: if you try to use c.getDisplay() below, then this Runnable will not + // run until resource view is actually visible. And it will also block other interesting + // async/job runnables, like perspective switch runnable using during debug launch, + // causing launch to be stuck at random point. + // + Display.getDefault().asyncExec(new Runnable() { + + @Override + public void run() { + + if (!c.isDisposed()) + fUIListener.update(); + } + }); + + } + + @DsfServiceEventHandler + public void eventDispatched(IResumedDMEvent e) { + if (e instanceof IContainerResumedDMEvent) { + // This event is raised only in all-stop. It does not + // seem to be possible to issue -info-os in all-stop, + // regardless of whether target-async is in effect, and + // according to DSF folks, all-stop+target-async will + // not work anyway. So, we assume that no commands + // can be issued right now. + fAcceptingCommands = false; + notifyUI(); + } + } + + @DsfServiceEventHandler + public void eventDispatched(ISuspendedDMEvent e) { + if (e instanceof IContainerSuspendedDMEvent) { + fAcceptingCommands = true; + notifyUI(); + } + } +} diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/ThreadVMNode.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/ThreadVMNode.java index eec89059d50..89e3a2a7a88 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/ThreadVMNode.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/launch/ThreadVMNode.java @@ -18,7 +18,6 @@ import java.util.Map; import org.eclipse.cdt.debug.internal.ui.pinclone.PinCloneUtils; import org.eclipse.cdt.debug.ui.IPinProvider.IPinElementColorDescriptor; -import org.eclipse.cdt.dsf.concurrent.IDsfStatusConstants; import org.eclipse.cdt.dsf.concurrent.ImmediateExecutor; import org.eclipse.cdt.dsf.concurrent.RequestMonitor; import org.eclipse.cdt.dsf.datamodel.IDMContext; @@ -316,7 +315,7 @@ public class ThreadVMNode extends AbstractThreadVMNode final IThreadDMContext threadDmc = findDmcInPath(update.getViewerInput(), update.getElementPath(), IThreadDMContext.class); if (processService == null || threadDmc == null) { - update.setStatus(new Status(IDsfStatusConstants.INVALID_HANDLE, GdbUIPlugin.PLUGIN_ID, "Service or handle invalid", null)); //$NON-NLS-1$ + update.setStatus(new Status(IStatus.ERROR, GdbUIPlugin.PLUGIN_ID, "Service or handle invalid", null)); //$NON-NLS-1$ } else { processService.getExecutionData( threadDmc, diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBHardwareAndOS_7_5.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBHardwareAndOS_7_5.java new file mode 100644 index 00000000000..537c321216a --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBHardwareAndOS_7_5.java @@ -0,0 +1,95 @@ +/******************************************************************************* + * Copyright (c) 2011, 2012 Mentor Graphics 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: + * Vladimir Prus (Mentor Graphics) - initial API and implementation + *******************************************************************************/ + +package org.eclipse.cdt.dsf.gdb.service; + +import java.util.Hashtable; + +import org.eclipse.cdt.dsf.concurrent.ConfinedToDsfExecutor; +import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor; +import org.eclipse.cdt.dsf.concurrent.ImmediateExecutor; +import org.eclipse.cdt.dsf.concurrent.RequestMonitor; +import org.eclipse.cdt.dsf.datamodel.IDMContext; +import org.eclipse.cdt.dsf.gdb.internal.GdbPlugin; +import org.eclipse.cdt.dsf.gdb.service.command.IGDBControl; +import org.eclipse.cdt.dsf.mi.service.command.CommandFactory; +import org.eclipse.cdt.dsf.mi.service.command.output.MIInfoOsInfo; +import org.eclipse.cdt.dsf.service.DsfSession; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; + +/** + * @since 4.2 + */ +public class GDBHardwareAndOS_7_5 extends GDBHardwareAndOS implements IGDBHardwareAndOS2 { + + public GDBHardwareAndOS_7_5(DsfSession session) { + super(session); + } + + @Override + public boolean isAvailable() { + return getSessionInitializationComplete(); + } + + @Override + public void initialize(final RequestMonitor requestMonitor) { + super.initialize(new RequestMonitor(ImmediateExecutor.getInstance(), requestMonitor) { + @Override + protected void handleSuccess() { + register(new String[] { IGDBHardwareAndOS2.class.getName() }, + new Hashtable()); + + requestMonitor.done(); + } + }); + } + + @Override + public void getResourceClasses(final IDMContext dmc, final DataRequestMonitor rm) { + + IGDBControl control = getServicesTracker().getService(IGDBControl.class); + if (control == null) { + rm.done(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, INVALID_STATE, "Service not available", null)); //$NON-NLS-1$ + return; + } + + CommandFactory factory = control.getCommandFactory(); + control.queueCommand(factory.createMIInfoOS(dmc), new DataRequestMonitor(getExecutor(), rm) { + @Override + @ConfinedToDsfExecutor("fExecutor") + protected void handleSuccess() { + rm.setData(getData().getResourceClasses()); + rm.done(); + } + }); + } + + @Override + public void getResourcesInformation(final IDMContext dmc, final String resourceClass, final DataRequestMonitor rm) { + + IGDBControl control = getServicesTracker().getService(IGDBControl.class); + if (control == null) { + rm.done(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, INVALID_STATE, "Service not available", null)); //$NON-NLS-1$ + return; + } + + CommandFactory factory = control.getCommandFactory(); + control.queueCommand(factory.createMIInfoOS(dmc, resourceClass), new DataRequestMonitor(getExecutor(), rm) { + + @Override + protected void handleSuccess() { + rm.setData(getData().getResourcesInformation()); + rm.done(); + } + }); + } +} diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GdbDebugServicesFactory.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GdbDebugServicesFactory.java index 3d33d62131e..27501dff4ee 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GdbDebugServicesFactory.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GdbDebugServicesFactory.java @@ -11,6 +11,7 @@ * Onur Akdemir (TUBITAK BILGEM-ITI) - Multi-process debugging (Bug 237306) * Marc Khouzam (Ericsson) - Support for GDB 7.4 (Bug 367788) * Marc Khouzam (Ericsson) - Include IGDBHardware service for the multicore visualizer (Bug 335027) + * Vladimir Prus (Mentor Graphics) - Support for OS resources. *******************************************************************************/ package org.eclipse.cdt.dsf.gdb.service; @@ -62,6 +63,8 @@ public class GdbDebugServicesFactory extends AbstractDsfDebugServicesFactory { public static final String GDB_7_3_VERSION = "7.3"; //$NON-NLS-1$ /** @since 4.1 */ public static final String GDB_7_4_VERSION = "7.4"; //$NON-NLS-1$ + /** @since 4.2*/ + public static final String GDB_7_5_VERSION = "7.5"; //$NON-NLS-1$ private final String fVersion; @@ -229,6 +232,9 @@ public class GdbDebugServicesFactory extends AbstractDsfDebugServicesFactory { /** @since 4.1 */ protected IGDBHardwareAndOS createHardwareAndOSService(DsfSession session, ILaunchConfiguration config) { + if (GDB_7_5_VERSION.compareTo(fVersion) <= 0) { + return new GDBHardwareAndOS_7_5(session); + } return new GDBHardwareAndOS(session); } } diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/IGDBHardwareAndOS2.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/IGDBHardwareAndOS2.java new file mode 100644 index 00000000000..256c67dd93f --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/IGDBHardwareAndOS2.java @@ -0,0 +1,67 @@ +/******************************************************************************* + * Copyright (c) 2011, 2012 Mentor Graphics 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: + * Vladimir Prus (Mentor Graphics) - initial API and implementation + *******************************************************************************/ + +package org.eclipse.cdt.dsf.gdb.service; + +import org.eclipse.cdt.dsf.concurrent.DataRequestMonitor; +import org.eclipse.cdt.dsf.datamodel.IDMContext; + +/** + * Interface for accessing information about OS resources. + * + * EXPERIMENTAL. This class or interface has been added as part + * of a work in progress. There is no guarantee that this API will work or that + * it will remain the same. + * + * @since 4.2 + */ +public interface IGDBHardwareAndOS2 extends IGDBHardwareAndOS { + + /** Returns true if information returned by the other methods is available. + * If false is returned, it means that session initialization is in progress, + * and further request should be made after DataModelInitializedEvent is fired. + */ + public boolean isAvailable(); + + /** Information about OS resource class. */ + public interface IResourceClass + { + /** The id of this resource class, used in GDB requests. */ + public String getId(); + /** Human-friendly description of this class, suitable for direct display in UI. */ + public String getHumanDescription(); + } + + /** + * Return a list of OS resource classes GDB knows about + */ + public void getResourceClasses(IDMContext dmc, DataRequestMonitor rm); + + /** Information about OS resources of specific resource class + * This is conceptually a table. GDB provides column headers, and + * data rows, but does not provide any additional information about + * the meaning + */ + public interface IResourcesInformation + { + /** Return the names of the columns in resource table. */ + public String[] getColumnNames(); + /** Returns rows of the resource table. Each element is an array + * of the size equal to getColumnNames().length + */ + public String[][] getContent(); + } + + /** + * Return table describing resources of specified class. + */ + void getResourcesInformation(IDMContext dmc, String resourceClassId, DataRequestMonitor rm); +} diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpoints.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpoints.java index b24cd9468f1..dcf41fb7361 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpoints.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpoints.java @@ -839,16 +839,12 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints, I // Flag the event getSession().dispatchEvent(new BreakpointAddedEvent(dmc), getProperties()); - // Break/Watch/Catchpoints that are disabled when set are delayed (we - // don't tell gdb about them until the user enables them). So, we shouldn't - // be here if this is a disabled breakpoint - assert ((Boolean)getProperty(attributes, IS_ENABLED, true)) == true; - - // Condition, ignore count and cannot be specified at creation time. + // Condition, ignore count and state cannot be specified at creation time. // Therefore, we have to update the catchpoint if any of these is present Map delta = new HashMap(); delta.put(CONDITION, getProperty(attributes, CONDITION, NULL_STRING)); delta.put(IGNORE_COUNT, getProperty(attributes, IGNORE_COUNT, 0 )); + delta.put(IS_ENABLED, getProperty(attributes, IS_ENABLED, true)); modifyBreakpoint(dmc, delta, rm, false); } diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIMemory.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIMemory.java index 4aa41ceff4a..f75beaa1628 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIMemory.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIMemory.java @@ -11,9 +11,12 @@ * Ericsson AB - added support for event handling * Ericsson AB - added memory cache * Vladimir Prus (CodeSourcery) - support for -data-read-memory-bytes (bug 322658) + * John Dallaway - support for -data-write-memory-bytes (bug 387793) + * John Dallaway - memory cache update fix (bug 387688) *******************************************************************************/ package org.eclipse.cdt.dsf.mi.service; +import java.util.Arrays; import java.util.HashMap; import java.util.Hashtable; import java.util.LinkedList; @@ -48,6 +51,7 @@ import org.eclipse.cdt.dsf.mi.service.command.CommandFactory; import org.eclipse.cdt.dsf.mi.service.command.output.MIDataReadMemoryBytesInfo; import org.eclipse.cdt.dsf.mi.service.command.output.MIDataReadMemoryInfo; import org.eclipse.cdt.dsf.mi.service.command.output.MIDataWriteMemoryInfo; +import org.eclipse.cdt.dsf.mi.service.command.output.MIInfo; import org.eclipse.cdt.dsf.service.AbstractDsfService; import org.eclipse.cdt.dsf.service.DsfServiceEventHandler; import org.eclipse.cdt.dsf.service.DsfSession; @@ -400,22 +404,31 @@ public class MIMemory extends AbstractDsfService implements IMemory, ICachingSer protected void writeMemoryBlock(final IDMContext dmc, final IAddress address, final long offset, final int word_size, final int count, final byte[] buffer, final RequestMonitor rm) { - // Each byte is written individually (GDB power...) - // so we need to keep track of the count - final CountingRequestMonitor countingRM = new CountingRequestMonitor(getExecutor(), rm); - countingRM.setDoneCount(count); - - // We will format the individual bytes in decimal - int format = MIFormat.DECIMAL; - String baseAddress = address.toString(); - - // Issue an MI request for each byte to write - for (int i = 0; i < count; i++) { - String value = new Byte(buffer[i]).toString(); + if (fDataReadMemoryBytes) { + // Use -data-write-memory-bytes for performance fCommandCache.execute( - fCommandFactory.createMIDataWriteMemory(dmc, offset + i, baseAddress, format, word_size, value), - new DataRequestMonitor(getExecutor(), countingRM) + fCommandFactory.createMIDataWriteMemoryBytes(dmc, address.add(offset).toString(), + (buffer.length == count) ? buffer : Arrays.copyOf(buffer, count)), + new DataRequestMonitor(getExecutor(), rm) ); + } else { + // Each byte is written individually (GDB power...) + // so we need to keep track of the count + final CountingRequestMonitor countingRM = new CountingRequestMonitor(getExecutor(), rm); + countingRM.setDoneCount(count); + + // We will format the individual bytes in decimal + int format = MIFormat.DECIMAL; + String baseAddress = address.toString(); + + // Issue an MI request for each byte to write + for (int i = 0; i < count; i++) { + String value = new Byte(buffer[i]).toString(); + fCommandCache.execute( + fCommandFactory.createMIDataWriteMemory(dmc, offset + i, baseAddress, format, word_size, value), + new DataRequestMonitor(getExecutor(), countingRM) + ); + } } } @@ -829,12 +842,20 @@ public class MIMemory extends AbstractDsfService implements IMemory, ICachingSer System.arraycopy(modBlock, 0, cachedBlock.fBlock, pos, count); } + // Case where the cached block is completely included in the modified block + else if (modBlockStart.distanceTo(cachedBlockStart).longValue() >= 0 + && cachedBlockEnd.distanceTo(modBlockEnd).longValue() >= 0) + { + int pos = (int) modBlockStart.distanceTo(cachedBlockStart).longValue(); + System.arraycopy(modBlock, pos, cachedBlock.fBlock, 0, (int) cachedBlock.fLength); + } + // Case where the beginning of the modified block is within the cached block else if (cachedBlockStart.distanceTo(modBlockStart).longValue() >= 0 && modBlockStart.distanceTo(cachedBlockEnd).longValue() > 0) { int pos = (int) cachedBlockStart.distanceTo(modBlockStart).longValue(); - int length = (int) cachedBlockStart.distanceTo(modBlockEnd).longValue(); + int length = (int) modBlockStart.distanceTo(cachedBlockEnd).longValue(); System.arraycopy(modBlock, 0, cachedBlock.fBlock, pos, length); } diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/CommandFactory.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/CommandFactory.java index a706ee91c90..c10c43b7581 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/CommandFactory.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/CommandFactory.java @@ -18,6 +18,8 @@ * Marc Khouzam (Ericsson) - New method for new MIGDBSetPythonPrintStack (Bug 367788) * Mathias Kunter - New methods for handling different charsets (Bug 370462) * Anton Gorenkov - A preference to use RTTI for variable types determination (Bug 377536) + * Vladimir Prus (Mentor Graphics) - Support for -info-os (Bug 360314) + * John Dallaway - Support for -data-write-memory-bytes (Bug 387793) *******************************************************************************/ package org.eclipse.cdt.dsf.mi.service.command; @@ -72,6 +74,7 @@ import org.eclipse.cdt.dsf.mi.service.command.commands.MIDataListRegisterValues; import org.eclipse.cdt.dsf.mi.service.command.commands.MIDataReadMemory; import org.eclipse.cdt.dsf.mi.service.command.commands.MIDataReadMemoryBytes; import org.eclipse.cdt.dsf.mi.service.command.commands.MIDataWriteMemory; +import org.eclipse.cdt.dsf.mi.service.command.commands.MIDataWriteMemoryBytes; import org.eclipse.cdt.dsf.mi.service.command.commands.MIEnablePrettyPrinting; import org.eclipse.cdt.dsf.mi.service.command.commands.MIEnvironmentCD; import org.eclipse.cdt.dsf.mi.service.command.commands.MIEnvironmentDirectory; @@ -118,6 +121,7 @@ import org.eclipse.cdt.dsf.mi.service.command.commands.MIGDBSetTargetCharset; import org.eclipse.cdt.dsf.mi.service.command.commands.MIGDBSetTargetWideCharset; import org.eclipse.cdt.dsf.mi.service.command.commands.MIGDBShowExitCode; import org.eclipse.cdt.dsf.mi.service.command.commands.MIInferiorTTYSet; +import org.eclipse.cdt.dsf.mi.service.command.commands.MIInfoOs; import org.eclipse.cdt.dsf.mi.service.command.commands.MIInterpreterExec; import org.eclipse.cdt.dsf.mi.service.command.commands.MIInterpreterExecConsole; import org.eclipse.cdt.dsf.mi.service.command.commands.MIInterpreterExecConsoleKill; @@ -181,6 +185,7 @@ import org.eclipse.cdt.dsf.mi.service.command.output.MIDataReadMemoryInfo; import org.eclipse.cdt.dsf.mi.service.command.output.MIDataWriteMemoryInfo; import org.eclipse.cdt.dsf.mi.service.command.output.MIGDBShowExitCodeInfo; import org.eclipse.cdt.dsf.mi.service.command.output.MIInfo; +import org.eclipse.cdt.dsf.mi.service.command.output.MIInfoOsInfo; import org.eclipse.cdt.dsf.mi.service.command.output.MIListFeaturesInfo; import org.eclipse.cdt.dsf.mi.service.command.output.MIListThreadGroupsInfo; import org.eclipse.cdt.dsf.mi.service.command.output.MIStackInfoDepthInfo; @@ -427,6 +432,11 @@ public class CommandFactory { return new MIDataWriteMemory(ctx, offset, address, wordFormat, wordSize, value); } + /** @since 4.2 */ + public ICommand createMIDataWriteMemoryBytes(IDMContext ctx, String address, byte[] contents) { + return new MIDataWriteMemoryBytes(ctx, address, contents); + } + /** @since 4.0 */ public ICommand createMIEnablePrettyPrinting(ICommandControlDMContext ctx) { return new MIEnablePrettyPrinting(ctx); @@ -708,6 +718,20 @@ public class CommandFactory { return new MIInferiorTTYSet(dmc, tty); } + /** + * @since 4.2 + */ + public ICommand createMIInfoOS(IDMContext ctx) { + return new MIInfoOs(ctx); + } + + /** + * @since 4.2 + */ + public ICommand createMIInfoOS(IDMContext ctx, String resourceClass) { + return new MIInfoOs(ctx, resourceClass); + } + public ICommand createMIInterpreterExec(IDMContext ctx, String interpreter, String cmd) { return new MIInterpreterExec(ctx, interpreter, cmd); } diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIDataWriteMemoryBytes.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIDataWriteMemoryBytes.java new file mode 100644 index 00000000000..99d34c6d73c --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIDataWriteMemoryBytes.java @@ -0,0 +1,53 @@ +/******************************************************************************* + * Copyright (c) 2012 QNX 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: + * John Dallaway - MIDataWriteMemoryBytes based on MIDataWriteMemory (bug 387793) + *******************************************************************************/ + +package org.eclipse.cdt.dsf.mi.service.command.commands; + +import org.eclipse.cdt.dsf.datamodel.IDMContext; +import org.eclipse.cdt.dsf.mi.service.command.output.MIInfo; + +/** + * -data-write-memory-bytes ADDRESS CONTENTS + * + * where: + * + * 'ADDRESS' + * An expression specifying the address of the first memory word to be + * written. Complex expressions containing embedded white space should + * be quoted using the C convention. + * + * 'CONTENTS' + * The hex-encoded bytes to write. + * @since 4.2 + */ +public class MIDataWriteMemoryBytes extends MICommand { + + public MIDataWriteMemoryBytes( + IDMContext ctx, + String address, + byte[] contents) + { + super(ctx, "-data-write-memory-bytes"); //$NON-NLS-1$ + + // performance-oriented conversion of byte[] to hex string + final char[] digits = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'}; + char[] hex = new char[contents.length * 2]; + for (int n = 0; n < contents.length; n++) { + final int val = contents[n] & 0xFF; + hex[n*2] = digits[val >>> 4]; + hex[n*2 + 1] = digits[val & 0x0F]; + } + setParameters( + new String[] { + address, + new String(hex)}); + } +} diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIInfoOs.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIInfoOs.java new file mode 100644 index 00000000000..a29a957c0ea --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIInfoOs.java @@ -0,0 +1,52 @@ +/******************************************************************************* + * Copyright (c) 2011 Mentor Graphics 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: + * Vladimir Prus (Mentor Graphics) - initial API and implementation + *******************************************************************************/ + +package org.eclipse.cdt.dsf.mi.service.command.commands; + +import org.eclipse.cdt.dsf.datamodel.IDMContext; +import org.eclipse.cdt.dsf.mi.service.command.commands.MICommand; +import org.eclipse.cdt.dsf.mi.service.command.output.MIInfoOsInfo; +import org.eclipse.cdt.dsf.mi.service.command.output.MIOutput; + +/** + * MIInfoOS + * + * -info-os [ type ] + * If no argument is supplied, the command returns a table of + * available operating-system-specific information types. If one of these + * types is supplied as an argument type, then the command returns a + * table of data of that type. + * + * The types of information available depend on the target operating system. + * @since 4.2 + */ +public class MIInfoOs extends MICommand { + + public MIInfoOs(IDMContext ctx) + { + super(ctx, "-info-os"); //$NON-NLS-1$ + } + + public MIInfoOs(IDMContext ctx, String resourceClass) + { + super(ctx, "-info-os", new String[]{resourceClass}); //$NON-NLS-1$ + specificResource = true; + } + + @Override + public MIInfoOsInfo getResult(MIOutput out) { + + return new MIInfoOsInfo(out, specificResource); + } + + private boolean specificResource = false; + +} diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIInfoOsInfo.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIInfoOsInfo.java new file mode 100644 index 00000000000..9c9f5191812 --- /dev/null +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIInfoOsInfo.java @@ -0,0 +1,187 @@ +/******************************************************************************* + * Copyright (c) 2011, 2012 Mentor Graphics 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: + * Vladimir Prus (Mentor Graphics) - initial API and implementation + *******************************************************************************/ + +package org.eclipse.cdt.dsf.mi.service.command.output; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.cdt.dsf.gdb.service.IGDBHardwareAndOS2; +import org.eclipse.cdt.dsf.mi.service.command.output.MIInfo; +import org.eclipse.cdt.dsf.mi.service.command.output.MIOutput; + +/** + * Example output: + * + * (gdb) -info-os + * ^done,OSDataTable={nr_rows="9",nr_cols="3", + * hdr=[{width="10",alignment="-1",col_name="col0",colhdr="Type"}, + * {width="10",alignment="-1",col_name="col1",colhdr="Description"}, + * {width="10",alignment="-1",col_name="col2",colhdr="Title"}], + * body=[item={col0="processes",col1="Listing of all processes", + * col2="Processes"}, + * item={col0="procgroups",col1="Listing of all process groups", + * col2="Process groups"}, + * item={col0="threads",col1="Listing of all threads", + * col2="Threads"}, + * item={col0="files",col1="Listing of all file descriptors", + * col2="File descriptors"}, + * item={col0="sockets",col1="Listing of all internet-domain sockets", + * col2="Sockets"}, + * item={col0="shm",col1="Listing of all shared-memory regions", + * col2="Shared-memory regions"}, + * item={col0="semaphores",col1="Listing of all semaphores", + * col2="Semaphores"}, + * item={col0="msg",col1="Listing of all message queues", + * col2="Message queues"}, + * item={col0="modules",col1="Listing of all loaded kernel modules", + * col2="Kernel modules"}]} + * (gdb) -info-os processes + * ^done,OSDataTable={nr_rows="190",nr_cols="4", + * hdr=[{width="10",alignment="-1",col_name="col0",colhdr="pid"}, + * {width="10",alignment="-1",col_name="col1",colhdr="user"}, + * {width="10",alignment="-1",col_name="col2",colhdr="command"}, + * {width="10",alignment="-1",col_name="col3",colhdr="cores"}], + * body=[item={col0="1",col1="root",col2="/sbin/init",col3="0"}, + * item={col0="2",col1="root",col2="[kthreadd]",col3="1"}, + * item={col0="3",col1="root",col2="[ksoftirqd/0]",col3="0"}, + * ... + * item={col0="26446",col1="stan",col2="bash",col3="0"}, + * item={col0="28152",col1="stan",col2="bash",col3="1"}]} + * (gdb) + * + * @since 4.2 + */ +public class MIInfoOsInfo extends MIInfo { + + // The fields below are used for response with list of classes. + private IGDBHardwareAndOS2.IResourceClass[] resourceClasses; + + // The below fields are used only for data with specific resource class + private String[] columnNames; + private String[][] content; + + public MIInfoOsInfo(MIOutput record, boolean resourcesInformation) { + super(record); + if (isDone()) { + if (resourcesInformation) + parseResourcesInformation(); + else + parseResourceClasses(); + } + } + + public IGDBHardwareAndOS2.IResourcesInformation getResourcesInformation() + { + return new IGDBHardwareAndOS2.IResourcesInformation() { + + @Override + public String[][] getContent() { return content; } + + @Override + public String[] getColumnNames() { return columnNames; } + }; + } + + public IGDBHardwareAndOS2.IResourceClass[] getResourceClasses() + { + return resourceClasses; + } + + private void parseResourceClasses() + { + List classes = new ArrayList(); + + MITuple table = (MITuple)get(getMIOutput(), "OSDataTable"); //$NON-NLS-1$ + + MIList body = (MIList)get(table, "body"); //$NON-NLS-1$ + for (MIResult r: body.getMIResults()) { + MITuple row = (MITuple)r.getMIValue(); + + final String id = getString(row.getMIResults()[0]); + final String description = getString(row.getMIResults()[2]); + + classes.add(new IGDBHardwareAndOS2.IResourceClass() { + + @Override + public String getId() { return id; } + + @Override + public String getHumanDescription() { return description; } + + }); + } + + resourceClasses = classes.toArray(new IGDBHardwareAndOS2.IResourceClass[classes.size()]); + } + + private void parseResourcesInformation() + { + MITuple table = (MITuple) get(getMIOutput(), "OSDataTable"); //$NON-NLS-1$ + + MIList header = (MIList) get(table, "hdr"); //$NON-NLS-1$ + columnNames = new String[header.getMIValues().length]; + int i = 0; + for (MIValue v : header.getMIValues()) { + MITuple column = (MITuple) v; + String columnName = ((MIConst) get(column, "colhdr")).getString(); //$NON-NLS-1$ + columnNames[i++] = Character.toUpperCase(columnName.charAt(0)) + columnName.substring(1); + } + + + MIList body = (MIList) get(table, "body"); //$NON-NLS-1$ + if (body == null) + { + content = new String[0][]; + return; + } + + content = new String[body.getMIResults().length][]; + i = 0; + for (MIResult r : body.getMIResults()) { + MITuple row = (MITuple) r.getMIValue(); + assert row.getMIResults().length == columnNames.length; + String[] rowStrings = new String[row.getMIResults().length]; + int j = 0; + for (MIResult r2 : row.getMIResults()) + { + rowStrings[j] = ((MIConst) r2.getMIValue()).getString(); + ++j; + } + content[i++] = rowStrings; + } + } + + private MIValue get(MIResult[] results, String name) { + for (MIResult r : results) + if (r.getVariable().equals(name)) + return r.getMIValue(); + return null; + } + + private MIValue get(MIOutput output, String name) { + return get(output.getMIResultRecord().getMIResults(), name); + } + + private MIValue get(MITuple tuple, String name) { + return get(tuple.getMIResults(), name); + } + + private String getString(MIValue value) + { + return ((MIConst)value).getString(); + } + + private String getString(MIResult result) + { + return getString(result.getMIValue()); + } +} diff --git a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIMemoryTest.java b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIMemoryTest.java index 9ae8ae86279..b987304026b 100644 --- a/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIMemoryTest.java +++ b/dsf-gdb/org.eclipse.cdt.tests.dsf.gdb/src/org/eclipse/cdt/tests/dsf/gdb/tests/MIMemoryTest.java @@ -1153,9 +1153,14 @@ public class MIMemoryTest extends BaseTestCase { fillMemory(fMemoryDmc, fBaseAddress, offset, word_size, count, pattern); fWait.waitUntilDone(AsyncCompletionWaitor.WAIT_FOREVER); assertFalse(fWait.getMessage(), fWait.isOK()); - String expected = "Cannot access memory at address"; // Error msg returned by gdb - assertTrue("Wrong error message: expected '" + expected + "', received '" + fWait.getMessage() + "'", - fWait.getMessage().contains(expected)); + + // Depending on the GDB, a different command can be used. Both error message are valid. + // Error message for -data-write-memory command + String expected = "Cannot access memory at address"; + // Error message for new -data-write-memory-bytes command + String expected2 = "Could not write memory"; + assertTrue("Wrong error message: expected '" + expected + ", or '" + expected2 + "', received '" + fWait.getMessage() + "'", + fWait.getMessage().contains(expected) || fWait.getMessage().contains(expected2)); // Ensure no MemoryChangedEvent event was received assertTrue("MemoryChangedEvent problem: expected " + 0 + ", received " + getEventCount(), getEventCount() == 0); diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/DsfSourceDisplayAdapter.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/DsfSourceDisplayAdapter.java index 5e322b82711..d5c16747f9e 100644 --- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/DsfSourceDisplayAdapter.java +++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/sourcelookup/DsfSourceDisplayAdapter.java @@ -8,6 +8,7 @@ * Contributors: * IBM Corporation - initial API and implementation * Wind River Systems - initial API and implementation + * Tensilica (Abeer Bagul) - fix for bug 391185 *******************************************************************************/ package org.eclipse.cdt.dsf.debug.ui.sourcelookup; @@ -749,7 +750,6 @@ public class DsfSourceDisplayAdapter implements ISourceDisplay, ISteppingControl private void startLookupJob(final FrameData frameData, final IWorkbenchPage page, boolean eventTriggered) { // If there is a previous lookup job running, cancel it. if (fRunningLookupJob != null) { - fRunningLookupJob.cancel(); if (!eventTriggered && frameData.isIdentical(fRunningLookupJob.fFrameData)) { // identical location - we are done return; diff --git a/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/BreakpointsMediator2.java b/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/BreakpointsMediator2.java index 035a41991eb..7d2e4ed750c 100644 --- a/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/BreakpointsMediator2.java +++ b/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/BreakpointsMediator2.java @@ -483,9 +483,11 @@ public class BreakpointsMediator2 extends AbstractDsfService implements IBreakpo for(Map.Entry> e: platformBPs.entrySet()) { // Stop at the first occurrence - for (ITargetBreakpointInfo tbp : e.getValue()) - if(tbp.getTargetBreakpoint().equals(bp)) + for (ITargetBreakpointInfo tbp : e.getValue()) { + IBreakpointDMContext targetBreakpoint = tbp.getTargetBreakpoint(); + if(targetBreakpoint != null && targetBreakpoint.equals(bp)) return e.getKey(); + } } } }
    Option Explanation