New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improved File Handling System #1341
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
|
Wowzer |
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
| import AppKit | ||
| import SwiftUI | ||
|
|
||
| protocol Resource: AnyObject, Identifiable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering on whether the term Resource is too arbitrary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to suggest better names :) I chose this because it's used a lot throughout the codebase and is memorizable (compared to, for example, CEWorkspaceFile)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apple's docs also refer to filesystem items as resources
| func fileName(typeHidden: Bool) -> String | ||
| } | ||
|
|
||
| extension Resource { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these properties in an extension?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Protocols cannot have function (or property) implementations, only declarations. To add default implementations you need to use an extension
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this functionality even belong in this feature (as in the feature folder)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I placed them here for now, once the PR is ready for review these things will be resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this functionality even belong in this feature (as in the feature folder)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I placed them here for now, once the PR is ready for review these things will be resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class is becoming a bit of a mess. Inner enums, property and function definitions are all over the place. They should either be separated by functionality with the // MARK comment or it should be something like, enum definitions first, then normal properties, then calculated properties, then override functions, then normal functions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I placed them here for now, once the PR is ready for review these things will be resolved.
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com> # Conflicts: # CodeEdit/Features/InspectorSidebar/InspectorSidebarView.swift # CodeEdit/Features/NavigatorSidebar/OutlineView/FileSystemTableViewCell.swift # CodeEdit/Features/NavigatorSidebar/ProjectNavigator/OutlineView/ProjectNavigatorTableViewCell.swift # CodeEdit/Features/NavigatorSidebar/ProjectNavigator/OutlineView/ProjectNavigatorViewController+OutlineTableViewCellDelegate.swift
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com> # Conflicts: # CodeEdit/Features/Documents/Views/WorkspaceCodeFileView.swift # CodeEdit/Features/InspectorSidebar/Views/FileInspectorView.swift # CodeEdit/Features/NavigatorSidebar/ProjectNavigator/OutlineView/ProjectNavigatorViewController.swift
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
Signed-off-by: Wouter01 <wouterhennen@gmail.com>
|
What is the status of this PR? |
It's 80% done, but I currently don't have the time to resume working on it |
|
So close! That is okay, I totally understand. Do you have any idea when you might get the time in the future? Depending, it may be best to close this for the time being and reopen when that time comes. What do you think? |
Maybe in September, but I can't promise anything 😅. It's fine for me to close this PR for now, but it's probably best that a linked issue is created so the work doesn't get lost. Also, branches are removed from time to time, so I'm hoping this one doesn't get deleted. I have a local copy though |
|
In that case, we can keep this PR open. It may help to keep it updated from time to time though so you don't end up with major conflicts down the road. |
Description
Rewrite of the file handling system.
The current file handling system starts to get slow for larger projects. This is noticeable to the user by the slow startup times of codeedit, slower file moving in larger projects, etc. A new file handling system is added which is more performant. It also makes more use of the capabilities of NSDocument, simplyfying things.
Related Issues
Checklist
Screenshots