Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/eclipse/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何自动格式化java代码以添加大括号_Java_Eclipse - Fatal编程技术网

如何自动格式化java代码以添加大括号

如何自动格式化java代码以添加大括号,java,eclipse,Java,Eclipse,如何自动格式化java代码以在eclispe中添加大括号 if (type == null) { if (other.type != null) return false; } else if (!type.equals(other.type)) return false; 要自动插入大括号,必须在首选项中更新java编辑器 您没有指定操作系统,但通常以下组合键可用于在eclipse中格式化代码: Windows操作系统:CRTL+SHIFT+F Mac操作系统

如何自动格式化java代码以在eclispe中添加大括号

if (type == null) {
    if (other.type != null)
        return false;
} else if (!type.equals(other.type))
    return false;
要自动插入大括号,必须在首选项中更新java编辑器


您没有指定操作系统,但通常以下组合键可用于在eclipse中格式化代码:

Windows操作系统:CRTL+SHIFT+F

Mac操作系统:⌘ + ⇧ + F


希望这会对您有所帮助。

如果您要请求Eclipse支持,您至少可以指定您使用的版本和操作系统。请尝试
CRTL+SHIFT+F
如果在windows上,如果在Mac上,请尝试
⌘ + ⇧ + F