1) Fixed issue #705: Take the global 'Undo history size' to overwrite the default...
authorrobekras <robekras>
Sun, 15 Jan 2012 16:26:09 +0000 (16:26 +0000)
committerrobekras <robekras>
Sun, 15 Jan 2012 16:26:09 +0000 (16:26 +0000)
net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPUnitEditor.java

index f726d5d..8b9382f 100644 (file)
@@ -414,6 +414,17 @@ public class PHPUnitEditor extends PHPEditor { // implements
                }
 
                /*
+                * Get the global 'Undo history size' setting 
+                *
+                */
+        protected int getUndoHistorySize () {
+                  IPreferenceStore store= getPreferenceStore ();
+                  
+                  return store != null ? store.getInt("undoHistorySize") : 1000;
+               }
+
+               
+               /*
                 * @see org.eclipse.jface.text.source.ISourceViewer#configure(org.eclipse.jface.text.source.SourceViewerConfiguration)
                 */
                public void configure(SourceViewerConfiguration configuration) {
@@ -428,6 +439,8 @@ public class PHPUnitEditor extends PHPEditor { // implements
                        prependAutoEditStrategy(smartSemi, IPHPPartitions.PHP_STRING_SQ);
                        prependAutoEditStrategy(smartSemi,
                                        IPHPPartitions.PHP_STRING_HEREDOC);
+            
+                       fUndoManager.setMaximalUndoLevel (this.getUndoHistorySize ());  // Set every editor to the global 'Undo history size'
                }
 
                /*