comparison org.eclipse.jface.text/src/org/eclipse/jface/text/DefaultUndoManager.d @ 16:dbfb303e8fb0

first complete successful compile (win-only)
author Frank Benoit <benoit@tionex.de>
date Wed, 18 Mar 2009 08:56:47 +0100
parents bc29606a740c
children
comparison
equal deleted inserted replaced
15:c4b1a29263fc 16:dbfb303e8fb0
454 * @since 3.1 454 * @since 3.1
455 */ 455 */
456 456
457 protected void updateCommand() { 457 protected void updateCommand() {
458 fText= fTextBuffer.toString(); 458 fText= fTextBuffer.toString();
459 fTextBuffer.truncate(0); 459 fTextBuffer.setLength(0);
460 fPreservedText= fPreservedTextBuffer.toString(); 460 fPreservedText= fPreservedTextBuffer.toString();
461 fPreservedTextBuffer.truncate(0); 461 fPreservedTextBuffer.setLength(0);
462 } 462 }
463 463
464 /** 464 /**
465 * Creates a new uncommitted text command depending on whether 465 * Creates a new uncommitted text command depending on whether
466 * a compound change is currently being executed. 466 * a compound change is currently being executed.
1250 1250
1251 } else if (fPreviousDelete.fStart is modelEnd) { 1251 } else if (fPreviousDelete.fStart is modelEnd) {
1252 // repeated backspace 1252 // repeated backspace
1253 1253
1254 // insert in buffer and extend command range 1254 // insert in buffer and extend command range
1255 fPreservedTextBuffer.select(0, 0); 1255 fPreservedTextBuffer.insert(0, replacedText);
1256 fPreservedTextBuffer.replace(replacedText);
1257 fCurrent.fStart= modelStart; 1256 fCurrent.fStart= modelStart;
1258 1257
1259 } else { 1258 } else {
1260 // either DEL or backspace for the first time 1259 // either DEL or backspace for the first time
1261 1260
1392 removeListeners(); 1391 removeListeners();
1393 1392
1394 fCurrent= null; 1393 fCurrent= null;
1395 fTextViewer= null; 1394 fTextViewer= null;
1396 disposeCommandStack(); 1395 disposeCommandStack();
1397 fTextBuffer.clear(); 1396 fTextBuffer= null;
1398 fPreservedTextBuffer.clear(); 1397 fPreservedTextBuffer= null;
1399 fUndoContext= null; 1398 fUndoContext= null;
1400 } 1399 }
1401 } 1400 }
1402 1401
1403 /* 1402 /*
1408 initializeCommandStack(); 1407 initializeCommandStack();
1409 fCurrent= new TextCommand(fUndoContext); 1408 fCurrent= new TextCommand(fUndoContext);
1410 fFoldingIntoCompoundChange= false; 1409 fFoldingIntoCompoundChange= false;
1411 fInserting= false; 1410 fInserting= false;
1412 fOverwriting= false; 1411 fOverwriting= false;
1413 fTextBuffer.truncate(0); 1412 fTextBuffer.setLength(0);
1414 fPreservedTextBuffer.truncate(0); 1413 fPreservedTextBuffer.setLength(0);
1415 fPreservedUndoModificationStamp= IDocumentExtension4.UNKNOWN_MODIFICATION_STAMP; 1414 fPreservedUndoModificationStamp= IDocumentExtension4.UNKNOWN_MODIFICATION_STAMP;
1416 fPreservedRedoModificationStamp= IDocumentExtension4.UNKNOWN_MODIFICATION_STAMP; 1415 fPreservedRedoModificationStamp= IDocumentExtension4.UNKNOWN_MODIFICATION_STAMP;
1417 } 1416 }
1418 } 1417 }
1419 1418