bug fix #408
This commit is contained in:
parent
3cfcd0c6e5
commit
16ffdc9a05
|
|
@ -372,6 +372,7 @@ namespace VisualPascalABCPlugins
|
|||
void ExecUndo();
|
||||
void ExecRedo();
|
||||
void CollapseRegions();
|
||||
void CodeFormat();
|
||||
}
|
||||
|
||||
public interface IWorkbenchDebuggerOperationsService
|
||||
|
|
@ -428,6 +429,14 @@ namespace VisualPascalABCPlugins
|
|||
IWorkbenchDesignerService DesignerService { get; }
|
||||
IWorkbenchOperationsService OperationsService { get; }
|
||||
IWorkbenchUpdateService UpdateService { get; }
|
||||
ICodeCompletionService CodeCompletionService { get; }
|
||||
}
|
||||
|
||||
public interface ICodeCompletionService
|
||||
{
|
||||
PascalABCCompiler.Parsers.ICodeCompletionDomConverter GetConverter(string FileName);
|
||||
void SetAsChanged(string FileName);
|
||||
void RegisterFileForParsing(string FileName);
|
||||
}
|
||||
|
||||
public interface IWorkbench
|
||||
|
|
@ -443,7 +452,6 @@ namespace VisualPascalABCPlugins
|
|||
ICompilerConsoleWindow CompilerConsoleWindow { get; }
|
||||
IOutputWindow OutputWindow { get; }
|
||||
IErrorListWindow ErrorsListWindow { get; }
|
||||
|
||||
void BeginInvoke(Delegate del, params object[] args);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -247,6 +247,11 @@ namespace VisualPascalABC
|
|||
(new ICSharpCode.TextEditor.Actions.SelectWholeDocument()).Execute(TextEditor.ActiveTextAreaControl.TextArea);
|
||||
}
|
||||
|
||||
public void DeselectAll()
|
||||
{
|
||||
(new ICSharpCode.TextEditor.Actions.ClearAllSelections()).Execute(TextEditor.ActiveTextAreaControl.TextArea);
|
||||
}
|
||||
|
||||
public void Delete()
|
||||
{
|
||||
(new ICSharpCode.TextEditor.Actions.Delete()).Execute(TextEditor.ActiveTextAreaControl.TextArea);
|
||||
|
|
|
|||
|
|
@ -567,6 +567,7 @@ namespace VisualPascalABC
|
|||
public override void Execute(TextArea textArea)
|
||||
{
|
||||
WorkbenchServiceFactory.Workbench.ErrorsListWindow.ClearErrorList();
|
||||
VisualPABCSingleton.MainForm.CurrentCodeFileDocument.DeselectAll();
|
||||
CodeFormatters.CodeFormatter cf = new CodeFormatters.CodeFormatter(VisualPABCSingleton.MainForm.UserOptions.TabIndent);
|
||||
List<PascalABCCompiler.Errors.Error> Errors = new List<PascalABCCompiler.Errors.Error>();
|
||||
//PascalABCCompiler.SyntaxTree.syntax_tree_node sn =
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace VisualPascalABC
|
|||
{
|
||||
public delegate void ParseInformationUpdatedDelegate(object obj, string fileName);
|
||||
|
||||
public class CodeCompletionParserController
|
||||
public class CodeCompletionParserController : VisualPascalABCPlugins.ICodeCompletionService
|
||||
{
|
||||
public static Hashtable open_files = new Hashtable(StringComparer.OrdinalIgnoreCase);
|
||||
public VisualEnvironmentCompiler visualEnvironmentCompiler;
|
||||
|
|
@ -35,10 +35,8 @@ namespace VisualPascalABC
|
|||
|
||||
public CodeCompletionParserController()
|
||||
{
|
||||
//this.visualEnvironmentCompiler = visualEnvironmentCompiler;
|
||||
this.th = new System.Threading.Thread(new System.Threading.ThreadStart(ParseInThread));
|
||||
ccp = new CodeCompletionProvider();
|
||||
//CodeCompletion.CodeCompletionController.OpenFiles = open_files;
|
||||
}
|
||||
|
||||
public PascalABCCompiler.Parsers.ICodeCompletionDomConverter GetConverter(string fileName)
|
||||
|
|
|
|||
|
|
@ -240,5 +240,10 @@ namespace VisualPascalABC
|
|||
{
|
||||
CurrentCodeFileDocument.TextEditor.CollapseRegions();
|
||||
}
|
||||
|
||||
public void CodeFormat()
|
||||
{
|
||||
(new CodeFormattingAction()).Execute(CurrentSyntaxEditor.TextEditor.ActiveTextAreaControl.TextArea);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,6 +72,11 @@ namespace VisualPascalABC
|
|||
{
|
||||
get { return WorkbenchServiceFactory.OperationsService; }
|
||||
}
|
||||
|
||||
public ICodeCompletionService CodeCompletionService
|
||||
{
|
||||
get { return WorkbenchServiceFactory.CodeCompletionService; }
|
||||
}
|
||||
}
|
||||
|
||||
public class WorkbenchServiceFactory
|
||||
|
|
@ -202,6 +207,14 @@ namespace VisualPascalABC
|
|||
}
|
||||
}
|
||||
|
||||
public static ICodeCompletionService CodeCompletionService
|
||||
{
|
||||
get
|
||||
{
|
||||
return CodeCompletionParserController;
|
||||
}
|
||||
}
|
||||
|
||||
public static CodeCompletionParserController CodeCompletionParserController
|
||||
{
|
||||
get
|
||||
|
|
|
|||
Loading…
Reference in a new issue