migrate AppletConfiguration and BndRunConfiguration to BaseState

This commit is contained in:
Vladimir Krivosheev
2017-12-06 13:40:44 +01:00
parent 07c8033e60
commit 6bc7ed1c72
27 changed files with 333 additions and 556 deletions
@@ -1,6 +1,4 @@
// Copyright 2000-2017 JetBrains s.r.o.
// Use of this source code is governed by the Apache 2.0 license that can be
// found in the LICENSE file.
// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.jetbrains
import com.intellij.codeInsight.completion.CompletionResultSet
@@ -55,22 +53,21 @@ class PySymbolFieldWithBrowseButton(contextAnchor: ContextAnchor,
dialog.showDialog()
val element = dialog.selected
if (element is PyQualifiedNameOwner) {
childComponent.text = element.qualifiedName
childComponent.setText(element.qualifiedName)
}
if (element is PyFile) {
childComponent.text = element.getQName()?.toString()
childComponent.setText(element.getQName()?.toString())
}
}
}
override fun setText(text: String?) {
childComponent.text = text
childComponent.setText(text)
}
override fun getText() = childComponent.text!!
override fun getText() = childComponent.text
}
private fun PyType.getVariants(element: PsiElement): Array<LookupElement> =
this.getCompletionVariants("", element, ProcessingContext()).filterIsInstance(LookupElement::class.java).toTypedArray()