diff --git a/source/dbs-properties.json b/source/dbs-properties.json
index 57da749..38c859a 100644
--- a/source/dbs-properties.json
+++ b/source/dbs-properties.json
@@ -101,7 +101,7 @@
"Type": 4
},
"NavPane Width": {
- "Value": 494,
+ "Value": 557,
"Type": 4
},
"Never Cache": {
diff --git a/source/forms/ACLibImportWizardForm.bas b/source/forms/ACLibImportWizardForm.bas
index 2116f91..9622971 100644
--- a/source/forms/ACLibImportWizardForm.bas
+++ b/source/forms/ACLibImportWizardForm.bas
@@ -16,11 +16,11 @@ Begin Form
GridY =10
Width =10214
DatasheetFontHeight =11
- ItemSuffix =93
- Left =5355
- Top =3278
- Right =17190
- Bottom =10020
+ ItemSuffix =95
+ Left =4178
+ Top =3030
+ Right =16673
+ Bottom =12195
OnUnload ="[Event Procedure]"
RecSrcDt = Begin
0x212b6fd80e9ce340
@@ -367,7 +367,7 @@ Begin Form
Top =7456
Width =2205
Height =555
- TabIndex =20
+ TabIndex =19
Name ="cmdImportFiles"
Caption ="&Import files"
OnClick ="[Event Procedure]"
@@ -539,27 +539,6 @@ Begin Form
LayoutCachedWidth =6815
LayoutCachedHeight =7501
End
- Begin CommandButton
- Visible = NotDefault
- Enabled = NotDefault
- OverlapFlags =215
- Left =7042
- Top =6196
- Width =2925
- Height =555
- TabIndex =19
- Name ="Command25"
- Caption ="Show dependencies"
- Tag ="LANG:"
- HorizontalAnchor =1
- VerticalAnchor =1
-
- LayoutCachedLeft =7042
- LayoutCachedTop =6196
- LayoutCachedWidth =9967
- LayoutCachedHeight =6751
- Overlaps =1
- End
Begin Label
Visible = NotDefault
OverlapFlags =215
@@ -598,7 +577,7 @@ Begin Form
Name ="chkImportTests"
AfterUpdate ="[Event Procedure]"
DefaultValue ="False"
- ControlTipText ="Die Testklassen der importierten Code-Modulen ebenfalls importieren"
+ ControlTipText ="Import tests for imported code modules"
UnicodeAccessKey =116
HorizontalAnchor =1
VerticalAnchor =1
@@ -705,7 +684,7 @@ Begin Form
Top =7456
Width =555
Height =555
- TabIndex =21
+ TabIndex =20
Name ="cmdOpenMenu"
Caption ="..."
OnClick ="[Event Procedure]"
@@ -1100,6 +1079,42 @@ Begin Form
End
End
End
+ Begin CheckBox
+ OverlapFlags =215
+ AccessKey =69
+ Left =7043
+ Top =6015
+ TabIndex =21
+ Name ="chkExamples"
+ DefaultValue ="False"
+ ControlTipText ="Import example code modules"
+ UnicodeAccessKey =101
+ HorizontalAnchor =1
+ VerticalAnchor =1
+
+ LayoutCachedLeft =7043
+ LayoutCachedTop =6015
+ LayoutCachedWidth =7303
+ LayoutCachedHeight =6255
+ Begin
+ Begin Label
+ OverlapFlags =215
+ Left =7319
+ Top =5955
+ Width =2730
+ Height =315
+ Name ="Label94"
+ Caption ="incl. &examples"
+ Tag ="LANG:"
+ HorizontalAnchor =1
+ VerticalAnchor =1
+ LayoutCachedLeft =7319
+ LayoutCachedTop =5955
+ LayoutCachedWidth =10049
+ LayoutCachedHeight =6270
+ End
+ End
+ End
End
End
End
diff --git a/source/forms/ACLibImportWizardForm.cls b/source/forms/ACLibImportWizardForm.cls
index 72006c9..185a5b6 100644
--- a/source/forms/ACLibImportWizardForm.cls
+++ b/source/forms/ACLibImportWizardForm.cls
@@ -177,7 +177,7 @@ On Error GoTo HandleErr
Else '
Set m_ACLibFileManager = Nothing
End If
- ACLibFileMngr.ImportRepositoryFiles FileNameArray, Nz(Me.ogImportMode.Value, 0), Nz(Me.chkImportTests.Value, False)
+ ACLibFileMngr.ImportRepositoryFiles FileNameArray, Nz(Me.ogImportMode.Value, 0), Nz(Me.chkImportTests.Value, False), Nz(Me.chkExamples.Value, False)
Me.labInfo.Caption = L10n.Text("Files have been imported")
Me.Repaint
diff --git a/source/modules/ACLibFileManager.cls b/source/modules/ACLibFileManager.cls
index e9e750a..397ed5f 100644
--- a/source/modules/ACLibFileManager.cls
+++ b/source/modules/ACLibFileManager.cls
@@ -68,6 +68,8 @@ Private Const SEARCHSTRING_REF_GUID_BEGIN As String = ""
Private Const SEARCHSTRING_REF_GUID_END As String = ""
Private Const SEARCHSTRING_TEST_BEGIN As String = ""
Private Const SEARCHSTRING_TEST_END As String = ""
+Private Const SEARCHSTRING_EXAMPLE_BEGIN As String = ""
+Private Const SEARCHSTRING_EXAMPLE_END As String = ""
Private Const SEARCHSTRING_EXECUTE_BEGIN As String = ""
Private Const SEARCHSTRING_EXECUTE_END As String = ""
@@ -268,7 +270,8 @@ Public Sub ExportAllReports()
End Sub
Public Sub ImportAllFilesFromRepository(Optional ByVal ImportMode As CodeLibImportMode = clim_ImportMissingItems, _
- Optional ByVal ImportTestFiles As Boolean = False)
+ Optional ByVal ImportTestFiles As Boolean = False, _
+ Optional ByVal ImportExampleFiles As Boolean = False)
Dim FolderCol As Collection
#If EARLYBINDING Then
@@ -309,13 +312,14 @@ Public Sub ImportAllFilesFromRepository(Optional ByVal ImportMode As CodeLibImpo
Set TempFile = Nothing
Set FolderCol = Nothing
- ImportFilesFromImportCollection True, ImportTestFiles
+ ImportFilesFromImportCollection True, ImportTestFiles, ImportExampleFiles
End Sub
Public Sub ImportRepositoryFile(ByVal RepositoryPath As String, _
Optional ByVal ImportMode As CodeLibImportMode = clim_ImportMissingItems, _
- Optional ByVal ImportTestFiles As Boolean = False)
+ Optional ByVal ImportTestFiles As Boolean = False, _
+ Optional ByVal ImportExampleFiles As Boolean = False)
Dim PathString As String
@@ -326,13 +330,14 @@ Public Sub ImportRepositoryFile(ByVal RepositoryPath As String, _
AddMissingFile TempFile, ImportMode
Set TempFile = Nothing
- ImportFilesFromImportCollection True, ImportTestFiles
+ ImportFilesFromImportCollection True, ImportTestFiles, ImportExampleFiles
End Sub
Public Sub ImportRepositoryFiles(ByRef RepositoryPathArray() As String, _
Optional ByVal ImportMode As CodeLibImportMode = clim_ImportMissingItems, _
- Optional ByVal ImportTestFiles As Boolean = False)
+ Optional ByVal ImportTestFiles As Boolean = False, _
+ Optional ByVal ImportExampleFiles As Boolean = False)
Dim ArraySize As Long
Dim i As Long
@@ -349,13 +354,14 @@ Public Sub ImportRepositoryFiles(ByRef RepositoryPathArray() As String, _
Next
Set TempFile = Nothing
- ImportFilesFromImportCollection True, ImportTestFiles
+ ImportFilesFromImportCollection True, ImportTestFiles, ImportExampleFiles
End Sub
Private Sub ImportFilesFromImportCollection( _
Optional ByRef CompileAfterImport As Boolean = True, _
- Optional ByVal ImportTestFiles As Boolean = False)
+ Optional ByVal ImportTestFiles As Boolean = False, _
+ Optional ByVal ImportExampleFiles As Boolean = False)
Dim TempFile As Object
Dim FileImportMode As CodeLibImportMode
@@ -393,7 +399,7 @@ Private Sub ImportFilesFromImportCollection( _
AccessProgressBar.Init "Importiere " & TempFile & "...", 2, 1
AccessProgressBar.PerformStep
- ImportFile TempFile, FileImportMode, ImportTestFiles, DownloadBase
+ ImportFile TempFile, FileImportMode, ImportTestFiles, ImportExampleFiles, DownloadBase
AccessProgressBar.PerformStep
MaxCnt = m_ImportFileCollection.Count
@@ -764,7 +770,8 @@ Private Property Get GitHubTempRepositoryPath() As String
End Property
Private Sub ImportFile(ByRef ImportFile As Object, ByRef ImportMode As CodeLibImportMode, _
- Optional ByVal ImportTestFiles As Boolean = False, Optional ByVal DownloadBase As String)
+ Optional ByVal ImportTestFiles As Boolean = False, Optional ByRef ImportExampleFiles As Boolean = False, _
+ Optional ByVal DownloadBase As String)
Dim i As Long
Dim TempFile As Object
@@ -779,8 +786,6 @@ Private Sub ImportFile(ByRef ImportFile As Object, ByRef ImportMode As CodeLibIm
If Len(DownloadBase) > 0 Then
m_CLI.ForceRemoveIfExists = True
- Else
- Stop
End If
'Enable abort
@@ -843,6 +848,19 @@ Private Sub ImportFile(ByRef ImportFile As Object, ByRef ImportMode As CodeLibIm
End If
End If
+ 'possibly the examples
+ If ImportExampleFiles Then
+ If (0 / 1) + (Not Not m_CLI.ExampleFiles) Then
+ For i = 0 To UBound(m_CLI.ExampleFiles)
+ FilePath = GetRepositoryFullPath(m_CLI.ExampleFiles(i), DownloadBase)
+ If fso.FileExists(FilePath) Then
+ Set TempFile = fso.GetFile(FilePath)
+ AddMissingFile TempFile, ImportMode, DownloadBase
+ End If
+ Next
+ End If
+ End If
+
#If DEBUGMODE Then
Debug.Print ImportFile.Path; " --> "; m_CLI.Name
#End If
@@ -1347,7 +1365,8 @@ End Function
Private Sub GetCodeLibInfoFromFile(ByRef CodeLibInf As CodeLibInfo, ByVal InputFile As Object, _
Optional ByVal FindDependency As Boolean = True, _
- Optional ByVal FindTests As Boolean = True)
+ Optional ByVal FindTests As Boolean = True, _
+ Optional ByVal FindExamples As Boolean = True)
Dim Pos As Long
Dim CheckString As String
@@ -1436,6 +1455,7 @@ Private Sub GetCodeLibInfoFromFile(ByRef CodeLibInf As CodeLibInfo, ByVal InputF
If FindDependency Then GetCodeLibInfoDependency CodeLibInf, CheckString
GetCodeLibInfoReferences CodeLibInf, CheckString
If FindTests Then GetCodeLibInfoTests CodeLibInf, CheckString
+ If FindExamples Then GetCodeLibInfoExamples CodeLibInf, CheckString
GetCodeLibInfoDescription CodeLibInf, CheckString
GetCodeLibInfoExecuteList CodeLibInf, CheckString
End If
@@ -1497,6 +1517,16 @@ Private Sub GetCodeLibInfoTests(ByRef CodeLibInf As CodeLibInfo, ByRef SourceStr
End Sub
+Private Sub GetCodeLibInfoExamples(ByRef CodeLibInf As CodeLibInfo, ByRef SourceString As String)
+
+ Dim Examples() As String
+
+ If GetCodelibInfoTagStrings(SourceString, SEARCHSTRING_EXAMPLE_BEGIN, SEARCHSTRING_EXAMPLE_END, Examples) > 0 Then
+ CodeLibInf.ExampleFiles = Examples
+ End If
+
+End Sub
+
Private Function GetCodelibInfoTagStrings(ByRef SourceString As String, _
ByRef StartTag As String, ByRef EndTag As String, _
ByRef TagStrings() As String) As Long
@@ -1779,6 +1809,14 @@ Public Sub InsertCodeLibInfo(ByRef CodMod As Object, ByRef CodeLibInf As CodeLib
Next
End If
+ ' blocks
+ ClTagArray = CodeLibInf.ExampleFiles
+ If Not ((0 / 1) + (Not Not ClTagArray) = 0) Then
+ For i = LBound(ClTagArray) To UBound(ClTagArray)
+ CodeLibInfoText = CodeLibInfoText & "' " & ClTagArray(i) & "" & vbNewLine
+ Next
+ End If
+
' blocks
ExecuteList = CodeLibInf.ExecuteList
If Not ((0 / 1) + (Not Not ExecuteList) = 0) Then
diff --git a/source/modules/defGlobal_ACLibImportWizard.bas b/source/modules/defGlobal_ACLibImportWizard.bas
index 90264e7..72b0ef9 100644
--- a/source/modules/defGlobal_ACLibImportWizard.bas
+++ b/source/modules/defGlobal_ACLibImportWizard.bas
@@ -47,6 +47,7 @@ Public Type CodeLibInfo
Dependency() As String
References() As CodeLibInfoReference
TestFiles() As String
+ ExampleFiles() As String
ExecuteList() As String
LicenseFile As String
Description As String