mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
revert (java: minor optimization)
only freshly build stubs were counted, wrong default for restored ones
This commit is contained in:
+11
-3
@@ -26,12 +26,13 @@ import com.intellij.psi.stubs.StubElement;
|
||||
import com.intellij.util.io.StringRef;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author max
|
||||
*/
|
||||
public class PsiParameterStubImpl extends StubBase<PsiParameter> implements PsiParameterStub {
|
||||
private StringRef myName;
|
||||
private boolean myGeneratedName = true;
|
||||
private final TypeInfo myType;
|
||||
private final boolean myIsEllipsis;
|
||||
|
||||
@@ -80,11 +81,18 @@ public class PsiParameterStubImpl extends StubBase<PsiParameter> implements PsiP
|
||||
|
||||
public void setName(String name) {
|
||||
myName = StringRef.fromString(name);
|
||||
myGeneratedName = false;
|
||||
}
|
||||
|
||||
public boolean isAutoGeneratedName() {
|
||||
return myGeneratedName;
|
||||
final List children = getParentStub().getChildrenStubs();
|
||||
int paramIndex = 0;
|
||||
for (Object o : children) {
|
||||
if (o instanceof PsiParameterStub) {
|
||||
paramIndex++;
|
||||
if (o == this) break;
|
||||
}
|
||||
}
|
||||
return ("p" + paramIndex).equals(getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user