如何更改代码样式,以便Reformat code
在这种情况下不会删除换行符:
DrawerItemInterface[] menu = new DrawerItemInterface[] {
DrawerHeaderItem.create(100, "Header"),
DrawerItem.create(101, "Item", false, getActivity())
};
执行Reformat code
给了我这个垃圾:
DrawerItemInterface[] menu = new DrawerItemInterface[]{DrawerHeaderItem.create(100, "Header"), DrawerItem.create(101, "Item", false, getActivity())};
答案 0 :(得分:1)
转到设置 - >代码风格 - >然后Java在右侧,检查换行符。然后它应该按预期工作