mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Add openDocuments property to OakDocumentController
This uses OakDocument’s isOpen property to know which documents are open. Currently not KVO compliant, but it probably should be.
This commit is contained in:
@@ -18,6 +18,7 @@ PUBLIC @interface OakDocumentController : NSObject
|
||||
- (OakDocument*)documentWithPath:(NSString*)aPath;
|
||||
- (OakDocument*)findDocumentWithIdentifier:(NSUUID*)anUUID;
|
||||
- (NSArray<OakDocument*>*)documents;
|
||||
- (NSArray<OakDocument*>*)openDocuments;
|
||||
|
||||
- (NSInteger)lruRankForDocument:(OakDocument*)aDocument;
|
||||
- (void)didTouchDocument:(OakDocument*)aDocument;
|
||||
|
||||
@@ -188,6 +188,11 @@ namespace
|
||||
return res;
|
||||
}
|
||||
|
||||
- (NSArray<OakDocument*>*)openDocuments
|
||||
{
|
||||
return [self.documents filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"isOpen == YES"]];
|
||||
}
|
||||
|
||||
// ======================
|
||||
// = Last Recently Used =
|
||||
// ======================
|
||||
|
||||
Reference in New Issue
Block a user