Skip to content

Commit

Permalink
Undid a huge erroneous deletion!
Browse files Browse the repository at this point in the history
  • Loading branch information
gkjpettet committed Jun 6, 2022
1 parent ff19cca commit f11161c
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 27 deletions.
2 changes: 1 addition & 1 deletion XUI EULA.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Both the Licensee and Licenser agree to adhere to the following terms and condit

- The Licenser grants (upon full payment and with acceptance of this source code license agreement) the Software to be used as permitted. A license shall be considered non-transferrable.

- The license granted may be used by the Licensee only. Additional licenses are required by any employees or subcontractors providing services for the Licensee. Enterprise licensing is available upon request.
- The standard license granted may be used by the Licensee only. The "Pro" license grants usage to all employees of a single organisation. Subcontractors providing services for the Licensee require an additional license.

- Throughout this agreement, “Software” shall be defined as all source code, object codes, linked libraries, utility programs, project files and scripts related to the software listed above.

Expand Down
24 changes: 0 additions & 24 deletions src/Build Automation.xojo_code
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@
Begin BuildStepList Linux
Begin BuildProjectStep Build
End
Begin CopyFilesBuildStep CopyTOMLKitTestsLinux
AppliesTo = 0
Architecture = 0
Target = 0
Destination = 1
Subdirectory =
FolderItem = Li4vLi4vdGVzdHMvVE9NTEtpdC9CdXJudFN1c2hpVGVzdHMv
End
Begin CopyFilesBuildStep CopyDemoResourcesLinux
AppliesTo = 0
Architecture = 0
Expand All @@ -24,14 +16,6 @@
Begin BuildStepList Mac OS X
Begin BuildProjectStep Build
End
Begin CopyFilesBuildStep CopyTOMLKitTestsMac
AppliesTo = 0
Architecture = 0
Target = 0
Destination = 1
Subdirectory =
FolderItem = Li4vLi4vdGVzdHMvVE9NTEtpdC9CdXJudFN1c2hpVGVzdHMv
End
Begin CopyFilesBuildStep CopyDemoResourcesMac
AppliesTo = 0
Architecture = 0
Expand All @@ -49,14 +33,6 @@
Begin BuildStepList Windows
Begin BuildProjectStep Build
End
Begin CopyFilesBuildStep CopyTOMLKitTestsWindows
AppliesTo = 0
Architecture = 0
Target = 0
Destination = 1
Subdirectory =
FolderItem = Li4vLi4vdGVzdHMvVE9NTEtpdC9CdXJudFN1c2hpVGVzdHMv
End
Begin CopyFilesBuildStep CopyDemoResourcesWindows
AppliesTo = 0
Architecture = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Begin DemoWindow WinCodeEditor
Resizeable = True
Title = "XUICodeEditor Demo"
Type = 0
Visible = True
Visible = False
Width = 1260
Begin XUITabBar TabBar
AllowAutoDeactivate= True
Expand Down Expand Up @@ -4226,7 +4226,9 @@ Begin DemoWindow WinCodeEditor
HighlightDelimitersAroundCaret= True
Index = -2147483648
InitialParent = ""
JustTokenised = False
LastFullyVisibleLineNumber= 0
LastParseMicroseconds= 0.0
Left = 0
LineNumberColor = &c00000000
LineNumberFontSize= 0
Expand All @@ -4237,6 +4239,7 @@ Begin DemoWindow WinCodeEditor
LockTop = True
LongestLineChanged= False
MinimumAutocompletionLength= 2
MinimumParseInterval= 500
NeedsFullRedraw = False
ReadOnly = False
Scope = 2
Expand Down
2 changes: 1 addition & 1 deletion src/XUI.xojo_project
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ MDI=0
MDICaption=
DefaultEncoding=&h0
AppIcon=XUI.xojo_resources;&h0
OSXBundleID=xyz.pettet.xui
OSXBundleID=software.xui.xui
DebuggerCommandLine=
UseGDIPlus=False
UseBuildsFolder=True
Expand Down
41 changes: 41 additions & 0 deletions src/XUI/XUICodeEditor/Formatters/XUICEXojoFormatter.xojo_code
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,47 @@ Implements XUICEFormatter
// Start by inheriting the line above's indent level.
line.IndentLevel = lineAbove.IndentLevel

// We need the first token of this line and the first token of the line above.
Var firstToken As XUICELineToken = line.FirstToken
If firstToken = Nil Then Continue
Var lineAboveFirstToken As XUICELineToken = lineAbove.FirstToken
If lineAboveFirstToken = Nil Then Continue

// Does the first token of the line above indent this line?
If lineAboveFirstToken.Type = XUICELineToken.TYPE_KEYWORD Then
Select Case lineAboveFirstToken.LookupData("keyword", Nil)
Case XojoKeywords.Case_, XojoKeywords.Catch_, XojoKeywords.Class_, XojoKeywords.Do_, XojoKeywords.ElseIf_, _
XojoKeywords.Else_, XojoKeywords.Exception_, XojoKeywords.Finally_, XojoKeywords.For_, _
XojoKeywords.Function_, XojoKeywords.Interface_, XojoKeywords.Module_, _
XojoKeywords.Private_, XojoKeywords.Property_, XojoKeywords.Protected_, _
XojoKeywords.Public_, XojoKeywords.Select_, XojoKeywords.Shared_, XojoKeywords.Static_, _
XojoKeywords.Sub_, XojoKeywords.Try_, XojoKeywords.While_
line.IndentLevel = line.IndentLevel + 1

Case XojoKeywords.If_
If Not IsSingleLineIfStatement(lineAbove) Then
line.IndentLevel = line.IndentLevel + 1
End If
End Select
End If

// Does the first token dedent this line?
If firstToken.Type = XUICELineToken.TYPE_KEYWORD Then
Select Case firstToken.LookupData("keyword", Nil)
Case XojoKeywords.Case_, XojoKeywords.Catch_, XojoKeywords.ElseIf_, XojoKeywords.Else_, XojoKeywords.End_, _
XojoKeywords.Loop_, XojoKeywords.Next_, XojoKeywords.Wend_
line.IndentLevel = line.IndentLevel - 1
End Select
End If

// Is this line a continuation of the line above?
Var lineAboveLastToken As XUICELineToken = LastNonCommentToken(lineAbove)
If lineAboveLastToken <> Nil And lineAboveLastToken.Type = XUICELineToken.TYPE_OPERATOR And _
lineAboveLastToken.LookupData("isLineContination", False) Then
line.IsContinuation = True
Else
line.IsContinuation = False
End If

End If

Expand Down

0 comments on commit f11161c

Please sign in to comment.