ProjectManager
0.2
|
00001 /* 00002 ProjectCreator.h 00003 00004 Copyright (C) 2005 Saso Kiselkov 00005 00006 This program is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation; either version 2 of the License, or 00009 (at your option) any later version. 00010 00011 This program is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with this program; if not, write to the Free Software 00018 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00019 */ 00020 00021 #import <Foundation/NSObject.h> 00022 00023 00024 @class WKWizardPanel; 00025 00026 @class NSDictionary, 00027 NSString, 00028 NSOutlineView, 00029 NSTableColumn, 00030 NSView, 00031 NSError; 00032 00033 extern NSString * const ProjectCreatorErrorDomain; 00034 enum { 00035 ProjectFileImportError, 00036 ProjectDirectoryCreationError 00037 }; 00038 00039 @interface ProjectCreator : NSObject 00040 { 00041 WKWizardPanel * wizard; 00042 00043 id projectNameCell, 00044 projectNameForm, 00045 projectNameNotice, 00046 projectNameMistake, 00047 projectNameView, 00048 projectTypes, 00049 projectTypeView, 00050 projectTypeIcon, 00051 projectTypeDescription, 00052 window1, 00053 window2, 00054 templateNeededNotice; 00055 00056 id finishButton, 00057 backToLocationButton, 00058 toProjectTypeSelectionButton; 00059 00060 // an array of ProjectTypeDescription objects 00061 NSArray * projectTypesCache; 00062 00063 NSString * location; 00064 NSString * projectName; 00065 } 00066 00067 + shared; 00068 00069 + (BOOL) createNewProjectAtPath: (NSString *) aProjectPath 00070 projectName: (NSString *) aProjectName 00071 fromTemplate: (NSString *) aTemplatePath 00072 error: (NSError **) error; 00073 00074 - (NSDictionary *) getNewProjectSetupWithLocation: (BOOL) withLocation; 00075 00076 - (void) cancel: sender; 00077 - (void) goToProjectLocationSelection: sender; 00078 - (void) projectTypeSelected: sender; 00079 - (void) doubleClickedProjectType: sender; 00080 00081 - (void) validateProjectName: sender; 00082 00083 // wizard panel delegate methods 00084 - (NSView *) wizardPanel: (WKWizardPanel *) sender 00085 viewForStage: (NSString *) aStage; 00086 - (NSView *) wizardPanel: (WKWizardPanel *) sender 00087 initialFirstResponderForStage: (NSString *) aStage; 00088 00089 // outline view data source methods 00090 - (int) outlineView: (NSOutlineView *) outlineView 00091 numberOfChildrenOfItem: (id) item; 00092 - (BOOL) outlineView: (NSOutlineView *) outlineView 00093 isItemExpandable: (id) item; 00094 - (id) outlineView: (NSOutlineView *) outlineView 00095 child: (int) index 00096 ofItem: (id) item; 00097 - (id) outlineView: (NSOutlineView *) outlineView 00098 objectValueForTableColumn: (NSTableColumn *) tableColumn 00099 byItem: (id) item; 00100 00101 @end 00102 00103 BOOL 00104 CreateDirectoryAndIntermediateDirectories(NSString * dirPath, 00105 NSError ** error); 00106 00107 BOOL 00108 ImportProjectFile(NSString * sourceFile, 00109 NSString * destinationFile, 00110 NSString * projectName, 00111 NSError ** error);