Revert 06215ca932
It led to parameter names missing in parameter info and completion for compiled java code used from kotlin See KT-11039
This commit is contained in:
+2
-8
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2015 JetBrains s.r.o.
|
||||
* Copyright 2010-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -19,7 +19,6 @@ package org.jetbrains.kotlin.load.java.structure.impl;
|
||||
import com.intellij.psi.PsiAnnotationOwner;
|
||||
import com.intellij.psi.PsiParameter;
|
||||
import com.intellij.psi.impl.compiled.ClsParameterImpl;
|
||||
import com.intellij.psi.impl.java.stubs.impl.PsiParameterStubImpl;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.kotlin.descriptors.Visibilities;
|
||||
@@ -86,7 +85,7 @@ public class JavaValueParameterImpl extends JavaElementImpl<PsiParameter>
|
||||
@Nullable
|
||||
public Name getName() {
|
||||
PsiParameter psi = getPsi();
|
||||
if (isParameterWithAutoGeneratedName(psi)) {
|
||||
if (psi instanceof ClsParameterImpl && ((ClsParameterImpl) psi).isAutoGeneratedName()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -94,11 +93,6 @@ public class JavaValueParameterImpl extends JavaElementImpl<PsiParameter>
|
||||
return name == null ? null : Name.identifier(name);
|
||||
}
|
||||
|
||||
private static boolean isParameterWithAutoGeneratedName(PsiParameter psi) {
|
||||
// see com.intellij.psi.impl.compiled.ClsParameterImpl.calcName()
|
||||
return psi instanceof ClsParameterImpl && ((PsiParameterStubImpl) ((ClsParameterImpl) psi).getStub()).isAutoGeneratedName();
|
||||
}
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public JavaType getType() {
|
||||
|
||||
Reference in New Issue
Block a user