}
/*
+ * 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) {
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'
}
/*
else
return new ExitFlags(LinkedPositionUI.COMMIT, true);
}
+ // Fix for #1380415 (toshihiro) start
+ switch (event.keyCode) {
+ case SWT.ARROW_UP:
+ case SWT.ARROW_DOWN:
+ return new ExitFlags(LinkedPositionUI.COMMIT, true);
+ case SWT.ARROW_LEFT:
+ case SWT.ARROW_RIGHT:
+ if (!manager.anyPositionIncludes(offset, length))
+ return new ExitFlags(LinkedPositionUI.COMMIT, true);
+ break;
+ }
+ // #1380415 end
switch (event.character) {
case '\b':
if (manager.getFirstPosition().length == 0)
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