Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Camelon2004-01-22 18:51:18 +0000
committerJohn Camelon2004-01-22 18:51:18 +0000
commit34754f2099dce26a0b73bb4c80b6230057e53899 (patch)
tree9163347b03477cf3db13be7d99daead925a8e463
parent703e1086c949aecefa6c8344268c7c73d09972f3 (diff)
downloadorg.eclipse.cdt-34754f2099dce26a0b73bb4c80b6230057e53899.tar.gz
org.eclipse.cdt-34754f2099dce26a0b73bb4c80b6230057e53899.tar.xz
org.eclipse.cdt-34754f2099dce26a0b73bb4c80b6230057e53899.zip
org.eclipse.cdt.core
Fixed bug 50344 - Wrong completion in Class scope if before the first declaration. org.eclipse.cdt.ui.tests Updated CompletionFailedTest_FieldType_NoPrefix_Bug50344 and moved from failed tests.
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Parser.java4
-rw-r--r--core/org.eclipse.cdt.ui.tests/ChangeLog3
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/AutomatedSuite.java2
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_FieldType_NoPrefix2.java (renamed from core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_FieldType_NoPrefix_Bug50344.java)15
4 files changed, 15 insertions, 9 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Parser.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Parser.java
index f6e2bfc38f0..5d086163303 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Parser.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Parser.java
@@ -2751,6 +2751,10 @@ public abstract class Parser implements IParser
if (LT(1) == IToken.tLBRACE)
{
consume(IToken.tLBRACE);
+ setCompletionKind(CompletionKind.FIELD_TYPE);
+ setCompletionContext(null);
+ setCompletionKeywords(Key.DECLARATION);
+ setCurrentScope(astClassSpecifier);
astClassSpecifier.enterScope( requestor );
memberDeclarationLoop : while (LT(1) != IToken.tRBRACE)
{
diff --git a/core/org.eclipse.cdt.ui.tests/ChangeLog b/core/org.eclipse.cdt.ui.tests/ChangeLog
index ac066585d86..9d0846568d4 100644
--- a/core/org.eclipse.cdt.ui.tests/ChangeLog
+++ b/core/org.eclipse.cdt.ui.tests/ChangeLog
@@ -1,3 +1,6 @@
+2004-01-22 John Camelon
+ Updated CompletionFailedTest_FieldType_NoPrefix_Bug50344 and moved from failed tests.
+
2004-01-21 Hoda Amer
Renamed completion tests to be more meaningful.
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 cc72c80d328..4953e241625 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
@@ -52,7 +52,7 @@ public class AutomatedSuite extends TestSuite {
// Failed Tests
addTest(CompletionFailedTest_ScopedReference_NoPrefix_Bug50152.suite());
addTest(CompletionFailedTest_ScopedReference_Prefix_Bug50152.suite());
- addTest(CompletionFailedTest_FieldType_NoPrefix_Bug50344.suite());
+ addTest(CompletionTest_FieldType_NoPrefix2.suite());
}
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_FieldType_NoPrefix_Bug50344.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_FieldType_NoPrefix2.java
index bd942d18a4f..97a66338bc6 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/failedtests/CompletionFailedTest_FieldType_NoPrefix_Bug50344.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/contentassist/CompletionTest_FieldType_NoPrefix2.java
@@ -8,12 +8,11 @@
* Contributors:
* IBM Rational Software - Initial API and implementation
***********************************************************************/
-package org.eclipse.cdt.ui.tests.text.contentassist.failedtests;
+package org.eclipse.cdt.ui.tests.text.contentassist;
import junit.framework.Test;
import junit.framework.TestSuite;
import org.eclipse.cdt.core.parser.ast.IASTCompletionNode.CompletionKind;
-import org.eclipse.cdt.ui.tests.text.contentassist.CompletionProposalsBaseTest;
/**
* @author hamer
@@ -22,26 +21,26 @@ import org.eclipse.cdt.ui.tests.text.contentassist.CompletionProposalsBaseTest;
* Bug#50344 :Wrong completion in Class scope if before the first declaration
*
*/
-public class CompletionFailedTest_FieldType_NoPrefix_Bug50344 extends CompletionProposalsBaseTest{
+public class CompletionTest_FieldType_NoPrefix2 extends CompletionProposalsBaseTest{
private final String fileName = "CompletionFailedTestStart3.h";
private final String fileFullPath ="resources/contentassist/failedtests/" + fileName;
private final String headerFileName = "CompletionTestStart.h";
private final String headerFileFullPath ="resources/contentassist/" + headerFileName;
- private final String expectedScopeName = "ASTCompilationUnit"; // should be "ASTClassSpecifier";
+ private final String expectedScopeName = "ASTClassSpecifier";
private final String expectedContextName = "null";
- private final CompletionKind expectedKind =CompletionKind.USER_SPECIFIED_NAME; // should be CompletionKind.FIELD_TYPE;
+ private final CompletionKind expectedKind = CompletionKind.FIELD_TYPE;
private final String expectedPrefix = "";
private final String[] expectedResults = {
};
- public CompletionFailedTest_FieldType_NoPrefix_Bug50344(String name) {
+ public CompletionTest_FieldType_NoPrefix2(String name) {
super(name);
}
public static Test suite() {
- TestSuite suite= new TestSuite(CompletionFailedTest_FieldType_NoPrefix_Bug50344.class.getName());
- suite.addTest(new CompletionFailedTest_FieldType_NoPrefix_Bug50344("testCompletionProposals"));
+ TestSuite suite= new TestSuite(CompletionTest_FieldType_NoPrefix2.class.getName());
+ suite.addTest(new CompletionTest_FieldType_NoPrefix2("testCompletionProposals"));
return suite;
}

Back to the top