J2K: JetUsageInfo
This commit is contained in:
+1
-1
@@ -165,7 +165,7 @@ public class JetCallableDefinitionUsage<T extends PsiElement> extends JetUsageIn
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean processUsage(JetChangeInfo changeInfo, PsiElement element) {
|
||||
public boolean processUsage(@NotNull JetChangeInfo changeInfo, @NotNull PsiElement element) {
|
||||
if (!(element instanceof JetNamedDeclaration)) return true;
|
||||
|
||||
JetPsiFactory psiFactory = JetPsiFactory(element.getProject());
|
||||
|
||||
+11
-22
@@ -14,30 +14,19 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.idea.refactoring.changeSignature.usages;
|
||||
package org.jetbrains.kotlin.idea.refactoring.changeSignature.usages
|
||||
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.PsiReference;
|
||||
import com.intellij.usageView.UsageInfo;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.kotlin.idea.refactoring.changeSignature.JetChangeInfo;
|
||||
import com.intellij.psi.PsiElement
|
||||
import com.intellij.psi.PsiReference
|
||||
import com.intellij.usageView.UsageInfo
|
||||
import org.jetbrains.kotlin.idea.refactoring.changeSignature.JetChangeInfo
|
||||
|
||||
public abstract class JetUsageInfo<T extends PsiElement> extends UsageInfo {
|
||||
public JetUsageInfo(@NotNull T element) {
|
||||
super(element);
|
||||
}
|
||||
public abstract class JetUsageInfo<T : PsiElement> : UsageInfo {
|
||||
public constructor(element: T) : super(element)
|
||||
public constructor(reference: PsiReference) : super(reference)
|
||||
|
||||
public JetUsageInfo(@NotNull PsiReference reference) {
|
||||
super(reference);
|
||||
}
|
||||
@suppress("UNCHECKED_CAST")
|
||||
override fun getElement() = super.getElement() as T?
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public T getElement() {
|
||||
//noinspection unchecked
|
||||
return (T) super.getElement();
|
||||
}
|
||||
|
||||
public abstract boolean processUsage(JetChangeInfo changeInfo, T element);
|
||||
public abstract fun processUsage(changeInfo: JetChangeInfo, element: T): Boolean
|
||||
}
|
||||
Reference in New Issue
Block a user