/// <summary> /// Does the cleanup tasks to the code /// </summary> public static void CleanUpCode(ScintillaControl sci) { try { if (Globals.Settings.EnsureLastLineEnd) { sci.AddLastLineEnd(); } if (Globals.Settings.EnsureConsistentLineEnds) { sci.ConvertEOLs(sci.EOLMode); } if (Globals.Settings.StripTrailingSpaces) { sci.StripTrailingSpaces(); } } catch (Exception ex) { ErrorManager.ShowError(ex); } }
/** * Does the cleanup tasks to the specified document */ private void CleanUpDocument(ScintillaControl sci) { try { if (this.settings.GetBool("FlashDevelop.EnsureConsistentLineEnds")) { sci.ConvertEOLs(sci.EOLMode); } if (this.settings.GetBool("FlashDevelop.EnsureLastLineEnd")) { sci.AddLastLineEnd(); } if (this.settings.GetBool("FlashDevelop.StripTrailingSpaces")) { sci.StripTrailingSpaces(); } } catch (Exception ex) { ErrorHandler.ShowError("Error while running cleanup tasks.", ex); } }