Community
Participate
Working Groups
Hi, Expected indentation after auto indentation (Ctrl+I): public FileNode fillFileNode(File file) throws IOException { // . . . return new FileNode( file.getName(), file.getName().endsWith(".txt") ? FileType.TEXT : FileType.BINARY, file.length(), toDate(basicAttributes.creationTime()), toDate(basicAttributes.lastModifiedTime()), toDate(basicAttributes.lastAccessTime()), file.canRead() ? computeFileHash(file) : null, ownerAttributeView.getOwner().getName() ); } But instead I am left with this mess: public FileNode fillFileNode(File file) throws IOException { // . . . return new FileNode( file.getName(), file.getName().endsWith(".txt") ? FileType.TEXT : FileType.BINARY, file.length(), toDate(basicAttributes.creationTime()), toDate(basicAttributes.lastModifiedTime()), toDate(basicAttributes.lastAccessTime()), file.canRead() ? computeFileHash(file) : null, ownerAttributeView.getOwner().getName() ); } It was already present in Eclipse Luna and now have the sad duty to report it also for Eclipse Mars. My colleagues are very fond of ternary operators which renders auto indentation/auto formatting unusable in most cases and in turn Eclipse close to be be an unusable IDE :( I tried to tweak auto formatter to be in fact only auto indenter, but I struggle there too. I can provide full, self contained, class code for you convenience if asked.
Potentially duplicate of Bug 65463 ? First reported in 2004-06-02 ..2011-04-13 possible patch ..and probably still not fixed??!!!
*** This bug has been marked as a duplicate of bug 65463 ***