Commit Graph

13 Commits

Author SHA1 Message Date
Alex Hoppen
32eff21977 [IDE] Remove "Begin completions" and "End completions" from test cases
These test lines weren't actually providing any value and were annoying to write. Let's jut remove them.
2023-03-22 09:07:17 -07:00
Nathan Hawes
eabb561994 [code-completion] Give Modules a SemanticContextKind of None
This seems more correct than OtherModule, and means they're treated as
low-priority results for the session-based completion APIs. With default
options that means won't be shown in global completion results but will be
once there's some matching filter text. It also sorts them below any symbols
that actually come from other modules, which is desirable, since most symbols
don't need to be module qualified.

The SemanticContextKind change doesn't seem to affect Xcode's handling of the
results.
2019-11-01 11:11:52 -07:00
Dmitri Gribenko
d175b3b66d Migrate FileCheck to %FileCheck in tests 2016-08-10 23:52:02 -07:00
Xi Ge
9ff84e145d [CodeCompletion] For submodules, also use ASTContext to collect their visibility. 2016-02-10 13:03:17 -08:00
Xi Ge
d08d37f249 [CodeCompletion] Omit code completion token if it immediately follows imported module names.
Not doing so may lead to concatenating unrelated code completion results on SourceKit. rdar://22847412
2015-12-08 13:18:11 -08:00
Xi Ge
827ea69fd3 [CodeComplete] Mark already-imported modules as not-recommended. rdar://23209864
When auto-completing import decls, we should prioritize not-yet imported modules
over already-imported modules. To do so, we mark the latter with not-recommended tag.
2015-11-10 11:57:29 -08:00
Xi Ge
0f881f5ad7 [CodeComplete] Add code completion for Clang sub-modules at import decls. rdar://23244877
e.g. completing at "import Foundation.<HERE>" should give the list of the submodules of Foundation.

Swift SVN r32852
2015-10-24 00:22:25 +00:00
Xi Ge
8b869e1113 [CodeComplete] When completing import statements, show all visible modules without filtering out the already imported ones. rdar://22788409
Swift SVN r32127
2015-09-21 21:45:44 +00:00
Xi Ge
71953ddc7a [CodeComplete] Add a new decl kind for module and update the code completion results of import decl to belong to this kind.
This allows Xcode to add special icons for completing module names.

Swift SVN r31109
2015-08-10 18:20:57 +00:00
Xi Ge
d7e07b1d4d [CodeCompletion] When code completing import decls, we only show the module names that are not yet imported in previous import decls.
Swift SVN r30964
2015-08-03 22:54:58 +00:00
Chris Willmore
7f12c9ffd5 [CodeCompletion] Add the initial support for code completing import declaration.
When a user invoke code completion after import keywords, the names of
visible top level clang modules were recommended for finishing the import decl.

(Undoing revert r30961 of r30957, which just required lockstep commit to
SourceKit -- cwillmore)

Swift SVN r30962
2015-08-03 21:08:32 +00:00
Chris Willmore
e4d1ac9c24 Revert "[CodeCompletion] Add the initial support for code completing import declaration."
This reverts r30957 because it broke the following tests on Jenkins:

    SourceKit :: CodeComplete/complete_open.swift
    SourceKit :: CodeComplete/complete_test.swift

<rdar://problem/22120345> swift-incremental-RA #8289 failed to build

Swift SVN r30961
2015-08-03 21:04:46 +00:00
Xi Ge
5e0014bcc4 [CodeCompletion] Add the initial support for code completing import declaration.
When a user invoke code completion after import keywords, the names of
visible top level clang modules were recommended for finishing the import decl.

Swift SVN r30957
2015-08-03 20:02:17 +00:00