Community
Participate
Working Groups
1. open a compilation unit. 2. put the cursor at the end of a import type line, just before the semicolon. 3. hit [CTRL SPACE], select the right type if necessary, the code is completed and a simecolon is added, even if there is already one.
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
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