Bug 50194 Indenting Java breaks comments
When correcting indentation (ctrl-I in my configuration), java comments are not properly preserved. My original code [1] is 'indented' to code [2], which is unexpected and syntactically incorrect. thanks PhF .. [1] try{ /* for(int i=0; i<8; i++){ System.out.println("something");} */ somethingElse(); .. [2] try{ /* */ for(int i=0; i<8; i++){ System.out.println("something");} */ somethingElse();
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavaDocAutoIndentStrategy.java
private final String fString;
		private final BreakIterator fIterator= BreakIterator.getLineInstance();
				
		private int fStart;
		private int fEnd;
		private int fBufferedEnd;
		
		public LineBreakIterator(String string) {
			fString= string;
			fIterator.setText(string);
		}
		
		public int first() {
			fBufferedEnd= -1;
			fStart= fIterator.first();
			return fStart;	
		}
		
		public int next() {
			
			if (fBufferedEnd != -1) {
				fStart= fEnd;
				fEnd= fBufferedEnd;
				fBufferedEnd= -1;
				return fEnd;
			}
			fStart= fEnd;