Skip to content

Commit e820ef0

Browse files
committed
+ package tag
1 parent 636ac55 commit e820ef0

File tree

5 files changed

+21
-110
lines changed

5 files changed

+21
-110
lines changed

source/modules/GitHubTreeNodeTests.cls renamed to Tests/ACLibImportWizard/GitHubTreeNodeTests.cls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION 1.0 CLASS
1+
VERSION 1.0 CLASS
22
BEGIN
33
MultiUse = -1 'True
44
END

source/modules/ACLibFileManager.cls

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ Private Const SEARCHSTRING_CODELIB_BEGIN As String = "<codelib>"
4848
Private Const SEARCHSTRING_CODELIB_END As String = "</codelib>"
4949
Private Const SEARCHSTRING_FILE_BEGIN As String = "<file>"
5050
Private Const SEARCHSTRING_FILE_END As String = "</file>"
51+
Private Const SEARCHSTRING_PACKAGE_BEGIN As String = "<package>"
52+
Private Const SEARCHSTRING_PACKAGE_END As String = "</package>"
5153
Private Const SEARCHSTRING_LICENSE_BEGIN As String = "<license>"
5254
Private Const SEARCHSTRING_LICENSE_END As String = "</license>"
5355
Private Const SEARCHSTRING_DESCRIPTION_BEGIN As String = "<description>"
@@ -692,7 +694,7 @@ Public Function GetRepositoryFullPath(ByVal ReleativPath As String) As String
692694

693695
End Function
694696

695-
Private Function DownLoadFromGitHub(ByVal ReleativPath As String, ByRef RepPath As String) As Boolean
697+
Private Function DownLoadFromGitHub(ByRef ReleativPath As String, ByRef RepPath As String) As Boolean
696698
' %GITHUB%/owner/repo@branch/Path
697699

698700
Dim FullFilePath As String
@@ -789,6 +791,8 @@ Private Sub ImportFile(ByRef ImportFile As Object, ByRef ImportMode As CodeLibIm
789791
ImportAccessObject acForm, m_CLI, ImportFile, ImportMode
790792
Case CodeLibElementType.clet_Report
791793
ImportAccessObject acReport, m_CLI, ImportFile, ImportMode
794+
Case CodeLibElementType.clet_Package
795+
' don't import package file
792796
Case Else
793797
' eventuell Fehler auslösen?
794798
End Select
@@ -1388,8 +1392,11 @@ Private Sub GetCodeLibInfoFromFile(ByRef CodeLibInf As CodeLibInfo, ByVal InputF
13881392
'Read CODELIB block
13891393
CheckString = FindSubString(CheckString, SEARCHSTRING_CODELIB_BEGIN, SEARCHSTRING_CODELIB_END)
13901394
If Len(CheckString) > 0 Then
1391-
GetCodeLibInfoRepositoryFile CodeLibInf, CheckString
1392-
GetCodeLibInfoRepositoryFileReplacement CodeLibInf, CheckString
1395+
GetCodeLibInfoPackage CodeLibInf, CheckString
1396+
If CodeLibInf.Type <> clet_Package Then
1397+
GetCodeLibInfoRepositoryFile CodeLibInf, CheckString
1398+
GetCodeLibInfoRepositoryFileReplacement CodeLibInf, CheckString
1399+
End If
13931400
GetCodeLibInfoLicenseFile CodeLibInf, CheckString
13941401
If FindDependency Then GetCodeLibInfoDependency CodeLibInf, CheckString
13951402
GetCodeLibInfoReferences CodeLibInf, CheckString
@@ -1400,6 +1407,15 @@ Private Sub GetCodeLibInfoFromFile(ByRef CodeLibInf As CodeLibInfo, ByVal InputF
14001407

14011408
End Sub
14021409

1410+
Private Sub GetCodeLibInfoPackage(ByRef CodeLibInf As CodeLibInfo, ByRef SourceString As String)
1411+
Dim PackageName As String
1412+
PackageName = Trim(FindSubString(SourceString, SEARCHSTRING_PACKAGE_BEGIN, SEARCHSTRING_PACKAGE_END))
1413+
If Len(PackageName) > 0 Then
1414+
CodeLibInf.Name = PackageName
1415+
CodeLibInf.Type = clet_Package
1416+
End If
1417+
End Sub
1418+
14031419
Private Sub GetCodeLibInfoRepositoryFile(ByRef CodeLibInf As CodeLibInfo, ByRef SourceString As String)
14041420
CodeLibInf.RepositoryFile = Replace(FindSubString(SourceString, SEARCHSTRING_FILE_BEGIN, SEARCHSTRING_FILE_END), "\", "/")
14051421
End Sub

source/modules/AccUnit_Factory.bas

Lines changed: 0 additions & 98 deletions
This file was deleted.

source/modules/AccUnit_TestClassFactory.bas

Lines changed: 0 additions & 8 deletions
This file was deleted.

source/modules/defGlobal_ACLibImportWizard.bas

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Public Enum CodeLibElementType 'angelehnt an Enum vbext_ComponentType
2222
clet_ClassModule = 2 ' = vbext_ComponentType.vbext_ct_ClassModule
2323
clet_Form = 101 ' = vbext_ComponentType.vbext_ct_Document + 1
2424
clet_Report = 102 ' = vbext_ComponentType.vbext_ct_Document + 2
25+
clet_Package = 256 ' = Package (don't import file, only interpret codelib block)
2526
End Enum
2627

2728
Public Enum CodeLibImportMode

0 commit comments

Comments
 (0)