Skip to content

Commit

Permalink
Converted more completion code to Kotlin
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinkip committed Aug 7, 2014
1 parent 3f62a96 commit 7219a52
Show file tree
Hide file tree
Showing 9 changed files with 399 additions and 571 deletions.
16 changes: 16 additions & 0 deletions annotations/com/intellij/codeInsight/completion/annotations.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@
name='com.intellij.codeInsight.completion.CompletionSorter com.intellij.codeInsight.completion.CompletionSorter weighBefore(java.lang.String, com.intellij.codeInsight.lookup.LookupElementWeigher...)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.codeInsight.completion.CompletionUtil java.lang.String findIdentifierPrefix(com.intellij.psi.PsiElement, int, com.intellij.patterns.ElementPattern&lt;java.lang.Character&gt;, com.intellij.patterns.ElementPattern&lt;java.lang.Character&gt;)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.codeInsight.completion.CompletionUtil java.lang.String findJavaIdentifierPrefix(com.intellij.codeInsight.completion.CompletionParameters)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.codeInsight.completion.CompletionUtil java.lang.String findJavaIdentifierPrefix(com.intellij.psi.PsiElement, int)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.codeInsight.completion.InsertHandler void handleInsert(com.intellij.codeInsight.completion.InsertionContext, T) 0'>
<annotation name='org.jetbrains.annotations.NotNull'/>
Expand All @@ -41,6 +53,10 @@
<item name='com.intellij.codeInsight.completion.InsertionContext com.intellij.openapi.project.Project getProject()'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item
name='com.intellij.codeInsight.completion.JavaCompletionSorting com.intellij.codeInsight.completion.CompletionResultSet addJavaSorting(com.intellij.codeInsight.completion.CompletionParameters, com.intellij.codeInsight.completion.CompletionResultSet)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
<item name='com.intellij.codeInsight.completion.OffsetKey com.intellij.codeInsight.completion.OffsetKey create(java.lang.String)'>
<annotation name='org.jetbrains.annotations.NotNull'/>
</item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
*/
public class JetShortNamesCache extends PsiShortNamesCache {

@NotNull
public static JetShortNamesCache getKotlinInstance(@NotNull Project project) {
PsiShortNamesCache[] extensions = Extensions.getArea(project).getExtensionPoint(PsiShortNamesCache.EP_NAME).getExtensions();
for (PsiShortNamesCache extension : extensions) {
Expand Down Expand Up @@ -354,6 +355,7 @@ else if (extensionFunction instanceof PsiMethod) {
return functionFQNs;
}

@NotNull
public Collection<ClassDescriptor> getJetClassesDescriptors(
@NotNull Condition<String> acceptedShortNameCondition,
@NotNull KotlinCodeAnalyzer analyzer,
Expand Down
303 changes: 0 additions & 303 deletions idea/src/org/jetbrains/jet/plugin/completion/CompletionSession.java

This file was deleted.

Loading

0 comments on commit 7219a52

Please sign in to comment.