mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
don't keep StringRef as field
This commit is contained in:
+2
-2
@@ -40,7 +40,7 @@ public abstract class FunctionalExpressionElementType<T extends PsiFunctionalExp
|
||||
@NotNull
|
||||
@Override
|
||||
public FunctionalExpressionStub<T> deserialize(@NotNull StubInputStream dataStream, StubElement parentStub) throws IOException {
|
||||
return new FunctionalExpressionStub<T>(parentStub, this, dataStream.readName());
|
||||
return new FunctionalExpressionStub<T>(parentStub, this, StringRef.toString(dataStream.readName()));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -49,7 +49,7 @@ public abstract class FunctionalExpressionElementType<T extends PsiFunctionalExp
|
||||
|
||||
@Override
|
||||
public FunctionalExpressionStub<T> createStub(LighterAST tree, LighterASTNode funExpr, StubElement parentStub) {
|
||||
return new FunctionalExpressionStub<T>(parentStub, this, StringRef.fromString(getPresentableText(tree, funExpr)));
|
||||
return new FunctionalExpressionStub<T>(parentStub, this, getPresentableText(tree, funExpr));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
|
||||
+4
-5
@@ -19,17 +19,16 @@ import com.intellij.psi.PsiFunctionalExpression;
|
||||
import com.intellij.psi.stubs.IStubElementType;
|
||||
import com.intellij.psi.stubs.StubBase;
|
||||
import com.intellij.psi.stubs.StubElement;
|
||||
import com.intellij.util.io.StringRef;
|
||||
|
||||
public class FunctionalExpressionStub<T extends PsiFunctionalExpression> extends StubBase<T> {
|
||||
private final StringRef myPresentableTextRef;
|
||||
private final String myPresentableText;
|
||||
|
||||
protected FunctionalExpressionStub(StubElement parent, IStubElementType elementType, StringRef presentableTextRef) {
|
||||
protected FunctionalExpressionStub(StubElement parent, IStubElementType elementType, String presentableTextRef) {
|
||||
super(parent, elementType);
|
||||
myPresentableTextRef = presentableTextRef;
|
||||
myPresentableText = presentableTextRef;
|
||||
}
|
||||
|
||||
public String getPresentableText() {
|
||||
return myPresentableTextRef.getString();
|
||||
return myPresentableText;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user