Revision: 29012 http://sourceforge.net/p/bibdesk/svn/29012 Author: hofman Date: 2025-02-17 15:10:43 +0000 (Mon, 17 Feb 2025) Log Message: ----------- add nullable qualifiers to BibDocument class
Modified Paths: -------------- trunk/bibdesk/BibDocument.h trunk/bibdesk/BibDocument_Actions.h trunk/bibdesk/BibDocument_DataSource.h trunk/bibdesk/BibDocument_Groups.h trunk/bibdesk/BibDocument_Menus.h trunk/bibdesk/BibDocument_Search.h trunk/bibdesk/BibDocument_Toolbar.h trunk/bibdesk/BibDocument_UI.h Modified: trunk/bibdesk/BibDocument.h =================================================================== --- trunk/bibdesk/BibDocument.h 2025-02-17 10:20:15 UTC (rev 29011) +++ trunk/bibdesk/BibDocument.h 2025-02-17 15:10:43 UTC (rev 29012) @@ -43,6 +43,8 @@ #import "BDSKUndoManager.h" #import "BDSKStringParser.h" +NS_ASSUME_NONNULL_BEGIN + @class BibItem, BibAuthor, BDSKGroup, BDSKStaticGroup, BDSKSmartGroup, BDSKTemplate, BDSKPublicationsArray, BDSKGroupsArray; @class AGRegex, BDSKMacroResolver; @class BDSKEditor, BDSKMacroWindowController, BDSKDocumentInfoWindowController, BDSKPreviewer, BDSKFileContentSearchController, BDSKCustomCiteDrawerController, BDSKSearchGroupViewController, BDSKSaveAccessoryViewController; @@ -305,39 +307,39 @@ NSString *uniqueID; } -@property (nonatomic, strong) IBOutlet NSWindow *documentWindow; -@property (nonatomic, strong) IBOutlet BDSKMainTableView *tableView; -@property (nonatomic, strong) IBOutlet NSScrollView *mainScrollView; -@property (nonatomic, strong) IBOutlet NSSplitView *splitView; -@property (nonatomic, strong) IBOutlet BDSKColoredView *mainBox; -@property (nonatomic, strong) IBOutlet NSView *mainView; -@property (nonatomic, strong) IBOutlet NSView *controlContentView; -@property (nonatomic, strong) IBOutlet NSLayoutConstraint *controlContentViewHeightConstraint; -@property (nonatomic, strong) IBOutlet BDSKStatusBar *statusBar; -@property (nonatomic, strong) IBOutlet BDSKGroupOutlineView *groupOutlineView; -@property (nonatomic, strong) IBOutlet NSSplitView *groupSplitView; -@property (nonatomic, strong) IBOutlet NSPopUpButton *groupActionButton; -@property (nonatomic, strong) IBOutlet NSPopUpButton *groupAddButton; -@property (nonatomic, strong) IBOutlet NSView *groupButtonView; -@property (nonatomic, strong) IBOutlet NSLayoutConstraint *groupButtonViewWidthConstraint; -@property (nonatomic, strong) IBOutlet NSMenu *groupFieldMenu; -@property (nonatomic, strong) IBOutlet NSTabView *sidePreviewTabView; -@property (nonatomic, strong) IBOutlet NSTextView *sidePreviewTextView; -@property (nonatomic, strong) IBOutlet FVFileView *sideFileView; -@property (nonatomic, strong) IBOutlet NSSegmentedControl *sidePreviewButton; -@property (nonatomic, strong) IBOutlet NSView *sidePreviewButtonView; -@property (nonatomic, strong) IBOutlet NSLayoutConstraint *sidePreviewButtonViewWidthConstraint; -@property (nonatomic, strong) IBOutlet NSTabView *bottomPreviewTabView; -@property (nonatomic, strong) IBOutlet NSTextView *bottomPreviewTextView; -@property (nonatomic, strong) IBOutlet FVFileView *bottomFileView; -@property (nonatomic, strong) IBOutlet NSSegmentedControl *bottomPreviewButton; -@property (nonatomic, strong) IBOutlet BDSKImagePopUpButton *actionMenuButton; -@property (nonatomic, strong) IBOutlet BDSKImagePopUpButton *groupActionMenuButton; -@property (nonatomic, strong) IBOutlet NSSearchField *searchField; -@property (nonatomic, strong) IBOutlet NSMenu *groupMenu; -@property (nonatomic, strong) IBOutlet NSMenu *actionMenu; -@property (nonatomic, strong) IBOutlet NSMenu *alternateCopyMenu; -@property (nonatomic, strong) IBOutlet NSMenu *sharingMenu; +@property (nonatomic, nullable, strong) IBOutlet NSWindow *documentWindow; +@property (nonatomic, nullable, strong) IBOutlet BDSKMainTableView *tableView; +@property (nonatomic, nullable, strong) IBOutlet NSScrollView *mainScrollView; +@property (nonatomic, nullable, strong) IBOutlet NSSplitView *splitView; +@property (nonatomic, nullable, strong) IBOutlet BDSKColoredView *mainBox; +@property (nonatomic, nullable, strong) IBOutlet NSView *mainView; +@property (nonatomic, nullable, strong) IBOutlet NSView *controlContentView; +@property (nonatomic, nullable, strong) IBOutlet NSLayoutConstraint *controlContentViewHeightConstraint; +@property (nonatomic, nullable, strong) IBOutlet BDSKStatusBar *statusBar; +@property (nonatomic, nullable, strong) IBOutlet BDSKGroupOutlineView *groupOutlineView; +@property (nonatomic, nullable, strong) IBOutlet NSSplitView *groupSplitView; +@property (nonatomic, nullable, strong) IBOutlet NSPopUpButton *groupActionButton; +@property (nonatomic, nullable, strong) IBOutlet NSPopUpButton *groupAddButton; +@property (nonatomic, nullable, strong) IBOutlet NSView *groupButtonView; +@property (nonatomic, nullable, strong) IBOutlet NSLayoutConstraint *groupButtonViewWidthConstraint; +@property (nonatomic, nullable, strong) IBOutlet NSMenu *groupFieldMenu; +@property (nonatomic, nullable, strong) IBOutlet NSTabView *sidePreviewTabView; +@property (nonatomic, nullable, strong) IBOutlet NSTextView *sidePreviewTextView; +@property (nonatomic, nullable, strong) IBOutlet FVFileView *sideFileView; +@property (nonatomic, nullable, strong) IBOutlet NSSegmentedControl *sidePreviewButton; +@property (nonatomic, nullable, strong) IBOutlet NSView *sidePreviewButtonView; +@property (nonatomic, nullable, strong) IBOutlet NSLayoutConstraint *sidePreviewButtonViewWidthConstraint; +@property (nonatomic, nullable, strong) IBOutlet NSTabView *bottomPreviewTabView; +@property (nonatomic, nullable, strong) IBOutlet NSTextView *bottomPreviewTextView; +@property (nonatomic, nullable, strong) IBOutlet FVFileView *bottomFileView; +@property (nonatomic, nullable, strong) IBOutlet NSSegmentedControl *bottomPreviewButton; +@property (nonatomic, nullable, strong) IBOutlet BDSKImagePopUpButton *actionMenuButton; +@property (nonatomic, nullable, strong) IBOutlet BDSKImagePopUpButton *groupActionMenuButton; +@property (nonatomic, nullable, strong) IBOutlet NSSearchField *searchField; +@property (nonatomic, nullable, strong) IBOutlet NSMenu *groupMenu; +@property (nonatomic, nullable, strong) IBOutlet NSMenu *actionMenu; +@property (nonatomic, nullable, strong) IBOutlet NSMenu *alternateCopyMenu; +@property (nonatomic, nullable, strong) IBOutlet NSMenu *sharingMenu; @property (nonatomic, readonly, getter=isMainDocument) BOOL mainDocument; @@ -345,7 +347,7 @@ - (BOOL)writeArchiveToURL:(NSURL *)fileURL error:(NSError **)outError; -- (NSData *)dataUsingTemplate:(BDSKTemplate *)template; +- (nullable NSData *)dataUsingTemplate:(BDSKTemplate *)template; - (NSFileWrapper *)fileWrapperUsingTemplate:(BDSKTemplate *)template; @property (nonatomic, readonly) NSData *atomData; @@ -352,12 +354,12 @@ @property (nonatomic, readonly) NSData *MODSData; @property (nonatomic, readonly) NSData *endNoteData; @property (nonatomic, readonly) NSData *wordXMLData; -- (NSData *)bibTeXDataDroppingInternal:(BOOL)drop relativeToPath:(NSString *)basePath error:(NSError **)outError; -- (NSData *)RISDataAndReturnError:(NSError **)error; -- (NSData *)referDataAndReturnError:(NSError **)error; -- (NSData *)LTBDataAndReturnError:(NSError **)error; +- (nullable NSData *)bibTeXDataDroppingInternal:(BOOL)drop relativeToPath:(NSString *)basePath error:(NSError **)outError; +- (nullable NSData *)RISDataAndReturnError:(NSError **)error; +- (nullable NSData *)referDataAndReturnError:(NSError **)error; +- (nullable NSData *)LTBDataAndReturnError:(NSError **)error; -- (BOOL)readFromBibTeXData:(NSData *)data string:(NSString *)string fromURL:(NSURL *)absoluteURL encoding:(NSStringEncoding)encoding error:(NSError **)outError; +- (BOOL)readFromBibTeXData:(NSData *)data string:(nullable NSString *)string fromURL:(NSURL *)absoluteURL encoding:(NSStringEncoding)encoding error:(NSError **)outError; - (void)reportTemporaryCiteKeysForNewDocument:(BOOL)isNewFile; - (void)markAsImported; @@ -382,14 +384,14 @@ @property (nonatomic, readonly) BDSKGroupsArray *groups; @property (nonatomic, copy) NSMapTable *documentInfo; -- (NSString *)documentInfoForKey:(NSString *)key; +- (nullable NSString *)documentInfoForKey:(NSString *)key; - (void)setDocumentInfo:(NSString *)value forKey:(NSString *)key; - (id)valueForUndefinedKey:(NSString *)key; - (NSString *)documentInfoString; -@property (nonatomic, readonly) BDSKMacroResolver *macroResolver; +@property (nonatomic, nullable, readonly) BDSKMacroResolver *macroResolver; -- (void)importPublications:(NSArray *)newPubs publicationsToAutoFile:(NSArray *)pubsToAutoFile options:(BDSKImportOptions)options; +- (void)importPublications:(NSArray *)newPubs publicationsToAutoFile:(nullable NSArray *)pubsToAutoFile options:(BDSKImportOptions)options; - (void)importPublications:(NSArray *)newPubs options:(BDSKImportOptions)options; - (NSArray *)importPublicationsFromPasteboard:(NSPasteboard *)pb options:(BDSKImportOptions)options; - (NSArray *)extractPublicationsFromFileURL:(NSURL *)fileURL verbose:(BOOL)verbose error:(NSError **)outError; @@ -404,30 +406,30 @@ - (id)objectForSetupKey:(NSString *)key; - (double)doubleForSetupKey:(NSString *)key defaultValue:(double)defaultValue; - (NSStringEncoding)stringEncodingForSetupKey:(NSString *)key defaultValue:(NSStringEncoding)defaultValue; -- (id)objectForSetupKey:(NSString *)key defaultValue:(id)defaultValue; +- (id)objectForSetupKey:(NSString *)key defaultValue:(nullable id)defaultValue; -- (void)sortPubsByKey:(NSString *)key; +- (void)sortPubsByKey:(nullable NSString *)key; @property (nonatomic, readonly) NSInteger numberOfSelectedPubs; @property (nonatomic, readonly) NSInteger numberOfClickedOrSelectedPubs; -@property (nonatomic, readonly) NSArray *selectedPublications; -@property (nonatomic, readonly) NSArray *clickedOrSelectedPublications; +@property (nonatomic, nullable, readonly) NSArray *selectedPublications; +@property (nonatomic, nullable, readonly) NSArray *clickedOrSelectedPublications; -@property (nonatomic, readonly) BibItem *singleSelectedPublication; +@property (nonatomic, nullable, readonly) BibItem *singleSelectedPublication; - (BOOL)selectItemsForCiteKeys:(NSArray *)citeKeys selectLibrary:(BOOL)flag; - (BOOL)selectItemForPartialItem:(NSDictionary *)partialItem; - (void)selectPublication:(BibItem *)bib; -- (void)selectPublications:(NSArray *)bibArray; +- (void)selectPublications:(nullable NSArray *)bibArray; -@property (nonatomic, readonly) NSArray *selectedFileURLs; -@property (nonatomic, readonly) NSArray *clickedOrSelectedFileURLs; -@property (nonatomic, readonly) NSArray *selectedRemoteURLs; -@property (nonatomic, readonly) NSArray *clickedOrSelectedRemoteURLs; -- (NSArray *)selectedURLsForField:(NSString *)field; -- (NSArray *)clickedOrSelectedURLsForField:(NSString *)field; +@property (nonatomic, nullable, readonly) NSArray *selectedFileURLs; +@property (nonatomic, nullable, readonly) NSArray *clickedOrSelectedFileURLs; +@property (nonatomic, nullable, readonly) NSArray *selectedRemoteURLs; +@property (nonatomic, nullable, readonly) NSArray *clickedOrSelectedRemoteURLs; +- (nullable NSArray *)selectedURLsForField:(NSString *)field; +- (nullable NSArray *)clickedOrSelectedURLsForField:(NSString *)field; @property (nonatomic) NSStringEncoding documentStringEncoding; @@ -439,13 +441,15 @@ - (void)userAddedURL:(NSURL *)aURL forPublication:(BibItem *)pub; - (void)userRemovedURL:(NSURL *)aURL forPublication:(BibItem *)pub; -- (void)runScriptHookWithName:(NSString *)name forPublications:(NSArray *)items; -- (void)runScriptHookWithName:(NSString *)name forPublications:(NSArray *)items field:(NSString *)field oldValues:(NSArray *)oldValues newValues:(NSArray *)newValues; -- (void)runScriptHookWithName:(NSString *)name forPublications:(NSArray *)items completionHandler:(void (^)(BOOL cancelled))handler; -- (void)runScriptHookWithName:(NSString *)name forPublications:(NSArray *)items field:(NSString *)field oldValues:(NSArray *)oldValues newValues:(NSArray *)newValues completionHandler:(void (^)(BOOL cancelled))handler; +- (void)runScriptHookWithName:(NSString *)name forPublications:(nullable NSArray *)items; +- (void)runScriptHookWithName:(NSString *)name forPublications:(nullable NSArray *)items field:(nullable NSString *)field oldValues:(nullable NSArray *)oldValues newValues:(nullable NSArray *)newValues; +- (void)runScriptHookWithName:(NSString *)name forPublications:(nullable NSArray *)items completionHandler:(void (^ _Nullable)(BOOL cancelled))handler; +- (void)runScriptHookWithName:(NSString *)name forPublications:(nullable NSArray *)items field:(nullable NSString *)field oldValues:(nullable NSArray *)oldValues newValues:(nullable NSArray *)newValues completionHandler:(void (^ _Nullable)(BOOL cancelled))handler; -@property (nonatomic, readonly) NSArray *sharingServices; +@property (nonatomic, nullable, readonly) NSArray *sharingServices; @property (nonatomic, readonly) NSDate *openDate; @end + +NS_ASSUME_NONNULL_END Modified: trunk/bibdesk/BibDocument_Actions.h =================================================================== --- trunk/bibdesk/BibDocument_Actions.h 2025-02-17 10:20:15 UTC (rev 29011) +++ trunk/bibdesk/BibDocument_Actions.h 2025-02-17 15:10:43 UTC (rev 29012) @@ -39,6 +39,7 @@ #import <Cocoa/Cocoa.h> #import "BibDocument.h" +NS_ASSUME_NONNULL_BEGIN @interface BibDocument (Actions) @@ -46,7 +47,7 @@ - (void)addNewPubAndEdit:(BibItem *)item; - (void)createNewPubUsingCrossrefForItem:(BibItem *)item; -- (IBAction)createNewPubUsingCrossrefAction:(id)sender; +- (IBAction)createNewPubUsingCrossrefAction:(nullable id)sender; /*! @method newPub: @@ -54,15 +55,15 @@ @discussion This is the action method for the 'new' button. It calls [self createNewBlankPubAndEdit:YES] @param sender The sending object (not used, we assume it's the 'new' button.) */ -- (IBAction)newPub:(id)sender; // new pub button pressed. +- (IBAction)newPub:(nullable id)sender; // new pub button pressed. - (void)deletePublications:(NSArray *)pubs; -- (IBAction)deleteSelectedPubs:(id)sender; +- (IBAction)deleteSelectedPubs:(nullable id)sender; - (void)removePublicationsFromSelectedGroups:(NSArray *)pubs; -- (IBAction)removeSelectedPubs:(id)sender; +- (IBAction)removeSelectedPubs:(nullable id)sender; /*! @method copyAsAction: @@ -70,9 +71,9 @@ @discussion puts the format for the currently selected publications onto the general pasteboard. @param sender The sender. */ -- (IBAction)copyAsAction:(id)sender; +- (IBAction)copyAsAction:(nullable id)sender; -- (BDSKEditor *)editorForPublication:(BibItem *)pub create:(BOOL)createNew; +- (nullable BDSKEditor *)editorForPublication:(BibItem *)pub create:(BOOL)createNew; /*! @method editPubCmd @@ -80,11 +81,11 @@ @discussion - @param sender Not Used! */ -- (IBAction)editPubCmd:(id)sender; +- (IBAction)editPubCmd:(nullable id)sender; - (void)editPublications:(NSArray *)pubs; -- (void)editPub:(BibItem *)pub forField:(NSString *)field; +- (void)editPub:(BibItem *)pub forField:(nullable NSString *)field; - (void)editPub:(BibItem *)pub; /*! @@ -93,9 +94,9 @@ @discussion - @param sender The sender. Not used. */ -- (void)editAction:(id)sender; +- (void)editAction:(nullable id)sender; -- (void)editRepresentedPub:(id)sender; +- (void)editRepresentedPub:(nullable id)sender; /*! @method editPubOrOpenURLAction: @@ -103,9 +104,9 @@ @discussion This is the tableview's doubleaction and the action of the edit pub button. It calls editPub with the tableview's selected publication. @param sender The sender. Not used. */ -- (void)editPubOrOpenURLAction:(id)sender; +- (void)editPubOrOpenURLAction:(nullable id)sender; -- (IBAction)pasteAndMerge:(id)sender; +- (IBAction)pasteAndMerge:(nullable id)sender; /*! @method showPerson: @@ -115,43 +116,43 @@ */ - (void)showPerson:(BibAuthor *)person; -- (IBAction)share:(id)sender; -- (IBAction)emailPubCmd:(id)sender; -- (IBAction)sendToLyX:(id)sender; -- (IBAction)postItemToWeblog:(id)sender; +- (IBAction)share:(nullable id)sender; +- (IBAction)emailPubCmd:(nullable id)sender; +- (IBAction)sendToLyX:(nullable id)sender; +- (IBAction)postItemToWeblog:(nullable id)sender; - (void)printPublications:(NSArray *)pubs; -- (IBAction)printSelection:(id)sender; +- (IBAction)printSelection:(nullable id)sender; -- (void)changeColorLabel:(id)sender; +- (void)changeColorLabel:(nullable id)sender; -- (IBAction)changeFlag:(id)sender; +- (IBAction)changeFlag:(nullable id)sender; -- (IBAction)openParentItem:(id)sender; +- (IBAction)openParentItem:(nullable id)sender; #pragma mark URL actions -- (IBAction)trashLinkedFile:(id)sender; -- (IBAction)chooseLinkedFile:(id)sender; -- (IBAction)chooseLinkedURL:(id)sender; +- (IBAction)trashLinkedFile:(nullable id)sender; +- (IBAction)chooseLinkedFile:(nullable id)sender; +- (IBAction)chooseLinkedURL:(nullable id)sender; #pragma mark | Linked File and URL actions -- (IBAction)openLinkedFile:(id)sender; +- (IBAction)openLinkedFile:(nullable id)sender; -- (IBAction)revealLinkedFile:(id)sender; +- (IBAction)revealLinkedFile:(nullable id)sender; -- (IBAction)openLinkedURL:(id)sender; +- (IBAction)openLinkedURL:(nullable id)sender; -- (IBAction)showNotesForLinkedFile:(id)sender; +- (IBAction)showNotesForLinkedFile:(nullable id)sender; -- (IBAction)copyNotesForLinkedFile:(id)sender; +- (IBAction)copyNotesForLinkedFile:(nullable id)sender; -- (IBAction)previewAction:(id)sender; +- (IBAction)previewAction:(nullable id)sender; -- (IBAction)migrateFiles:(id)sender; +- (IBAction)migrateFiles:(nullable id)sender; -- (IBAction)downloadRemoteURL:(id)sender; +- (IBAction)downloadRemoteURL:(nullable id)sender; #pragma mark View Actions @@ -161,7 +162,7 @@ @discussion - @param sender The sender. Not used. */ -- (IBAction)selectAllPublications:(id)sender; +- (IBAction)selectAllPublications:(nullable id)sender; /*! @method deselectAllPublications: @@ -169,63 +170,65 @@ @discussion - @param sender The sender. Not used. */ -- (IBAction)deselectAllPublications:(id)sender; +- (IBAction)deselectAllPublications:(nullable id)sender; -- (IBAction)toggleGroups:(id)sender; -- (IBAction)toggleSideBar:(id)sender; +- (IBAction)toggleGroups:(nullable id)sender; +- (IBAction)toggleSideBar:(nullable id)sender; -- (IBAction)toggleStatusBar:(id)sender; +- (IBAction)toggleStatusBar:(nullable id)sender; -- (IBAction)changeMainTableFont:(id)sender; -- (IBAction)changeGroupTableFont:(id)sender; +- (IBAction)changeMainTableFont:(nullable id)sender; +- (IBAction)changeGroupTableFont:(nullable id)sender; -- (IBAction)changePreviewDisplay:(id)sender; -- (IBAction)changeSidePreviewDisplay:(id)sender; +- (IBAction)changePreviewDisplay:(nullable id)sender; +- (IBAction)changeSidePreviewDisplay:(nullable id)sender; #pragma mark Showing related info windows -- (IBAction)toggleShowingCustomCitations:(id)sender; +- (IBAction)toggleShowingCustomCitations:(nullable id)sender; -- (IBAction)showDocumentInfoWindow:(id)sender; +- (IBAction)showDocumentInfoWindow:(nullable id)sender; -- (IBAction)showMacrosWindow:(id)sender; +- (IBAction)showMacrosWindow:(nullable id)sender; #pragma mark Sharing Actions -- (IBAction)refreshSharing:(id)sender; -- (IBAction)refreshSharedBrowsing:(id)sender; +- (IBAction)refreshSharing:(nullable id)sender; +- (IBAction)refreshSharedBrowsing:(nullable id)sender; #pragma mark Text import sheet support -- (IBAction)importFromPasteboardAction:(id)sender; -- (IBAction)importFromFileAction:(id)sender; -- (IBAction)importFromWebAction:(id)sender; +- (IBAction)importFromPasteboardAction:(nullable id)sender; +- (IBAction)importFromFileAction:(nullable id)sender; +- (IBAction)importFromWebAction:(nullable id)sender; #pragma mark AutoFile stuff -- (IBAction)consolidateLinkedFiles:(id)sender; +- (IBAction)consolidateLinkedFiles:(nullable id)sender; #pragma mark Cite Keys and Crossref support - (void)generateCiteKeysForPublications:(NSArray *)pubs; -- (IBAction)generateCiteKey:(id)sender; +- (IBAction)generateCiteKey:(nullable id)sender; -- (IBAction)sortForCrossrefs:(id)sender; +- (IBAction)sortForCrossrefs:(nullable id)sender; - (void)performSortForCrossrefs; - (void)selectCrossrefParentForItem:(BibItem *)item; -- (IBAction)selectCrossrefParentAction:(id)sender; +- (IBAction)selectCrossrefParentAction:(nullable id)sender; -- (IBAction)selectCrossrefs:(id)sender; +- (IBAction)selectCrossrefs:(nullable id)sender; -- (IBAction)duplicateTitleToBooktitle:(id)sender; +- (IBAction)duplicateTitleToBooktitle:(nullable id)sender; #pragma mark Duplicate and Incomplete searching -- (IBAction)selectPossibleDuplicates:(id)sender; -- (IBAction)selectDuplicates:(id)sender; -- (IBAction)selectIncompletePublications:(id)sender; -- (IBAction)selectPublicationsFromAuxFile:(id)sender; +- (IBAction)selectPossibleDuplicates:(nullable id)sender; +- (IBAction)selectDuplicates:(nullable id)sender; +- (IBAction)selectIncompletePublications:(nullable id)sender; +- (IBAction)selectPublicationsFromAuxFile:(nullable id)sender; @end + +NS_ASSUME_NONNULL_END Modified: trunk/bibdesk/BibDocument_DataSource.h =================================================================== --- trunk/bibdesk/BibDocument_DataSource.h 2025-02-17 10:20:15 UTC (rev 29011) +++ trunk/bibdesk/BibDocument_DataSource.h 2025-02-17 15:10:43 UTC (rev 29012) @@ -40,6 +40,8 @@ #import "BDSKItemPasteboardHelper.h" #import <FileView/FileView.h> +NS_ASSUME_NONNULL_BEGIN + /*! @category BibDocument(DataSource) @discussion Additions to BibDocument for handling table views. */ @@ -46,8 +48,8 @@ @interface BibDocument (DataSource) <BDSKMainTableViewDelegate, BDSKMainTableViewDataSource, BDSKGroupOutlineViewDelegate, NSOutlineViewDataSource, FVFileViewDelegate, FVFileViewDataSource, BDSKItemPasteboardHelperDelegate> - (BOOL)writePublications:(NSArray*)pubs forDragCopyType:(BDSKDragCopyType)dragCopyType toPasteboard:(NSPasteboard*)pboard; -- (BOOL)writePublications:(NSArray*)pubs forDragCopyType:(BDSKDragCopyType)dragCopyType citeString:(NSString *)citeString toPasteboard:(NSPasteboard*)pboard; -- (NSImage *)dragImageForPromisedItemsUsingCiteString:(NSString *)citeString; +- (BOOL)writePublications:(NSArray*)pubs forDragCopyType:(BDSKDragCopyType)dragCopyType citeString:(nullable NSString *)citeString toPasteboard:(NSPasteboard*)pboard; +- (NSImage *)dragImageForPromisedItemsUsingCiteString:(nullable NSString *)citeString; @property (nonatomic, readonly) NSDictionary *currentTableColumnWidthsAndIdentifiers; @property (nonatomic, getter=isDragFromExternalGroups) BOOL dragFromExternalGroups; @@ -59,3 +61,6 @@ - (void)updateView:(NSTableCellView *)view forField:(NSString *)field ofItem:(BibItem *)pub; @end + +NS_ASSUME_NONNULL_END + Modified: trunk/bibdesk/BibDocument_Groups.h =================================================================== --- trunk/bibdesk/BibDocument_Groups.h 2025-02-17 10:20:15 UTC (rev 29011) +++ trunk/bibdesk/BibDocument_Groups.h 2025-02-17 15:10:43 UTC (rev 29012) @@ -39,6 +39,8 @@ #import "BibDocument.h" #import "BDSKGroup.h" +NS_ASSUME_NONNULL_BEGIN + @class BDSKSmartGroup, BDSKStaticGroup, BDSKCategoryGroup, BDSKExternalGroup, BDSKURLGroup, BDSKScriptGroup, BDSKWebGroup, BDSKParentGroup, BDSKCategoryParentGroup, BDSKFilterController, BDSKURLGroupSheetController, BDSKScriptGroupSheetController, BDSKGroupCellView; @interface BibDocument (Groups) @@ -62,11 +64,11 @@ - (BOOL)removePublications:(NSArray *)pubs fromGroups:(NSArray *)groupArray; - (BOOL)movePublications:(NSArray *)pubs fromGroup:(BDSKCategoryGroup *)group toGroup:(BDSKCategoryGroup *)newGroup; -- (IBAction)toggleGroupFieldAction:(id)sender; -- (IBAction)changeGroupFieldAction:(id)sender; -- (IBAction)addGroupFieldAction:(id)sender; -- (IBAction)removeGroupFieldAction:(id)sender; -- (IBAction)removeCategoryParentAction:(id)sender; +- (IBAction)toggleGroupFieldAction:(nullable id)sender; +- (IBAction)changeGroupFieldAction:(nullable id)sender; +- (IBAction)addGroupFieldAction:(nullable id)sender; +- (IBAction)removeGroupFieldAction:(nullable id)sender; +- (IBAction)removeCategoryParentAction:(nullable id)sender; - (void)showWebGroupView; - (void)hideWebGroupView; @@ -76,63 +78,65 @@ - (void)handleGroupNameChangedNotification:(NSNotification *)notification; - (void)handleStaticGroupChangedNotification:(NSNotification *)notification; -- (void)handleSharedGroupsChangedNotification:(NSNotification *)notification; -- (void)handleGroupTableSelectionChangedNotification:(NSNotification *)notification; +- (void)handleSharedGroupsChangedNotification:(nullable NSNotification *)notification; +- (void)handleGroupTableSelectionChangedNotification:(nullable NSNotification *)notification; - (void)handleExternalGroupUpdatedNotification:(NSNotification *)notification; - (void)willRemoveGroups:(NSArray *)groupsToRemove; -- (void)reloadParentGroup:(BDSKParentGroup *)parentGroup withSelection:(NSArray *)selectedGroups; +- (void)reloadParentGroup:(nullable BDSKParentGroup *)parentGroup withSelection:(NSArray *)selectedGroups; -- (BDSKGroupCellView *)viewForGroup:(BDSKGroup *)group; -- (void)updateCountBubbleForGroup:(BDSKGroup *)group inView:(BDSKGroupCellView *)view; +- (nullable BDSKGroupCellView *)viewForGroup:(BDSKGroup *)group; +- (void)updateCountBubbleForGroup:(BDSKGroup *)group inView:(nullable BDSKGroupCellView *)view; - (void)removeSpinnerFromView:(BDSKGroupCellView *)view; - (BOOL)isGroupHighlighted:(BDSKGroup *)group forSelection:(NSArray *)selPubs; - (void)updateGroupHighlights; -- (IBAction)sortGroupsByGroup:(id)sender; -- (IBAction)sortGroupsByCount:(id)sender; +- (IBAction)sortGroupsByGroup:(nullable id)sender; +- (IBAction)sortGroupsByCount:(nullable id)sender; -- (IBAction)addSmartGroupAction:(id)sender; -- (IBAction)addStaticGroupAction:(id)sender; -- (IBAction)addURLGroupAction:(id)sender; -- (IBAction)addScriptGroupAction:(id)sender; -- (IBAction)addWebGroupAction:(id)sender; -- (IBAction)addSearchGroupAction:(id)sender; -- (IBAction)newSearchGroupFromBookmark:(id)sender; -- (IBAction)addSearchBookmark:(id)sender; +- (IBAction)addSmartGroupAction:(nullable id)sender; +- (IBAction)addStaticGroupAction:(nullable id)sender; +- (IBAction)addURLGroupAction:(nullable id)sender; +- (IBAction)addScriptGroupAction:(nullable id)sender; +- (IBAction)addWebGroupAction:(nullable id)sender; +- (IBAction)addSearchGroupAction:(nullable id)sender; +- (IBAction)newSearchGroupFromBookmark:(nullable id)sender; +- (IBAction)addSearchBookmark:(nullable id)sender; - (void)removeGroups:(NSArray *)theGroups; -- (IBAction)removeSelectedGroups:(id)sender; +- (IBAction)removeSelectedGroups:(nullable id)sender; - (void)editGroup:(BDSKGroup *)group; -- (IBAction)editGroupDoubleClickAction:(id)sender; -- (IBAction)editGroupAction:(id)sender; -- (IBAction)renameGroupAction:(id)sender; -- (IBAction)copyGroupURLAction:(id)sender; -- (IBAction)selectLibraryGroup:(id)sender; -- (IBAction)changeIntersectGroupsAction:(id)sender; -- (IBAction)editNewStaticGroupWithSelection:(id)sender; +- (IBAction)editGroupDoubleClickAction:(nullable id)sender; +- (IBAction)editGroupAction:(nullable id)sender; +- (IBAction)renameGroupAction:(nullable id)sender; +- (IBAction)copyGroupURLAction:(nullable id)sender; +- (IBAction)selectLibraryGroup:(nullable id)sender; +- (IBAction)changeIntersectGroupsAction:(nullable id)sender; +- (IBAction)editNewStaticGroupWithSelection:(nullable id)sender; - (IBAction)editNewCategoryGroupWithSelection:(id)sender; -- (IBAction)mergeInExternalGroup:(id)sender; -- (IBAction)mergeInExternalPublications:(id)sender; +- (IBAction)mergeInExternalGroup:(nullable id)sender; +- (IBAction)mergeInExternalPublications:(nullable id)sender; - (NSArray *)mergeInPublications:(NSArray *)items; -- (IBAction)refreshAllExternalGroups:(id)sender; -- (IBAction)refreshSelectedGroups:(id)sender; -- (IBAction)openBookmark:(id)sender; -- (IBAction)addBookmark:(id)sender; +- (IBAction)refreshAllExternalGroups:(nullable id)sender; +- (IBAction)refreshSelectedGroups:(nullable id)sender; +- (IBAction)openBookmark:(nullable id)sender; +- (IBAction)addBookmark:(nullable id)sender; -- (IBAction)changeGroupName:(id)sender; +- (IBAction)changeGroupName:(nullable id)sender; - (void)handleFilterChangedNotification:(NSNotification *)notification; @property (nonatomic, readonly) NSArray *groupSortDescriptors; -- (void)sortGroupsByKey:(NSString *)key; +- (void)sortGroupsByKey:(nullable NSString *)key; - (BOOL)resortParentGroup:(BDSKParentGroup *)parentGroup; -- (IBAction)importItem:(id)sender; +- (IBAction)importItem:(nullable id)sender; -- (void)setImported:(BOOL)flag forPublications:(NSArray *)pubs inGroup:(BDSKExternalGroup *)aGroup; +- (void)setImported:(BOOL)flag forPublications:(NSArray *)pubs inGroup:(nullable BDSKExternalGroup *)aGroup; - (BOOL)openURL:(NSURL *)url; @end + +NS_ASSUME_NONNULL_END Modified: trunk/bibdesk/BibDocument_Menus.h =================================================================== --- trunk/bibdesk/BibDocument_Menus.h 2025-02-17 10:20:15 UTC (rev 29011) +++ trunk/bibdesk/BibDocument_Menus.h 2025-02-17 15:10:43 UTC (rev 29012) @@ -37,6 +37,9 @@ #import "BibDocument.h" +NS_ASSUME_NONNULL_BEGIN @interface BibDocument (Menus) @end + +NS_ASSUME_NONNULL_END Modified: trunk/bibdesk/BibDocument_Search.h =================================================================== --- trunk/bibdesk/BibDocument_Search.h 2025-02-17 10:20:15 UTC (rev 29011) +++ trunk/bibdesk/BibDocument_Search.h 2025-02-17 15:10:43 UTC (rev 29012) @@ -41,13 +41,14 @@ #import "BDSKDocumentSearch.h" #import "BDSKNotesSearchIndex.h" +NS_ASSUME_NONNULL_BEGIN @interface BibDocument (Search) <BDSKFileContentSearchControllerDelegate, BDSKDocumentSearchDelegate, BDSKNotesSearchIndexDelegate> @property (nonatomic, strong) NSString *searchString; -- (IBAction)changeSearchType:(id)sender; -- (IBAction)search:(id)sender; +- (IBAction)changeSearchType:(nullable id)sender; +- (IBAction)search:(nullable id)sender; - (BOOL)addFileSearchItems; - (void)removeFileSearchItems; @@ -57,6 +58,8 @@ #pragma mark Find panel -@property (nonatomic, readonly) NSString *selectedStringForFind; +@property (nonatomic, nullable, readonly) NSString *selectedStringForFind; @end + +NS_ASSUME_NONNULL_END Modified: trunk/bibdesk/BibDocument_Toolbar.h =================================================================== --- trunk/bibdesk/BibDocument_Toolbar.h 2025-02-17 10:20:15 UTC (rev 29011) +++ trunk/bibdesk/BibDocument_Toolbar.h 2025-02-17 15:10:43 UTC (rev 29012) @@ -36,10 +36,14 @@ #import <Cocoa/Cocoa.h> #import "BibDocument.h" +NS_ASSUME_NONNULL_BEGIN + @interface BibDocument (Toolbar) <NSToolbarDelegate, NSTouchBarDelegate, NSTouchBarProvider> - (void)setupToolbar; -- (IBAction)makeSearchFieldKey:(id)sender; +- (IBAction)makeSearchFieldKey:(nullable id)sender; @end + +NS_ASSUME_NONNULL_END Modified: trunk/bibdesk/BibDocument_UI.h =================================================================== --- trunk/bibdesk/BibDocument_UI.h 2025-02-17 10:20:15 UTC (rev 29011) +++ trunk/bibdesk/BibDocument_UI.h 2025-02-17 15:10:43 UTC (rev 29012) @@ -40,6 +40,7 @@ #import <Quartz/Quartz.h> #import "BibDocument.h" +NS_ASSUME_NONNULL_BEGIN @interface BibDocument (UI) <NSSplitViewDelegate, NSMenuDelegate, QLPreviewPanelDataSource, QLPreviewPanelDelegate> @@ -49,7 +50,7 @@ - (void)updateBottomPreviewPane; - (void)updateSidePreviewPane; -@property (nonatomic, readonly) NSArray *shownFiles; +@property (nonatomic, nullable, readonly) NSArray *shownFiles; - (void)updateFileViews; - (void)setStatus:(NSString *)status; @@ -64,15 +65,17 @@ - (BOOL)currentlyDisplaysControlView:(BDSKControlView)control; - (NSCellStateValue)displaysFileSearch; -@property (nonatomic, readonly) NSMenu *columnsMenu; +@property (nonatomic, nullable, readonly) NSMenu *columnsMenu; - (void)registerForNotifications; - (void)startObserving; - (void)endObserving; -- (void)handleTableSelectionChangedNotification:(NSNotification *)notification; +- (void)handleTableSelectionChangedNotification:(nullable NSNotification *)notification; -- (void)previewURLs:(NSArray *)urls; +- (void)previewURLs:(nullable NSArray *)urls; - (void)stopPreviewing; @end + +NS_ASSUME_NONNULL_END This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit