@@ -85,17 +85,23 @@ public class DefaultUndoManager implements IUndoManager, IUndoManagerExtension {
8585 class TextCommand extends AbstractOperation {
8686
8787 /** The start index of the replaced text. */
88+ @ Deprecated
8889 protected int fStart = -1 ;
8990 /** The end index of the replaced text. */
91+ @ Deprecated
9092 protected int fEnd = -1 ;
9193 /** The newly inserted text. */
94+ @ Deprecated
9295 protected String fText ;
9396 /** The replaced text. */
97+ @ Deprecated
9498 protected String fPreservedText ;
9599
96100 /** The undo modification stamp. */
101+ @ Deprecated
97102 protected long fUndoModificationStamp = IDocumentExtension4 .UNKNOWN_MODIFICATION_STAMP ;
98103 /** The redo modification stamp. */
104+ @ Deprecated
99105 protected long fRedoModificationStamp = IDocumentExtension4 .UNKNOWN_MODIFICATION_STAMP ;
100106
101107 /**
@@ -104,6 +110,7 @@ class TextCommand extends AbstractOperation {
104110 * @param context the undo context for this command
105111 * @since 3.1
106112 */
113+ @ Deprecated
107114 TextCommand (IUndoContext context ) {
108115 super (JFaceTextMessages .getString ("DefaultUndoManager.operationLabel" )); //$NON-NLS-1$
109116 addContext (context );
@@ -112,6 +119,7 @@ class TextCommand extends AbstractOperation {
112119 /**
113120 * Re-initializes this text command.
114121 */
122+ @ Deprecated
115123 protected void reinitialize () {
116124 fStart = fEnd = -1 ;
117125 fText = fPreservedText = null ;
@@ -125,13 +133,15 @@ protected void reinitialize() {
125133 * @param start the start index
126134 * @param end the end index
127135 */
136+ @ Deprecated
128137 protected void set (int start , int end ) {
129138 fStart = start ;
130139 fEnd = end ;
131140 fText = null ;
132141 fPreservedText = null ;
133142 }
134143
144+ @ Deprecated
135145 @ Override
136146 public void dispose () {
137147 reinitialize ();
@@ -142,6 +152,7 @@ public void dispose() {
142152 *
143153 * @since 2.0
144154 */
155+ @ Deprecated
145156 protected void undoTextChange () {
146157 try {
147158 IDocument document = fTextViewer .getDocument ();
@@ -154,6 +165,7 @@ protected void undoTextChange() {
154165 }
155166 }
156167
168+ @ Deprecated
157169 @ Override
158170 public boolean canUndo () {
159171
@@ -208,6 +220,7 @@ public boolean canUndo() {
208220 return false ;
209221 }
210222
223+ @ Deprecated
211224 @ Override
212225 public boolean canRedo () {
213226 if (isConnected () && isValid ()) {
@@ -223,11 +236,13 @@ public boolean canRedo() {
223236 return false ;
224237 }
225238
239+ @ Deprecated
226240 @ Override
227241 public boolean canExecute () {
228242 return isConnected ();
229243 }
230244
245+ @ Deprecated
231246 @ Override
232247 public IStatus execute (IProgressMonitor monitor , IAdaptable uiInfo ) {
233248 // Text commands execute as they are typed, so executing one has no effect.
@@ -247,6 +262,7 @@ public IStatus execute(IProgressMonitor monitor, IAdaptable uiInfo) {
247262 * @param uiInfo an adaptable that can provide UI info if needed
248263 * @return the status
249264 */
265+ @ Deprecated
250266 @ Override
251267 public IStatus undo (IProgressMonitor monitor , IAdaptable uiInfo ) {
252268 if (isValid ()) {
@@ -263,6 +279,7 @@ public IStatus undo(IProgressMonitor monitor, IAdaptable uiInfo) {
263279 *
264280 * @since 2.0
265281 */
282+ @ Deprecated
266283 protected void redoTextChange () {
267284 try {
268285 IDocument document = fTextViewer .getDocument ();
@@ -283,6 +300,7 @@ protected void redoTextChange() {
283300 * @param uiInfo an adaptable that can provide UI info if needed
284301 * @return the status
285302 */
303+ @ Deprecated
286304 @ Override
287305 public IStatus redo (IProgressMonitor monitor , IAdaptable uiInfo ) {
288306 if (isValid ()) {
@@ -300,6 +318,7 @@ public IStatus redo(IProgressMonitor monitor, IAdaptable uiInfo) {
300318 * @since 3.1
301319 */
302320
321+ @ Deprecated
303322 protected void updateCommand () {
304323 fText = fTextBuffer .toString ();
305324 fTextBuffer .setLength (0 );
@@ -313,13 +332,15 @@ protected void updateCommand() {
313332 *
314333 * @return a new, uncommitted text command or a compound text command
315334 */
335+ @ Deprecated
316336 protected TextCommand createCurrent () {
317337 return fFoldingIntoCompoundChange ? new CompoundTextCommand (fUndoContext ) : new TextCommand (fUndoContext );
318338 }
319339
320340 /**
321341 * Commits the current change into this command.
322342 */
343+ @ Deprecated
323344 protected void commit () {
324345 if (fStart < 0 ) {
325346 if (fFoldingIntoCompoundChange ) {
@@ -340,6 +361,7 @@ protected void commit() {
340361 *
341362 * @since 3.1
342363 */
364+ @ Deprecated
343365 protected void pretendCommit () {
344366 if (fStart > -1 ) {
345367 fText = fTextBuffer .toString ();
@@ -355,6 +377,7 @@ protected void pretendCommit() {
355377 * new fCurrent, false if not.
356378 * @since 3.1
357379 */
380+ @ Deprecated
358381 protected boolean attemptCommit () {
359382 pretendCommit ();
360383 if (isValid ()) {
@@ -370,12 +393,14 @@ protected boolean attemptCommit() {
370393 * @return <code>true</code> if the command is valid for undo or redo
371394 * @since 3.1
372395 */
396+ @ Deprecated
373397 protected boolean isValid () {
374398 return fStart > -1 &&
375399 fEnd > -1 &&
376400 fText != null ;
377401 }
378402
403+ @ Deprecated
379404 @ Override
380405 public String toString () {
381406 String delimiter = ", " ; //$NON-NLS-1$
@@ -408,6 +433,7 @@ public String toString() {
408433 * @return the undo modification stamp for this command
409434 * @since 3.1
410435 */
436+ @ Deprecated
411437 protected long getUndoModificationStamp () {
412438 return fUndoModificationStamp ;
413439 }
@@ -418,6 +444,7 @@ protected long getUndoModificationStamp() {
418444 * @return the redo modification stamp for this command
419445 * @since 3.1
420446 */
447+ @ Deprecated
421448 protected long getRedoModificationStamp () {
422449 return fRedoModificationStamp ;
423450 }
@@ -439,6 +466,7 @@ class CompoundTextCommand extends TextCommand {
439466 * @param context the undo context for this command
440467 * @since 3.1
441468 */
469+ @ Deprecated
442470 CompoundTextCommand (IUndoContext context ) {
443471 super (context );
444472 }
@@ -448,10 +476,12 @@ class CompoundTextCommand extends TextCommand {
448476 *
449477 * @param command the command to be added
450478 */
479+ @ Deprecated
451480 protected void add (TextCommand command ) {
452481 fCommands .add (command );
453482 }
454483
484+ @ Deprecated
455485 @ Override
456486 public IStatus undo (IProgressMonitor monitor , IAdaptable uiInfo ) {
457487 resetProcessChangeSate ();
@@ -473,6 +503,7 @@ public IStatus undo(IProgressMonitor monitor, IAdaptable uiInfo) {
473503 return Status .OK_STATUS ;
474504 }
475505
506+ @ Deprecated
476507 @ Override
477508 public IStatus redo (IProgressMonitor monitor , IAdaptable uiInfo ) {
478509 resetProcessChangeSate ();
@@ -498,6 +529,7 @@ public IStatus redo(IProgressMonitor monitor, IAdaptable uiInfo) {
498529
499530 */
500531
532+ @ Deprecated
501533 @ Override
502534 protected void updateCommand () {
503535 // first gather the data from the buffers
@@ -520,6 +552,7 @@ protected void updateCommand() {
520552 /*
521553 * @see TextCommand#createCurrent
522554 */
555+ @ Deprecated
523556 @ Override
524557 protected TextCommand createCurrent () {
525558
@@ -531,6 +564,7 @@ protected TextCommand createCurrent() {
531564 return this ;
532565 }
533566
567+ @ Deprecated
534568 @ Override
535569 protected void commit () {
536570 // if there is pending data, update the command
@@ -547,6 +581,7 @@ protected void commit() {
547581 * @return true if the command is valid.
548582 * @since 3.1
549583 */
584+ @ Deprecated
550585 @ Override
551586 protected boolean isValid () {
552587 if (isConnected ()) {
@@ -561,6 +596,7 @@ protected boolean isValid() {
561596 * @return the undo modification stamp
562597 * @since 3.1
563598 */
599+ @ Deprecated
564600 @ Override
565601 protected long getUndoModificationStamp () {
566602 if (fStart > -1 ) {
@@ -578,6 +614,7 @@ protected long getUndoModificationStamp() {
578614 * @return the redo modification stamp
579615 * @since 3.1
580616 */
617+ @ Deprecated
581618 @ Override
582619 protected long getRedoModificationStamp () {
583620 if (fStart > -1 ) {
@@ -599,6 +636,7 @@ class KeyAndMouseListener implements MouseListener, KeyListener {
599636 /*
600637 * @see MouseListener#mouseDoubleClick
601638 */
639+ @ Deprecated
602640 @ Override
603641 public void mouseDoubleClick (MouseEvent e ) {
604642 }
@@ -607,6 +645,7 @@ public void mouseDoubleClick(MouseEvent e) {
607645 * If the right mouse button is pressed, the current editing command is closed
608646 * @see MouseListener#mouseDown
609647 */
648+ @ Deprecated
610649 @ Override
611650 public void mouseDown (MouseEvent e ) {
612651 if (e .button == 1 ) {
@@ -617,13 +656,15 @@ public void mouseDown(MouseEvent e) {
617656 /*
618657 * @see MouseListener#mouseUp
619658 */
659+ @ Deprecated
620660 @ Override
621661 public void mouseUp (MouseEvent e ) {
622662 }
623663
624664 /*
625665 * @see KeyListener#keyPressed
626666 */
667+ @ Deprecated
627668 @ Override
628669 public void keyReleased (KeyEvent e ) {
629670 }
@@ -632,6 +673,7 @@ public void keyReleased(KeyEvent e) {
632673 * On cursor keys, the current editing command is closed
633674 * @see KeyListener#keyPressed
634675 */
676+ @ Deprecated
635677 @ Override
636678 public void keyPressed (KeyEvent e ) {
637679 switch (e .keyCode ) {
@@ -653,6 +695,7 @@ class DocumentListener implements IDocumentListener {
653695
654696 private String fReplacedText ;
655697
698+ @ Deprecated
656699 @ Override
657700 public void documentAboutToBeChanged (DocumentEvent event ) {
658701 try {
@@ -663,6 +706,7 @@ public void documentAboutToBeChanged(DocumentEvent event) {
663706 }
664707 }
665708
709+ @ Deprecated
666710 @ Override
667711 public void documentChanged (DocumentEvent event ) {
668712 fPreservedRedoModificationStamp = event .getModificationStamp ();
@@ -703,6 +747,7 @@ public void documentChanged(DocumentEvent event) {
703747 @ Deprecated
704748 class TextInputListener implements ITextInputListener {
705749
750+ @ Deprecated
706751 @ Override
707752 public void inputDocumentAboutToBeChanged (IDocument oldInput , IDocument newInput ) {
708753 if (oldInput != null && fDocumentListener != null ) {
@@ -711,6 +756,7 @@ public void inputDocumentAboutToBeChanged(IDocument oldInput, IDocument newInput
711756 }
712757 }
713758
759+ @ Deprecated
714760 @ Override
715761 public void inputDocumentChanged (IDocument oldInput , IDocument newInput ) {
716762 if (newInput != null ) {
@@ -731,6 +777,7 @@ public void inputDocumentChanged(IDocument oldInput, IDocument newInput) {
731777 class HistoryListener implements IOperationHistoryListener {
732778 private IUndoableOperation fOperation ;
733779
780+ @ Deprecated
734781 @ Override
735782 public void historyNotification (final OperationHistoryEvent event ) {
736783 final int type = event .getEventType ();
0 commit comments