2022-06-30 09:47:11 +03:00
|
|
|
|
// 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.IO;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
using ICSharpCode.TextEditor;
|
|
|
|
|
|
using ICSharpCode.TextEditor.Document;
|
|
|
|
|
|
using ICSharpCode.TextEditor.Gui.CompletionWindow;
|
|
|
|
|
|
using PascalABCCompiler;
|
|
|
|
|
|
using PascalABCCompiler.Parsers;
|
|
|
|
|
|
|
|
|
|
|
|
namespace VisualPascalABC
|
|
|
|
|
|
{
|
|
|
|
|
|
public class CodeCompletionActionsManager
|
|
|
|
|
|
{
|
|
|
|
|
|
static CodeCompletionProvider ccp;
|
|
|
|
|
|
public static CodeTemplateManager templateManager;
|
|
|
|
|
|
|
|
|
|
|
|
public static void Rename(TextArea textArea)
|
|
|
|
|
|
{
|
2026-01-27 22:25:28 +03:00
|
|
|
|
if (!CodeCompletion.CodeCompletionController.IntellisenseAvailable()) return;
|
2022-06-30 09:47:11 +03:00
|
|
|
|
IDocument doc = textArea.Document;
|
|
|
|
|
|
string textContent = doc.TextContent;
|
|
|
|
|
|
ccp = new CodeCompletionProvider();
|
|
|
|
|
|
string name = null;
|
|
|
|
|
|
string expressionResult = FindOnlyIdent(textContent, textArea, ref name).Trim(' ', '\n', '\t', '\r');
|
|
|
|
|
|
string new_val = null;
|
|
|
|
|
|
List<SymbolsViewerSymbol> refers = ccp.Rename(expressionResult, name, textArea.MotherTextEditorControl.FileName, textArea.Caret.Line, textArea.Caret.Column, ref new_val);
|
|
|
|
|
|
if (refers == null || new_val == null) return;
|
|
|
|
|
|
int addit = 0;
|
|
|
|
|
|
PascalABCCompiler.SourceLocation tmp = new PascalABCCompiler.SourceLocation(null, 0, 0, 0, 0);
|
|
|
|
|
|
string file_name = null;
|
|
|
|
|
|
if (CodeCompletion.CodeCompletionNameHelper.Helper.IsKeyword(new_val))
|
|
|
|
|
|
new_val = "&" + new_val;
|
|
|
|
|
|
foreach (SymbolsViewerSymbol svs in refers)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (svs.SourceLocation.BeginPosition.Line != tmp.BeginPosition.Line)
|
|
|
|
|
|
addit = 0;
|
|
|
|
|
|
else if (svs.SourceLocation.BeginPosition.Column < tmp.BeginPosition.Column)
|
|
|
|
|
|
addit = 0;
|
|
|
|
|
|
if (svs.SourceLocation.FileName != file_name)
|
|
|
|
|
|
{
|
|
|
|
|
|
CodeFileDocumentControl cfdoc = VisualPABCSingleton.MainForm.FindTab(svs.SourceLocation.FileName);
|
|
|
|
|
|
if (cfdoc == null) continue;
|
|
|
|
|
|
doc = cfdoc.TextEditor.ActiveTextAreaControl.TextArea.Document;
|
|
|
|
|
|
file_name = svs.SourceLocation.FileName;
|
|
|
|
|
|
}
|
|
|
|
|
|
tmp = svs.SourceLocation;
|
|
|
|
|
|
TextLocation tl_beg = new TextLocation(svs.SourceLocation.BeginPosition.Column - 1 + addit, svs.SourceLocation.BeginPosition.Line - 1);
|
|
|
|
|
|
//TextLocation tl_end = new TextLocation(svs.SourceLocation.EndPosition.Line,svs.SourceLocation.EndPosition.Column);
|
|
|
|
|
|
int offset = doc.PositionToOffset(tl_beg);
|
|
|
|
|
|
|
|
|
|
|
|
addit += new_val.Length - name.Length;
|
|
|
|
|
|
doc.Replace(offset, name.Length, new_val);
|
|
|
|
|
|
doc.CommitUpdate();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static void RenameUnit(string FileName, string new_val)
|
|
|
|
|
|
{
|
2026-01-27 22:25:28 +03:00
|
|
|
|
if (!CodeCompletion.CodeCompletionController.IntellisenseAvailable()) return;
|
2022-06-30 09:47:11 +03:00
|
|
|
|
ccp = new CodeCompletionProvider();
|
|
|
|
|
|
IDocument doc = null;
|
|
|
|
|
|
CodeCompletion.CodeCompletionController controller = new CodeCompletion.CodeCompletionController();
|
|
|
|
|
|
string text = WorkbenchServiceFactory.Workbench.VisualEnvironmentCompiler.SourceFilesProvider(FileName, PascalABCCompiler.SourceFileOperation.GetText) as string;
|
|
|
|
|
|
PascalABCCompiler.SyntaxTree.compilation_unit cu = controller.ParseOnlySyntaxTree(FileName, text);
|
2026-01-16 20:13:20 +03:00
|
|
|
|
if (cu == null)
|
|
|
|
|
|
return;
|
2022-06-30 09:47:11 +03:00
|
|
|
|
PascalABCCompiler.SyntaxTree.ident unitName = null;
|
|
|
|
|
|
if (cu is PascalABCCompiler.SyntaxTree.unit_module)
|
|
|
|
|
|
{
|
|
|
|
|
|
unitName = (cu as PascalABCCompiler.SyntaxTree.unit_module).unit_name.idunit_name;
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (cu is PascalABCCompiler.SyntaxTree.program_module)
|
|
|
|
|
|
{
|
|
|
|
|
|
if ((cu as PascalABCCompiler.SyntaxTree.program_module).program_name == null)
|
|
|
|
|
|
return;
|
|
|
|
|
|
unitName = (cu as PascalABCCompiler.SyntaxTree.program_module).program_name.prog_name;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (unitName.source_context == null)
|
|
|
|
|
|
return;
|
|
|
|
|
|
List<SymbolsViewerSymbol> refers = ccp.Rename(unitName.name, unitName.name, FileName, unitName.source_context.begin_position.line_num, unitName.source_context.begin_position.column_num);
|
|
|
|
|
|
if (refers == null || new_val == null) return;
|
|
|
|
|
|
int addit = 0;
|
|
|
|
|
|
PascalABCCompiler.SourceLocation tmp = new PascalABCCompiler.SourceLocation(null, 0, 0, 0, 0);
|
|
|
|
|
|
string file_name = null;
|
|
|
|
|
|
VisualPABCSingleton.MainForm.StopTimer();
|
|
|
|
|
|
WorkbenchServiceFactory.CodeCompletionParserController.StopParseThread();
|
|
|
|
|
|
foreach (IFileInfo fi in ProjectFactory.Instance.CurrentProject.SourceFiles)
|
|
|
|
|
|
{
|
|
|
|
|
|
WorkbenchServiceFactory.CodeCompletionParserController.RegisterFileForParsing(fi.Path);
|
|
|
|
|
|
}
|
|
|
|
|
|
WorkbenchServiceFactory.CodeCompletionParserController.ParseInThread();
|
|
|
|
|
|
foreach (SymbolsViewerSymbol svs in refers)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (svs.SourceLocation.BeginPosition.Line != tmp.BeginPosition.Line)
|
|
|
|
|
|
addit = 0;
|
|
|
|
|
|
else if (svs.SourceLocation.BeginPosition.Column < tmp.BeginPosition.Column)
|
|
|
|
|
|
addit = 0;
|
|
|
|
|
|
if (svs.SourceLocation.FileName != file_name)
|
|
|
|
|
|
{
|
|
|
|
|
|
CodeFileDocumentControl cfdoc = VisualPABCSingleton.MainForm.FindTab(svs.SourceLocation.FileName);
|
|
|
|
|
|
if (cfdoc == null) continue;
|
|
|
|
|
|
doc = cfdoc.TextEditor.ActiveTextAreaControl.TextArea.Document;
|
|
|
|
|
|
file_name = svs.SourceLocation.FileName;
|
|
|
|
|
|
}
|
|
|
|
|
|
tmp = svs.SourceLocation;
|
|
|
|
|
|
TextLocation tl_beg = new TextLocation(svs.SourceLocation.BeginPosition.Column - 1, svs.SourceLocation.BeginPosition.Line - 1);
|
|
|
|
|
|
//TextLocation tl_end = new TextLocation(svs.SourceLocation.EndPosition.Line,svs.SourceLocation.EndPosition.Column);
|
|
|
|
|
|
int offset = doc.PositionToOffset(tl_beg);
|
|
|
|
|
|
//addit += new_val.Length - unitName.name.Length;
|
|
|
|
|
|
doc.Replace(offset, unitName.name.Length, new_val);
|
|
|
|
|
|
doc.CommitUpdate();
|
|
|
|
|
|
}
|
|
|
|
|
|
WorkbenchServiceFactory.CodeCompletionParserController.RunParseThread();
|
|
|
|
|
|
VisualPABCSingleton.MainForm.StartTimer();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static List<Position> GetDefinitionPosition(TextArea textArea, bool only_check)
|
|
|
|
|
|
{
|
2026-01-27 22:25:28 +03:00
|
|
|
|
if (!CodeCompletion.CodeCompletionController.IntellisenseAvailable()) return new List<Position>();
|
Refactor intellisense (#3213)
* 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:
commit 7751fe7e750e3ca6d1ebf6fe85510c64eab0ea94
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Sun Mar 16 13:28:03 2025 +0300
generating language res file at build time (#3252)
commit d1fce63d69886eb69b2940c267d75374aa042220
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Mar 4 08:38:09 2025 +0300
Сборка после pr SDK
commit d491e88aa78e0193c524a77d8d317104dcc727ad
Author: 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
commit 1fd348ec3c99e459cff8862a25823f544b0f44a6
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Feb 23 20:49:26 2025 +0300
NSIS New 3.10
Ярлык в меню Пуск у всех пользователей
commit 80b7182dc10c4567f619871bd73eb240cb065f84
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Feb 19 11:50:00 2025 +0300
_ in names
commit a2b078960b0d2e561f408cb0987a3225f07c9a94
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Feb 19 10:52:25 2025 +0300
cnfc2
commit 58f26d469da124367427f6c41ebb1365b04e8f55
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Feb 18 22:28:13 2025 +0300
перекомпиляция 3.10.3.3611
commit b78a72977f28d7ac205db62c32fc82cc18576fea
Author: 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
commit c3557e388c6ee5bebe67c447c798ccce62b14536
Author: 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
commit 9dbac389e16734279779fb67e76b44f44b951cf0
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Wed Feb 12 13:57:14 2025 +0300
Add missing projects to pabcnetc.sln (#3247)
commit 41dfb6f187afb2f80ecfb8fa14036ba5b0b00287
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Fri Feb 7 21:41:01 2025 +0300
[] - преобразование во все контейнеры
GraphABCHelper - теперь ABCObjects работает под Линукс
School исправлен согласно последним веяниям []
commit 79bbbd10ffcbcc9f7529c449698b488dad84af76
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Wed Jan 29 20:18:37 2025 +0300
removing files for support fx4.0 (#3240)
commit 88d5c409ebfe7b7a41fc0563f7e03a44f4687f3e
Author: 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
commit 8fbd7fdfc323713b7e9fe98703d079d1315df4de
Author: 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)
commit bba132bd5dbe24a770e068d6f0b6686cb83c72b9
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jan 22 09:14:44 2025 +0300
Поправил справку по функции
commit 1bd21857cc05e7e6150bd2d646215c4186f7a28a
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jan 8 18:46:51 2025 +0300
Teacher Control Plugin - возможность задать server.dat
commit 0848a1b796559015f0f3338ebb4abfed57ba20cb
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 22:54:38 2025 +0300
Исправление автоформатирования []
commit d45b782a7bf675be806851bf2f60338f2b9fb9b9
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 18:45:07 2025 +0300
Rename PABCSistem in test suite
commit c2347e604b02232735b3e77ceeaaa034a50195d4
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 14:44:51 2025 +0300
Примеры - устранил неточности
LightPT - имя сервера вынес в публичную секцию
commit b68b8da9702bc14e55f1f7ece135116d492c6a83
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 17 15:52:18 2024 +0300
Примеры Coords1.pas Coords2.pas.pas
commit 8a9788e6f9915df7e9bf925be55e0895753ce022
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 17 15:06:57 2024 +0300
Перенес проверку set array на уровень парсера
Немного поправил Intellisense по наведению для NewSet
По точке там что то другое работает
commit 874ddebad324e4ac5cd99251a7f254a075b30a6a
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 21:00:38 2024 +0300
Поправил грамматику []
Теперь нельзя в режиме ## использовать атрибуты
Зато можно [1,2,3].Print
commit 080fb487e10b3ae356a9fad23d460827409b5d30
Merge: a53dcd9ed a484b0e82
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 15:25:24 2024 +0300
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit a53dcd9ed22b80e08c926d4fc525da73d7618a42
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 15:25:16 2024 +0300
SF Prm Cmb для строк
commit a484b0e82db2033614a0287a50f447630f8e20de
Author: Sun Serega <sunserega2@gmail.com>
Date: Thu Dec 12 13:49:17 2024 +0200
fix (#3231)
commit 6ef11f249c4368df35d2c4052b788b1bdbfc39e1
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 10 11:05:45 2024 +0300
3.10.2
commit db9679d89ff7548ed432a8bc28677887284aa6c9
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 10 10:59:20 2024 +0300
Закончил превращение синтаксиса [] по умолчанию в массивы
commit 45fdde24b47ea9bb2556898ada8f777e4b39df41
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 18:08:00 2024 +0100
#3229
commit 494b47624dc7eb204417ffc6174a74a120aeecef
Merge: 5875b9929 7906d73da
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 10:42:07 2024 +0100
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit 5875b99296d165f4e51d26e6bf291aba7f81c590
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 10:41:53 2024 +0100
platformtarget native - .NET 9.0
commit 7906d73da359b89181c71ab847fe04251ccd9f49
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 3 14:25:37 2024 +0300
Небольшие изменения в реализации операций с множествами
commit 087591c7b662ac5d08137c4effc5f72f670cd779
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 27 11:37:07 2024 +0300
3.10.1
Coords - доработки
Distance, Middle, DrawText с фоном и рамкой. Глобальные переменные настройки
commit d268d4f83b05cd57689f4162c1656d61f706e02f
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Nov 21 22:24:07 2024 +0300
NSToBytes переделал с исключением
commit 2bacdc8c28c46b70ac85f9379eddf09dd3a98c1a
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 20 13:20:33 2024 +0300
Комментарии к NewSet
commit e917ac8eca4eb401c541e247320df06a82d6be54
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 20 12:42:15 2024 +0300
TypeName для set
commit 206289c6a7b6f23fefa7b8135025de8382d036e8
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Nov 19 20:23:03 2024 +0300
Везде заменил _hs на hs в NewSet
Убрал вызовы методов расширений NewSet в PABCSystem.pas
Убрал var в operator +
commit d8262078f642bf038978da11f8e31eb435273fb8
Author: 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 надо бы сделать исключение
commit f8819665bad36e60b18b423f573de10f5e5e6a85
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Nov 16 10:56:11 2024 +0300
NS2
commit 591d9ebe6013653a6ce9e381b925adf8c7252d5d
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 21:34:10 2024 +0100
fix
commit c6505634f4b0b0f3a94b1df8c2a99b17ae14e2f2
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 21:12:33 2024 +0100
fix
commit a6564df23cb1fb4a1958d9d608a80772888fb4a3
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 20:52:29 2024 +0100
fix in new sets
commit 03be5bd931b57072807e2664ab512eb2bac0add4
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 13 22:13:41 2024 +0300
Переставил operator:= в NewSet
commit 96c68f1666836f51f203528423d099998555b6c3
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Nov 12 21:38:07 2024 +0100
#3223
commit 82776f3c77a81f3cd67cf1d89474961f64b71aec
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Nov 9 12:18:19 2024 +0300
NewSet - много мелких исправлений.
Все тесты проходят кроме Tests 5 - видимо с pabcrtl.dll
* Update comments in PascalABCLanguageInformation
2025-04-10 13:13:17 +03:00
|
|
|
|
|
2022-06-30 09:47:11 +03:00
|
|
|
|
IDocument doc = textArea.Document;
|
|
|
|
|
|
string textContent = doc.TextContent;
|
|
|
|
|
|
ccp = new CodeCompletionProvider();
|
|
|
|
|
|
string full_expr;
|
|
|
|
|
|
string expressionResult = FindFullExpression(textContent, textArea, out ccp.keyword, out full_expr);
|
Refactor intellisense (#3213)
* 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:
commit 7751fe7e750e3ca6d1ebf6fe85510c64eab0ea94
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Sun Mar 16 13:28:03 2025 +0300
generating language res file at build time (#3252)
commit d1fce63d69886eb69b2940c267d75374aa042220
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Mar 4 08:38:09 2025 +0300
Сборка после pr SDK
commit d491e88aa78e0193c524a77d8d317104dcc727ad
Author: 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
commit 1fd348ec3c99e459cff8862a25823f544b0f44a6
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Feb 23 20:49:26 2025 +0300
NSIS New 3.10
Ярлык в меню Пуск у всех пользователей
commit 80b7182dc10c4567f619871bd73eb240cb065f84
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Feb 19 11:50:00 2025 +0300
_ in names
commit a2b078960b0d2e561f408cb0987a3225f07c9a94
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Feb 19 10:52:25 2025 +0300
cnfc2
commit 58f26d469da124367427f6c41ebb1365b04e8f55
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Feb 18 22:28:13 2025 +0300
перекомпиляция 3.10.3.3611
commit b78a72977f28d7ac205db62c32fc82cc18576fea
Author: 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
commit c3557e388c6ee5bebe67c447c798ccce62b14536
Author: 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
commit 9dbac389e16734279779fb67e76b44f44b951cf0
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Wed Feb 12 13:57:14 2025 +0300
Add missing projects to pabcnetc.sln (#3247)
commit 41dfb6f187afb2f80ecfb8fa14036ba5b0b00287
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Fri Feb 7 21:41:01 2025 +0300
[] - преобразование во все контейнеры
GraphABCHelper - теперь ABCObjects работает под Линукс
School исправлен согласно последним веяниям []
commit 79bbbd10ffcbcc9f7529c449698b488dad84af76
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Wed Jan 29 20:18:37 2025 +0300
removing files for support fx4.0 (#3240)
commit 88d5c409ebfe7b7a41fc0563f7e03a44f4687f3e
Author: 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
commit 8fbd7fdfc323713b7e9fe98703d079d1315df4de
Author: 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)
commit bba132bd5dbe24a770e068d6f0b6686cb83c72b9
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jan 22 09:14:44 2025 +0300
Поправил справку по функции
commit 1bd21857cc05e7e6150bd2d646215c4186f7a28a
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jan 8 18:46:51 2025 +0300
Teacher Control Plugin - возможность задать server.dat
commit 0848a1b796559015f0f3338ebb4abfed57ba20cb
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 22:54:38 2025 +0300
Исправление автоформатирования []
commit d45b782a7bf675be806851bf2f60338f2b9fb9b9
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 18:45:07 2025 +0300
Rename PABCSistem in test suite
commit c2347e604b02232735b3e77ceeaaa034a50195d4
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 14:44:51 2025 +0300
Примеры - устранил неточности
LightPT - имя сервера вынес в публичную секцию
commit b68b8da9702bc14e55f1f7ece135116d492c6a83
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 17 15:52:18 2024 +0300
Примеры Coords1.pas Coords2.pas.pas
commit 8a9788e6f9915df7e9bf925be55e0895753ce022
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 17 15:06:57 2024 +0300
Перенес проверку set array на уровень парсера
Немного поправил Intellisense по наведению для NewSet
По точке там что то другое работает
commit 874ddebad324e4ac5cd99251a7f254a075b30a6a
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 21:00:38 2024 +0300
Поправил грамматику []
Теперь нельзя в режиме ## использовать атрибуты
Зато можно [1,2,3].Print
commit 080fb487e10b3ae356a9fad23d460827409b5d30
Merge: a53dcd9ed a484b0e82
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 15:25:24 2024 +0300
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit a53dcd9ed22b80e08c926d4fc525da73d7618a42
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 15:25:16 2024 +0300
SF Prm Cmb для строк
commit a484b0e82db2033614a0287a50f447630f8e20de
Author: Sun Serega <sunserega2@gmail.com>
Date: Thu Dec 12 13:49:17 2024 +0200
fix (#3231)
commit 6ef11f249c4368df35d2c4052b788b1bdbfc39e1
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 10 11:05:45 2024 +0300
3.10.2
commit db9679d89ff7548ed432a8bc28677887284aa6c9
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 10 10:59:20 2024 +0300
Закончил превращение синтаксиса [] по умолчанию в массивы
commit 45fdde24b47ea9bb2556898ada8f777e4b39df41
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 18:08:00 2024 +0100
#3229
commit 494b47624dc7eb204417ffc6174a74a120aeecef
Merge: 5875b9929 7906d73da
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 10:42:07 2024 +0100
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit 5875b99296d165f4e51d26e6bf291aba7f81c590
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 10:41:53 2024 +0100
platformtarget native - .NET 9.0
commit 7906d73da359b89181c71ab847fe04251ccd9f49
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 3 14:25:37 2024 +0300
Небольшие изменения в реализации операций с множествами
commit 087591c7b662ac5d08137c4effc5f72f670cd779
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 27 11:37:07 2024 +0300
3.10.1
Coords - доработки
Distance, Middle, DrawText с фоном и рамкой. Глобальные переменные настройки
commit d268d4f83b05cd57689f4162c1656d61f706e02f
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Nov 21 22:24:07 2024 +0300
NSToBytes переделал с исключением
commit 2bacdc8c28c46b70ac85f9379eddf09dd3a98c1a
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 20 13:20:33 2024 +0300
Комментарии к NewSet
commit e917ac8eca4eb401c541e247320df06a82d6be54
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 20 12:42:15 2024 +0300
TypeName для set
commit 206289c6a7b6f23fefa7b8135025de8382d036e8
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Nov 19 20:23:03 2024 +0300
Везде заменил _hs на hs в NewSet
Убрал вызовы методов расширений NewSet в PABCSystem.pas
Убрал var в operator +
commit d8262078f642bf038978da11f8e31eb435273fb8
Author: 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 надо бы сделать исключение
commit f8819665bad36e60b18b423f573de10f5e5e6a85
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Nov 16 10:56:11 2024 +0300
NS2
commit 591d9ebe6013653a6ce9e381b925adf8c7252d5d
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 21:34:10 2024 +0100
fix
commit c6505634f4b0b0f3a94b1df8c2a99b17ae14e2f2
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 21:12:33 2024 +0100
fix
commit a6564df23cb1fb4a1958d9d608a80772888fb4a3
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 20:52:29 2024 +0100
fix in new sets
commit 03be5bd931b57072807e2664ab512eb2bac0add4
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 13 22:13:41 2024 +0300
Переставил operator:= в NewSet
commit 96c68f1666836f51f203528423d099998555b6c3
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Nov 12 21:38:07 2024 +0100
#3223
commit 82776f3c77a81f3cd67cf1d89474961f64b71aec
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Nov 9 12:18:19 2024 +0300
NewSet - много мелких исправлений.
Все тесты проходят кроме Tests 5 - видимо с pabcrtl.dll
* Update comments in PascalABCLanguageInformation
2025-04-10 13:13:17 +03:00
|
|
|
|
|
2022-06-30 09:47:11 +03:00
|
|
|
|
if (expressionResult != null)
|
|
|
|
|
|
expressionResult = expressionResult.Trim();
|
Refactor intellisense (#3213)
* 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:
commit 7751fe7e750e3ca6d1ebf6fe85510c64eab0ea94
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Sun Mar 16 13:28:03 2025 +0300
generating language res file at build time (#3252)
commit d1fce63d69886eb69b2940c267d75374aa042220
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Mar 4 08:38:09 2025 +0300
Сборка после pr SDK
commit d491e88aa78e0193c524a77d8d317104dcc727ad
Author: 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
commit 1fd348ec3c99e459cff8862a25823f544b0f44a6
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Feb 23 20:49:26 2025 +0300
NSIS New 3.10
Ярлык в меню Пуск у всех пользователей
commit 80b7182dc10c4567f619871bd73eb240cb065f84
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Feb 19 11:50:00 2025 +0300
_ in names
commit a2b078960b0d2e561f408cb0987a3225f07c9a94
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Feb 19 10:52:25 2025 +0300
cnfc2
commit 58f26d469da124367427f6c41ebb1365b04e8f55
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Feb 18 22:28:13 2025 +0300
перекомпиляция 3.10.3.3611
commit b78a72977f28d7ac205db62c32fc82cc18576fea
Author: 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
commit c3557e388c6ee5bebe67c447c798ccce62b14536
Author: 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
commit 9dbac389e16734279779fb67e76b44f44b951cf0
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Wed Feb 12 13:57:14 2025 +0300
Add missing projects to pabcnetc.sln (#3247)
commit 41dfb6f187afb2f80ecfb8fa14036ba5b0b00287
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Fri Feb 7 21:41:01 2025 +0300
[] - преобразование во все контейнеры
GraphABCHelper - теперь ABCObjects работает под Линукс
School исправлен согласно последним веяниям []
commit 79bbbd10ffcbcc9f7529c449698b488dad84af76
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Wed Jan 29 20:18:37 2025 +0300
removing files for support fx4.0 (#3240)
commit 88d5c409ebfe7b7a41fc0563f7e03a44f4687f3e
Author: 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
commit 8fbd7fdfc323713b7e9fe98703d079d1315df4de
Author: 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)
commit bba132bd5dbe24a770e068d6f0b6686cb83c72b9
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jan 22 09:14:44 2025 +0300
Поправил справку по функции
commit 1bd21857cc05e7e6150bd2d646215c4186f7a28a
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jan 8 18:46:51 2025 +0300
Teacher Control Plugin - возможность задать server.dat
commit 0848a1b796559015f0f3338ebb4abfed57ba20cb
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 22:54:38 2025 +0300
Исправление автоформатирования []
commit d45b782a7bf675be806851bf2f60338f2b9fb9b9
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 18:45:07 2025 +0300
Rename PABCSistem in test suite
commit c2347e604b02232735b3e77ceeaaa034a50195d4
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 14:44:51 2025 +0300
Примеры - устранил неточности
LightPT - имя сервера вынес в публичную секцию
commit b68b8da9702bc14e55f1f7ece135116d492c6a83
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 17 15:52:18 2024 +0300
Примеры Coords1.pas Coords2.pas.pas
commit 8a9788e6f9915df7e9bf925be55e0895753ce022
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 17 15:06:57 2024 +0300
Перенес проверку set array на уровень парсера
Немного поправил Intellisense по наведению для NewSet
По точке там что то другое работает
commit 874ddebad324e4ac5cd99251a7f254a075b30a6a
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 21:00:38 2024 +0300
Поправил грамматику []
Теперь нельзя в режиме ## использовать атрибуты
Зато можно [1,2,3].Print
commit 080fb487e10b3ae356a9fad23d460827409b5d30
Merge: a53dcd9ed a484b0e82
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 15:25:24 2024 +0300
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit a53dcd9ed22b80e08c926d4fc525da73d7618a42
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 15:25:16 2024 +0300
SF Prm Cmb для строк
commit a484b0e82db2033614a0287a50f447630f8e20de
Author: Sun Serega <sunserega2@gmail.com>
Date: Thu Dec 12 13:49:17 2024 +0200
fix (#3231)
commit 6ef11f249c4368df35d2c4052b788b1bdbfc39e1
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 10 11:05:45 2024 +0300
3.10.2
commit db9679d89ff7548ed432a8bc28677887284aa6c9
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 10 10:59:20 2024 +0300
Закончил превращение синтаксиса [] по умолчанию в массивы
commit 45fdde24b47ea9bb2556898ada8f777e4b39df41
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 18:08:00 2024 +0100
#3229
commit 494b47624dc7eb204417ffc6174a74a120aeecef
Merge: 5875b9929 7906d73da
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 10:42:07 2024 +0100
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit 5875b99296d165f4e51d26e6bf291aba7f81c590
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 10:41:53 2024 +0100
platformtarget native - .NET 9.0
commit 7906d73da359b89181c71ab847fe04251ccd9f49
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 3 14:25:37 2024 +0300
Небольшие изменения в реализации операций с множествами
commit 087591c7b662ac5d08137c4effc5f72f670cd779
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 27 11:37:07 2024 +0300
3.10.1
Coords - доработки
Distance, Middle, DrawText с фоном и рамкой. Глобальные переменные настройки
commit d268d4f83b05cd57689f4162c1656d61f706e02f
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Nov 21 22:24:07 2024 +0300
NSToBytes переделал с исключением
commit 2bacdc8c28c46b70ac85f9379eddf09dd3a98c1a
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 20 13:20:33 2024 +0300
Комментарии к NewSet
commit e917ac8eca4eb401c541e247320df06a82d6be54
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 20 12:42:15 2024 +0300
TypeName для set
commit 206289c6a7b6f23fefa7b8135025de8382d036e8
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Nov 19 20:23:03 2024 +0300
Везде заменил _hs на hs в NewSet
Убрал вызовы методов расширений NewSet в PABCSystem.pas
Убрал var в operator +
commit d8262078f642bf038978da11f8e31eb435273fb8
Author: 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 надо бы сделать исключение
commit f8819665bad36e60b18b423f573de10f5e5e6a85
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Nov 16 10:56:11 2024 +0300
NS2
commit 591d9ebe6013653a6ce9e381b925adf8c7252d5d
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 21:34:10 2024 +0100
fix
commit c6505634f4b0b0f3a94b1df8c2a99b17ae14e2f2
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 21:12:33 2024 +0100
fix
commit a6564df23cb1fb4a1958d9d608a80772888fb4a3
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 20:52:29 2024 +0100
fix in new sets
commit 03be5bd931b57072807e2664ab512eb2bac0add4
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 13 22:13:41 2024 +0300
Переставил operator:= в NewSet
commit 96c68f1666836f51f203528423d099998555b6c3
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Nov 12 21:38:07 2024 +0100
#3223
commit 82776f3c77a81f3cd67cf1d89474961f64b71aec
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Nov 9 12:18:19 2024 +0300
NewSet - много мелких исправлений.
Все тесты проходят кроме Tests 5 - видимо с pabcrtl.dll
* Update comments in PascalABCLanguageInformation
2025-04-10 13:13:17 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Проверка, что компилируем Паскаль временно EVA 10.11.2024
|
2026-01-27 22:25:28 +03:00
|
|
|
|
if (CodeCompletion.CodeCompletionController.CurrentLanguage == Languages.Facade.LanguageProvider.Instance.MainLanguage)
|
Refactor intellisense (#3213)
* 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:
commit 7751fe7e750e3ca6d1ebf6fe85510c64eab0ea94
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Sun Mar 16 13:28:03 2025 +0300
generating language res file at build time (#3252)
commit d1fce63d69886eb69b2940c267d75374aa042220
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Mar 4 08:38:09 2025 +0300
Сборка после pr SDK
commit d491e88aa78e0193c524a77d8d317104dcc727ad
Author: 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
commit 1fd348ec3c99e459cff8862a25823f544b0f44a6
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Feb 23 20:49:26 2025 +0300
NSIS New 3.10
Ярлык в меню Пуск у всех пользователей
commit 80b7182dc10c4567f619871bd73eb240cb065f84
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Feb 19 11:50:00 2025 +0300
_ in names
commit a2b078960b0d2e561f408cb0987a3225f07c9a94
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Feb 19 10:52:25 2025 +0300
cnfc2
commit 58f26d469da124367427f6c41ebb1365b04e8f55
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Feb 18 22:28:13 2025 +0300
перекомпиляция 3.10.3.3611
commit b78a72977f28d7ac205db62c32fc82cc18576fea
Author: 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
commit c3557e388c6ee5bebe67c447c798ccce62b14536
Author: 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
commit 9dbac389e16734279779fb67e76b44f44b951cf0
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Wed Feb 12 13:57:14 2025 +0300
Add missing projects to pabcnetc.sln (#3247)
commit 41dfb6f187afb2f80ecfb8fa14036ba5b0b00287
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Fri Feb 7 21:41:01 2025 +0300
[] - преобразование во все контейнеры
GraphABCHelper - теперь ABCObjects работает под Линукс
School исправлен согласно последним веяниям []
commit 79bbbd10ffcbcc9f7529c449698b488dad84af76
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Wed Jan 29 20:18:37 2025 +0300
removing files for support fx4.0 (#3240)
commit 88d5c409ebfe7b7a41fc0563f7e03a44f4687f3e
Author: 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
commit 8fbd7fdfc323713b7e9fe98703d079d1315df4de
Author: 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)
commit bba132bd5dbe24a770e068d6f0b6686cb83c72b9
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jan 22 09:14:44 2025 +0300
Поправил справку по функции
commit 1bd21857cc05e7e6150bd2d646215c4186f7a28a
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jan 8 18:46:51 2025 +0300
Teacher Control Plugin - возможность задать server.dat
commit 0848a1b796559015f0f3338ebb4abfed57ba20cb
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 22:54:38 2025 +0300
Исправление автоформатирования []
commit d45b782a7bf675be806851bf2f60338f2b9fb9b9
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 18:45:07 2025 +0300
Rename PABCSistem in test suite
commit c2347e604b02232735b3e77ceeaaa034a50195d4
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 14:44:51 2025 +0300
Примеры - устранил неточности
LightPT - имя сервера вынес в публичную секцию
commit b68b8da9702bc14e55f1f7ece135116d492c6a83
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 17 15:52:18 2024 +0300
Примеры Coords1.pas Coords2.pas.pas
commit 8a9788e6f9915df7e9bf925be55e0895753ce022
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 17 15:06:57 2024 +0300
Перенес проверку set array на уровень парсера
Немного поправил Intellisense по наведению для NewSet
По точке там что то другое работает
commit 874ddebad324e4ac5cd99251a7f254a075b30a6a
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 21:00:38 2024 +0300
Поправил грамматику []
Теперь нельзя в режиме ## использовать атрибуты
Зато можно [1,2,3].Print
commit 080fb487e10b3ae356a9fad23d460827409b5d30
Merge: a53dcd9ed a484b0e82
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 15:25:24 2024 +0300
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit a53dcd9ed22b80e08c926d4fc525da73d7618a42
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 15:25:16 2024 +0300
SF Prm Cmb для строк
commit a484b0e82db2033614a0287a50f447630f8e20de
Author: Sun Serega <sunserega2@gmail.com>
Date: Thu Dec 12 13:49:17 2024 +0200
fix (#3231)
commit 6ef11f249c4368df35d2c4052b788b1bdbfc39e1
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 10 11:05:45 2024 +0300
3.10.2
commit db9679d89ff7548ed432a8bc28677887284aa6c9
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 10 10:59:20 2024 +0300
Закончил превращение синтаксиса [] по умолчанию в массивы
commit 45fdde24b47ea9bb2556898ada8f777e4b39df41
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 18:08:00 2024 +0100
#3229
commit 494b47624dc7eb204417ffc6174a74a120aeecef
Merge: 5875b9929 7906d73da
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 10:42:07 2024 +0100
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit 5875b99296d165f4e51d26e6bf291aba7f81c590
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 10:41:53 2024 +0100
platformtarget native - .NET 9.0
commit 7906d73da359b89181c71ab847fe04251ccd9f49
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 3 14:25:37 2024 +0300
Небольшие изменения в реализации операций с множествами
commit 087591c7b662ac5d08137c4effc5f72f670cd779
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 27 11:37:07 2024 +0300
3.10.1
Coords - доработки
Distance, Middle, DrawText с фоном и рамкой. Глобальные переменные настройки
commit d268d4f83b05cd57689f4162c1656d61f706e02f
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Nov 21 22:24:07 2024 +0300
NSToBytes переделал с исключением
commit 2bacdc8c28c46b70ac85f9379eddf09dd3a98c1a
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 20 13:20:33 2024 +0300
Комментарии к NewSet
commit e917ac8eca4eb401c541e247320df06a82d6be54
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 20 12:42:15 2024 +0300
TypeName для set
commit 206289c6a7b6f23fefa7b8135025de8382d036e8
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Nov 19 20:23:03 2024 +0300
Везде заменил _hs на hs в NewSet
Убрал вызовы методов расширений NewSet в PABCSystem.pas
Убрал var в operator +
commit d8262078f642bf038978da11f8e31eb435273fb8
Author: 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 надо бы сделать исключение
commit f8819665bad36e60b18b423f573de10f5e5e6a85
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Nov 16 10:56:11 2024 +0300
NS2
commit 591d9ebe6013653a6ce9e381b925adf8c7252d5d
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 21:34:10 2024 +0100
fix
commit c6505634f4b0b0f3a94b1df8c2a99b17ae14e2f2
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 21:12:33 2024 +0100
fix
commit a6564df23cb1fb4a1958d9d608a80772888fb4a3
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 20:52:29 2024 +0100
fix in new sets
commit 03be5bd931b57072807e2664ab512eb2bac0add4
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 13 22:13:41 2024 +0300
Переставил operator:= в NewSet
commit 96c68f1666836f51f203528423d099998555b6c3
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Nov 12 21:38:07 2024 +0100
#3223
commit 82776f3c77a81f3cd67cf1d89474961f64b71aec
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Nov 9 12:18:19 2024 +0300
NewSet - много мелких исправлений.
Все тесты проходят кроме Tests 5 - видимо с pabcrtl.dll
* Update comments in PascalABCLanguageInformation
2025-04-10 13:13:17 +03:00
|
|
|
|
{
|
|
|
|
|
|
if (expressionResult != full_expr && full_expr.StartsWith("("))
|
|
|
|
|
|
return new List<Position>();
|
|
|
|
|
|
|
|
|
|
|
|
if (full_expr != null && full_expr.Contains("^"))
|
|
|
|
|
|
{
|
|
|
|
|
|
full_expr = full_expr.Replace("^", "");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2022-06-30 09:47:11 +03:00
|
|
|
|
List<Position> poses = ccp.GetDefinition(full_expr, textArea.MotherTextEditorControl.FileName, textArea.Caret.Line, textArea.Caret.Column, only_check);
|
Refactor intellisense (#3213)
* 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:
commit 7751fe7e750e3ca6d1ebf6fe85510c64eab0ea94
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Sun Mar 16 13:28:03 2025 +0300
generating language res file at build time (#3252)
commit d1fce63d69886eb69b2940c267d75374aa042220
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Mar 4 08:38:09 2025 +0300
Сборка после pr SDK
commit d491e88aa78e0193c524a77d8d317104dcc727ad
Author: 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
commit 1fd348ec3c99e459cff8862a25823f544b0f44a6
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Feb 23 20:49:26 2025 +0300
NSIS New 3.10
Ярлык в меню Пуск у всех пользователей
commit 80b7182dc10c4567f619871bd73eb240cb065f84
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Feb 19 11:50:00 2025 +0300
_ in names
commit a2b078960b0d2e561f408cb0987a3225f07c9a94
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Feb 19 10:52:25 2025 +0300
cnfc2
commit 58f26d469da124367427f6c41ebb1365b04e8f55
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Feb 18 22:28:13 2025 +0300
перекомпиляция 3.10.3.3611
commit b78a72977f28d7ac205db62c32fc82cc18576fea
Author: 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
commit c3557e388c6ee5bebe67c447c798ccce62b14536
Author: 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
commit 9dbac389e16734279779fb67e76b44f44b951cf0
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Wed Feb 12 13:57:14 2025 +0300
Add missing projects to pabcnetc.sln (#3247)
commit 41dfb6f187afb2f80ecfb8fa14036ba5b0b00287
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Fri Feb 7 21:41:01 2025 +0300
[] - преобразование во все контейнеры
GraphABCHelper - теперь ABCObjects работает под Линукс
School исправлен согласно последним веяниям []
commit 79bbbd10ffcbcc9f7529c449698b488dad84af76
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Wed Jan 29 20:18:37 2025 +0300
removing files for support fx4.0 (#3240)
commit 88d5c409ebfe7b7a41fc0563f7e03a44f4687f3e
Author: 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
commit 8fbd7fdfc323713b7e9fe98703d079d1315df4de
Author: 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)
commit bba132bd5dbe24a770e068d6f0b6686cb83c72b9
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jan 22 09:14:44 2025 +0300
Поправил справку по функции
commit 1bd21857cc05e7e6150bd2d646215c4186f7a28a
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jan 8 18:46:51 2025 +0300
Teacher Control Plugin - возможность задать server.dat
commit 0848a1b796559015f0f3338ebb4abfed57ba20cb
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 22:54:38 2025 +0300
Исправление автоформатирования []
commit d45b782a7bf675be806851bf2f60338f2b9fb9b9
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 18:45:07 2025 +0300
Rename PABCSistem in test suite
commit c2347e604b02232735b3e77ceeaaa034a50195d4
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 14:44:51 2025 +0300
Примеры - устранил неточности
LightPT - имя сервера вынес в публичную секцию
commit b68b8da9702bc14e55f1f7ece135116d492c6a83
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 17 15:52:18 2024 +0300
Примеры Coords1.pas Coords2.pas.pas
commit 8a9788e6f9915df7e9bf925be55e0895753ce022
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 17 15:06:57 2024 +0300
Перенес проверку set array на уровень парсера
Немного поправил Intellisense по наведению для NewSet
По точке там что то другое работает
commit 874ddebad324e4ac5cd99251a7f254a075b30a6a
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 21:00:38 2024 +0300
Поправил грамматику []
Теперь нельзя в режиме ## использовать атрибуты
Зато можно [1,2,3].Print
commit 080fb487e10b3ae356a9fad23d460827409b5d30
Merge: a53dcd9ed a484b0e82
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 15:25:24 2024 +0300
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit a53dcd9ed22b80e08c926d4fc525da73d7618a42
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 15:25:16 2024 +0300
SF Prm Cmb для строк
commit a484b0e82db2033614a0287a50f447630f8e20de
Author: Sun Serega <sunserega2@gmail.com>
Date: Thu Dec 12 13:49:17 2024 +0200
fix (#3231)
commit 6ef11f249c4368df35d2c4052b788b1bdbfc39e1
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 10 11:05:45 2024 +0300
3.10.2
commit db9679d89ff7548ed432a8bc28677887284aa6c9
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 10 10:59:20 2024 +0300
Закончил превращение синтаксиса [] по умолчанию в массивы
commit 45fdde24b47ea9bb2556898ada8f777e4b39df41
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 18:08:00 2024 +0100
#3229
commit 494b47624dc7eb204417ffc6174a74a120aeecef
Merge: 5875b9929 7906d73da
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 10:42:07 2024 +0100
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit 5875b99296d165f4e51d26e6bf291aba7f81c590
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 10:41:53 2024 +0100
platformtarget native - .NET 9.0
commit 7906d73da359b89181c71ab847fe04251ccd9f49
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 3 14:25:37 2024 +0300
Небольшие изменения в реализации операций с множествами
commit 087591c7b662ac5d08137c4effc5f72f670cd779
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 27 11:37:07 2024 +0300
3.10.1
Coords - доработки
Distance, Middle, DrawText с фоном и рамкой. Глобальные переменные настройки
commit d268d4f83b05cd57689f4162c1656d61f706e02f
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Nov 21 22:24:07 2024 +0300
NSToBytes переделал с исключением
commit 2bacdc8c28c46b70ac85f9379eddf09dd3a98c1a
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 20 13:20:33 2024 +0300
Комментарии к NewSet
commit e917ac8eca4eb401c541e247320df06a82d6be54
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 20 12:42:15 2024 +0300
TypeName для set
commit 206289c6a7b6f23fefa7b8135025de8382d036e8
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Nov 19 20:23:03 2024 +0300
Везде заменил _hs на hs в NewSet
Убрал вызовы методов расширений NewSet в PABCSystem.pas
Убрал var в operator +
commit d8262078f642bf038978da11f8e31eb435273fb8
Author: 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 надо бы сделать исключение
commit f8819665bad36e60b18b423f573de10f5e5e6a85
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Nov 16 10:56:11 2024 +0300
NS2
commit 591d9ebe6013653a6ce9e381b925adf8c7252d5d
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 21:34:10 2024 +0100
fix
commit c6505634f4b0b0f3a94b1df8c2a99b17ae14e2f2
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 21:12:33 2024 +0100
fix
commit a6564df23cb1fb4a1958d9d608a80772888fb4a3
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 20:52:29 2024 +0100
fix in new sets
commit 03be5bd931b57072807e2664ab512eb2bac0add4
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 13 22:13:41 2024 +0300
Переставил operator:= в NewSet
commit 96c68f1666836f51f203528423d099998555b6c3
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Nov 12 21:38:07 2024 +0100
#3223
commit 82776f3c77a81f3cd67cf1d89474961f64b71aec
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Nov 9 12:18:19 2024 +0300
NewSet - много мелких исправлений.
Все тесты проходят кроме Tests 5 - видимо с pabcrtl.dll
* Update comments in PascalABCLanguageInformation
2025-04-10 13:13:17 +03:00
|
|
|
|
|
2022-06-30 09:47:11 +03:00
|
|
|
|
if (poses == null || poses.Count == 0)
|
|
|
|
|
|
poses = ccp.GetDefinition(expressionResult, textArea.MotherTextEditorControl.FileName, textArea.Caret.Line, textArea.Caret.Column, only_check);
|
Refactor intellisense (#3213)
* 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:
commit 7751fe7e750e3ca6d1ebf6fe85510c64eab0ea94
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Sun Mar 16 13:28:03 2025 +0300
generating language res file at build time (#3252)
commit d1fce63d69886eb69b2940c267d75374aa042220
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Mar 4 08:38:09 2025 +0300
Сборка после pr SDK
commit d491e88aa78e0193c524a77d8d317104dcc727ad
Author: 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
commit 1fd348ec3c99e459cff8862a25823f544b0f44a6
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sun Feb 23 20:49:26 2025 +0300
NSIS New 3.10
Ярлык в меню Пуск у всех пользователей
commit 80b7182dc10c4567f619871bd73eb240cb065f84
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Feb 19 11:50:00 2025 +0300
_ in names
commit a2b078960b0d2e561f408cb0987a3225f07c9a94
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Feb 19 10:52:25 2025 +0300
cnfc2
commit 58f26d469da124367427f6c41ebb1365b04e8f55
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Feb 18 22:28:13 2025 +0300
перекомпиляция 3.10.3.3611
commit b78a72977f28d7ac205db62c32fc82cc18576fea
Author: 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
commit c3557e388c6ee5bebe67c447c798ccce62b14536
Author: 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
commit 9dbac389e16734279779fb67e76b44f44b951cf0
Author: AlexanderZemlyak <92867056+AlexanderZemlyak@users.noreply.github.com>
Date: Wed Feb 12 13:57:14 2025 +0300
Add missing projects to pabcnetc.sln (#3247)
commit 41dfb6f187afb2f80ecfb8fa14036ba5b0b00287
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Fri Feb 7 21:41:01 2025 +0300
[] - преобразование во все контейнеры
GraphABCHelper - теперь ABCObjects работает под Линукс
School исправлен согласно последним веяниям []
commit 79bbbd10ffcbcc9f7529c449698b488dad84af76
Author: samuraiGH <87191377+samuraiGH@users.noreply.github.com>
Date: Wed Jan 29 20:18:37 2025 +0300
removing files for support fx4.0 (#3240)
commit 88d5c409ebfe7b7a41fc0563f7e03a44f4687f3e
Author: 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
commit 8fbd7fdfc323713b7e9fe98703d079d1315df4de
Author: 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)
commit bba132bd5dbe24a770e068d6f0b6686cb83c72b9
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jan 22 09:14:44 2025 +0300
Поправил справку по функции
commit 1bd21857cc05e7e6150bd2d646215c4186f7a28a
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Jan 8 18:46:51 2025 +0300
Teacher Control Plugin - возможность задать server.dat
commit 0848a1b796559015f0f3338ebb4abfed57ba20cb
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 22:54:38 2025 +0300
Исправление автоформатирования []
commit d45b782a7bf675be806851bf2f60338f2b9fb9b9
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 18:45:07 2025 +0300
Rename PABCSistem in test suite
commit c2347e604b02232735b3e77ceeaaa034a50195d4
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Jan 4 14:44:51 2025 +0300
Примеры - устранил неточности
LightPT - имя сервера вынес в публичную секцию
commit b68b8da9702bc14e55f1f7ece135116d492c6a83
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 17 15:52:18 2024 +0300
Примеры Coords1.pas Coords2.pas.pas
commit 8a9788e6f9915df7e9bf925be55e0895753ce022
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 17 15:06:57 2024 +0300
Перенес проверку set array на уровень парсера
Немного поправил Intellisense по наведению для NewSet
По точке там что то другое работает
commit 874ddebad324e4ac5cd99251a7f254a075b30a6a
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 21:00:38 2024 +0300
Поправил грамматику []
Теперь нельзя в режиме ## использовать атрибуты
Зато можно [1,2,3].Print
commit 080fb487e10b3ae356a9fad23d460827409b5d30
Merge: a53dcd9ed a484b0e82
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 15:25:24 2024 +0300
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit a53dcd9ed22b80e08c926d4fc525da73d7618a42
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Dec 14 15:25:16 2024 +0300
SF Prm Cmb для строк
commit a484b0e82db2033614a0287a50f447630f8e20de
Author: Sun Serega <sunserega2@gmail.com>
Date: Thu Dec 12 13:49:17 2024 +0200
fix (#3231)
commit 6ef11f249c4368df35d2c4052b788b1bdbfc39e1
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 10 11:05:45 2024 +0300
3.10.2
commit db9679d89ff7548ed432a8bc28677887284aa6c9
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 10 10:59:20 2024 +0300
Закончил превращение синтаксиса [] по умолчанию в массивы
commit 45fdde24b47ea9bb2556898ada8f777e4b39df41
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 18:08:00 2024 +0100
#3229
commit 494b47624dc7eb204417ffc6174a74a120aeecef
Merge: 5875b9929 7906d73da
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 10:42:07 2024 +0100
Merge branch 'master' of https://github.com/pascalabcnet/pascalabcnet
commit 5875b99296d165f4e51d26e6bf291aba7f81c590
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Sun Dec 8 10:41:53 2024 +0100
platformtarget native - .NET 9.0
commit 7906d73da359b89181c71ab847fe04251ccd9f49
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Dec 3 14:25:37 2024 +0300
Небольшие изменения в реализации операций с множествами
commit 087591c7b662ac5d08137c4effc5f72f670cd779
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 27 11:37:07 2024 +0300
3.10.1
Coords - доработки
Distance, Middle, DrawText с фоном и рамкой. Глобальные переменные настройки
commit d268d4f83b05cd57689f4162c1656d61f706e02f
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Thu Nov 21 22:24:07 2024 +0300
NSToBytes переделал с исключением
commit 2bacdc8c28c46b70ac85f9379eddf09dd3a98c1a
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 20 13:20:33 2024 +0300
Комментарии к NewSet
commit e917ac8eca4eb401c541e247320df06a82d6be54
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 20 12:42:15 2024 +0300
TypeName для set
commit 206289c6a7b6f23fefa7b8135025de8382d036e8
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Tue Nov 19 20:23:03 2024 +0300
Везде заменил _hs на hs в NewSet
Убрал вызовы методов расширений NewSet в PABCSystem.pas
Убрал var в operator +
commit d8262078f642bf038978da11f8e31eb435273fb8
Author: 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 надо бы сделать исключение
commit f8819665bad36e60b18b423f573de10f5e5e6a85
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Nov 16 10:56:11 2024 +0300
NS2
commit 591d9ebe6013653a6ce9e381b925adf8c7252d5d
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 21:34:10 2024 +0100
fix
commit c6505634f4b0b0f3a94b1df8c2a99b17ae14e2f2
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 21:12:33 2024 +0100
fix
commit a6564df23cb1fb4a1958d9d608a80772888fb4a3
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Wed Nov 13 20:52:29 2024 +0100
fix in new sets
commit 03be5bd931b57072807e2664ab512eb2bac0add4
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Wed Nov 13 22:13:41 2024 +0300
Переставил operator:= в NewSet
commit 96c68f1666836f51f203528423d099998555b6c3
Author: Ivan Bondarev <ibond84@googlemail.com>
Date: Tue Nov 12 21:38:07 2024 +0100
#3223
commit 82776f3c77a81f3cd67cf1d89474961f64b71aec
Author: Mikhalkovich Stanislav <miks@math.sfedu.ru>
Date: Sat Nov 9 12:18:19 2024 +0300
NewSet - много мелких исправлений.
Все тесты проходят кроме Tests 5 - видимо с pabcrtl.dll
* Update comments in PascalABCLanguageInformation
2025-04-10 13:13:17 +03:00
|
|
|
|
|
2022-06-30 09:47:11 +03:00
|
|
|
|
return poses;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static List<Position> GetRealizationPosition(TextArea textArea)
|
|
|
|
|
|
{
|
2026-01-27 22:25:28 +03:00
|
|
|
|
if (!CodeCompletion.CodeCompletionController.IntellisenseAvailable()) return new List<Position>();
|
2022-06-30 09:47:11 +03:00
|
|
|
|
IDocument doc = textArea.Document;
|
|
|
|
|
|
string textContent = doc.TextContent;
|
|
|
|
|
|
ccp = new CodeCompletionProvider();
|
|
|
|
|
|
string full_expr;
|
|
|
|
|
|
string expressionResult = FindFullExpression(textContent, textArea, out ccp.keyword, out full_expr);
|
|
|
|
|
|
List<Position> poses = ccp.GetRealization(full_expr, textArea.MotherTextEditorControl.FileName, textArea.Caret.Line, textArea.Caret.Column);
|
|
|
|
|
|
if (poses == null || poses.Count == 0)
|
|
|
|
|
|
poses = ccp.GetRealization(expressionResult, textArea.MotherTextEditorControl.FileName, textArea.Caret.Line, textArea.Caret.Column);
|
|
|
|
|
|
return poses;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static List<SymbolsViewerSymbol> FindReferences(TextArea textArea)
|
|
|
|
|
|
{
|
2026-01-27 22:25:28 +03:00
|
|
|
|
if (!CodeCompletion.CodeCompletionController.IntellisenseAvailable()) return new List<SymbolsViewerSymbol>();
|
2022-06-30 09:47:11 +03:00
|
|
|
|
ccp = new CodeCompletionProvider();
|
|
|
|
|
|
string full_expr;
|
|
|
|
|
|
string expressionResult = FindFullExpression(textArea.Document.TextContent, textArea, out ccp.keyword, out full_expr);
|
|
|
|
|
|
return ccp.FindReferences(expressionResult, textArea.MotherTextEditorControl.FileName, textArea.Caret.Line, textArea.Caret.Column, false);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static void GotoRealization(TextArea textArea)
|
|
|
|
|
|
{
|
2026-01-27 22:25:28 +03:00
|
|
|
|
if (!CodeCompletion.CodeCompletionController.IntellisenseAvailable()) return;
|
2022-06-30 09:47:11 +03:00
|
|
|
|
position = GetRealizationPosition(textArea);
|
|
|
|
|
|
if (position == null || position.Count == 0) return;
|
|
|
|
|
|
if (position.Count == 1)
|
|
|
|
|
|
{
|
|
|
|
|
|
Position pos = position[0];
|
|
|
|
|
|
if (pos.file_name != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
WorkbenchServiceFactory.Workbench.VisualEnvironmentCompiler.ExecuteSourceLocationAction(
|
|
|
|
|
|
new PascalABCCompiler.SourceLocation(pos.file_name, pos.line, pos.column, pos.line, pos.column), VisualPascalABCPlugins.SourceLocationAction.GotoBeg);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
List<SymbolsViewerSymbol> svs_lst = new List<SymbolsViewerSymbol>();
|
|
|
|
|
|
foreach (Position pos in position)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (pos.file_name != null)
|
|
|
|
|
|
svs_lst.Add(new SymbolsViewerSymbol(new PascalABCCompiler.SourceLocation(pos.file_name, pos.line, pos.column, pos.end_line, pos.end_column), CodeCompletionProvider.ImagesProvider.IconNumberGotoText));
|
|
|
|
|
|
}
|
|
|
|
|
|
VisualPABCSingleton.MainForm.FindSymbolResults.showInThread = false;
|
|
|
|
|
|
VisualPABCSingleton.MainForm.ShowFindResults(svs_lst);
|
|
|
|
|
|
VisualPABCSingleton.MainForm.FindSymbolResults.showInThread = true;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static bool CanGoTo(TextArea textArea)
|
|
|
|
|
|
{
|
2026-01-27 22:25:28 +03:00
|
|
|
|
if (!CodeCompletion.CodeCompletionController.IntellisenseAvailable()) return false;
|
2022-06-30 09:47:11 +03:00
|
|
|
|
List<Position> poses = GetDefinitionPosition(textArea, true);
|
|
|
|
|
|
if (poses == null || poses.Count == 0) return false;
|
|
|
|
|
|
foreach (Position pos in poses)
|
|
|
|
|
|
if (pos.from_metadata || pos.file_name != null && (bool)WorkbenchServiceFactory.Workbench.VisualEnvironmentCompiler.SourceFilesProvider(pos.file_name, PascalABCCompiler.SourceFileOperation.Exists))
|
|
|
|
|
|
return true;
|
|
|
|
|
|
return false;
|
|
|
|
|
|
//string file_name = GetDefinitionPosition(textArea).file_name;
|
|
|
|
|
|
//return file_name != null && (bool)VisualPABCSingleton.MainForm.VisualEnvironmentCompiler.SourceFilesProvider(file_name, PascalABCCompiler.SourceFileOperation.Exists);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static bool CanGoToRealization(TextArea textArea)
|
|
|
|
|
|
{
|
2026-01-27 22:25:28 +03:00
|
|
|
|
if (!CodeCompletion.CodeCompletionController.IntellisenseAvailable()) return false;
|
2022-06-30 09:47:11 +03:00
|
|
|
|
List<Position> poses = GetRealizationPosition(textArea);
|
|
|
|
|
|
if (poses == null || poses.Count == 0) return false;
|
|
|
|
|
|
foreach (Position pos in poses)
|
|
|
|
|
|
if (pos.file_name != null && (bool)WorkbenchServiceFactory.Workbench.VisualEnvironmentCompiler.SourceFilesProvider(pos.file_name, PascalABCCompiler.SourceFileOperation.Exists))
|
|
|
|
|
|
return true;
|
|
|
|
|
|
return false;
|
|
|
|
|
|
// string file_name = GetRealizationPosition(textArea).file_name;
|
|
|
|
|
|
// return file_name != null && (bool)VisualPABCSingleton.MainForm.VisualEnvironmentCompiler.SourceFilesProvider(file_name, PascalABCCompiler.SourceFileOperation.Exists);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static bool CanFindReferences(TextArea textArea)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
2026-01-27 22:25:28 +03:00
|
|
|
|
if (!CodeCompletion.CodeCompletionController.IntellisenseAvailable()) return false;
|
2022-06-30 09:47:11 +03:00
|
|
|
|
ccp = new CodeCompletionProvider();
|
|
|
|
|
|
string full_expr;
|
|
|
|
|
|
string expressionResult = FindFullExpression(textArea.Document.TextContent, textArea, out ccp.keyword, out full_expr);
|
|
|
|
|
|
if (expressionResult != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
expressionResult = expressionResult.Trim(' ', '\n', '\t', '\r');
|
|
|
|
|
|
return expressionResult != null && expressionResult != "";
|
|
|
|
|
|
}
|
|
|
|
|
|
return expressionResult != null && expressionResult != "";
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
|
{
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static bool CanGenerateRealization(TextArea textArea)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
2026-01-27 22:25:28 +03:00
|
|
|
|
if (!CodeCompletion.CodeCompletionController.IntellisenseAvailable()) return false;
|
2022-06-30 09:47:11 +03:00
|
|
|
|
ccp = new CodeCompletionProvider();
|
|
|
|
|
|
Position pos = new Position();
|
|
|
|
|
|
//string text = "procedure Test(a : integer);\n begin \n x := 1; \n end;";//ccp.GetRealizationTextToAdd(out pos);
|
|
|
|
|
|
string text = ccp.GetRealizationTextToAdd(textArea.MotherTextEditorControl.FileName, textArea.Caret.Line, textArea.Caret.Column, ref pos, textArea);
|
|
|
|
|
|
return text != null && pos.file_name != null;
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
|
{
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static void GenerateMethodImplementationHeaders(TextArea textArea)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
2026-01-27 22:25:28 +03:00
|
|
|
|
if (!CodeCompletion.CodeCompletionController.IntellisenseAvailable()) return;
|
2022-06-30 09:47:11 +03:00
|
|
|
|
ccp = new CodeCompletionProvider();
|
|
|
|
|
|
Position pos = new Position();
|
|
|
|
|
|
//string text = "procedure Test(a : integer);\n begin \n x := 1; \n end;";//ccp.GetRealizationTextToAdd(out pos);
|
|
|
|
|
|
string text = ccp.GetMethodImplementationTextToAdd(textArea.MotherTextEditorControl.FileName, textArea.Caret.Line, textArea.Caret.Column, ref pos, textArea);
|
|
|
|
|
|
if (!string.IsNullOrEmpty(text) && pos.file_name != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
textArea.Caret.Line = pos.line - 1;
|
|
|
|
|
|
textArea.Caret.Column = 0;
|
|
|
|
|
|
textArea.InsertString(text);
|
|
|
|
|
|
textArea.Caret.Line = pos.line - 1;
|
|
|
|
|
|
textArea.Caret.Column = 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (System.Exception e)
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
private static PABCNETCodeCompletionWindow codeCompletionWindow;
|
|
|
|
|
|
private static TextArea _textArea;
|
|
|
|
|
|
public static void GenerateOverridableMethods(TextArea textArea)
|
|
|
|
|
|
{
|
2026-01-27 22:25:28 +03:00
|
|
|
|
if (!CodeCompletion.CodeCompletionController.IntellisenseAvailable()) return;
|
2022-06-30 09:47:11 +03:00
|
|
|
|
ccp = new CodeCompletionProvider();
|
|
|
|
|
|
_textArea = textArea;
|
|
|
|
|
|
int off = textArea.Caret.Offset;
|
|
|
|
|
|
codeCompletionWindow = PABCNETCodeCompletionWindow.ShowOverridableMethodsCompletionWindows
|
|
|
|
|
|
(VisualPABCSingleton.MainForm, textArea.MotherTextEditorControl, textArea.MotherTextEditorControl.FileName, ccp);
|
|
|
|
|
|
CodeCompletionAllNamesAction.comp_windows[textArea] = codeCompletionWindow;
|
|
|
|
|
|
if (codeCompletionWindow != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
// ShowCompletionWindow can return null when the provider returns an empty list
|
|
|
|
|
|
codeCompletionWindow.Closed += new EventHandler(CloseCodeCompletionWindow);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private static void CloseCodeCompletionWindow(object sender, EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (codeCompletionWindow != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
codeCompletionWindow.Closed -= new EventHandler(CloseCodeCompletionWindow);
|
|
|
|
|
|
CodeCompletionProvider.disp.Reset();
|
|
|
|
|
|
codeCompletionWindow.Dispose();
|
|
|
|
|
|
CodeCompletion.AssemblyDocCache.Reset();
|
|
|
|
|
|
CodeCompletion.UnitDocCache.Reset();
|
|
|
|
|
|
codeCompletionWindow = null;
|
|
|
|
|
|
}
|
|
|
|
|
|
CodeCompletionAllNamesAction.comp_windows[_textArea] = null;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static void GenerateClassOrMethodRealization(TextArea textArea)
|
|
|
|
|
|
{
|
2026-01-27 22:25:28 +03:00
|
|
|
|
if (!CodeCompletion.CodeCompletionController.IntellisenseAvailable()) return;
|
2022-06-30 09:47:11 +03:00
|
|
|
|
ccp = new CodeCompletionProvider();
|
|
|
|
|
|
Position pos = new Position();
|
|
|
|
|
|
//string text = "procedure Test(a : integer);\n begin \n x := 1; \n end;";//ccp.GetRealizationTextToAdd(out pos);
|
|
|
|
|
|
string text = ccp.GetRealizationTextToAdd(textArea.MotherTextEditorControl.FileName, textArea.Caret.Line, textArea.Caret.Column, ref pos, textArea);
|
|
|
|
|
|
if (text != null && pos.file_name != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
textArea.Caret.Line = pos.line - 1;
|
|
|
|
|
|
textArea.Caret.Column = pos.column - 1;
|
|
|
|
|
|
textArea.InsertString(text);
|
|
|
|
|
|
textArea.Caret.Line = pos.line + 4 - 1;
|
|
|
|
|
|
textArea.Caret.Column = VisualPABCSingleton.MainForm.UserOptions.CursorTabCount + 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private static void find_cursor_pos(string s, out int line, out int col)
|
|
|
|
|
|
{
|
|
|
|
|
|
line = 0;
|
|
|
|
|
|
col = 0;
|
|
|
|
|
|
for (int i = 0; i < s.Length; i++)
|
|
|
|
|
|
if (s[i] == '\n')
|
|
|
|
|
|
{
|
|
|
|
|
|
line++;
|
|
|
|
|
|
col = 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (s[i] == '|')
|
|
|
|
|
|
{
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
col++;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static void GenerateTemplate(string pattern, TextArea textArea) => GenerateTemplate(pattern, textArea, templateManager);
|
|
|
|
|
|
|
|
|
|
|
|
public static void GenerateTemplate(string pattern, TextArea textArea, CodeTemplateManager templateManager, bool withPatternLength = true, Func<string,string> PostAction = null)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
|
|
|
IDocument doc = textArea.Document;
|
|
|
|
|
|
|
|
|
|
|
|
if (textArea.SelectionManager.HasSomethingSelected) // удаление выделенного
|
|
|
|
|
|
{
|
|
|
|
|
|
var isel = textArea.SelectionManager.SelectionCollection[0];
|
|
|
|
|
|
textArea.Caret.Line = isel.StartPosition.Line;
|
|
|
|
|
|
textArea.Caret.Column = isel.StartPosition.Column;
|
|
|
|
|
|
textArea.SelectionManager.RemoveSelectedText();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
int line = textArea.Caret.Line;
|
|
|
|
|
|
int col = textArea.Caret.Column;
|
|
|
|
|
|
string name = templateManager.GetTemplateHeader(pattern);
|
|
|
|
|
|
if (name == null) return;
|
|
|
|
|
|
string templ = templateManager.GetTemplate(name);
|
|
|
|
|
|
int ind = withPatternLength ? pattern.Length : 0;
|
|
|
|
|
|
int cline;
|
|
|
|
|
|
int ccol;
|
|
|
|
|
|
find_cursor_pos(templ, out cline, out ccol);
|
|
|
|
|
|
sb.Append(templ);
|
|
|
|
|
|
int cur_ind = templ.IndexOf('|');
|
|
|
|
|
|
if (cur_ind != -1)
|
|
|
|
|
|
sb = sb.Remove(cur_ind, 1);
|
|
|
|
|
|
sb = sb.Replace("<filename>", Path.GetFileNameWithoutExtension(textArea.MotherTextEditorControl.FileName));
|
|
|
|
|
|
templ = sb.ToString();
|
|
|
|
|
|
int i = 0;
|
|
|
|
|
|
i = templ.IndexOf('\n', i);
|
|
|
|
|
|
while (i != -1)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (i + 1 < sb.Length)
|
|
|
|
|
|
sb.Insert(i + 1, " ", col - ind);
|
|
|
|
|
|
i = sb.ToString().IndexOf('\n', i + 1);
|
|
|
|
|
|
}
|
|
|
|
|
|
TextLocation tl_beg = new TextLocation(col - ind, line);
|
|
|
|
|
|
int offset = doc.PositionToOffset(tl_beg);
|
|
|
|
|
|
doc.Replace(offset, ind, "");
|
|
|
|
|
|
doc.CommitUpdate();
|
|
|
|
|
|
textArea.Caret.Column = col - ind;
|
|
|
|
|
|
var sbs = sb.ToString();
|
|
|
|
|
|
if (PostAction != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
sbs = PostAction(sbs);
|
|
|
|
|
|
}
|
|
|
|
|
|
textArea.InsertString(sbs);
|
|
|
|
|
|
textArea.Caret.Line = line + cline;
|
|
|
|
|
|
textArea.Caret.Column = col - ind + ccol;
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private static bool should_insert_comment(TextArea textArea)
|
|
|
|
|
|
{
|
|
|
|
|
|
string content = textArea.Document.TextContent;
|
|
|
|
|
|
LineSegment seg = textArea.Document.GetLineSegment(textArea.Caret.Line);
|
|
|
|
|
|
string line = textArea.Document.GetText(seg);
|
|
|
|
|
|
if (line.Trim(' ', '\t') != "//")
|
|
|
|
|
|
return false;
|
|
|
|
|
|
if (textArea.Caret.Line + 1 >= textArea.Document.TotalNumberOfLines)
|
|
|
|
|
|
return false;
|
|
|
|
|
|
return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private static string get_next_line(TextArea textArea)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (textArea.Caret.Line + 1 >= textArea.Document.TotalNumberOfLines)
|
|
|
|
|
|
return null;
|
|
|
|
|
|
LineSegment seg = textArea.Document.GetLineSegment(textArea.Caret.Line + 1);
|
|
|
|
|
|
return textArea.Document.GetText(seg).Trim(' ', '\t');
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private static string get_possible_description(TextArea textArea, out int len)
|
|
|
|
|
|
{
|
|
|
|
|
|
LineSegment seg = textArea.Document.GetLineSegment(textArea.Caret.Line);
|
|
|
|
|
|
len = 0;
|
|
|
|
|
|
string s = textArea.Document.GetText(seg).TrimStart(' ', '\t');
|
|
|
|
|
|
if (s != "///" && s.StartsWith("///"))
|
|
|
|
|
|
{
|
|
|
|
|
|
len = s.Length - 3;
|
|
|
|
|
|
return s.Substring(3).Trim(' ', '\t');
|
|
|
|
|
|
}
|
|
|
|
|
|
return null;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static bool GenerateCommentTemplate(TextArea textArea)
|
|
|
|
|
|
{
|
2026-01-27 22:25:28 +03:00
|
|
|
|
if (!CodeCompletion.CodeCompletionController.IntellisenseAvailable()) return false;
|
2022-06-30 09:47:11 +03:00
|
|
|
|
ccp = new CodeCompletionProvider();
|
|
|
|
|
|
//if (!should_insert_comment(textArea))
|
|
|
|
|
|
// return false;
|
|
|
|
|
|
string lineText = get_next_line(textArea);
|
2026-01-27 22:25:28 +03:00
|
|
|
|
string addit = CodeCompletion.CodeCompletionController.CurrentLanguage.LanguageIntellisenseSupport.GetDocumentTemplate(
|
2022-06-30 09:47:11 +03:00
|
|
|
|
lineText, textArea.Document.TextContent, textArea.Caret.Line, textArea.Caret.Column, textArea.Caret.Offset);
|
|
|
|
|
|
if (addit == null)
|
|
|
|
|
|
return false;
|
|
|
|
|
|
int col = textArea.Caret.Column;
|
|
|
|
|
|
int line = textArea.Caret.Line;
|
|
|
|
|
|
int len;
|
|
|
|
|
|
string desc = get_possible_description(textArea, out len);
|
|
|
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
|
|
|
sb.AppendLine(" <summary>");
|
|
|
|
|
|
for (int i = 0; i < col - 3; i++)
|
|
|
|
|
|
sb.Append(' ');
|
|
|
|
|
|
sb.Append("/// ");
|
|
|
|
|
|
if (desc != null)
|
|
|
|
|
|
sb.Append(desc);
|
|
|
|
|
|
sb.AppendLine();
|
|
|
|
|
|
for (int i = 0; i < col - 3; i++)
|
|
|
|
|
|
sb.Append(' ');
|
|
|
|
|
|
sb.Append("/// </summary>");
|
|
|
|
|
|
if (addit != "")
|
|
|
|
|
|
{
|
|
|
|
|
|
sb.Append(addit);
|
|
|
|
|
|
}
|
|
|
|
|
|
if (desc == null)
|
|
|
|
|
|
textArea.InsertString(sb.ToString());
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
IDocument doc = textArea.Document;
|
|
|
|
|
|
TextLocation tl_beg = new TextLocation(col, line);
|
|
|
|
|
|
//TextLocation tl_end = new TextLocation(svs.SourceLocation.EndPosition.Line,svs.SourceLocation.EndPosition.Column);
|
|
|
|
|
|
int offset = doc.PositionToOffset(tl_beg);
|
|
|
|
|
|
doc.Replace(offset, len, "");
|
|
|
|
|
|
doc.CommitUpdate();
|
|
|
|
|
|
textArea.InsertString(sb.ToString());
|
|
|
|
|
|
}
|
|
|
|
|
|
textArea.Caret.Line = line + 1;
|
|
|
|
|
|
textArea.Caret.Column = col + 1;
|
|
|
|
|
|
return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static void GotoDefinition(TextArea _textArea)
|
|
|
|
|
|
{
|
2026-01-27 22:25:28 +03:00
|
|
|
|
if (!CodeCompletion.CodeCompletionController.IntellisenseAvailable()) return;
|
2022-06-30 09:47:11 +03:00
|
|
|
|
position = GetDefinitionPosition(_textArea, false);
|
|
|
|
|
|
if (position == null) return;
|
|
|
|
|
|
if (position.Count == 1)
|
|
|
|
|
|
{
|
|
|
|
|
|
Position pos = position[0];
|
|
|
|
|
|
if (pos.file_name != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
WorkbenchServiceFactory.Workbench.VisualEnvironmentCompiler.ExecuteSourceLocationAction(
|
|
|
|
|
|
new PascalABCCompiler.SourceLocation(pos.file_name, pos.line, pos.column, pos.line, pos.column), VisualPascalABCPlugins.SourceLocationAction.GotoBeg);
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
if (pos.from_metadata)
|
|
|
|
|
|
{
|
|
|
|
|
|
WorkbenchServiceFactory.FileService.OpenTabWithText(pos.metadata_title, pos.metadata);
|
|
|
|
|
|
WorkbenchServiceFactory.Workbench.VisualEnvironmentCompiler.ExecuteSourceLocationAction(
|
|
|
|
|
|
new PascalABCCompiler.SourceLocation(pos.file_name, pos.line, pos.column, pos.line, pos.column), VisualPascalABCPlugins.SourceLocationAction.GotoBeg);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
List<SymbolsViewerSymbol> svs_lst = new List<SymbolsViewerSymbol>();
|
|
|
|
|
|
foreach (Position pos in position)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (pos.file_name != null)
|
|
|
|
|
|
svs_lst.Add(new SymbolsViewerSymbol(new PascalABCCompiler.SourceLocation(pos.file_name, pos.line, pos.column, pos.end_line, pos.end_column), CodeCompletionProvider.ImagesProvider.IconNumberGotoText));
|
|
|
|
|
|
}
|
|
|
|
|
|
VisualPABCSingleton.MainForm.FindSymbolResults.showInThread = false;
|
|
|
|
|
|
VisualPABCSingleton.MainForm.ShowFindResults(svs_lst);
|
|
|
|
|
|
VisualPABCSingleton.MainForm.FindSymbolResults.showInThread = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private static string FindFullExpression(string Text, TextArea _textArea, out PascalABCCompiler.Parsers.KeywordKind keyw, out string full_expr)
|
|
|
|
|
|
{
|
|
|
|
|
|
keyw = PascalABCCompiler.Parsers.KeywordKind.None;
|
|
|
|
|
|
string expr_without_brackets = null;
|
|
|
|
|
|
full_expr = null;
|
2026-01-27 22:25:28 +03:00
|
|
|
|
if (CodeCompletion.CodeCompletionController.IntellisenseAvailable())
|
2022-06-30 09:47:11 +03:00
|
|
|
|
{
|
2026-01-27 22:25:28 +03:00
|
|
|
|
full_expr = CodeCompletion.CodeCompletionController.CurrentLanguage.LanguageIntellisenseSupport.FindExpressionFromAnyPosition(_textArea.Caret.Offset, Text, _textArea.Caret.Line, _textArea.Caret.Column, out keyw, out expr_without_brackets);
|
2022-06-30 09:47:11 +03:00
|
|
|
|
return expr_without_brackets;
|
|
|
|
|
|
}
|
|
|
|
|
|
return null;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private static string FindOnlyIdent(string Text, TextArea _textArea, ref string name)
|
|
|
|
|
|
{
|
2026-01-27 22:25:28 +03:00
|
|
|
|
return CodeCompletion.CodeCompletionController.CurrentLanguage.LanguageIntellisenseSupport.FindOnlyIdentifier(_textArea.Caret.Offset, Text, _textArea.Caret.Line, _textArea.Caret.Column, ref name);
|
2022-06-30 09:47:11 +03:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static List<Position> position;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public class VirtualMethodsAction : ICSharpCode.TextEditor.Actions.AbstractEditAction
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Execute(TextArea textArea)
|
|
|
|
|
|
{
|
|
|
|
|
|
CodeCompletionActionsManager.GenerateOverridableMethods(textArea);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public class ClassOrMethodRealizationAction : ICSharpCode.TextEditor.Actions.AbstractEditAction
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Execute(TextArea textArea)
|
|
|
|
|
|
{
|
|
|
|
|
|
CodeCompletionActionsManager.GenerateClassOrMethodRealization(textArea);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public class GenerateMethodImplementationHeadersAction : ICSharpCode.TextEditor.Actions.AbstractEditAction
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Execute(TextArea textArea)
|
|
|
|
|
|
{
|
|
|
|
|
|
CodeCompletionActionsManager.GenerateMethodImplementationHeaders(textArea);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public class GotoAction : ICSharpCode.TextEditor.Actions.AbstractEditAction
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Execute(TextArea textArea)
|
|
|
|
|
|
{
|
|
|
|
|
|
CodeCompletionActionsManager.GotoDefinition(textArea);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public class CodeCompletionNamesOnlyInModuleAction : CodeCompletionAllNamesAction
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Execute(TextArea _textArea)
|
|
|
|
|
|
{
|
|
|
|
|
|
key = '\0';
|
|
|
|
|
|
base.Execute(_textArea);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public class CodeFormattingAction : ICSharpCode.TextEditor.Actions.AbstractEditAction
|
|
|
|
|
|
{
|
|
|
|
|
|
public override void Execute(TextArea textArea)
|
|
|
|
|
|
{
|
2026-01-27 22:25:28 +03:00
|
|
|
|
if (WorkbenchServiceFactory.DebuggerManager.IsRunning || !CodeCompletion.CodeCompletionController.IntellisenseAvailable())
|
2022-06-30 09:47:11 +03:00
|
|
|
|
return;
|
|
|
|
|
|
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 =
|
|
|
|
|
|
// MainForm.VisualEnvironmentCompiler.Compiler.ParsersController.Compile(
|
Refactoring of Compiler.cs (#2984)
* Add first comments
* Finish commenting for Compile and CompileUnit
* Write TODO sections
* Add a few clarifications
* splitted some functions from compile
* Written some methods from Compile to functions
* Update variable names
* Refactor - stage 1
Refactor GetUsesSection and IsPossibleNameSpace
* Refactor - stage 2
Rename a few functions and variables
* Correct an inaccuracy
* Added comments, look through CompileUnit
* Rename a few functions and add new comments
* Split CompileUnit to Subfunctions
Add IsUnitCompiled, IsUnitInPCU, InitializeNewUnit, GetSourceCode, GenSyntaxTree, GenUnitDocumentation, CheckDLLDirectiveOnlyForLibraries, MatchErrorsToBadNodes, CheckIfUnitModule, SetUseDLLForSystemUnits,
CompileInterfaceDependencies, CompileCurrentUnitInterface, GetImplementationUsesSection, CompileImplementationDependencies, CompileCurrentUnitImplementation
* Added some TODOs
* Return uses_unit_in original name
Renaming of syntax tree nodes leads to internal compiler errors
* Extract GenerateILCode method
* Add checking if recompilation needed method
Needs to be discussed and revised
* Add functions for catch blocks in Compile
* Extract building semantic tree method
Creating main function to be moved to another class
* Rename UnitsSortedList
* Edit CompileUnitsFromDelayedList method
* Change a few variable names, make CreateRCFile function and add comments
* Make code more "user-friendly"
* Add TODOs 31.11.23
* Create PrebuildSemanticTreeActionsMethod
* Refactor semantic checks section in initialize new unit method
* Refactor Adding standard units to uses method
* Return file_name and compiler_directives original names to avoid internal compilation errors
* Refactor GetReferences Method
* Initial refactoring of IncludeNamespaces function
* Create three more methods and wrap important code in regions
* Add TODO's
* Resolve merge conflicts
* Add returned value to ConstructSyntaxTree method
* Fix UnitsSortedList NotFoundError in PCUWriter
* Workaround commit
* Update PABCSystem after tests' changes
* Rename syntax trees in some methods
* Delete CurrentSyntaxUnit variable
* Revert unnecessary project files changes
* Squashed commit of the following:
commit f4d7599f1a39252feac97bd5391f46dfdc25f6f4
Author: Владислав Крылов <krylov@sfedu.ru>
Date: Wed Nov 22 11:43:29 2023 +0300
added links to identarranger
commit 3bd5d33e2b2969884e61a3279ff9c353013b57fe
Author: Владислав Крылов <krylov@sfedu.ru>
Date: Wed Nov 22 11:43:03 2023 +0300
Change extension for verybasic to yavb
commit 61294c6e7d405e1c68516cc81d3a109e8a1ee295
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Tue Nov 21 09:33:57 2023 +0300
Change Program Example
commit 86971488341ed6bf13c39e13a513d7ac0c51c285
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Tue Nov 21 09:28:59 2023 +0300
Add IndentArranger to Compile
commit 2ce50bbbf9db22c4243b247b870f6935ce206d26
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Fri Nov 17 10:00:31 2023 +0300
Add Semicolon After Each Statement
commit 796309d340e8d8ba730ff9418fa376f34fb7fd36
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Wed Nov 15 18:49:11 2023 +0300
Add Alpha Version of Python-style If-statement
commit 5eb88f946fe8254b4f5c5a56ed0a567b3be51227
Merge: ab4ce5b0 0162b637
Author: Владислав Крылов <krylov@sfedu.ru>
Date: Wed Nov 15 16:54:26 2023 +0300
Merge branch 'IndentArranger' into VeryBasicLanguage
commit ab4ce5b0e32d42004726e3dc45cc0d8a65e53f56
Author: Владислав Крылов <krylov@sfedu.ru>
Date: Wed Nov 15 16:53:51 2023 +0300
Fixes from seminar
commit af74012289d0d08517c13499a2a66cb543fc06d2
Author: Владислав Крылов <krylov@sfedu.ru>
Date: Sun Nov 12 18:57:29 2023 +0300
finally working!
fully implemented compatibility
commit 58a39c313324b468d1eec207ba3f5f6eddf74ef2
Author: Владислав Крылов <krylov@sfedu.ru>
Date: Sun Nov 12 11:58:16 2023 +0300
more compatibility with pabc
Now verybasic statements translate to pascal compiler
added .bat script for autobuilding verybasic
commit 0162b6376b8fe970704f26213bf9f0f670dfb12e
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Sun Nov 12 10:06:14 2023 +0300
Update test.txt
commit 1b759ab1cd7ee2ffeb14afff0418ddf0f30b0399
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Sun Nov 12 10:05:36 2023 +0300
Add Indent and Unindent Keywords to Generated File
commit cabda7f3985651cff2a8740f1a5bdea8fe7ac892
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Fri Nov 10 21:25:52 2023 +0300
Add Generation of Output File
commit 306f033d0176ab559e3622b8505427dbe2e0e203
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Thu Nov 9 20:42:18 2023 +0300
Update IndentArranger.sln
commit 60c0ceced1aa3a7d2e33de0facb1126e295f43b5
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Thu Nov 9 20:41:22 2023 +0300
Add IndentArranger
commit 1f4556c4573dae154fcc167b41ff6ab9e8122136
Author: Владислав Крылов <krylov@sfedu.ru>
Date: Mon Nov 6 22:48:36 2023 +0300
Made my own VeryBasicParser project
Copied some code from SaushkinParser
Tried to compile it and implement into Pascal
Doesn't work due to grammatik issue
* Squashed commit of the following:
commit 4e73d9ac3ffef68312f06a74dc83afffcf3ccbee
Author: Владислав Крылов <krylov@sfedu.ru>
Date: Wed Nov 22 15:08:10 2023 +0300
Fixed GPPG (i think so at least)
commit e5cfc220828b37fb2f35e565683019716ec3f0ce
Author: Владислав Крылов <krylov@sfedu.ru>
Date: Wed Nov 22 11:44:27 2023 +0300
Update Compiler.cs
commit 4698e2e75a5f3b4f523a8bc7733a50e8abb4fca1
Merge: 22aaf2b2 f4d7599f
Author: Владислав Крылов <krylov@sfedu.ru>
Date: Wed Nov 22 11:43:54 2023 +0300
Merge branch 'IndentArrangerTemp' into VeryBasicLanguage
commit f4d7599f1a39252feac97bd5391f46dfdc25f6f4
Author: Владислав Крылов <krylov@sfedu.ru>
Date: Wed Nov 22 11:43:29 2023 +0300
added links to identarranger
commit 3bd5d33e2b2969884e61a3279ff9c353013b57fe
Author: Владислав Крылов <krylov@sfedu.ru>
Date: Wed Nov 22 11:43:03 2023 +0300
Change extension for verybasic to yavb
commit 22aaf2b2508278a9ffce525ffed52419bf72c23f
Merge: c326174f 61294c6e
Author: Владислав Крылов <krylov@sfedu.ru>
Date: Wed Nov 22 11:26:36 2023 +0300
Merge branch 'IndentArrangerTemp' into VeryBasicLanguage
commit 61294c6e7d405e1c68516cc81d3a109e8a1ee295
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Tue Nov 21 09:33:57 2023 +0300
Change Program Example
commit 86971488341ed6bf13c39e13a513d7ac0c51c285
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Tue Nov 21 09:28:59 2023 +0300
Add IndentArranger to Compile
commit c326174ff5ecccf9c4f76d58aea4653f047af049
Author: Владислав Крылов <krylov@sfedu.ru>
Date: Sun Nov 19 15:03:19 2023 +0300
Added UniversalParserHelper and GPPG
ShiftReduceParser moved to another project
UniversalParserHelper project added, most of it copied from SaushkinParser
commit 2ce50bbbf9db22c4243b247b870f6935ce206d26
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Fri Nov 17 10:00:31 2023 +0300
Add Semicolon After Each Statement
commit 796309d340e8d8ba730ff9418fa376f34fb7fd36
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Wed Nov 15 18:49:11 2023 +0300
Add Alpha Version of Python-style If-statement
commit 5eb88f946fe8254b4f5c5a56ed0a567b3be51227
Merge: ab4ce5b0 0162b637
Author: Владислав Крылов <krylov@sfedu.ru>
Date: Wed Nov 15 16:54:26 2023 +0300
Merge branch 'IndentArranger' into VeryBasicLanguage
commit ab4ce5b0e32d42004726e3dc45cc0d8a65e53f56
Author: Владислав Крылов <krylov@sfedu.ru>
Date: Wed Nov 15 16:53:51 2023 +0300
Fixes from seminar
commit af74012289d0d08517c13499a2a66cb543fc06d2
Author: Владислав Крылов <krylov@sfedu.ru>
Date: Sun Nov 12 18:57:29 2023 +0300
finally working!
fully implemented compatibility
commit 58a39c313324b468d1eec207ba3f5f6eddf74ef2
Author: Владислав Крылов <krylov@sfedu.ru>
Date: Sun Nov 12 11:58:16 2023 +0300
more compatibility with pabc
Now verybasic statements translate to pascal compiler
added .bat script for autobuilding verybasic
commit 0162b6376b8fe970704f26213bf9f0f670dfb12e
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Sun Nov 12 10:06:14 2023 +0300
Update test.txt
commit 1b759ab1cd7ee2ffeb14afff0418ddf0f30b0399
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Sun Nov 12 10:05:36 2023 +0300
Add Indent and Unindent Keywords to Generated File
commit cabda7f3985651cff2a8740f1a5bdea8fe7ac892
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Fri Nov 10 21:25:52 2023 +0300
Add Generation of Output File
commit 306f033d0176ab559e3622b8505427dbe2e0e203
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Thu Nov 9 20:42:18 2023 +0300
Update IndentArranger.sln
commit 60c0ceced1aa3a7d2e33de0facb1126e295f43b5
Author: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Date: Thu Nov 9 20:41:22 2023 +0300
Add IndentArranger
commit 1f4556c4573dae154fcc167b41ff6ab9e8122136
Author: Владислав Крылов <krylov@sfedu.ru>
Date: Mon Nov 6 22:48:36 2023 +0300
Made my own VeryBasicParser project
Copied some code from SaushkinParser
Tried to compile it and implement into Pascal
Doesn't work due to grammatik issue
* Changed GPPG project NET Framework version, added .dll to gitignore
* Adding UniversalParserHelper to project, trying to include VeryBasic
* Managed dependencies and got VeryBasicLanguage to work
* Change extension of a test program
* Rebuild changes
What should be added to .gitignore?
* Fix bug related to err0524_res_unit.pas
* Rebuild Parser
* Change Indent and Unindent tokens
* Add Symbol Table to ParserABC.y
* Change Indent Space Number to 2
* Add While Loop
* Add Some Operations to Parser
* Make Initialization Node at the Beginning of a program
* Create Grammar.txt
* Test program added
* Add ELIF and SyntaxHighlight
* Fix TableSymbol
* Add Division
* Add Method Call
* Add For Loop
* Rename SPython Parser Folder
* Add documented comments for CompileUnit method
* Added Errors to SPython
Added Errors.cs
Removed link to PABCSaushkinParser
Minor fixes
* Create default constructor for SourceContext
* Move null check of currentUnit to upper level in CompileUnit
* Move CreateMainFunction method from Compiler to TreeConverter class
* Add gppg and parserhelper to visualpascalabcnet dependencies
* Updated installer files to include GPPG and UniversalParserHelper
* Rename GPPG to ShiftReduceParser
* Fix ShiftReduceParser project dependencies
* Fix ShiftReduceParserDependencies second iteration
* Workaround commit
* Update PABCSystem after tests' changes
* Refactor ConvertDirectives method
* Get rid of legacy standard modules code
* Return varBeginOffset and beginOffset calculation to Compiler class
Размещение метода в SyntaxTreeToSemanticTreeConverter не целесообразно. В комментарии видимо имелось в виду что-то другое.
* Workaround commit
* Update PABCSystem after tests' changes
* Revert SPython changes
Оставляем только изменения связанные с рефакторингом.
* Update .gitignore
Co-authored-by: Sun Serega <sunserega2@gmail.com>
* Resolve a few Sun Serega treds
* Delete comments in ParsersController.cs
* Replace specific path with path variable in Studio.bat
* Add comment in Studio.bat file and return FileName in CompilerError.cs
* Fix TreeSubsidiary.cs encoding and sectCore.nsh indents
* Return old version of TestRunner.exe
* Rename some variables and polish a few methods
* Uncomment accidentally commented code
* Replace spaces with tabs
* Changed dll name from GPPG
* Revert "Changed dll name from GPPG"
This reverts commit c485cc8cb787809b7e9dfa8a361e75f17ed39893.
* Update .gitignore
* Delete Libraries/ShiftReduceParser.dll
* Delete bin\ShiftReduceParser.dll
* Replace tabs with spaces
* Update encoding in Studio.bat
* Fix bug with PABCrtl excluded files
* Refactor StandardModule class
* Add null checks to make debuging easier
* Delete unnecessary null checks in SymTable.cs
---------
Co-authored-by: Владислав Крылов <krylov@sfedu.ru>
Co-authored-by: MovchanGitHub <92666028+MovchanGitHub@users.noreply.github.com>
Co-authored-by: Sun Serega <sunserega2@gmail.com>
2023-12-18 22:33:27 +03:00
|
|
|
|
// file_name, TextEditor.Text, null, Errors, PascalABCCompiler.Parsers.ParseMode.Normal);
|
2022-06-30 09:47:11 +03:00
|
|
|
|
string text = WorkbenchServiceFactory.Workbench.VisualEnvironmentCompiler.SourceFilesProvider(VisualPABCSingleton.MainForm.CurrentCodeFileDocument.FileName, PascalABCCompiler.SourceFileOperation.GetText) as string;
|
2026-01-27 22:25:28 +03:00
|
|
|
|
|
2022-06-30 09:47:11 +03:00
|
|
|
|
PascalABCCompiler.SyntaxTree.compilation_unit cu =
|
2026-01-27 22:25:28 +03:00
|
|
|
|
CodeCompletion.CodeCompletionController.CurrentLanguage.Parser.GetCompilationUnitForFormatter(
|
2022-06-30 09:47:11 +03:00
|
|
|
|
VisualPABCSingleton.MainForm.CurrentCodeFileDocument.FileName,
|
|
|
|
|
|
text, //VisualPascalABC.Form1.Form1_object._currentCodeFileDocument.TextEditor.Text,
|
|
|
|
|
|
Errors,
|
|
|
|
|
|
new List<PascalABCCompiler.Errors.CompilerWarning>());
|
2026-01-27 22:25:28 +03:00
|
|
|
|
|
2022-06-30 09:47:11 +03:00
|
|
|
|
if (Errors.Count == 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
string formattedText = cf.FormatTree(text, cu, textArea.Caret.Line + 1, textArea.Caret.Column + 1);
|
|
|
|
|
|
bool success = true;
|
|
|
|
|
|
if (success)
|
|
|
|
|
|
{
|
|
|
|
|
|
//WorkbenchServiceFactory.Workbench.VisualEnvironmentCompiler.ExecuteAction(VisualPascalABCPlugins.VisualEnvironmentCompilerAction.SetCurrentSourceFileTextFormatting, "");
|
|
|
|
|
|
WorkbenchServiceFactory.Workbench.VisualEnvironmentCompiler.ExecuteAction(VisualPascalABCPlugins.VisualEnvironmentCompilerAction.SetCurrentSourceFileTextFormatting, formattedText);
|
|
|
|
|
|
WorkbenchServiceFactory.Workbench.VisualEnvironmentCompiler.ExecuteSourceLocationAction(
|
|
|
|
|
|
new PascalABCCompiler.SourceLocation(VisualPABCSingleton.MainForm.CurrentCodeFileDocument.FileName, cf.Line, cf.Column, cf.Line, cf.Column), VisualPascalABCPlugins.SourceLocationAction.GotoBeg);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-05-25 12:26:32 +03:00
|
|
|
|
else
|
2022-06-30 09:47:11 +03:00
|
|
|
|
{
|
|
|
|
|
|
WorkbenchServiceFactory.Workbench.VisualEnvironmentCompiler.ExecuteAction(VisualPascalABCPlugins.VisualEnvironmentCompilerAction.AddMessageToErrorListWindow, new List<PascalABCCompiler.Errors.Error>(new PascalABCCompiler.Errors.Error[] { Errors[0] }));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public class CodeCompletionAllNamesAction : ICSharpCode.TextEditor.Actions.AbstractEditAction
|
|
|
|
|
|
{
|
|
|
|
|
|
PABCNETCodeCompletionWindow codeCompletionWindow;
|
|
|
|
|
|
public static TextArea textArea;
|
|
|
|
|
|
public static Hashtable comp_windows = new Hashtable();
|
|
|
|
|
|
public static bool is_begin = false;
|
|
|
|
|
|
protected char key = '_';
|
|
|
|
|
|
|
|
|
|
|
|
private string get_prev_text(string text, int off)
|
|
|
|
|
|
{
|
|
|
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
|
|
|
while (off >= 0 && char.IsLetterOrDigit(text[off]))
|
|
|
|
|
|
{
|
|
|
|
|
|
sb.Insert(0, text[off--]);
|
|
|
|
|
|
}
|
|
|
|
|
|
return sb.ToString();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public override void Execute(TextArea _textArea)
|
|
|
|
|
|
{
|
|
|
|
|
|
//try
|
|
|
|
|
|
{
|
|
|
|
|
|
textArea = _textArea;
|
|
|
|
|
|
int off = textArea.Caret.Offset;
|
|
|
|
|
|
string text = textArea.Document.TextContent.Substring(0, textArea.Caret.Offset);
|
|
|
|
|
|
if (key == '\0')
|
|
|
|
|
|
if (off > 2 && text[off - 1] == '/' && text[off - 2] == '/' && text[off - 3] == '/')
|
|
|
|
|
|
{
|
|
|
|
|
|
CodeCompletionActionsManager.GenerateCommentTemplate(textArea);
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
string prev = get_prev_text(text, off - 1);
|
|
|
|
|
|
if (!string.IsNullOrEmpty(prev))
|
|
|
|
|
|
{
|
|
|
|
|
|
CodeCompletionActionsManager.GenerateTemplate(prev, textArea);
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!WorkbenchServiceFactory.Workbench.UserOptions.CodeCompletionDot)
|
|
|
|
|
|
return;
|
2026-01-27 22:25:28 +03:00
|
|
|
|
if (CodeCompletion.CodeCompletionController.CurrentLanguage == null) return;
|
2022-06-30 09:47:11 +03:00
|
|
|
|
CodeCompletionProvider completionDataProvider = new CodeCompletionProvider();
|
|
|
|
|
|
|
|
|
|
|
|
bool is_pattern = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
is_begin = true;
|
|
|
|
|
|
|
2026-01-27 22:25:28 +03:00
|
|
|
|
completionDataProvider.preSelection = CodeCompletion.CodeCompletionController.CurrentLanguage.LanguageIntellisenseSupport.FindPattern(off, text, out is_pattern);
|
2022-06-30 09:47:11 +03:00
|
|
|
|
|
|
|
|
|
|
if (!is_pattern && off > 0 && text[off - 1] == '.')
|
2025-07-17 10:08:54 +03:00
|
|
|
|
key = '_';//was '$'
|
2022-06-30 09:47:11 +03:00
|
|
|
|
codeCompletionWindow = PABCNETCodeCompletionWindow.ShowCompletionWindow(
|
|
|
|
|
|
VisualPABCSingleton.MainForm, // The parent window for the completion window
|
|
|
|
|
|
textArea.MotherTextEditorControl, // The text editor to show the window for
|
|
|
|
|
|
textArea.MotherTextEditorControl.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
|
|
|
|
|
|
false,
|
|
|
|
|
|
false,
|
|
|
|
|
|
PascalABCCompiler.Parsers.KeywordKind.None
|
|
|
|
|
|
);
|
|
|
|
|
|
key = '_';
|
|
|
|
|
|
CodeCompletionNamesOnlyInModuleAction.comp_windows[textArea] = codeCompletionWindow;
|
|
|
|
|
|
|
|
|
|
|
|
if (codeCompletionWindow != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
// ShowCompletionWindow can return null when the provider returns an empty list
|
|
|
|
|
|
codeCompletionWindow.Closed += new EventHandler(CloseCodeCompletionWindow);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
//catch (Exception e)
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public 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();
|
|
|
|
|
|
codeCompletionWindow = null;
|
|
|
|
|
|
}
|
|
|
|
|
|
comp_windows[textArea] = null;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|