// // P4DiffTool.h // MBMenuExtra // // Created by Michael Bishop on 1/17/10. // Copyright 2010 Perforce Software. All rights reserved. // #import <Cocoa/Cocoa.h> NSString * const kDiffToolExtension; // file extensions for DiffTool Plugins // Info.plist keys for DiffTool Plugins NSString * const kDiffToolTypeKey; // The type of plugin NSString * const kDiffToolTypeAppleScript; // The key if it is an applescript plugin NSString * const kDiffToolTypeTask; // The key if it is a command-line tool // Key for task plugin types // Contains an NSArray of arguments // Supported arguments are: // %file - the main file that is being diffed // %olderFile - the older revision of the file NSString * const kDiffToolLaunchArgumentsKey; // The application it represents. This does NOT have to the application // that is run. This is what shows up in the list of tools in the preferences // pane NSString * const kDiffToolRepresentedApplicationIdentifierKey; // An NSArray of UTI types that refer to documents this plugin does not handle // This overrides the information scavenged from the applications' Info.plist. // For instance, Microsoft Word will open Text Documents, but we don't want it // to handle diffing them NSString * const kDiffToolExcludedDocumentTypesKey; @interface P4DiffTool : NSObject { NSString * _representedApplicationID; NSString * _representedApplicationName; NSImage * _representedApplicationIcon; NSString * _representedApplicationPath; BOOL _active; } -(id)initWithApplicationID:(NSString*)applicationIdentifier; -(BOOL)recognizesDocumentType:(NSString*)type; -(BOOL)isOnlyForFileComparison; -(BOOL)diffFileWithPath:(NSString*)file1 againstOlderFileWithPath:(NSString*)file2; @property (readonly) NSString * representedApplicationID; // Bundle ID of represented application @property (readonly, copy) NSString * representedApplicationName; @property (readonly, copy) NSImage * representedApplicationIcon; @property (readwrite) BOOL active; @end @interface P4DiffToolPlugin : P4DiffTool { NSArray * _supportedDocumentTypes; BOOL _onlyForFileComparison; } -(id)initWithBundle:(NSBundle*)bundle; -(BOOL)isOnlyForFileComparison; @end @interface P4DiffToolAppleScript : P4DiffToolPlugin { NSAppleScript * _appleScript; } -(id)initWithBundle:(NSBundle*)bundle; -(BOOL)diffFileWithPath:(NSString*)file1 againstOlderFileWithPath:(NSString*)file2; @end @interface P4DiffToolTask : P4DiffToolPlugin { NSArray * _arguments; NSString * _launchPath; } -(id)initWithBundle:(NSBundle*)bundle; -(BOOL)diffFileWithPath:(NSString*)file1 againstOlderFileWithPath:(NSString*)file2; @end @interface P4DiffToolManualComparison : P4DiffTool { } +(NSString*)applicationIdentifier; -(BOOL)diffFileWithPath:(NSString*)file1 againstOlderFileWithPath:(NSString*)file2; @end
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 20722 | jdputsch | initial branch, prep for -Zapp= support | ||
//guest/michael_bishop/MacMenu/src/P4Menu/Source/P4DiffTool.h | |||||
#1 | 8331 | Matt Attaway |
Adding initial version of MacMenu for Perforce MacMenu is a helpful Perforce client that sits in your toolbar. It allows you to run standard Perforce operations on the document that is open the currently active editor/viewer. |