* Refactor keywords managing to avoid repeating them twice * Fix build error * Fix string comparisons and null reference exception * Manage references in PascalABCLanguageInfo project * Fix inaccuracy in BaseKeywords.cs * Move ValidDirectives field to ILanguageInformation * Basic refactoring of GetPopupHintText + delete ampersend inserting * Delete other cases of ampersend inserting * Add check that we parsing PascalABC.NET in GetPopupHintText Временное решение, нужно будет вынести вторую попытку в интерфейс парсера. * Refactor CodeCompletionProvider (first iteration) * Extract shift space actions in separate class * Replace dollar service character in CodeCompletion by separate boolean (ctrlSpaceAfterDot)) * Refactor GetCompletionDataByFirst method * Fix GetCompletionDataByFirst behaviour when getting symInfos after uses keyword * Another iteration of refactoring in CodeCompletionProvider + comments * Update intellisense documentation * Fix build error * Fix encoding * Squashed commit of the following: commit7751fe7e75Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Sun Mar 16 13:28:03 2025 +0300 generating language res file at build time (#3252) commitd1fce63d69Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Mar 4 08:38:09 2025 +0300 Сборка после pr SDK commitd491e88aa7Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Mon Mar 3 20:34:51 2025 +0300 migration to new build system (#3241) * converting project files into sdk style * new build commands * adding new dll into nsis * removing unused .cs files commit1fd348ec3cAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Feb 23 20:49:26 2025 +0300 NSIS New 3.10 Ярлык в меню Пуск у всех пользователей commit80b7182dc1Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Feb 19 11:50:00 2025 +0300 _ in names commita2b078960bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Feb 19 10:52:25 2025 +0300 cnfc2 commit58f26d469dAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Feb 18 22:28:13 2025 +0300 перекомпиляция 3.10.3.3611 commitb78a72977fAuthor: nevermind322 <81963698+nevermind322@users.noreply.github.com> Date: Tue Feb 18 22:02:19 2025 +0300 fix build on mono (#3249) * fix build on mono * remove local func * fix again commitc3557e388cAuthor: Nikolay Kuznetsov <adasoft@gmail.com> Date: Sat Feb 15 20:32:46 2025 +0300 Update GraphABC.pas (#3244) 1. Быстрая реализация функции FloodFill Для этого добавлена процедура BitmapFloodFill, которая вызывается из метода Picture.FloodFill и процедуры FloodFill 2.Добавлена поддержка LockDrawing/UnlockDrawing в процедуру FloodFill commit9dbac389e1Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com> Date: Wed Feb 12 13:57:14 2025 +0300 Add missing projects to pabcnetc.sln (#3247) commit41dfb6f187Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Fri Feb 7 21:41:01 2025 +0300 [] - преобразование во все контейнеры GraphABCHelper - теперь ABCObjects работает под Линукс School исправлен согласно последним веяниям [] commit79bbbd10ffAuthor: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Wed Jan 29 20:18:37 2025 +0300 removing files for support fx4.0 (#3240) commit88d5c409ebAuthor: samuraiGH <87191377+samuraiGH@users.noreply.github.com> Date: Tue Jan 28 20:41:55 2025 +0300 Рефакторинг PascalABCNET.xshd (#3237) * refactoring PascalABCNET.xshd * removing extra characters commit8fbd7fdfc3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sun Jan 26 23:42:48 2025 +0300 3.10.3 faststrings EmptyCollection и преобразование ее в List, Dictionary t: (real,real) := (1,2) commitbba132bd5dAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jan 22 09:14:44 2025 +0300 Поправил справку по функции commit1bd21857ccAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Jan 8 18:46:51 2025 +0300 Teacher Control Plugin - возможность задать server.dat commit0848a1b796Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jan 4 22:54:38 2025 +0300 Исправление автоформатирования [] commitd45b782a7bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jan 4 18:45:07 2025 +0300 Rename PABCSistem in test suite commitc2347e604bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Jan 4 14:44:51 2025 +0300 Примеры - устранил неточности LightPT - имя сервера вынес в публичную секцию commitb68b8da970Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 17 15:52:18 2024 +0300 Примеры Coords1.pas Coords2.pas.pas commit8a9788e6f9Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 17 15:06:57 2024 +0300 Перенес проверку set array на уровень парсера Немного поправил Intellisense по наведению для NewSet По точке там что то другое работает commit874ddebad3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 21:00:38 2024 +0300 Поправил грамматику [] Теперь нельзя в режиме ## использовать атрибуты Зато можно [1,2,3].Print commit080fb487e1Merge:a53dcd9eda484b0e82Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 15:25:24 2024 +0300 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commita53dcd9ed2Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Dec 14 15:25:16 2024 +0300 SF Prm Cmb для строк commita484b0e82dAuthor: Sun Serega <sunserega2@gmail.com> Date: Thu Dec 12 13:49:17 2024 +0200 fix (#3231) commit6ef11f249cAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 10 11:05:45 2024 +0300 3.10.2 commitdb9679d89fAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 10 10:59:20 2024 +0300 Закончил превращение синтаксиса [] по умолчанию в массивы commit45fdde24b4Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 18:08:00 2024 +0100 #3229 commit494b47624dMerge:5875b99297906d73daAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 10:42:07 2024 +0100 Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet commit5875b99296Author: Ivan Bondarev <ibond84@googlemail.com> Date: Sun Dec 8 10:41:53 2024 +0100 platformtarget native - .NET 9.0 commit7906d73da3Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Dec 3 14:25:37 2024 +0300 Небольшие изменения в реализации операций с множествами commit087591c7b6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 27 11:37:07 2024 +0300 3.10.1 Coords - доработки Distance, Middle, DrawText с фоном и рамкой. Глобальные переменные настройки commitd268d4f83bAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Thu Nov 21 22:24:07 2024 +0300 NSToBytes переделал с исключением commit2bacdc8c28Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 20 13:20:33 2024 +0300 Комментарии к NewSet commite917ac8ecaAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 20 12:42:15 2024 +0300 TypeName для set commit206289c6a7Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Nov 19 20:23:03 2024 +0300 Везде заменил _hs на hs в NewSet Убрал вызовы методов расширений NewSet в PABCSystem.pas Убрал var в operator + commitd8262078f6Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Tue Nov 19 13:56:47 2024 +0300 Исправление мелких ошибок NewSet Все тесты проходят. Проблема, которая остаётся - в режиме ускорения такие программы падают: begin var s: set of byte; Print(s = [1]); end. Причина - из dll не вызывается конструктор записи без параметров, хотя он определён. В C# вообще у записей не может быть конструктора по умолчанию - наверное потому. Но для NewSet надо бы сделать исключение commitf8819665baAuthor: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Nov 16 10:56:11 2024 +0300 NS2 commit591d9ebe60Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 21:34:10 2024 +0100 fix commitc6505634f4Author: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 21:12:33 2024 +0100 fix commita6564df23cAuthor: Ivan Bondarev <ibond84@googlemail.com> Date: Wed Nov 13 20:52:29 2024 +0100 fix in new sets commit03be5bd931Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Wed Nov 13 22:13:41 2024 +0300 Переставил operator:= в NewSet commit96c68f1666Author: Ivan Bondarev <ibond84@googlemail.com> Date: Tue Nov 12 21:38:07 2024 +0100 #3223 commit82776f3c77Author: Mikhalkovich Stanislav <miks@math.sfedu.ru> Date: Sat Nov 9 12:18:19 2024 +0300 NewSet - много мелких исправлений. Все тесты проходят кроме Tests 5 - видимо с pabcrtl.dll * Update comments in PascalABCLanguageInformation
285 lines
14 KiB
C#
285 lines
14 KiB
C#
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
|
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
|
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Drawing;
|
|
using System.Windows.Forms;
|
|
using System.IO;
|
|
using System.Threading;
|
|
|
|
using ICSharpCode.TextEditor;
|
|
using ICSharpCode.TextEditor.Gui;
|
|
using ICSharpCode.TextEditor.Document;
|
|
using ICSharpCode.TextEditor.Gui.CompletionWindow;
|
|
using ICSharpCode.TextEditor.Gui.InsightWindow;
|
|
|
|
namespace VisualPascalABC
|
|
{
|
|
|
|
class CodeCompletionKeyHandler
|
|
{
|
|
public TextEditorControl editor;
|
|
public PABCNETCodeCompletionWindow codeCompletionWindow;
|
|
public PABCNETInsightWindow insightWindow;
|
|
public CodeCompletionProvider completionDataProvider;
|
|
|
|
private static Hashtable ht = new Hashtable();
|
|
|
|
private CodeCompletionKeyHandler(TextEditorControl editor)
|
|
{
|
|
this.editor = editor;
|
|
}
|
|
|
|
public static CodeCompletionKeyHandler Attach(TextEditorControl editor)
|
|
{
|
|
CodeCompletionKeyHandler h = new CodeCompletionKeyHandler(editor);
|
|
ht[editor] = h;
|
|
editor.ActiveTextAreaControl.TextArea.KeyEventHandler += h.TextAreaKeyEventHandler;
|
|
editor.ActiveTextAreaControl.TextArea.Caret.PositionChanged += h.CaretPositionChangedEventHandler;
|
|
//editor.ActiveTextAreaControl.TextArea.KeyDown += new System.Windows.Forms.KeyEventHandler(TextArea_KeyDown);
|
|
//editor.ActiveTextAreaControl.KeyDown += h.TextControlEventHandler;
|
|
// When the editor is disposed, close the code completion window
|
|
editor.Disposed += h.CloseCodeCompletionWindow;
|
|
return h;
|
|
}
|
|
|
|
public static void Detach(TextEditorControl editor)
|
|
{
|
|
if (ht.ContainsKey(editor))
|
|
ht.Remove(editor);
|
|
}
|
|
|
|
void CaretPositionChangedEventHandler(object sender, EventArgs e)
|
|
{
|
|
if (!VisualPABCSingleton.MainForm.UserOptions.HighlightOperatorBrackets || WorkbenchServiceFactory.DebuggerManager.IsRunning)
|
|
return;
|
|
CodeCompletionHighlighter.Highlight(editor.ActiveTextAreaControl.TextArea);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Return true to handle the keypress, return false to let the text area handle the keypress
|
|
/// </summary>
|
|
bool TextAreaKeyEventHandler(char key)
|
|
{
|
|
if (!WorkbenchServiceFactory.Workbench.UserOptions.AllowCodeCompletion || !VisualPABCSingleton.MainForm.VisualEnvironmentCompiler.compilerLoaded)
|
|
return false;
|
|
if (CodeCompletion.CodeCompletionController.CurrentParser == null) return false;
|
|
if (codeCompletionWindow != null)
|
|
{
|
|
// If completion window is open and wants to handle the key, don't let the text area
|
|
// handle it
|
|
if (codeCompletionWindow.ProcessKeyEvent(key))
|
|
return true;
|
|
}
|
|
else
|
|
{
|
|
PABCNETCodeCompletionWindow ccw = CodeCompletionNamesOnlyInModuleAction.comp_windows[editor.ActiveTextAreaControl.TextArea] as PABCNETCodeCompletionWindow;
|
|
|
|
if (ccw != null && CodeCompletionNamesOnlyInModuleAction.is_begin)
|
|
{
|
|
CodeCompletionNamesOnlyInModuleAction.is_begin = false;
|
|
if (key != ' ')
|
|
ccw.ProcessKeyEvent(key);
|
|
else
|
|
{
|
|
ccw.ProcessKeyEvent('_');
|
|
ccw.Close();
|
|
}
|
|
|
|
}
|
|
else if (ccw != null && ccw.ProcessKeyEvent(key))
|
|
return true;
|
|
}
|
|
if (key == '.')
|
|
{
|
|
if (CodeCompletion.CodeCompletionController.CurrentParser == null)
|
|
return false;
|
|
if (!string.IsNullOrEmpty(WorkbenchServiceFactory.DocumentService.CurrentCodeFileDocument.TextEditor.ActiveTextAreaControl.SelectionManager.SelectedText))
|
|
{
|
|
WorkbenchServiceFactory.DocumentService.CurrentCodeFileDocument.TextEditor.ActiveTextAreaControl.Caret.Position = WorkbenchServiceFactory.DocumentService.CurrentCodeFileDocument.TextEditor.ActiveTextAreaControl.SelectionManager.SelectionCollection[0].StartPosition;
|
|
WorkbenchServiceFactory.DocumentService.CurrentCodeFileDocument.TextEditor.ActiveTextAreaControl.SelectionManager.RemoveSelectedText();
|
|
}
|
|
|
|
if (WorkbenchServiceFactory.Workbench.UserOptions.CodeCompletionDot)
|
|
{
|
|
completionDataProvider = new CodeCompletionProvider();
|
|
|
|
codeCompletionWindow = PABCNETCodeCompletionWindow.ShowCompletionWindow(
|
|
VisualPABCSingleton.MainForm, // The parent window for the completion window
|
|
editor, // The text editor to show the window for
|
|
editor.FileName, // Filename - will be passed back to the provider
|
|
completionDataProvider, // Provider to get the list of possible completions
|
|
key, // Key pressed - will be passed to the provider
|
|
true,
|
|
true,
|
|
PascalABCCompiler.Parsers.KeywordKind.None
|
|
);
|
|
editor.Focus();
|
|
CodeCompletionNamesOnlyInModuleAction.is_begin = true;
|
|
CodeCompletionNamesOnlyInModuleAction.comp_windows[editor.ActiveTextAreaControl.TextArea] = codeCompletionWindow;
|
|
if (codeCompletionWindow != null)
|
|
codeCompletionWindow.Closed += new EventHandler(CloseCodeCompletionWindow);
|
|
}
|
|
}
|
|
else if (key == '(' || key == '[' || key == ',')
|
|
{
|
|
if (CodeCompletion.CodeCompletionController.CurrentParser == null) return false;
|
|
if (VisualPABCSingleton.MainForm.UserOptions.CodeCompletionParams)
|
|
{
|
|
ICSharpCode.TextEditor.Gui.InsightWindow.IInsightDataProvider idp = new DefaultInsightDataProvider(-1, false, key);
|
|
if (insightWindow == null || insightWindow.InsightProviderStackLength == 0)
|
|
{
|
|
insightWindow = new PABCNETInsightWindow(VisualPABCSingleton.MainForm, editor);
|
|
insightWindow.Font = new Font(Constants.CompletionInsightWindowFontName, insightWindow.Font.Size);
|
|
insightWindow.Closed += new EventHandler(CloseInsightWindow);
|
|
}
|
|
else
|
|
{
|
|
(idp as DefaultInsightDataProvider).defaultIndex = insightWindow.GetCurrentData();
|
|
(idp as DefaultInsightDataProvider).cur_param_num = (insightWindow.GetInsightProvider() as DefaultInsightDataProvider).param_count;
|
|
|
|
}
|
|
insightWindow.AddInsightDataProvider(idp, editor.FileName);
|
|
insightWindow.ShowInsightWindow();
|
|
editor.Focus();
|
|
}
|
|
}
|
|
else if (key == ' ')
|
|
{
|
|
if (CodeCompletion.CodeCompletionController.CurrentParser == null) return false;
|
|
if (VisualPABCSingleton.MainForm.UserOptions.CodeCompletionDot)
|
|
{
|
|
PascalABCCompiler.Parsers.KeywordKind keyw = KeywordChecker.TestForKeyword(editor.Document.TextContent, editor.ActiveTextAreaControl.TextArea.Caret.Offset - 1);
|
|
if (keyw == PascalABCCompiler.Parsers.KeywordKind.New || keyw == PascalABCCompiler.Parsers.KeywordKind.Uses)
|
|
{
|
|
completionDataProvider = new CodeCompletionProvider();
|
|
codeCompletionWindow = PABCNETCodeCompletionWindow.ShowCompletionWindow(
|
|
VisualPABCSingleton.MainForm, // The parent window for the completion window
|
|
editor, // The text editor to show the window for
|
|
editor.FileName, // Filename - will be passed back to the provider
|
|
completionDataProvider, // Provider to get the list of possible completions
|
|
' ', // Key pressed - will be passed to the provider
|
|
true,
|
|
false,
|
|
keyw
|
|
);
|
|
CodeCompletionNamesOnlyInModuleAction.comp_windows[editor.ActiveTextAreaControl.TextArea] = codeCompletionWindow;
|
|
if (codeCompletionWindow != null)
|
|
codeCompletionWindow.Closed += new EventHandler(CloseCodeCompletionWindow);
|
|
//return true;
|
|
}
|
|
}
|
|
}
|
|
else if (key == '\n')
|
|
{
|
|
if (VisualPABCSingleton.MainForm.UserOptions.AllowCodeCompletion && CodeCompletion.CodeCompletionController.CurrentParser != null)
|
|
{
|
|
try
|
|
{
|
|
CodeCompletion.DomConverter dconv = (CodeCompletion.DomConverter)CodeCompletion.CodeCompletionController.comp_modules[editor.FileName];
|
|
if (dconv != null)
|
|
{
|
|
CodeCompletion.SymScope ss = dconv.FindScopeByLocation(editor.ActiveTextAreaControl.TextArea.Caret.Line + 1, editor.ActiveTextAreaControl.TextArea.Caret.Column + 1);
|
|
ss.IncreaseEndLine();
|
|
}
|
|
}
|
|
catch
|
|
{
|
|
|
|
}
|
|
}
|
|
}
|
|
else if (codeCompletionWindow == null && VisualPABCSingleton.MainForm.UserOptions.EnableSmartIntellisense && (char.IsLetter(key) || key == '_'))
|
|
{
|
|
if (VisualPABCSingleton.MainForm.UserOptions.CodeCompletionDot)
|
|
{
|
|
if (CodeCompletion.CodeCompletionController.CurrentParser == null) return false;
|
|
PascalABCCompiler.Parsers.KeywordKind keyw = KeywordChecker.TestForKeyword(editor.Document.TextContent, editor.ActiveTextAreaControl.TextArea.Caret.Offset - 1);
|
|
if (CodeCompletion.CodeCompletionController.CurrentParser.LanguageInformation.IsDefinitionIdentifierAfterKeyword(keyw))
|
|
return false;
|
|
|
|
// если не первый символ выражения (предыдущий тоже буква или "_"), то не открываем новое окно
|
|
if (editor.ActiveTextAreaControl.TextArea.Caret.Offset > 0 && (char.IsLetterOrDigit(editor.Document.TextContent[editor.ActiveTextAreaControl.TextArea.Caret.Offset - 1]) || editor.Document.TextContent[editor.ActiveTextAreaControl.TextArea.Caret.Offset - 1] == '_'))
|
|
return false;
|
|
|
|
completionDataProvider = new CodeCompletionProvider();
|
|
codeCompletionWindow = PABCNETCodeCompletionWindow.ShowCompletionWindowWithFirstChar(
|
|
VisualPABCSingleton.MainForm, // The parent window for the completion window
|
|
editor, // The text editor to show the window for
|
|
editor.FileName, // Filename - will be passed back to the provider
|
|
completionDataProvider, // Provider to get the list of possible completions
|
|
key, // Key pressed - will be passed to the provider
|
|
keyw
|
|
);
|
|
CodeCompletionNamesOnlyInModuleAction.comp_windows[editor.ActiveTextAreaControl.TextArea] = codeCompletionWindow;
|
|
if (codeCompletionWindow != null)
|
|
codeCompletionWindow.Closed += new EventHandler(CloseCodeCompletionWindow);
|
|
|
|
}
|
|
}
|
|
/*else if (codeCompletionWindow == null && key == '\n')
|
|
{
|
|
if (mainForm.UserOptions.AllowCodeFormatting)
|
|
{
|
|
if (CodeCompletion.CodeCompletionController.currentParser == null) return false;
|
|
string bracket = CodeCompletion.CodeCompletionController.currentParser.LanguageInformation.GetBodyStartBracket();
|
|
string end_bracket = CodeCompletion.CodeCompletionController.currentParser.LanguageInformation.GetBodyEndBracket();
|
|
if (bracket != null)
|
|
{
|
|
int i = editor.ActiveTextAreaControl.TextArea.Caret.Offset-1;
|
|
int j = bracket.Length-1;
|
|
bool eq=true;
|
|
while (i >= 0 && j >= 0)
|
|
{
|
|
if (editor.Document.TextContent[i] != bracket[j])
|
|
{
|
|
eq = false;
|
|
break;
|
|
}
|
|
i--; j--;
|
|
}
|
|
if (eq && j<0)
|
|
{
|
|
TextArea textArea = editor.ActiveTextAreaControl.TextArea;
|
|
int col = textArea.Caret.Column-bracket.Length;
|
|
textArea.InsertString("\n\n"+end_bracket);
|
|
textArea.Caret.Column = 0;
|
|
textArea.Caret.Line = textArea.Caret.Line-1;
|
|
textArea.Caret.Column = VisualPABCSingleton.MainForm.UserOptions.CursorTabCount+col;
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
}*/
|
|
|
|
return false;
|
|
}
|
|
|
|
void CloseInsightWindow(object sender, EventArgs e)
|
|
{
|
|
if (insightWindow != null)
|
|
{
|
|
insightWindow.Closed -= new EventHandler(CloseInsightWindow);
|
|
insightWindow.Dispose();
|
|
insightWindow = null;
|
|
}
|
|
}
|
|
|
|
void CloseCodeCompletionWindow(object sender, EventArgs e)
|
|
{
|
|
if (codeCompletionWindow != null)
|
|
{
|
|
codeCompletionWindow.Closed -= new EventHandler(CloseCodeCompletionWindow);
|
|
CodeCompletionProvider.disp.Reset();
|
|
CodeCompletion.AssemblyDocCache.Reset();
|
|
CodeCompletion.UnitDocCache.Reset();
|
|
codeCompletionWindow.Dispose();
|
|
CodeCompletionNamesOnlyInModuleAction.comp_windows[editor.ActiveTextAreaControl.TextArea] = null;
|
|
codeCompletionWindow = null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|