[BLUEJ-276] Strange deletion problem
Create a new class in BlueJ, e.g. ArrayWrapper. Then make a selection that begins immediately before the x in the variable declaration and ends after the final slash in the comment before the constructor:
{noformat} // instance variables - replace the example below with your own private int x;
/**
- Constructor for objects of class ArrayWrapper */ public ArrayWrapper() { // initialise instance variables x = 0; } {noformat}
Once you have made this selection, press delete. That's fine. Then press backspace or delete, and part of the method afterwards vanishes. I get this exception:
{noformat} Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: -46 at bluej.editor.moe.BlueJSyntaxView.findNonWhitespace(BlueJSyntaxView.java:1145) at bluej.editor.moe.BlueJSyntaxView.reassessIndents(BlueJSyntaxView.java:1062) at bluej.editor.moe.BlueJSyntaxView.updateDamage(BlueJSyntaxView.java:1286) at bluej.editor.moe.NaviviewView.updateDamage(NaviviewView.java:179) at javax.swing.text.PlainView.removeUpdate(PlainView.java:438) {noformat}
Issue metadata
- Issue type: Bug
- Priority: Medium
- Fix versions: 3.0.2