Summary: | code assist adds extra semicolons in import type declarations | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Luc Bourlier <eclipse> |
Component: | Core | Assignee: | Stephan Herrmann <stephan.herrmann> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P2 | CC: | lrozenblyum, oxvalley, stephan.herrmann |
Version: | 2.0 | Keywords: | noteworthy |
Target Milestone: | 4.15 M3 | ||
Hardware: | PC | ||
OS: | Linux | ||
See Also: |
https://git.eclipse.org/r/157519 https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=470c18c006bd18cd7dc63747acf5b23da275d723 https://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=7819cf0adee7f552aa09935578c327ed58fb38cd |
||
Whiteboard: |
Description
Luc Bourlier
2002-05-08 19:03:43 EDT
we insert the completion proposal we get from code assist. Code assist should check whether there is already a semicolon before adding one. Moving to JDT CORE Nice to have Defer Defer Defer As of now 'LATER' and 'REMIND' resolutions are no longer supported. Please reopen this bug if it is still valid for you. New Gerrit change created: https://git.eclipse.org/r/157519 (In reply to Eclipse Genie from comment #7) > New Gerrit change created: https://git.eclipse.org/r/157519 Wow, it's risen from the dead :) Not inserting the duplicate ';' is easy. Unfortunately JDT/UI meanwhile abuses presence of a terminating ';' to detect if a proposal is an import proposal, when deciding whether or not to insert type arguments. I'm preparing for a better solution in JDT/UI by setting a new token location, as CompletionContext.TL_IN_IMPORT; Change for JDT/UI leveraging TL_IN_IMPORT is coming in a minute. Unfortunately, both have to be released at the same time to avoid test failures. *** Bug 392897 has been marked as a duplicate of this bug. *** Gerrit change https://git.eclipse.org/r/157519 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=470c18c006bd18cd7dc63747acf5b23da275d723 I directly pushed corresponding changes in JDT/UI via https://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=7819cf0adee7f552aa09935578c327ed58fb38cd Locally JDT/UI tests ran fine (except for some unrelated intermittent hick-ups). Here we switch strategy in FillArgumentNamesCompletionProposalCollector from looking for ';' towards using the new constant CompletionContext.TL_IN_IMPORT. Additionally, I added some tests to CodeCompletionTest to ensure the expected replacement behavior. Released for 4.15 M3 |