1) Fixed issue #705: Take the global 'Undo history size' to overwrite the default...
authorrobekras <robekras>
Sun, 20 Nov 2011 15:43:00 +0000 (15:43 +0000)
committerrobekras <robekras>
Sun, 20 Nov 2011 15:43:00 +0000 (15:43 +0000)
net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/phpeditor/PHPUnitEditor.java

index 93d23ff..370142e 100644 (file)
@@ -417,6 +417,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) {
@@ -431,6 +442,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'
                }
 
                /*