Skip to content

Commit

Permalink
Rearrange the controls after inserting them. (#1604)
Browse files Browse the repository at this point in the history
* Issue 1508

Extension of the VOWindowCloneSelectDlg with:
- Selection of a directory
- Search in the loaded list
The additions to the project structure made by Chris are also included.

* Issue 1508

added the filter for the currently edited file and the start directory for the FolderBrowser dialog.

* Enabled /EnforceSelf on our projects

* Changed our source files so they compile with /enforceself. Also changed the templates for forms etc for this.

* Changed compiler to only apply /enforceself to method calls

* Recompile with /enforceSelf

* Buiold 2.21.0.1: Rolled bacl change for #1503.

* Correction WarningDialog box : RTF source was shown instead of message

* Correction to avoid compiler warnings

* Correction #1588 : Show Warning message instead of RTF Content

* [Compiler tests] Adjusted tests to use /allowdot both enabled and disabled for #1515

* [VsIntegration] Do not resolve Stranger Projects using ENVDTE but use the Community Toolkit instead to prevent locking issues

* ControlOrder
Conversion of the ControlOrder window from a modal dialog to a normal window.

PropGrid
If you select several controls in the Designer, the values in the properties window remain with the first selected control; now the properties of the last selected control are always displayed.

VoWindowEditor
Conversion of the VOControlCreationOrderDlg window from a modal dialog to a normal window.
Hiding the toolbox and the properties window only when the designer cannot take focus and not as before when the designer loses focus.
If controls are inserted via copy and paste, they are no longer added somewhere in the ControlOrder but at the end.Issue 1508

added the filter for the currently edited file and the start directory for the FolderBrowser dialog.

* [Vsinrtegration] Additional changes to reload external DLL when changed

* [Macrocompiler] Allow 'AS Type' clause for Runtime Macro (type is ignored for now)

* [XSharp.VFP.UI] Function Sys(16) correction #1592

* Moved test to right function

* The properties window and the tool window remain visible as long as the designer interface can maintain the focus.

* [VsIntegration] Added some checks for SnapShotPoints for End of Buffer and Start of Buffer , to prevent incrementing or decrementing outside of the valid range.
To simplify the code two extension methods for SnapShotPoint() were added: AtEnd() and AtStart()
Also renamed 'currentChar' to 'point' at several locations, because that's the type of the variable.

* Updated versions to 2.21.0.2 (should have been committed before previous commit)

* [Compiler] When the AnalyzerConfig option is passed to the compiler, then we need to add a new entry to the sourceFileAnalyzerConfigOptions object for the generated code.
Otherwise the size of trees and the config options is different.

* [Build] Fix generation of Xml file in wrong folder. Add default items for X# (Vobinary and NativeResource)

* Added some DefaultValue to avoid WinForm designer to generate unwanted code

* Added some DefaultValue to avoid WinForm designer to generate unwanted code

* Suppress the direct load of Serilog Nuget package to avoid conflict with VS2022 integration

* Correction on default Value for vfpEvents

* [Vsintegration] When include file contains "real code" then we should not fetch the start token from the include file. Fixes #1596 and #1595

* Refactored previous commit: remove duplicate code

* [Doc] Update

* Rearrange the controls after inserting them.

---------

Co-authored-by: Robert van der Hulst <[email protected]>
Co-authored-by: Fabrice Foray <[email protected]>
Co-authored-by: cpyrgas <[email protected]>
  • Loading branch information
4 people authored Oct 19, 2024
1 parent 5138852 commit 87d0cdc
Show file tree
Hide file tree
Showing 182 changed files with 2,835 additions and 2,198 deletions.
6 changes: 3 additions & 3 deletions docs/Help/Topics/VersionHistory.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="../helpproject.xsl" ?>
<topic template="Default" modified="2024-10-03T02:42:10.989+03:00" lasteditedby="cpc" version="2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../helpproject.xsd">
<topic template="Default" modified="2024-10-15T12:36:44.691+02:00" lasteditedby="robert" version="2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../helpproject.xsd">
<title>Version History</title>
<keywords>
<keyword>Changes</keyword>
Expand All @@ -11,7 +11,7 @@
<para styleclass="Heading1">Version History</para>
</header>
<para styleclass="Body Text" style="tabstops:96px left,144px left,240px left,488px left,1998px left ;">Note: When an item has a matching GitHub ticket then the ticket number is behind the item in parentheses prefixed with #. You can find these tickets by going to: <br/>https://github.com/X-Sharp/XSharpPublic/issues/<text style="font-weight:bold;">nnn</text> where <text style="font-weight:bold;">nnn</text> is the ticket number.<br/>If you find an issue in X# we recommend that you report it on GitHub. You will be notified of the progress on the work on your issue.</para>
<para styleclass="Heading1">Changes in 2.21.0.0</para>
<para styleclass="Heading1">Changes in 2.21.0.3</para>
<para styleclass="Heading2">Compiler</para>
<para styleclass="Heading3">Bug fixes</para>
<list id="0" type="ul" listtype="bullet" formatstring="&#183;" format-charset="SYMBOL_CHARSET" levelreset="true" legalstyle="false" startfrom="1" styleclass="Normal" style="font-family:Symbol; font-size:11pt; color:#000000;">
Expand All @@ -24,7 +24,6 @@
<li styleclass="Normal">Fixed problem passing array reference or ivar by reference in the XBase++ dialect (#1492)</li>
<li styleclass="Normal">Fixed AmbiguousMatchException in Evaluate() function for methods included in an interface (#1494)</li>
<li styleclass="Normal">Fixed problem with /fox1 switch being ignored in some cases (#1496)</li>
<li styleclass="Normal">Fixed problem with /enforceself compiler option being ignored (#1503)</li>
<li styleclass="Normal">The Build System now automatically adds a TargetFramework Attribute to assemblies compiled with X# (#1507)</li>
<li styleclass="Normal">Fixed an ambiguity problem with same named namespace and property and several issues when the /allowdot option is disabled (#1515)</li>
<li styleclass="Normal">Fixed problem in TEXT TO/ENDTEXT with TEXTMERGE clause (#1517)</li>
Expand Down Expand Up @@ -65,6 +64,7 @@
<li styleclass="Normal">Fixed a problem with putting the .resx file for windows forms user controls in an incorrect location in the Solution Explorer (#1560)</li>
<li styleclass="Normal">Fixed problem with editor snippets no longer working in VS 2022 version 17.11 (#1564)</li>
<li styleclass="Normal">Fix a problem with indenting lines with end keywords, such as NEXT and ENDDO, when these keywords were following by &apos;garbage&apos;.</li>
<li styleclass="Normal">Opening a form in the VS Form designer could fail when one of the include files declared entities, such as USING SomeNameSpace (#1595, #1596)</li>
</list>
<para styleclass="Heading3">New features</para>
<list id="0" type="ul" listtype="bullet" formatstring="&#183;" format-charset="SYMBOL_CHARSET" levelreset="true" legalstyle="false" startfrom="1" styleclass="Normal" style="font-family:Symbol; font-size:11pt; color:#000000;">
Expand Down
2 changes: 1 addition & 1 deletion docs/Help/XSHelp.hmxp
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@
<config-value name="publisher">XSharp BV</config-value>
</config-group>
<variables>
<variable id="TXTVERSION" type="text" translate="true">Cahors (2.21.0.0)</variable>
<variable id="TXTVERSION" type="text" translate="true">Cahors (2.21.0.1)</variable>
<variable id="APP" type="text" translate="true">XSharp</variable>
</variables>
<helpcontext-numbers>
Expand Down
2 changes: 1 addition & 1 deletion src/Common/BuildNumber.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// This is the file version number, which is ignored by .NET but used by Windows installer to determine
// whether one file is newer than another.
// This typically would change if we're generating a patch, otherwise it should be the same as VERSION_NUMBER
#define FILEVERSION_NUMBER "2.21.0.0"
#define FILEVERSION_NUMBER "2.21.0.3"
// This is used for the assembly version number, which the CLR uses to determine binding
// This generally changes when we release a new full build
// NOTE: DO NOT FORGET THE VERSION NUMBER IN THE CONSTANTS.CS FILE and the Versions.Props file
Expand Down
2 changes: 1 addition & 1 deletion src/Common/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ internal static partial class Constants
#else
internal const string Version = FileVersion;
#endif
internal const string FileVersion = "2.21.0.0";
internal const string FileVersion = "2.21.0.3";
internal const string ProductVersion = "2.21 GA";
internal const string PublicKey = "ed555a0467764586";
internal const string Copyright = "Copyright © XSharp BV 2015-2024";
Expand Down
4 changes: 2 additions & 2 deletions src/Common/version.Targets
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<Project>
<PropertyGroup>
<AssemblyVersion>2.6</AssemblyVersion>
<FileVersion>2.18.0.0</FileVersion>
<FileVersion>2.21.0.3</FileVersion>
<Company>XSharp BV</Company>
<Product>XSharp</Product>
<Copyright>Copyright (c) XSharp BV 2015-2023.</Copyright>
<Copyright>Copyright (c) XSharp BV 2015-2024.</Copyright>
<InformationalVersion>XSharp Cahors</InformationalVersion>
</PropertyGroup>
</Project>
Expand Down
2 changes: 1 addition & 1 deletion src/Compiler/eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ See License.txt in the project root for license information.
<MajorVersion>2</MajorVersion>
<MinorVersion>21</MinorVersion>
<PatchVersion>0</PatchVersion>
<PreReleaseVersionLabel>0</PreReleaseVersionLabel>
<PreReleaseVersionLabel>2</PreReleaseVersionLabel>
<VersionPrefix>$(MajorVersion).$(MinorVersion).$(PatchVersion)</VersionPrefix>
<!--
By default the assembly version in official builds is "$(MajorVersion).$(MinorVersion).0.0".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ Copyright (c) XSharp B.V. All Rights Reserved
</PropertyGroup>

<ItemGroup>
<DocFileItem Include="$(DocumentationFile)" Condition="'$(DocumentationFile)'!=''"/>
<DocFileItem Include="$(IntermediateOutputPath)$(DocumentationFile)" Condition="'$(DocumentationFile)'!=''"/>
</ItemGroup>

<ItemGroup Condition="'$(_DebugSymbolsProduced)' == 'true' and '$(PdbFile)' != ''">
Expand Down
14 changes: 14 additions & 0 deletions src/Compiler/src/Compiler/XSharpBuildTask/XSharp.props
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,18 @@
<DebugType>pdbonly</DebugType>
<DefineConstants>TRACE</DefineConstants>
</PropertyGroup>
<ItemGroup Condition="'$(UsingMicrosoftNETSdkWeb)' == 'true'">
<VOBinary Include="**\*.xsdbs" />
<VOBinary Include="**\*.xsfs" />
<VOBinary Include="**\*.xsfrm" />
<VOBinary Include="**\*.xsmnu" />
<VOBinary Include="**\*.xsrep" />
<VOBinary Include="**\*.xssql" />
<VOBinary Include="**\*.vndbs" />
<VOBinary Include="**\*.vnfs" />
<VOBinary Include="**\*.vnfrm" />
<VOBinary Include="**\*.vnmnu" />
<NativeResource Include="**\*.rc" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -1307,23 +1307,23 @@ private BoundExpression BindXSIdentifier(

lookupResult.Free();

if (node is IdentifierNameSyntax &&
Compilation.Options.HasOption(CompilerOption.EnforceSelf, node))
{
Symbol symbol = null;
if (expression is BoundFieldAccess bfa)
{
symbol = bfa.FieldSymbol;
}
else if (expression is BoundPropertyAccess bpa)
{
symbol = bpa.PropertySymbol;
}
if (symbol != null && !symbol.IsStatic)
{
diagnostics.Add(ErrorCode.ERR_ObjectRequired, node.Location, symbol);
}
}
//if (node is IdentifierNameSyntax &&
// Compilation.Options.HasOption(CompilerOption.EnforceSelf, node))
//{
// Symbol symbol = null;
// if (expression is BoundFieldAccess bfa)
// {
// symbol = bfa.FieldSymbol;
// }
// else if (expression is BoundPropertyAccess bpa)
// {
// symbol = bpa.PropertySymbol;
// }
// if (symbol != null && !symbol.IsStatic)
// {
// diagnostics.Add(ErrorCode.ERR_ObjectRequired, node.Location, symbol);
// }
//}

return expression;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageIcon>XSharp.png</PackageIcon>
<PackageIconUrl />
<Title>XSharp Compler</Title>
<Description>This package contains the X# compiler and build tools</Description>
<PackageReadmeFile>readme.md</PackageReadmeFile>
</PropertyGroup>

<ItemGroup>
Expand Down Expand Up @@ -79,6 +82,10 @@
<None Include="build\XSharp.Compiler.Tools.props" />
<Compile Remove="**/*assemblyinfo.cs" />
<None Include="build\XSharp.Compiler.Tools.targets" />
<None Include="readme.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
<None Include="XSharp.png">
<Pack>True</Pack>
<PackagePath></PackagePath>
Expand Down
1 change: 1 addition & 0 deletions src/Compiler/src/NuGet/XSharp.Compiler.Tools/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
XSharp Compiler Tools
13 changes: 12 additions & 1 deletion src/CompilerTests/Applications/C108/Prg/C108.prg
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// 108. error XS1061: 'ITest' does not contain a definition for 'StaticMethod'


INTERFACE ITest
METHOD Foo() AS VOID
END INTERFACE
Expand All @@ -7,10 +9,19 @@ CLASS Test
STATIC METHOD StaticMethod() AS VOID
END CLASS

#pragma options (allowdot, on)
FUNCTION Start() AS VOID
LOCAL Test AS ITest
Test := NULL
Test.StaticMethod()
? (OBJECT) Test
RETURN


#pragma options (allowdot, off)
FUNCTION Start2() AS VOID
LOCAL Test AS ITest
Test := NULL
Test.StaticMethod()
? (OBJECT) Test


31 changes: 26 additions & 5 deletions src/CompilerTests/Applications/C923/Prg/C923.prg
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,21 @@ VOSTRUCT testStruc
MEMBER n AS INT
MEMBER m AS INT

#pragma options (allowdot, on)
CLASS TestClass
PROPERTY System AS LOGIC AUTO
CONSTRUCTOR()
System.Diagnostics.Debug.WriteLine( "Hi" )
END CLASS

#pragma options (allowdot, off)
CLASS TestClass2
PROPERTY System AS LOGIC AUTO
CONSTRUCTOR()
System.Diagnostics.Debug.WriteLine( "Hi" )
END CLASS

#pragma options (allowdot, on)
FUNCTION Start( ) AS VOID
LOCAL testStruc IS testStruc
testStruc.n := 123 // error XS0120
Expand All @@ -25,8 +39,15 @@ FUNCTION Start( ) AS VOID
? bitmap.m // error XS0117
RETURN

CLASS TestClass
PROPERTY System AS LOGIC AUTO
CONSTRUCTOR()
System.Diagnostics.Debug.WriteLine( "Hi" )
END CLASS
#pragma options (allowdot, off)
FUNCTION Start2( ) AS VOID
LOCAL testStruc IS testStruc
testStruc.n := 123 // error XS0120
? testStruc.n // error XS0120

LOCAL bitmap IS testStruc
bitmap.m := 456 // error XS0117
? bitmap.m // error XS0117
RETURN


45 changes: 10 additions & 35 deletions src/CompilerTests/Applications/Tester/Prg/tester.prg
Original file line number Diff line number Diff line change
@@ -1,35 +1,10 @@
// Class1.prg
// Created by : robert
// Creation Date : 9/23/2024 9:33:04 AM
// Created for :
// WorkStation : LEDA


USING System
USING System.Collections.Generic
USING System.Linq
USING System.Text

BEGIN NAMESPACE ClassLibrary1

/// <summary>
/// The Class1 class.
/// </summary>
[ComVisible(TRUE)];
DEFINE CLASS Class1 AS Custom
PROTECTED prop1 AS STRING // X# allows types
HIDDEN hiddenprop1 AS DATE
// CONSTRUCTOR
PROCEDURE Init(p1, p2)
prop1 := p1
hiddenprop1 := p2
RETURN


FUNCTION Compare (p1 as STRING, p2 as DATE) AS LOGIC
? p1, p2
RETURN p1 == prop1 AND p2 == hiddenprop1

END DEFINE
END NAMESPACE // ClassLibrary1

// Core dialect
PUBLIC STRUCTURE MyStruct
EXPORT n AS INT
EXPORT c AS STRING
END STRUCTURE

FUNCTION Start() AS VOID
? SizeOf(System.Drawing.Point) // OK
? SizeOf(MyStruct) // error XS0208: Cannot take the address of, get the size of, or declare a pointer to a managed type ('MyStruct')
RETURN
Loading

0 comments on commit 87d0cdc

Please sign in to comment.