This commit is contained in:
Бондарев Иван 2020-10-11 14:24:39 +02:00
parent 595bca24d6
commit b4c9dc2f0c
4 changed files with 17 additions and 1 deletions

View file

@ -377,6 +377,7 @@ namespace VisualPascalABCPlugins
void ExecRedo();
void CollapseRegions();
void CodeFormat();
void SetEditorDisabled(bool val);
}
public interface IWorkbenchDebuggerOperationsService

View file

@ -662,6 +662,7 @@ namespace VisualPascalABC
RemoveGotoBreakpoints();
AssemblyHelper.Unload();
CloseOldToolTip();
workbench.ServiceContainer.EditorService.SetEditorDisabled(false);
//RemoveMarker(frm.CurrentCodeFileDocument.TextEditor.ActiveTextAreaControl.Document);
evaluator = null;
parser= null;
@ -697,6 +698,7 @@ namespace VisualPascalABC
workbench.WidgetController.EnableCodeCompletionToolTips(false);
workbench.WidgetController.SetAddExprMenuVisible(true);
workbench.WidgetController.SetDisassemblyMenuVisible(true);
workbench.ServiceContainer.EditorService.SetEditorDisabled(true);
TooltipServiceManager.hideToolTip();
IsRunning = true;
evaluator = new ExpressionEvaluator(e.Process,workbench.VisualEnvironmentCompiler, FileName);

View file

@ -85,6 +85,17 @@ namespace VisualPascalABC
edit.Document.HighlightingStrategy = ICSharpCode.TextEditor.Document.HighlightingManager.Manager.FindHighlighterForFile(FileName);
}
internal bool editorDisabled;
public void SetEditorDisabled(bool val)
{
this.editorDisabled = val;
if (!val)
foreach (var tab in OpenDocuments.Values)
tab.TextEditor.Document.ReadOnly = val;
CurrentCodeFileDocument.TextEditor.Document.ReadOnly = val;
}
public void SynEdit_ChangeText(object sender, CodeFileDocumentControl cfdc)
{
CodeFileDocumentControl d = cfdc;
@ -98,7 +109,7 @@ namespace VisualPascalABC
}
NavigationLocationChanged();
UpdateUndoRedoEnabled();
UpdateUndoRedoEnabled();
WorkbenchServiceFactory.CodeCompletionParserController.SetAsChanged(cfdc.FileName);
}

View file

@ -108,6 +108,8 @@ namespace VisualPascalABC
//toolStrip1.Refresh();
}
bool BottomDockContentVisible
{
get