ProjectManager
0.2
|
This protocol declares what methods should be implemented by a FileManager delegate object. More...
#import <FileManagerDelegate.h>
Public Member Functions | |
(BOOL) | - canCreateCategoriesAtPath: |
Should return YES if creating categories at the provided path is allowed, and NO if it isn't. | |
(BOOL) | - canCreatePlainFilesAtPath: |
Should return YES if creating or importing plain files at the provided path is allowed, and NO if it isn't. | |
(BOOL) | - canCreateLinksAtPath: |
Should return YES if creating links to files at the provided path is allowed, and NO if it isn't. | |
(BOOL) | - canCreateVirtualFilesAtPath: |
Should return YES if creating virtual files at the provided path is allowed, and NO if it isn't. | |
(BOOL) | - canDeletePath: |
Should return YES if deleting a file at the provided path is allowed, and NO if it isn't. | |
(FileOpenResult) | - openFile: |
Asks the file manager's delegate to open the file at the specified project path. | |
(NSString *) | - pathToFile:isCategory: |
Should return a path to the physical location of the specified path on disk. | |
(NSImage *) | - iconForPath: |
Should return an icon for the specified path, if the delegate wishes to assign a special icon to that file. | |
(NSArray *) | - permissibleFileExtensionsInCategory: |
Should return an array of file extensions for files which are permitted in the specified category. | |
(FileImportResult) | - importFile:intoCategory:error: |
Asks the delegate to handle a file import into the project. | |
(NSString *) | - pathToFileTemplatesDirectoryForCategory: |
Should return a path to a directory containing file templates for files that are created in category `aCategory'. | |
(NSDictionary *) | - filesAssociatedWithTemplateFile:fromTemplatesDirectory:forCategory: |
Should return a list of files which are to be additionally added to the project into specific categories, when the user chose to add the template file `aFile' from `templatesDir' into the project category `targetCategory'. |
This protocol declares what methods should be implemented by a FileManager delegate object.
- (NSDictionary *) filesAssociatedWithTemplateFile: | (NSString *) | aFile | |
fromTemplatesDirectory: | (NSString *) | templatesDir | |
forCategory: | (NSString *) | targetCategory | |
Should return a list of files which are to be additionally added to the project into specific categories, when the user chose to add the template file `aFile' from `templatesDir' into the project category `targetCategory'.
The associated files are assigned the same name as the user chose for the created file, but keep their file extensions.
- (NSImage *) iconForPath: | (NSString *) | aPath |
Should return an icon for the specified path, if the delegate wishes to assign a special icon to that file.
If the default icon for the file is to be used, `nil' should be returned instead.
- (FileImportResult) importFile: | (NSString *) | aFile | |
intoCategory: | (NSString *) | aCategory | |
error: | (NSError **) | error | |
Asks the delegate to handle a file import into the project.
The delegate can use this method to override the default importing mechanisms, which would copy or link the source file and instead invoke some more complex mechanisms.
aFile | The file in the filesystem which to import. |
aCategory | The category where to import the file. |
error | A pointer which should be set to an NSError object describing the error in case the operation failed. |
Asks the file manager's delegate to open the file at the specified project path.
Should return a path to the physical location of the specified path on disk.
aPath | The virtual path for which to return the physical path. |
isCategory | Specifies whether the object identified by `aPath' is a category or a file. |
- (NSString *) pathToFileTemplatesDirectoryForCategory: | (NSString *) | aCategory |
Should return a path to a directory containing file templates for files that are created in category `aCategory'.
In case there are no templates available for that category, `nil' should be returned instead.
The templates directories are directories which follow these rules:
An example templates directory structure:
+-- <dir> "My_Files_Template.templates" | +-- <dir> "Simple Classes" | | | +-- <file> "NSObject Subclass.m" | | | +-- <file> "NSObject Subclass.m.pmdesc" | | +-- <dir> "NSView Subclasses" | | | +-- <file> "NSControl Subclass.m" | | | +-- <file> "NSControl Subclass.m.pmdesc" | +-- <dir> "Interface Files" | +-- <dir> "Main Menu.gorm" | | | +-- <file> "objects.gorm" | | | +-- <file> "data.info" | | | +-- <file> "data.classes" | +-- ...
- (NSArray *) permissibleFileExtensionsInCategory: | (NSString *) | aCategory |
Should return an array of file extensions for files which are permitted in the specified category.
If any files are allowed, `nil' should be returned instead.