diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index 9aee95f84..8b1514254 100644 --- a/Configuration/GlobalAssemblyInfo.cs +++ b/Configuration/GlobalAssemblyInfo.cs @@ -15,7 +15,7 @@ internal static class RevisionClass public const string Major = "3"; public const string Minor = "5"; public const string Build = "1"; - public const string Revision = "2260"; + public const string Revision = "2265"; public const string MainVersion = Major + "." + Minor; public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision; diff --git a/Configuration/Version.defs b/Configuration/Version.defs index f2d103802..e34d66b41 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ -%COREVERSION%=1 -%REVISION%=2260 %MINOR%=5 +%REVISION%=2265 +%COREVERSION%=1 %MAJOR%=3 diff --git a/PluginsSupport/Interfaces.cs b/PluginsSupport/Interfaces.cs index 648fba8d1..8b38a2bc0 100644 --- a/PluginsSupport/Interfaces.cs +++ b/PluginsSupport/Interfaces.cs @@ -88,7 +88,8 @@ namespace VisualPascalABCPlugins SaveFile, BuildUnit, AddMessageToErrorListWindow, - SetCurrentSourceFileTextFormatting + SetCurrentSourceFileTextFormatting, + PT4PositionCursorAfterTask } public delegate IAsyncResult InvokeDegegate(Delegate method, params object[] args); diff --git a/Release/pabcversion.txt b/Release/pabcversion.txt index eed65888a..ef87ca57f 100644 --- a/Release/pabcversion.txt +++ b/Release/pabcversion.txt @@ -1 +1 @@ -3.5.1.2260 +3.5.1.2265 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index 0a4a79d8a..079e0fe11 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.5.1.2260' +!define VERSION '3.5.1.2265' diff --git a/TestSuite/CompilationSamples/GraphWPF.pas b/TestSuite/CompilationSamples/GraphWPF.pas index c3d7ca2a0..9b357f6ae 100644 --- a/TestSuite/CompilationSamples/GraphWPF.pas +++ b/TestSuite/CompilationSamples/GraphWPF.pas @@ -41,6 +41,8 @@ type GWindow = System.Windows.Window; GPen = System.Windows.Media.Pen; /// Тип точки + Point = System.Windows.Point; + /// Тип точки GPoint = System.Windows.Point; GBrush = System.Windows.Media.Brush; /// Тип стиля шрифта diff --git a/TestSuite/CompilationSamples/PABCSystem.pas b/TestSuite/CompilationSamples/PABCSystem.pas index 9d840260e..0e7b1f483 100644 --- a/TestSuite/CompilationSamples/PABCSystem.pas +++ b/TestSuite/CompilationSamples/PABCSystem.pas @@ -10556,6 +10556,32 @@ begin Result := Range(0, Self - 1); end; +/// Возвращает число, ограниченное диапазоном от bottom до top включительно +function Clamp(Self: integer; bottom,top: integer): integer; extensionmethod; +begin + if Self < bottom then + Result := bottom + else if Self > top then + Result := top + else Result := Self; +end; + +/// Возвращает число, ограниченное величиной top сверху +function ClampTop(Self: integer; top: integer): integer; extensionmethod; +begin + if Self > top then + Result := top + else Result := Self; +end; + +/// Возвращает число, ограниченное величиной bottom снизу +function Clamp(Self: integer; bottom: integer): integer; extensionmethod; +begin + if Self < bottom then + Result := bottom + else Result := Self; +end; + // ----------------------------------------------------- //>> Методы расширения типа BigInteger # Extension methods for BigInteger // ----------------------------------------------------- @@ -10632,6 +10658,32 @@ begin Result := Format('{0:f' + frac + '}', Self) end; +/// Возвращает число, ограниченное диапазоном от bottom до top включительно +function Clamp(Self: real; bottom,top: real): real; extensionmethod; +begin + if Self < bottom then + Result := bottom + else if Self > top then + Result := top + else Result := Self; +end; + +/// Возвращает число, ограниченное величиной top сверху +function ClampTop(Self: real; top: real): real; extensionmethod; +begin + if Self > top then + Result := top + else Result := Self; +end; + +/// Возвращает число, ограниченное величиной bottom снизу +function Clamp(Self: real; bottom: real): real; extensionmethod; +begin + if Self < bottom then + Result := bottom + else Result := Self; +end; + //------------------------------------------------------------------------------ //>> Методы расширения типа char # Extension methods for char diff --git a/TestSuite/CompilationSamples/WPFObjects.pas b/TestSuite/CompilationSamples/WPFObjects.pas index 254a15f26..c35a91bd2 100644 --- a/TestSuite/CompilationSamples/WPFObjects.pas +++ b/TestSuite/CompilationSamples/WPFObjects.pas @@ -43,6 +43,8 @@ type /// Тип размера GSize = System.Windows.Size; /// Тип точки + Point = System.Windows.Point; + /// Тип точки GPoint = System.Windows.Point; /// Тип окна GWindow = System.Windows.Window; diff --git a/VisualPascalABCNET/Form1.cs b/VisualPascalABCNET/Form1.cs index 492ca9e17..3d34cdf16 100644 --- a/VisualPascalABCNET/Form1.cs +++ b/VisualPascalABCNET/Form1.cs @@ -608,6 +608,23 @@ namespace VisualPascalABC if (s != null) return s; return WorkbenchStorage.StandartDirectories[(string)obj] as string; + case VisualEnvironmentCompilerAction.PT4PositionCursorAfterTask: // SSM 09.11.19 + { + var ta = CurrentCodeFileDocument.TextEditor.ActiveTextAreaControl.TextArea; + var d = ta.Document; + for (var i = 0; i 0) tb = CopyTextBox(OutputWindow.outputTextBox); AddWindowToDockPanel(tp, tabControl, tp.Dock != dockStyle?dockStyle:tp.Dock, DockState.Document, tp.IsFloat, null, 0); + tb.Font = tp.TextEditor.Font; OutputTextBoxs.Add(tp, tb); WorkbenchServiceFactory.CodeCompletionParserController.ParseInformationUpdated += tp.TextEditor.UpdateFolding; diff --git a/VisualPlugins/PT4Provider/PT4ProviderPlugin.cs b/VisualPlugins/PT4Provider/PT4ProviderPlugin.cs index b9e565e8f..130c8741a 100644 --- a/VisualPlugins/PT4Provider/PT4ProviderPlugin.cs +++ b/VisualPlugins/PT4Provider/PT4ProviderPlugin.cs @@ -125,6 +125,7 @@ namespace VisualPascalABCPlugins if (i < 1 || filename.ToString() == "") return;*/ VisualEnvironmentCompiler.ExecuteAction(VisualEnvironmentCompilerAction.OpenFile, filename.ToString()); + VisualEnvironmentCompiler.ExecuteAction(VisualEnvironmentCompilerAction.PT4PositionCursorAfterTask, null); } public void ExecuteB_R() { diff --git a/bin/Lib/GraphWPF.pas b/bin/Lib/GraphWPF.pas index 26e14d0d2..b5e61a2cd 100644 --- a/bin/Lib/GraphWPF.pas +++ b/bin/Lib/GraphWPF.pas @@ -41,6 +41,8 @@ type GWindow = System.Windows.Window; GPen = System.Windows.Media.Pen; /// Тип точки + Point = System.Windows.Point; + /// Тип точки GPoint = System.Windows.Point; GBrush = System.Windows.Media.Brush; /// Тип стиля шрифта diff --git a/bin/Lib/PABCSystem.pas b/bin/Lib/PABCSystem.pas index 9d840260e..0e7b1f483 100644 --- a/bin/Lib/PABCSystem.pas +++ b/bin/Lib/PABCSystem.pas @@ -10556,6 +10556,32 @@ begin Result := Range(0, Self - 1); end; +/// Возвращает число, ограниченное диапазоном от bottom до top включительно +function Clamp(Self: integer; bottom,top: integer): integer; extensionmethod; +begin + if Self < bottom then + Result := bottom + else if Self > top then + Result := top + else Result := Self; +end; + +/// Возвращает число, ограниченное величиной top сверху +function ClampTop(Self: integer; top: integer): integer; extensionmethod; +begin + if Self > top then + Result := top + else Result := Self; +end; + +/// Возвращает число, ограниченное величиной bottom снизу +function Clamp(Self: integer; bottom: integer): integer; extensionmethod; +begin + if Self < bottom then + Result := bottom + else Result := Self; +end; + // ----------------------------------------------------- //>> Методы расширения типа BigInteger # Extension methods for BigInteger // ----------------------------------------------------- @@ -10632,6 +10658,32 @@ begin Result := Format('{0:f' + frac + '}', Self) end; +/// Возвращает число, ограниченное диапазоном от bottom до top включительно +function Clamp(Self: real; bottom,top: real): real; extensionmethod; +begin + if Self < bottom then + Result := bottom + else if Self > top then + Result := top + else Result := Self; +end; + +/// Возвращает число, ограниченное величиной top сверху +function ClampTop(Self: real; top: real): real; extensionmethod; +begin + if Self > top then + Result := top + else Result := Self; +end; + +/// Возвращает число, ограниченное величиной bottom снизу +function Clamp(Self: real; bottom: real): real; extensionmethod; +begin + if Self < bottom then + Result := bottom + else Result := Self; +end; + //------------------------------------------------------------------------------ //>> Методы расширения типа char # Extension methods for char diff --git a/bin/Lib/WPFObjects.pas b/bin/Lib/WPFObjects.pas index 254a15f26..c35a91bd2 100644 --- a/bin/Lib/WPFObjects.pas +++ b/bin/Lib/WPFObjects.pas @@ -43,6 +43,8 @@ type /// Тип размера GSize = System.Windows.Size; /// Тип точки + Point = System.Windows.Point; + /// Тип точки GPoint = System.Windows.Point; /// Тип окна GWindow = System.Windows.Window;