Skip to content

Commit 5c33d63

Browse files
committed
structure remaining classes/structs/enums docs
1 parent 39fc241 commit 5c33d63

File tree

22 files changed

+108
-49
lines changed

22 files changed

+108
-49
lines changed

CodeEdit.xcodeproj/project.pbxproj

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@
3737
2072FA18280D871200C7F8D4 /* TextEncoding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2072FA17280D871200C7F8D4 /* TextEncoding.swift */; };
3838
2072FA1A280D872600C7F8D4 /* LineEndings.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2072FA19280D872600C7F8D4 /* LineEndings.swift */; };
3939
2072FA1C280D874000C7F8D4 /* IndentUsing.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2072FA1B280D874000C7F8D4 /* IndentUsing.swift */; };
40-
2072FA1E280D891500C7F8D4 /* Location.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2072FA1D280D891500C7F8D4 /* Location.swift */; };
40+
2072FA1E280D891500C7F8D4 /* FileLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2072FA1D280D891500C7F8D4 /* FileLocation.swift */; };
4141
20D839AB280DEB2900B27357 /* NoSelectionInspectorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20D839AA280DEB2900B27357 /* NoSelectionInspectorView.swift */; };
42-
20D839AE280E0CA700B27357 /* PopoverView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20D839AD280E0CA700B27357 /* PopoverView.swift */; };
42+
20D839AE280E0CA700B27357 /* HistoryPopoverView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20D839AD280E0CA700B27357 /* HistoryPopoverView.swift */; };
4343
20EBB501280C325D00F3A5DA /* FileInspectorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20EBB500280C325D00F3A5DA /* FileInspectorView.swift */; };
4444
20EBB503280C327C00F3A5DA /* HistoryInspectorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20EBB502280C327C00F3A5DA /* HistoryInspectorView.swift */; };
4545
20EBB505280C329800F3A5DA /* HistoryInspectorItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20EBB504280C329800F3A5DA /* HistoryInspectorItemView.swift */; };
@@ -109,7 +109,7 @@
109109
5879821A292D92370085B254 /* SearchResultModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58798216292D92370085B254 /* SearchResultModel.swift */; };
110110
5879821B292D92370085B254 /* SearchResultMatchModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58798217292D92370085B254 /* SearchResultMatchModel.swift */; };
111111
58798233292E30B90085B254 /* FeedbackToolbar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5879822B292E30B90085B254 /* FeedbackToolbar.swift */; };
112-
58798234292E30B90085B254 /* IssueArea.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5879822D292E30B90085B254 /* IssueArea.swift */; };
112+
58798234292E30B90085B254 /* FeedbackIssueArea.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5879822D292E30B90085B254 /* FeedbackIssueArea.swift */; };
113113
58798235292E30B90085B254 /* FeedbackModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5879822E292E30B90085B254 /* FeedbackModel.swift */; };
114114
58798236292E30B90085B254 /* FeedbackType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5879822F292E30B90085B254 /* FeedbackType.swift */; };
115115
58798237292E30B90085B254 /* FeedbackView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58798230292E30B90085B254 /* FeedbackView.swift */; };
@@ -399,9 +399,9 @@
399399
2072FA17280D871200C7F8D4 /* TextEncoding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextEncoding.swift; sourceTree = "<group>"; };
400400
2072FA19280D872600C7F8D4 /* LineEndings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LineEndings.swift; sourceTree = "<group>"; };
401401
2072FA1B280D874000C7F8D4 /* IndentUsing.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IndentUsing.swift; sourceTree = "<group>"; };
402-
2072FA1D280D891500C7F8D4 /* Location.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Location.swift; sourceTree = "<group>"; };
402+
2072FA1D280D891500C7F8D4 /* FileLocation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileLocation.swift; sourceTree = "<group>"; };
403403
20D839AA280DEB2900B27357 /* NoSelectionInspectorView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoSelectionInspectorView.swift; sourceTree = "<group>"; };
404-
20D839AD280E0CA700B27357 /* PopoverView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PopoverView.swift; sourceTree = "<group>"; };
404+
20D839AD280E0CA700B27357 /* HistoryPopoverView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HistoryPopoverView.swift; sourceTree = "<group>"; };
405405
20EBB500280C325D00F3A5DA /* FileInspectorView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileInspectorView.swift; sourceTree = "<group>"; };
406406
20EBB502280C327C00F3A5DA /* HistoryInspectorView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HistoryInspectorView.swift; sourceTree = "<group>"; };
407407
20EBB504280C329800F3A5DA /* HistoryInspectorItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HistoryInspectorItemView.swift; sourceTree = "<group>"; };
@@ -472,7 +472,7 @@
472472
58798216292D92370085B254 /* SearchResultModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SearchResultModel.swift; sourceTree = "<group>"; };
473473
58798217292D92370085B254 /* SearchResultMatchModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SearchResultMatchModel.swift; sourceTree = "<group>"; };
474474
5879822B292E30B90085B254 /* FeedbackToolbar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FeedbackToolbar.swift; sourceTree = "<group>"; };
475-
5879822D292E30B90085B254 /* IssueArea.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IssueArea.swift; sourceTree = "<group>"; };
475+
5879822D292E30B90085B254 /* FeedbackIssueArea.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FeedbackIssueArea.swift; sourceTree = "<group>"; };
476476
5879822E292E30B90085B254 /* FeedbackModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FeedbackModel.swift; sourceTree = "<group>"; };
477477
5879822F292E30B90085B254 /* FeedbackType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FeedbackType.swift; sourceTree = "<group>"; };
478478
58798230292E30B90085B254 /* FeedbackView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FeedbackView.swift; sourceTree = "<group>"; };
@@ -808,7 +808,7 @@
808808
20D839AC280E0C9400B27357 /* Popover */ = {
809809
isa = PBXGroup;
810810
children = (
811-
20D839AD280E0CA700B27357 /* PopoverView.swift */,
811+
20D839AD280E0CA700B27357 /* HistoryPopoverView.swift */,
812812
);
813813
path = Popover;
814814
sourceTree = "<group>";
@@ -837,7 +837,7 @@
837837
2072FA17280D871200C7F8D4 /* TextEncoding.swift */,
838838
2072FA19280D872600C7F8D4 /* LineEndings.swift */,
839839
2072FA1B280D874000C7F8D4 /* IndentUsing.swift */,
840-
2072FA1D280D891500C7F8D4 /* Location.swift */,
840+
2072FA1D280D891500C7F8D4 /* FileLocation.swift */,
841841
);
842842
path = Models;
843843
sourceTree = "<group>";
@@ -1250,7 +1250,7 @@
12501250
5879822C292E30B90085B254 /* Model */ = {
12511251
isa = PBXGroup;
12521252
children = (
1253-
5879822D292E30B90085B254 /* IssueArea.swift */,
1253+
5879822D292E30B90085B254 /* FeedbackIssueArea.swift */,
12541254
5879822E292E30B90085B254 /* FeedbackModel.swift */,
12551255
5879822F292E30B90085B254 /* FeedbackType.swift */,
12561256
);
@@ -2525,7 +2525,7 @@
25252525
5878DAB1291D627C00DD95A3 /* BreadcrumbsComponent.swift in Sources */,
25262526
58822533292C280D00E83CDE /* StatusBarTabType.swift in Sources */,
25272527
587B9E6E29301D8F00AC7927 /* GitLabProject.swift in Sources */,
2528-
58798234292E30B90085B254 /* IssueArea.swift in Sources */,
2528+
58798234292E30B90085B254 /* FeedbackIssueArea.swift in Sources */,
25292529
587B9E5F29301D8F00AC7927 /* GitLabProjectRouter.swift in Sources */,
25302530
587B9E7329301D8F00AC7927 /* GitRouter.swift in Sources */,
25312531
0463E51327FCC1FB00806D5C /* CodeEditTargetsAPI.swift in Sources */,
@@ -2588,10 +2588,10 @@
25882588
DE6F77872813625500D00A76 /* TabBarDivider.swift in Sources */,
25892589
D7211D4327E066CE008F2ED7 /* Localized+Ex.swift in Sources */,
25902590
581BFB692926431000D251EC /* WelcomeActionView.swift in Sources */,
2591-
20D839AE280E0CA700B27357 /* PopoverView.swift in Sources */,
2591+
20D839AE280E0CA700B27357 /* HistoryPopoverView.swift in Sources */,
25922592
58F2EAFD292FB2B0004A9BDE /* GitHubLoginView.swift in Sources */,
25932593
587D9B782933BF5700BF7490 /* Interface.swift in Sources */,
2594-
2072FA1E280D891500C7F8D4 /* Location.swift in Sources */,
2594+
2072FA1E280D891500C7F8D4 /* FileLocation.swift in Sources */,
25952595
587B9E6729301D8F00AC7927 /* GitLabEventData.swift in Sources */,
25962596
5882252F292C280D00E83CDE /* StatusBarClearButton.swift in Sources */,
25972597
58F2EB04292FB2B0004A9BDE /* SourceControlPreferences.swift in Sources */,

CodeEdit/Features/AppPreferences/Model/Keybindings/KeybindingsPreferences.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ extension AppPreferences {
2727
appendNew()
2828

2929
let mgr = CommandManager.shared
30-
let wrap = ClosureWrapper.init(closure: {
30+
let wrap = CommandClosureWrapper.init(closure: {
3131
print("testing closure")
3232
})
3333
mgr.addCommand(name: "Send test to console",

CodeEdit/Features/Documents/Controllers/CodeEditWindowController.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ final class CodeEditWindowController: NSWindowController, NSToolbarDelegate {
4040
name: "Quick Open",
4141
title: "Quick Open",
4242
id: "quick_open",
43-
command: ClosureWrapper(closure: {
43+
command: CommandClosureWrapper(closure: {
4444
self.openQuickly(self)
4545
})
4646
)
@@ -49,7 +49,7 @@ final class CodeEditWindowController: NSWindowController, NSToolbarDelegate {
4949
name: "Toggle Left Sidebar",
5050
title: "Toggle Left Sidebar",
5151
id: "toggle_left_sidebar",
52-
command: ClosureWrapper(closure: {
52+
command: CommandClosureWrapper(closure: {
5353
self.toggleFirstPanel()
5454
})
5555
)
@@ -58,7 +58,7 @@ final class CodeEditWindowController: NSWindowController, NSToolbarDelegate {
5858
name: "Toggle Right Sidebar",
5959
title: "Toggle Right Sidebar",
6060
id: "toggle_right_sidebar",
61-
command: ClosureWrapper(closure: {
61+
command: CommandClosureWrapper(closure: {
6262
self.toggleLastPanel()
6363
})
6464
)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
//
2-
// IssueArea.swift
2+
// FeedbackIssueArea.swift
33
// CodeEditModules/Feedback
44
//
55
// Created by Nanashi Li on 2022/04/14.
66
//
77

88
import Foundation
99

10-
struct IssueArea: Identifiable, Hashable {
10+
struct FeedbackIssueArea: Identifiable, Hashable {
1111
let name: String
1212
let id: String
1313
}

CodeEdit/Features/Feedback/Model/FeedbackModel.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public class FeedbackModel: ObservableObject {
3131
@Published
3232
var whatHappenedDescription: String = ""
3333
@Published
34-
var issueAreaListSelection: IssueArea.ID = "none"
34+
var issueAreaListSelection: FeedbackIssueArea.ID = "none"
3535
@Published
3636
var feedbackTypeListSelection: FeedbackType.ID = "none"
3737

@@ -44,13 +44,13 @@ public class FeedbackModel: ObservableObject {
4444
FeedbackType(name: "Other", id: "other")]
4545

4646
@Published
47-
var issueAreaList = [IssueArea(name: "Please select the problem area", id: "none"),
48-
IssueArea(name: "Project Navigator", id: "projectNavigator"),
49-
IssueArea(name: "Extensions", id: "extensions"),
50-
IssueArea(name: "Git", id: "git"),
51-
IssueArea(name: "Debugger", id: "debugger"),
52-
IssueArea(name: "Editor", id: "editor"),
53-
IssueArea(name: "Other", id: "other")]
47+
var issueAreaList = [FeedbackIssueArea(name: "Please select the problem area", id: "none"),
48+
FeedbackIssueArea(name: "Project Navigator", id: "projectNavigator"),
49+
FeedbackIssueArea(name: "Extensions", id: "extensions"),
50+
FeedbackIssueArea(name: "Git", id: "git"),
51+
FeedbackIssueArea(name: "Debugger", id: "debugger"),
52+
FeedbackIssueArea(name: "Editor", id: "editor"),
53+
FeedbackIssueArea(name: "Other", id: "other")]
5454

5555
/// Gets the ID of the selected issue type and then
5656
/// cross references it to select the right Label based on the type

CodeEdit/Features/Git/Accounts/GitHub/GitHubConfiguration.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ struct GitHubTokenConfiguration: GitRouterConfiguration {
3434
}
3535
}
3636

37-
struct OAuthConfiguration: GitRouterConfiguration {
37+
struct GitHubOAuthConfiguration: GitRouterConfiguration {
3838
var apiEndpoint: String?
3939
var accessToken: String?
4040
let token: String
@@ -117,8 +117,8 @@ struct OAuthConfiguration: GitRouterConfiguration {
117117
}
118118

119119
enum GitHubOAuthRouter: GitRouter {
120-
case authorize(OAuthConfiguration)
121-
case accessToken(OAuthConfiguration, String)
120+
case authorize(GitHubOAuthConfiguration)
121+
case accessToken(GitHubOAuthConfiguration, String)
122122

123123
var configuration: GitRouterConfiguration? {
124124
switch self {

CodeEdit/Features/Git/Accounts/GitLab/GitLabConfiguration.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ struct GitLabTokenConfiguration: GitRouterConfiguration {
1919
}
2020
}
2121

22-
struct PrivateTokenConfiguration: GitRouterConfiguration {
22+
struct GitLabPrivateTokenConfiguration: GitRouterConfiguration {
2323
var apiEndpoint: String?
2424
var accessToken: String?
2525
let errorDomain: String? = "com.codeedit.models.accounts.gitlab"

CodeEdit/Features/InspectorSidebar/Models/FileInspectorModel.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public final class FileInspectorModel: ObservableObject {
2020
var fileName: String = ""
2121

2222
@Published
23-
var locationSelection: Location.ID = "relative_group"
23+
var locationSelection: FileLocation.ID = "relative_group"
2424
@Published
2525
var textEncodingSelection: TextEncoding.ID = "utf8"
2626
@Published
@@ -62,12 +62,12 @@ public final class FileInspectorModel: ObservableObject {
6262
var otherList = FileTypeList.init().otherList
6363

6464
@Published
65-
var locationList = [Location(name: "Absolute Path", id: "absolute"),
66-
Location(name: "Relative to Group", id: "relative_group"),
67-
Location(name: "Relative to Project", id: "relative_project"),
68-
Location(name: "Relative to Developer Directory", id: "relative_developer_dir"),
69-
Location(name: "Relative to Build Projects", id: "relative_build_projects"),
70-
Location(name: "Relative to SDK", id: "relative_sdk")]
65+
var locationList = [FileLocation(name: "Absolute Path", id: "absolute"),
66+
FileLocation(name: "Relative to Group", id: "relative_group"),
67+
FileLocation(name: "Relative to Project", id: "relative_project"),
68+
FileLocation(name: "Relative to Developer Directory", id: "relative_developer_dir"),
69+
FileLocation(name: "Relative to Build Projects", id: "relative_build_projects"),
70+
FileLocation(name: "Relative to SDK", id: "relative_sdk")]
7171

7272
@Published
7373
var textEncodingList = [TextEncoding(name: "Unicode (UTF-8)", id: "utf8"),

CodeEdit/Features/InspectorSidebar/Models/Location.swift renamed to CodeEdit/Features/InspectorSidebar/Models/FileLocation.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
//
2-
// Location.swift
2+
// FileLocation.swift
33
// CodeEdit
44
//
55
// Created by Nanashi Li on 2022/04/18.
66
//
77

88
import Foundation
99

10-
struct Location: Identifiable, Hashable {
10+
struct FileLocation: Identifiable, Hashable {
1111
let name: String
1212
let id: String
1313
}

CodeEdit/Features/InspectorSidebar/Views/HistoryInspectorItemView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ struct HistoryInspectorItemView: View {
6464
.padding(.horizontal, 10)
6565
.contentShape(Rectangle())
6666
.popover(isPresented: showPopup, arrowEdge: .leading) {
67-
PopoverView(commit: commit)
67+
HistoryPopoverView(commit: commit)
6868
}
6969
.contextMenu {
7070
Group {

0 commit comments

Comments
 (0)