43
43
import com .perl5 .lang .perl .psi .PerlSignatureElement ;
44
44
import com .perl5 .lang .perl .psi .PsiPerlStatementModifier ;
45
45
import com .perl5 .lang .perl .psi .utils .PerlPsiUtil ;
46
- import gnu . trove . TIntIntHashMap ;
47
- import gnu . trove . TIntObjectHashMap ;
46
+ import it . unimi . dsi . fastutil . ints . Int2IntOpenHashMap ;
47
+ import it . unimi . dsi . fastutil . ints . Int2ObjectOpenHashMap ;
48
48
import org .jetbrains .annotations .Contract ;
49
49
import org .jetbrains .annotations .NotNull ;
50
50
import org .jetbrains .annotations .Nullable ;
@@ -64,7 +64,7 @@ public class PurePerlFormattingContext extends PerlBaseFormattingContext {
64
64
private static final Logger LOG = Logger .getInstance (PurePerlFormattingContext .class );
65
65
private final Map <ASTNode , Wrap > myWrapMap = new HashMap <>();
66
66
private final Map <Integer , Alignment > myAssignmentsAlignmentsMap = new HashMap <>();
67
- private final TIntObjectHashMap <Alignment > myCommentsAlignmentMap = new TIntObjectHashMap <>();
67
+ private final Int2ObjectOpenHashMap <Alignment > myCommentsAlignmentMap = new Int2ObjectOpenHashMap <>();
68
68
private final Map <ASTNode , Alignment > myRightwardCallsAlignmentMap = FactoryMap .create (sequence -> Alignment .createAlignment (true ));
69
69
private final Map <ASTNode , Alignment > myOperatorsAlignmentsMap = FactoryMap .create (sequence -> Alignment .createAlignment (true ));
70
70
private final Map <ASTNode , Alignment > myElementsALignmentsMap = FactoryMap .create (sequence -> Alignment .createAlignment (true ));
@@ -99,7 +99,7 @@ else if (StringUtil.containsLineBreak(run.getChars())) {
99
99
}
100
100
101
101
int commentLine = getNodeLine (commentNode );
102
- if (myCommentsAlignmentMap .contains (commentLine )) {
102
+ if (myCommentsAlignmentMap .containsKey (commentLine )) {
103
103
return myCommentsAlignmentMap .get (commentLine );
104
104
}
105
105
if (LOG .isDebugEnabled ()) {
@@ -140,7 +140,7 @@ else if (StringUtil.containsLineBreak(run.getChars())) {
140
140
/**
141
141
* Maps line numbers to the offset of first here-doc openers. Or {@link Integer.MAX_VALUE} if there is none
142
142
*/
143
- private final TIntIntHashMap myHeredocForbiddenOffsets = new TIntIntHashMap ();
143
+ private final Int2IntOpenHashMap myHeredocForbiddenOffsets = new Int2IntOpenHashMap ();
144
144
145
145
private static final MultiMap <IElementType , IElementType > OPERATOR_COLLISIONS_MAP = new MultiMap <>();
146
146
@@ -205,7 +205,7 @@ public boolean isNewLineForbiddenAt(@NotNull ASTNode node) {
205
205
return true ;
206
206
}
207
207
int nodeLine = getNodeLine (node );
208
- if (myHeredocForbiddenOffsets .contains (nodeLine )) {
208
+ if (myHeredocForbiddenOffsets .containsKey (nodeLine )) {
209
209
return node .getStartOffset () > myHeredocForbiddenOffsets .get (nodeLine );
210
210
}
211
211
0 commit comments