X-Git-Url: http://git.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPUnitEditor.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPUnitEditor.java index 15c174f..8b9382f 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPUnitEditor.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPUnitEditor.java @@ -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' } /* @@ -2758,7 +2771,8 @@ public class PHPUnitEditor extends PHPEditor { // implements super.editorSaved(); ShowExternalPreviewAction a = ShowExternalPreviewAction.getInstance(); if (a != null) { - a.refresh(ShowExternalPreviewAction.PHP_TYPE); + //a.refresh(ShowExternalPreviewAction.PHP_TYPE); + a.doRun(ShowExternalPreviewAction.PHP_TYPE); } } } \ No newline at end of file