Bug 90016 [typing] Several errors when display tab with set to 0
Eclipse Java Development Tools Version: 3.0.2 Build id: 200503110845 Hi to all and thank for the tool, very nice work. :) I start Eclipse. I open one of my java file under my only open project. (3 closed) I expand the following. -->private DefaultTableModel tableModel = new DefaultTableModel() { public boolean isCellEditable(int rowIndex, int mColIndex) { return false; } // Returning the Class of each column will allow different // renderers to be used based on Class public Class getColumnClass(int column) { return getValueAt(0, column).getClass(); } }; I select the following line and I copy it CTRL-C: " // Returning the Class of each column will allow different" I set my cursor before the following line: " public boolean isCellEditable(int rowIndex, int mColIndex)" And I hit CTRL-V. (for pasting.) And I have this error poping up: ________________________________________________ | Error Executing Command | |________________________________________________| | The command for the key you pressed failed | | | | Reason: | | / by zero | |________________________________________________| Thanks for your time. If you have any other questions, let me know. Keep in mind that in other place on the same file, copy and paste work fine, it's only at specific place. Ciao, Francois.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/JavaIndenter.java
* <p>If <code>peekNextChar</code> is <code>true</code>, the next token after
	 * <code>offset</code> is read and taken into account when computing the
	 * indentation. Currently, if the next token is the first token on the line
	 * (i.e. only preceded by whitespace), the following tokens are specially
	 * handled:
	 * <ul>
	 * 	<li><code>switch</code> labels are indented relative to the switch block</li>
	 * 	<li>opening curly braces are aligned correctly with the introducing code</li>
	 * 	<li>closing curly braces are aligned properly with the introducing code of
	 * 		the matching opening brace</li>
	 * 	<li>closing parenthesis' are aligned with their opening peer</li>
	 * 	<li>the <code>else</code> keyword is aligned with its <code>if</code>, anything
	 * 		else is aligned normally (i.e. with the base of any introducing statements).</li>
	 *  <li>if there is no token on the same line after <code>offset</code>, the indentation
	 * 		is the same as for an <code>else</code> keyword</li>
	 * </ul>
	 * 
	 * @param offset the offset for which the reference is computed
	 * @param nextToken the next token to assume in the document
	 * @return the reference statement relative to which <code>offset</code>
	 *         should be indented, or {@link JavaHeuristicScanner#NOT_FOUND}
	 */
	public int findReferencePosition(int offset, int nextToken) {
		boolean danglingElse= false;
		boolean unindent= false;
		boolean indent= false;
		boolean matchBrace= false;
		boolean matchParen= false;
		boolean matchCase= false;