mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fix compatibility issues related to parameter and its stub.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
// 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.python.psi;
|
||||
|
||||
import com.jetbrains.python.PyNames;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
@@ -29,15 +28,6 @@ public interface PyParameter extends PyElement {
|
||||
|
||||
boolean hasDefaultValue();
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link PyParameter#getDefaultValueText()} instead.
|
||||
* This method will be removed in 2018.2.
|
||||
*/
|
||||
@Deprecated
|
||||
default boolean hasDefaultNoneValue() {
|
||||
return PyNames.NONE.equals(getDefaultValueText());
|
||||
}
|
||||
|
||||
/**
|
||||
* @apiNote This method will be marked as abstract in 2018.2.
|
||||
*/
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
package com.jetbrains.python.psi.stubs;
|
||||
|
||||
import com.intellij.psi.stubs.NamedStub;
|
||||
import com.jetbrains.python.PyNames;
|
||||
import com.jetbrains.python.psi.PyNamedParameter;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -23,15 +22,6 @@ public interface PyNamedParameterStub extends NamedStub<PyNamedParameter>, PyAnn
|
||||
return getDefaultValueText() != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link PyNamedParameterStub#getDefaultValueText()} instead.
|
||||
* This method will be removed in 2018.2.
|
||||
*/
|
||||
@Deprecated
|
||||
default boolean hasDefaultNoneValue() {
|
||||
return PyNames.NONE.equals(getDefaultValueText());
|
||||
}
|
||||
|
||||
@Nullable
|
||||
default String getDefaultValueText() {
|
||||
return null;
|
||||
|
||||
@@ -48,7 +48,6 @@ public class PyNamedParameterStubImpl extends StubBase<PyNamedParameter> impleme
|
||||
boolean isPositionalContainer,
|
||||
boolean isKeywordContainer,
|
||||
boolean hasDefaultValue,
|
||||
boolean hasDefaultNoneValue,
|
||||
@Nullable String typeCommentAnnotation,
|
||||
@Nullable String annotation,
|
||||
StubElement parent,
|
||||
@@ -56,7 +55,7 @@ public class PyNamedParameterStubImpl extends StubBase<PyNamedParameter> impleme
|
||||
this(name,
|
||||
isPositionalContainer,
|
||||
isKeywordContainer,
|
||||
hasDefaultNoneValue ? PyNames.NONE : hasDefaultValue ? PyNames.ELLIPSIS : null,
|
||||
hasDefaultValue ? PyNames.ELLIPSIS : null,
|
||||
typeCommentAnnotation,
|
||||
annotation,
|
||||
parent,
|
||||
|
||||
Reference in New Issue
Block a user