Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 193792 Details for
Bug 343342
[assist] Non constant variables, strings and methods are proposed inside case statements
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
minor update
patch343342_v2.txt (text/plain), 4.31 KB, created by
Ayushman Jain
on 2011-04-21 05:40:02 EDT
(
hide
)
Description:
minor update
Filename:
MIME Type:
Creator:
Ayushman Jain
Created:
2011-04-21 05:40:02 EDT
Size:
4.31 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java,v >retrieving revision 1.428 >diff -u -r1.428 CompletionEngine.java >--- codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java 21 Apr 2011 05:43:13 -0000 1.428 >+++ codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java 21 Apr 2011 09:37:11 -0000 >@@ -2935,8 +2935,7 @@ > (CompletionOnQualifiedNameReference) astNode; > this.completionToken = ref.completionIdentifier; > long completionPosition = ref.sourcePositions[ref.sourcePositions.length - 1]; >- this.assistNodeIsInsideCase = assistNodeIsInsideCase(astNode, this.parser.assistNodeParent); >- >+ > if (qualifiedBinding.problemId() == ProblemReasons.NotFound) { > setSourceAndTokenRange((int) (completionPosition >>> 32), (int) completionPosition); > // complete field members with missing fields type >@@ -3080,7 +3079,6 @@ > this.assistNodeIsSuperType = ref.isSuperType(); > this.assistNodeIsExtendedType = assistNodeIsExtendedType(astNode, astNodeParent); > this.assistNodeIsInterfaceExcludingAnnotation = assistNodeIsInterfaceExcludingAnnotation(astNode, astNodeParent); >- this.assistNodeIsInsideCase = assistNodeIsInsideCase(astNode, astNodeParent); > > this.completionToken = ref.completionIdentifier; > long completionPosition = ref.sourcePositions[ref.tokens.length]; >@@ -3141,7 +3139,6 @@ > CompletionOnSingleNameReference singleNameReference = (CompletionOnSingleNameReference) astNode; > this.completionToken = singleNameReference.token; > SwitchStatement switchStatement = astNodeParent instanceof SwitchStatement ? (SwitchStatement) astNodeParent : null; >- this.assistNodeIsInsideCase = assistNodeIsInsideCase(astNode, astNodeParent); > if (switchStatement != null > && switchStatement.expression.resolvedType != null > && switchStatement.expression.resolvedType.isEnum()) { >@@ -3217,7 +3214,6 @@ > this.assistNodeIsSuperType = singleRef.isSuperType(); > this.assistNodeIsExtendedType = assistNodeIsExtendedType(astNode, astNodeParent); > this.assistNodeIsInterfaceExcludingAnnotation = assistNodeIsInterfaceExcludingAnnotation(astNode, astNodeParent); >- this.assistNodeIsInsideCase = assistNodeIsInsideCase(astNode, astNodeParent); > > // can be the start of a qualified type name > if (qualifiedBinding == null) { >@@ -3664,6 +3660,7 @@ > } > } else if (parent instanceof SwitchStatement) { > SwitchStatement switchStatement = (SwitchStatement) parent; >+ this.assistNodeIsInsideCase = assistNodeIsInsideCase(node, parent); > if (switchStatement.expression != null && > switchStatement.expression.resolvedType != null) { > addExpectedType(switchStatement.expression.resolvedType, scope); >@@ -9727,6 +9724,9 @@ > if (selector == null && notInJavadoc) { > return; > } >+ >+ if (this.assistNodeIsInsideCase) >+ return; // no methods should be proposed inside case expression > > ReferenceBinding currentType = receiverType; > if (notInJavadoc) { >@@ -11555,7 +11555,7 @@ > -1, > -1); > } >- if(proposeMethod && !insideAnnotationAttribute && !this.assistNodeIsInsideCase) { >+ if(proposeMethod && !insideAnnotationAttribute) { > findMethods( > token, > null, >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/model/CompletionTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/CompletionTests.java,v >retrieving revision 1.239 >diff -u -r1.239 CompletionTests.java >--- src/org/eclipse/jdt/core/tests/model/CompletionTests.java 21 Apr 2011 05:43:10 -0000 1.239 >+++ src/org/eclipse/jdt/core/tests/model/CompletionTests.java 21 Apr 2011 09:37:12 -0000 >@@ -23026,6 +23026,7 @@ > " public static final int[] ZZZ5 = null;\n" + > " public static final Object[] ZZZ6 = null;\n" + > " public static final short ZZZ7 = 0;\n" + >+ " public static int ZZZMethod(){ return 1;}\n" + > " int ZZZ8(){return 1;}\n" + > " void foo(int i){\n" + > " final int ZZZ01 = 1;\n" +
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 343342
:
193702
| 193792