IDEA-171523: change font method name to unique not dynamic name

This commit is contained in:
Alexander Lobas
2017-05-23 13:47:53 +03:00
parent e49f933927
commit 5e9bea4241
3 changed files with 3 additions and 2 deletions
@@ -59,6 +59,7 @@ public class AsmCodeGenerator {
public static final String CREATE_COMPONENTS_METHOD_NAME = "createUIComponents";
public static final String LOAD_LABEL_TEXT_METHOD = "$$$loadLabelText$$$";
public static final String LOAD_BUTTON_TEXT_METHOD = "$$$loadButtonText$$$";
public static final String GET_FONT_METHOD_NAME = "$$$getFont$$$";
private static final Type ourButtonGroupType = Type.getType(ButtonGroup.class);
private static final Type ourBorderFactoryType = Type.getType(BorderFactory.class);
@@ -102,7 +102,7 @@ public class FontPropertyCodeGenerator extends PropertyCodeGenerator {
}
public static Method createGetFontMethod() {
return new Method("getFont" + System.currentTimeMillis(), ourFontType,
return new Method(AsmCodeGenerator.GET_FONT_METHOD_NAME, ourFontType,
new Type[]{ourStringType, Type.INT_TYPE, Type.INT_TYPE, ourFontType});
}
@@ -1035,7 +1035,7 @@ public final class FormSourceCodeGenerator {
}
else {
if (myGetFontMethod == null) {
myGetFontMethod = "getFont" + System.currentTimeMillis();
myGetFontMethod = AsmCodeGenerator.GET_FONT_METHOD_NAME;
}
startMethodCall("this", myGetFontMethod);