File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 46
46
import javax .swing .text .PlainDocument ;
47
47
import javax .swing .undo .UndoManager ;
48
48
import javax .swing .text .DefaultCaret ;
49
+ import javax .swing .text .Document ;
49
50
50
51
import org .fife .ui .rsyntaxtextarea .RSyntaxDocument ;
51
52
import org .fife .ui .rsyntaxtextarea .RSyntaxTextAreaEditorKit ;
@@ -402,7 +403,7 @@ public void setText(String what) {
402
403
int policy = caret .getUpdatePolicy ();
403
404
caret .setUpdatePolicy (DefaultCaret .NEVER_UPDATE );
404
405
try {
405
- RSyntaxDocument doc = ( RSyntaxDocument ) textarea .getDocument ();
406
+ Document doc = textarea .getDocument ();
406
407
int oldLength = doc .getLength ();
407
408
// The undo manager already seems to group the insert and remove together
408
409
// automatically, but better be explicit about it.
You can’t perform that action at this time.
0 commit comments