File tree Expand file tree Collapse file tree 2 files changed +14
-8
lines changed
src/org/intellij/erlang/psi/impl Expand file tree Collapse file tree 2 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -1388,23 +1388,26 @@ public Icon getIcon(boolean b) {
13881388
13891389 @ NotNull
13901390 public static String createFunctionPresentation (@ NotNull ErlangAtomWithArityExpression function ) {
1391- return getName (function .getQAtom ()) + "/" + getArity (function .getInteger ());
1391+ return createFunctionPresentation ( getName (function .getQAtom ()), getArity (function .getInteger () ));
13921392 }
13931393
13941394 @ NotNull
1395- public static String createFunctionClausePresentation (@ Nullable ErlangFunctionClause clause ) {
1396- if (clause == null ) return "" ;
1397- return clause .getQAtom ().getText () + "/" + calculateFunctionClauseArity (clause );
1395+ public static String createFunctionClausePresentation (@ NotNull ErlangFunctionClause clause ) {
1396+ return createFunctionPresentation (getName (clause .getQAtom ()), calculateFunctionClauseArity (clause ));
13981397 }
13991398
14001399 @ NotNull
14011400 public static String createFunctionPresentation (@ NotNull ErlangFunction function ) {
1402- return function .getName () + "/" + function .getArity ();
1401+ return createFunctionPresentation ( function .getName (), function .getArity () );
14031402 }
14041403
14051404 @ NotNull
14061405 public static String createFunctionPresentation (@ NotNull ErlangImportFunction function ) {
1407- return getName (function .getQAtom ()) + "/" + getArity (function .getInteger ());
1406+ return createFunctionPresentation (getName (function .getQAtom ()), getArity (function .getInteger ()));
1407+ }
1408+
1409+ private static String createFunctionPresentation (String functionName , int arity ) {
1410+ return toAtomName (functionName ) + "/" + arity ;
14081411 }
14091412
14101413 @ NotNull
Original file line number Diff line number Diff line change 1- -export ([foo /0 , ? foo / 1 ]).
1+ -export ([foo /0 , ? foo / 1 , 'CAPS' / 1 ]).
22
33foo () -> ok ;
44< error > zoo </ error > () -> ok ;
@@ -8,4 +8,7 @@ foo() -> ok;
88-define (bar , fun1 ).
99
1010? foo (1 ) -> ok ;
11- ? bar (2 ) -> ok .
11+ ? bar (2 ) -> ok .
12+
13+ 'CAPS' (1 ) -> ok ;
14+ 'CAPS' (2 ) -> ok .
You can’t perform that action at this time.
0 commit comments