Added Headers directory layout

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/UNSTABLE_0_5@22209 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Sergii Stoian 2005-12-27 11:13:02 +00:00
parent 350cf08698
commit 533437b7f1
33 changed files with 2766 additions and 19 deletions

View file

@ -1,11 +1,8 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2001 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
This file is part of GNUstep.
This application is free software; you can redistribute it and/or
@ -28,7 +25,6 @@
#include <AppKit/AppKit.h>
@class PCServer;
@class PCProjectManager;
@class PCFileManager;
@class PCMenuController;
@ -45,7 +41,6 @@
PCPrefController *prefController;
PCLogController *logController;
PCServer *doServer;
NSConnection *doConnection;
}
@ -68,8 +63,6 @@
- (PCPrefController *)prefController;
- (PCLogController *)logController;
- (PCServer *)doServer;
//============================================================================
//==== Application
//============================================================================

View file

@ -1,11 +1,8 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2001 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
This file is part of GNUstep.
This application is free software; you can redistribute it and/or

View file

@ -1,11 +1,8 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2001 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
This file is part of GNUstep.
This application is free software; you can redistribute it and/or
@ -85,9 +82,9 @@
- (void)fileNewUntitled:(id)sender;
// Edit
- (void)findShowPanel:(id)sender;
/*- (void)findShowPanel:(id)sender;
- (void)findNext:(id)sender;
- (void)findPrevious:(id)sender;
- (void)findPrevious:(id)sender;*/
// Tools
- (void)showInspector:(id)sender;

View file

@ -0,0 +1,54 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2004 Free Software Foundation
Authors: Serg Stoyan
This file is part of GNUstep.
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This application is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _PCAddFilesPanel_h_
#define _PCAddFilesPanel_h_
//#include <Foundation/Foundation.h>
#include <AppKit/AppKit.h>
@interface PCAddFilesPanel : NSOpenPanel
{
NSBox *fileTypeAccessaryView;
NSPopUpButton *fileTypePopup;
}
+ (PCAddFilesPanel *)addFilesPanel;
- (void)setCategories:(NSArray *)categories;
- (void)selectCategory:(NSString *)category;
- (NSString *)selectedCategory;
- (void)setFileTypes:(NSArray *)fileTypes;
- (void)filesForAddPopupClicked:(id)sender;
@end
@interface NSObject (PCAddFilesPanelDelegate)
- (void)categoryChangedTo:(NSString *)category;
@end
#endif

View file

@ -0,0 +1,70 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2000-2004 Free Software Foundation
Author: Philippe C.D. Robert
Serg Stoyan
This file is part of GNUstep.
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This application is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _PCBundleManager_h_
#define _PCBundleManager_h_
#include <AppKit/AppKit.h>
@interface PCBundleManager : NSObject
{
NSMutableDictionary *loadedBundles;
NSMutableDictionary *bundlesInfo;
}
//----------------------------------------------------------------------------
// Init and free methods
//----------------------------------------------------------------------------
- (id)init;
- (void)dealloc;
- (NSString *)resourcePath;
- (NSDictionary *)infoForBundlesOfType:(NSString *)extension;
- (NSString *)bundlePathWithName:(NSString *)bundleName;
- (NSBundle *)bundleOfType:(NSString *)type forClassName:(NSString *)className;
- (id)objectForClassName:(NSString *)className
withProtocol:(Protocol *)proto
inBundleType:(NSString *)type;
- (BOOL)loadBundleIfNeededWithName:(NSString *)bundleName;
// Load all bundles found in the BundlePaths
- (void)loadBundlesWithExtension:(NSString *)extension;
- (void)loadBundlesAtPath:(NSString *)path withExtension:(NSString *)extension;
- (BOOL)loadBundleWithFullPath:(NSString *)path;
// Returns all loaded ProjectCenter bundles.
- (NSDictionary *)loadedBundles;
@end
@interface NSObject (BundleManagerDelegates)
- (void)bundleLoader:(id)sender didLoadBundle:(NSBundle *)aBundle;
@end
#endif

View file

@ -0,0 +1,47 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2003-2004 Free Software Foundation
Authors: Serg Stoyan
This file is part of GNUstep.
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This application is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _PCButton_h_
#define _PCButton_h_
#include <AppKit/AppKit.h>
/*
* Button
*/
@interface PCButton : NSButton
{
NSToolTipTag mainToolTip;
NSTimer *ttTimer;
NSWindow *ttWindow;
NSMutableDictionary *ttTitleAttrs;
NSColor *ttBackground;
BOOL _hasTooltips;
}
@end
#endif

View file

@ -0,0 +1,233 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2000-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
This file is part of GNUstep.
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This application is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _PCDefines_h_
#define _PCDefines_h_
#define PC_EXTERN extern
#define PRIVATE_EXTERN __private_extern__
#define SuccessSound @"SuccessSound"
#define FailureSound @"FailureSound"
#define RootBuildDirectory @"RootBuildDirectory"
#define PromptOnClean @"PromtOnClean"
#define SaveOnQuit @"SaveOnQuit"
#define KeepBackup @"KeepBackup"
#define AutoSavePeriod @"AutoSavePeriod"
#define TabBehaviour @"TabBehaviour"
#define TabSpaces @"TabSpaces"
#define PromptOnQuit @"PromtOnQuit"
#define DeleteCacheWhenQuitting @"DeleteBuildCacheWhenQuitting"
#define FullPathInFilePanels @"FullPathInFilePanels"
#define BuildTool @"BuildTool"
#define Debugger @"Debugger"
#define Editor @"Editor"
#define SeparateBuilder @"SeparateBuilder"
#define SeparateLauncher @"SeparateLauncher"
#define SeparateLoadedFiles @"SeparateLoadedFiles"
#define SeparateEditor @"SeparateEditor"
#define EditorLines @"EditorLines"
#define EditorColumns @"EditorColumns"
#define RememberWindows @"RememberWindows"
#define DisplayLog @"DisplayLog"
#define Compiler @"Compiler"
#define BundlePaths @"BundlePaths"
#define PCAppDidInitNotification @"PCAppDidInit"
#define PCAppWillTerminateNotification @"PCAppWillTerminate"
#define NIB_NOT_FOUND_EXCEPTION @"NibNotFoundException"
#define UNKNOWN_PROJECT_TYPE_EXCEPTION @"UnknownProjectTypeException"
#define NOT_A_PROJECT_TYPE_EXCEPTION @"NoProjectTypeCreatorException"
#define PROJECT_CREATION_EXCEPTION @"ProjectCreationException"
#define PROJECT_OPEN_FAILED_EXCEPTION @"ProjectOpenFailedException"
#define PROJECT_SAVE_FAILED_EXCEPTION @"ProjectSaveFailedException"
#define BUNDLE_MANAGER_EXCEPTION @"BundleManagerException"
//=============================================================================
// ==== MacOS X portability defines
//=============================================================================
#ifndef GNUSTEP_BASE_VERSION
#define RETAIN(object) [object retain]
#define RELEASE(object) [object release]
#define AUTORELEASE(object) [object autorelease]
#define TEST_RELEASE(object) ({ if (object) [object release]; })
#define ASSIGN(object,value) ({\
id __value = (id)(value); \
id __object = (id)(object); \
if (__value != __object) \
{ \
if (__value != nil) \
{ \
[__value retain]; \
} \
object = __value; \
if (__object != nil) \
{ \
[__object release]; \
} \
} \
})
#define DESTROY(object) ({ \
if (object) \
{ \
id __o = object; \
object = nil; \
[__o release]; \
} \
})
#define NSLocalizedString(key, comment) \
[[NSBundle mainBundle] localizedStringForKey:(key) value:@"" table:nil]
#define _(X) NSLocalizedString (X, @"")
#endif // GNUSTEP_BASE_VERSION
//
// ==== From PCProject.h
//
#ifndef IMAGE
#define IMAGE(X) [NSImage imageNamed:(X)]
#endif
//=============================================================================
// ==== DEFINES
//=============================================================================
#define BUILD_ARGS_KEY @"BuildArgsKey"
#define BUILD_HOST_KEY @"BuildHostKey"
#define TARGET_MAKE @"Make"
#define TARGET_MAKE_DEBUG @"MakeDebug"
#define TARGET_MAKE_PROFILE @"MakeProfile"
#define TARGET_MAKE_INSTALL @"MakeInstall"
#define TARGET_MAKE_CLEAN @"MakeClean"
#define TARGET_MAKE_RPM @"MakeRPM"
#define BUILD_TAG 0
#define LAUNCH_TAG 1
#define EDITOR_TAG 2
#define FILES_TAG 3
#define FIND_TAG 4
#define INSPECTOR_TAG 5
//=============================================================================
// ==== Not used yet
//=============================================================================
#define TOUCHED_NOTHING (0)
#define TOUCHED_EVERYTHING (1 << 0)
#define TOUCHED_PROJECT_NAME (1 << 1)
#define TOUCHED_LANGUAGE (1 << 2)
#define TOUCHED_PROJECT_TYPE (1 << 3)
#define TOUCHED_INSTALL_DIR (1 << 4)
#define TOUCHED_ICON_NAMES (1 << 5)
#define TOUCHED_FILES (1 << 6)
#define TOUCHED_MAINNIB (1 << 7)
#define TOUCHED_PRINCIPALCLASS (1 << 8)
#define TOUCHED_TARGETS (1 << 9)
#define TOUCHED_PB_PROJECT (1 << 10)
#define TOUCHED_SYST_EXT (1 << 11)
#define TOUCHED_EXTENSION (1 << 12)
#define TOUCHED_PATHS (1 << 13)
typedef int PCProjInfoBits;
//=============================================================================
// ==== Project keys
//=============================================================================
#include <Foundation/Foundation.h>
static NSString * const PCClasses = @"CLASS_FILES";
static NSString * const PCHeaders = @"HEADER_FILES";
static NSString * const PCOtherSources = @"OTHER_SOURCES";
static NSString * const PCInterfaces = @"INTERFACES";
static NSString * const PCImages = @"IMAGES";
static NSString * const PCOtherResources = @"OTHER_RESOURCES";
static NSString * const PCSubprojects = @"SUBPROJECTS";
static NSString * const PCDocuFiles = @"DOCU_FILES";
static NSString * const PCSupportingFiles = @"SUPPORTING_FILES";
static NSString * const PCLibraries = @"LIBRARIES";
static NSString * const PCNonProject = @"NON_PROJECT_FILES";
static NSString * const PCGSMarkupFiles = @"INTERFACES";
static NSString * const PCLanguage = @"LANGUAGE";
static NSString * const PCUserLanguages = @"USER_LANGUAGES";
static NSString * const PCLocalizedResources = @"LOCALIZED_RESOURCES";
static NSString * const PCBuildTool = @"BUILDTOOL";
static NSString * const PCCompilerOptions = @"COMPILEROPTIONS";
static NSString * const PCPreprocessorOptions = @"CPPOPTIONS";
static NSString * const PCCreationDate = @"CREATION_DATE";
static NSString * const PCInstallDir = @"INSTALLDIR";
static NSString * const PCLinkerOptions = @"LINKEROPTIONS";
static NSString * const PCLastEditing = @"LAST_EDITING";
static NSString * const PCObjCCompilerOptions = @"OBJC_COMPILEROPTIONS";
static NSString * const PCPrincipalClass = @"PRINCIPAL_CLASS";
static NSString * const PCAuthors = @"PROJECT_AUTHORS";
static NSString * const PCCopyright = @"PROJECT_COPYRIGHT";
static NSString * const PCCopyrightDescription = @"PROJECT_COPYRIGHT_DESC";
static NSString * const PCProjectCreator = @"PROJECT_CREATOR";
static NSString * const PCDescription = @"PROJECT_DESCRIPTION";
static NSString * const PCDocumentExtensions = @"PROJECT_DOCUMENTEXTENSIONS";
static NSString * const PCDocumentTypes = @"PROJECT_DOCUMENTTYPES";
static NSString * const PCGroup = @"PROJECT_GROUP";
static NSString * const PCProjectMaintainer = @"PROJECT_MAINTAINER";
static NSString * const PCProjectName = @"PROJECT_NAME";
static NSString * const PCRelease = @"PROJECT_RELEASE";
static NSString * const PCSummary = @"PROJECT_SUMMARY";
static NSString * const PCProjectType = @"PROJECT_TYPE";
static NSString * const PCURL = @"PROJECT_URL";
static NSString * const PCSearchHeaders = @"SEARCH_HEADER_DIRS";
static NSString * const PCSearchLibs = @"SEARCH_LIB_DIRS";
// Application specific
static NSString * const PCAppIcon = @"APPLICATIONICON";
static NSString * const PCMainInterfaceFile = @"MAININTERFACE";
static NSString * const PCHelpFile = @"HELP_FILE";
static NSString * const PCDocumentBasedApp = @"APP_DOCUMENT_BASED";
static NSString * const PCAppType = @"APP_TYPE";
// Library specific
static NSString * const PCPublicHeaders = @"PUBLIC_HEADERS";
static NSString * const PCHeadersInstallDir = @"HEADERS_INSTALL_DIR";
// Bundle specific
static NSString * const PCBundleExtension = @"BUNDLE_EXTENSION";
// Tool specific
static NSString * const PCToolIcon = @"TOOLICON";
static NSString * const PCPackageName = @"PACKAGE_NAME";
static NSString * const PCLibraryVar = @"LIBRARY_VAR";
// Will be removed
static NSString * const PCProjectBuilderClass = @"PROJECT_BUILDER";
#endif // _PCDEFINES_H_

View file

@ -0,0 +1,60 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2001-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
This file is part of GNUstep.
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This application is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _PCFileCreator_h_
#define _PCFileCreator_h_
#include <AppKit/AppKit.h>
#define ProtocolFile @"Objective-C Protocol"
#define ObjCClass @"Objective-C Class"
#define ObjCHeader @"Objective-C Header"
#define CFile @"C File"
#define CHeader @"C Header"
#define GSMarkupFile @"GNUstep Markup"
@class PCProject;
@interface PCFileCreator : NSObject
{
NSMutableString *file;
}
+ (id)sharedCreator;
- (NSString *)name;
- (NSDictionary *)creatorDictionary;
// The implementation needs some heavy cleanup!
- (NSDictionary *)createFileOfType:(NSString *)type
path:(NSString *)path
project:(PCProject *)aProject;
- (void)replaceTagsInFileAtPath:(NSString *)newFile
withProject:(PCProject *)aProject;
@end
#endif

View file

@ -0,0 +1,133 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2000-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
This file is part of GNUstep.
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This application is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _PCFileManager_h_
#define _PCFileManager_h_
//#include <Foundation/Foundation.h>
#include <AppKit/AppKit.h>
@class PCProject;
@class PCProjectManager;
@class PCAddFilesPanel;
@interface PCFileManager : NSObject
{
PCProjectManager *projectManager;
id delegate; // PCProjectManager
NSDictionary *creators;
// New File in Project panel
IBOutlet NSPanel *newFilePanel;
IBOutlet NSImageView *nfImage;
IBOutlet NSPopUpButton *nfTypePB;
IBOutlet NSTextView *nfDescriptionTV;
IBOutlet NSTextField *nfNameField;
IBOutlet NSButton *nfCancleButton;
IBOutlet NSButton *nfCreateButton;
PCAddFilesPanel *addFilesPanel;
}
//==============================================================================
// ==== Class methods
//==============================================================================
+ (PCFileManager *)defaultManager;
//==============================================================================
// ==== Init and free
//==============================================================================
- (id)initWithProjectManager:(PCProjectManager *)aProjectManager;
- (void)dealloc;
// ===========================================================================
// ==== File stuff
// ===========================================================================
// Shows NSOpenPanel and return selected files if any
- (NSMutableArray *)filesForOpenOfType:(NSArray *)types
multiple:(BOOL)yn
title:(NSString *)title
accView:(NSView *)accessoryView;
- (NSString *)fileForSaveOfType:(NSArray *)types
title:(NSString *)title
accView:(NSView *)accessoryView;
// Checks if directories in path exists and creates if not.
- (BOOL)createDirectoriesIfNeededAtPath:(NSString *)path;
// Create directories in toFile path if needed
- (BOOL)copyFile:(NSString *)file toFile:(NSString *)toFile;
// Calls copyFile:toFile:
- (BOOL)copyFile:(NSString *)file intoDirectory:(NSString *)directory;
// Calls copyFile:intoDirectory in cycle
- (BOOL)copyFiles:(NSArray *)files intoDirectory:(NSString *)directory;
// Calls copyFile:intoDirectory:
- (BOOL)copyFile:(NSString *)file
fromDirectory:(NSString *)fromDir
intoDirectory:(NSString *)toDir;
// If directory is empty remove it recursively
- (BOOL)removeDirectoriesIfEmptyAtPath:(NSString *)path;
// Remove 'file' located in 'directory'
- (BOOL)removeFile:(NSString *)file fromDirectory:(NSString *)directory;
// Remove file with full path 'file'. Calls removeDirectoriesIfEmptyAtPath:.
- (BOOL)removeFileAtPath:(NSString *)file;
// Remove array of files from directory
- (BOOL)removeFiles:(NSArray *)files fromDirectory:(NSString *)directory;
- (BOOL)moveFile:(NSString *)file intoDirectory:(NSString *)directory;
- (void)createFile;
@end
@interface PCFileManager (UInterface)
- (void)showNewFilePanel;
- (void)closeNewFilePanel:(id)sender;
- (void)createFile:(id)sender;
- (void)newFilePopupChanged:(id)sender;
- (NSMutableArray *)filesForAddOfTypes:(NSArray*)fileTypes;
@end
@interface PCFileManager (FileType)
- (BOOL)isTextFile:(NSString *)filename;
@end
#endif

View file

@ -0,0 +1,38 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2000-2004 Free Software Foundation
Authors: Serg Stoyan
This file is part of GNUstep.
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This application is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _PCFileNameField_h_
#define _PCFileNameField_h_
@class NSTextField;
@interface PCFileNameField : NSTextField
{
}
- (void)setEditableField:(BOOL)yn;
- (BOOL)textShouldSetEditable:(NSString *)text;
@end
#endif

View file

@ -0,0 +1,43 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2000-2005 Free Software Foundation
Authors: Serg Stoyan
This file is part of GNUstep.
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This application is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _PCFileNameIcon_h_
#define _PCFileNameIcon_h_
@class NSImageView;
@interface PCFileNameIcon : NSImageView
{
NSString *filePath;
NSTextField *fileNameField;
NSString *msfText;
}
- (void)setFileNameField:(NSTextField *)field;
- (void)setMultipleFilesSelectionText:(NSString *)text;
- (void)setFileIcon:(NSNotification *)notification;
@end
#endif

View file

@ -0,0 +1,62 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2001 Free Software Foundation
This file is part of GNUstep.
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This application is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _PCLOGCONTROLLER_H
#define _PCLOGCONTROLLER_H
#include <AppKit/AppKit.h>
#define INFO 0
#define STATUS 1
#define WARNING 2
#define ERROR 3
// --- Functions
void
PCLog(id sender, int tag, NSString* format, va_list args);
void
PCLogInfo(id sender, NSString* format, ...);
void
PCLogStatus(id sender, NSString* format, ...);
void
PCLogWarning(id sender, NSString* format, ...);
void
PCLogError(id sender, NSString* format, ...);
@interface PCLogController : NSObject
{
IBOutlet NSPanel *panel;
IBOutlet NSTextView *textView;
NSMutableDictionary *textAttributes;
}
+ (PCLogController *)sharedLogController;
- (void)showPanel;
- (void)logMessage:(NSString *)message withTag:(int)tag sender:(id)sender;
- (void)putMessageOnScreen:(NSAttributedString *)message;
@end
#endif

View file

@ -0,0 +1,64 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2002-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
This file is part of GNUstep.
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This application is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _PCMakefileFactory_h_
#define _PCMakefileFactory_h_
#include <Foundation/Foundation.h>
@class PCProject;
@interface PCMakefileFactory : NSObject
{
NSMutableString *mfile;
NSString *pnme;
}
+ (PCMakefileFactory *)sharedFactory;
- (void)createMakefileForProject:(NSString *)prName;
- (BOOL)createPreambleForProject:(PCProject *)project;
- (BOOL)createPostambleForProject:(PCProject *)project;
- (void)appendString:(NSString *)aString;
- (void)appendLibraries:(NSArray *)array;
- (void)appendHeaders:(NSArray *)array;
- (void)appendHeaders:(NSArray *)array forTarget:(NSString *)target;
- (void)appendClasses:(NSArray *)array;
- (void)appendClasses:(NSArray *)array forTarget:(NSString *)target;
- (void)appendOtherSources:(NSArray *)array;
- (void)appendOtherSources:(NSArray *)array forTarget:(NSString *)target;
- (void)appendResources:(NSArray *)array inDir:(NSString *)dir;
- (void)appendLocalizedResources:(NSArray *)resources
forLanguages:(NSArray *)languages;
- (void)appendSubprojects:(NSArray*)array;
- (NSData *)encodedMakefile;
@end
#endif

View file

@ -0,0 +1,128 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2001 Free Software Foundation
This file is part of GNUstep.
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This application is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _PCPREFCONTROLLER_H
#define _PCPREFCONTROLLER_H
#include <AppKit/AppKit.h>
#define PCSavePeriodDidChangeNotification @"PCSavePeriodDidChangeNotification"
#define PCPreferencesDidChangeNotification @"PCPreferencesDidChangeNotification"
#ifndef PCDefaultBuildTool
#define PCDefaultBuildTool @"/usr/bin/make"
#endif
#ifndef PCDefaultDebugger
#define PCDefaultDebugger @"/usr/bin/gdb"
#endif
@interface PCPrefController : NSObject
{
IBOutlet NSPanel *panel;
IBOutlet NSPopUpButton *popupButton;
IBOutlet NSBox *sectionsView;
IBOutlet NSBox *buildingView;
IBOutlet NSTextField *successField;
IBOutlet NSButton *setSuccessButton;
IBOutlet NSTextField *failureField;
IBOutlet NSButton *setFailureButton;
IBOutlet NSTextField *rootBuildDirField;
IBOutlet NSButton *rootBuildDirButton;
IBOutlet NSButton *promptOnClean;
IBOutlet NSBox *savingView;
IBOutlet NSButton *saveOnQuit;
IBOutlet NSButton *keepBackup;
IBOutlet NSSlider *autosaveSlider;
IBOutlet NSTextField *autosaveField;
IBOutlet NSBox *keyBindingsView;
IBOutlet NSMatrix *tabMatrix;
IBOutlet NSButton *tabSpacesField;
IBOutlet NSBox *miscView;
IBOutlet NSButton *promptWhenQuit;
IBOutlet NSButton *deleteCache;
IBOutlet NSButton *fullPathInFilePanels;
IBOutlet NSTextField *buildToolField;
IBOutlet NSTextField *debuggerField;
IBOutlet NSTextField *editorField;
IBOutlet NSBox *interfaceView;
IBOutlet NSButton *separateBuilder;
IBOutlet NSButton *separateLauncher;
IBOutlet NSButton *separateEditor;
IBOutlet NSButton *separateLoadedFiles;
IBOutlet NSTextField *editorLinesField;
IBOutlet NSTextField *editorColumnsField;
IBOutlet NSButton *rememberWindows;
IBOutlet NSButton *displayLog;
IBOutlet NSBox *bundlesView;
IBOutlet NSTextField *bundlePathField;
NSMutableDictionary *preferencesDict;
}
+ (PCPrefController *)sharedPCPreferences;
- (id)init;
- (void)dealloc;
- (void)setDefaultValues;
- (void)loadPreferences;
- (NSDictionary *)preferencesDict;
- (id)objectForKey:(NSString *)key;
- (NSString *)selectFileWithTypes:(NSArray *)types;
- (void)showPanel:(id)sender;
- (void)popupChanged:(id)sender;
- (void)setSuccessSound:(id)sender;
- (void)setFailureSound:(id)sender;
- (void)setRootBuildDir:(id)sender;
- (void)setPromptOnClean:(id)sender;
- (void)setSaveOnQuit:(id)sender;
- (void)setKeepBackup:(id)sender;
- (void)setSavePeriod:(id)sender;
- (void)setPromptWhenQuit:(id)sender;
- (void)setDeleteCache:(id)sender;
- (void)setFullPathInFilePanels:(id)sender;
- (void)setDebugger:(id)sender;
- (void)setEditor:(id)sender;
- (void)setDisplayPanels:(id)sender;
- (void)setEditorSize:(id)sender;
- (void)setEditorSizeEnabled:(BOOL)yn;
- (void)setRememberWindows:(id)sender;
- (void)setDisplayLog:(id)sender;
- (void)setBundlePath:(id)sender;
@end
#endif

View file

@ -0,0 +1,216 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2000-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
This file is part of GNUstep.
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This application is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _PCProject_h_
#define _PCProject_h_
#include <AppKit/AppKit.h>
@class PCProjectManager;
@class PCProjectWindow;
@class PCProjectBrowser;
@class PCProjectLoadedFiles;
@class PCProjectInspector;
@class PCProjectBuilder;
@class PCProjectLauncher;
@class PCProjectEditor;
extern NSString *PCProjectDictDidChangeNotification;
extern NSString *PCProjectDictDidSaveNotification;
@interface PCProject : NSObject
{
PCProjectManager *projectManager;
PCProjectWindow *projectWindow;
PCProjectBrowser *projectBrowser;
PCProjectLoadedFiles *projectLoadedFiles;
PCProjectEditor *projectEditor;
PCProjectBuilder *projectBuilder;
PCProjectLauncher *projectLauncher;
NSMutableDictionary *projectDict;
NSString *projectName;
NSString *projectPath;
NSArray *rootKeys; // e.g. CLASS_FILES
NSArray *rootCategories; // e.g. Classes
NSDictionary *rootEntries; // Initialised by subclasses
NSMutableDictionary *buildOptions;
PCProject *activeSubproject;
// Subproject
NSMutableArray *loadedSubprojects;
BOOL isSubproject;
PCProject *rootProject;
PCProject *superProject;
}
// ============================================================================
// ==== Init and free
// ============================================================================
- (id)init;
//- (id)initWithProjectDictionary:(NSDictionary *)dict path:(NSString *)path;
- (PCProject *)openWithDictionaryAt:(NSString *)path;
- (void)dealloc;
// ============================================================================
// ==== Project handling
// ============================================================================
- (BOOL)assignProjectDict:(NSDictionary *)pDict atPath:(NSString *)pPath;
//- (BOOL)assignProjectDict:(NSDictionary *)aDict;
- (BOOL)isValidDictionary:(NSDictionary *)aDict;
// Validates the project dictionary and inserts missing keys if needed.
// It calls isValidDictionary to validate.
- (void)validateProjectDict;
- (void)setProjectDictObject:(id)object forKey:(NSString *)key notify:(BOOL)yn;
- (void)updateProjectDict;
- (NSDictionary *)projectDict;
- (NSString *)projectName;
- (void)setProjectName:(NSString *)aName;
- (NSString *)projectPath;
- (void)setProjectPath:(NSString *)aPath;
- (BOOL)isProjectChanged;
// Subclasses need to call this before their customised implementation!
- (BOOL)writeMakefile;
- (BOOL)saveProjectWindowsAndPanels;
- (BOOL)save;
- (BOOL)close:(id)sender;
// ============================================================================
// ==== Accessory methods
// ============================================================================
- (PCProjectManager *)projectManager;
- (void)setProjectManager:(PCProjectManager *)aManager;
- (PCProjectWindow *)projectWindow;
- (PCProjectBrowser *)projectBrowser;
- (PCProjectLoadedFiles *)projectLoadedFiles;
- (PCProjectBuilder *)projectBuilder;
- (PCProjectLauncher *)projectLauncher;
- (PCProjectEditor *)projectEditor;
// ===========================================================================
// ==== Can be overriden
// ===========================================================================
// Project Attributes Inspector
- (NSView *)projectAttributesView;
//--- Properties from Info.table
- (NSDictionary *)projectBundleInfoTable;
- (NSString *)projectTypeName;
- (Class)builderClass;
- (NSString *)projectDescription;
- (BOOL)isExecutable;
- (NSString *)execToolName;
- (BOOL)canHavePublicHeaders;
- (NSArray *)publicHeaders;
- (void)setHeaderFile:(NSString *)file public:(BOOL)yn;
- (NSArray *)localizedResources;
- (void)setResourceFile:(NSString *)file localizable:(BOOL)yn;
- (NSArray *)buildTargets;
// Files placed into /
- (NSArray *)sourceFileKeys;
// Files placed into /Resources or /Language.lproj
- (NSArray *)resourceFileKeys;
- (NSArray *)otherKeys;
- (NSArray *)allowableSubprojectTypes;
- (NSArray *)localizableKeys;
- (BOOL)isEditableCategory:(NSString *)category;
- (BOOL)isEditableFile:(NSString *)filePath;
- (NSArray *)fileTypesForCategoryKey:(NSString *)key;
- (NSString *)categoryKeyForFileType:(NSString *)type;
- (NSString *)dirForCategoryKey:(NSString *)key;
- (NSString *)complementaryTypeForType:(NSString *)type;
// ============================================================================
// ==== File Handling
// ============================================================================
// Returns file path taking into account localizable resources
- (NSString *)pathForFile:(NSString *)file forKey:(NSString *)key;
// Remove path from "file" and handle special cases like libraries
- (NSString *)projectFileFromFile:(NSString *)file forKey:(NSString *)type;
// Returns YES if type is a valid key and file is not contained in the
// project already
- (BOOL)doesAcceptFile:(NSString *)file forKey:(NSString *)key;
- (BOOL)addAndCopyFiles:(NSArray *)files forKey:(NSString *)key;
- (void)addFiles:(NSArray *)files forKey:(NSString *)key notify:(BOOL)yn;
- (BOOL)removeFiles:(NSArray *)files forKey:(NSString *)key notify:(BOOL)yn;
- (BOOL)renameFile:(NSString *)fromFile toFile:(NSString *)toFile;
// ============================================================================
// ==== Subprojects
// ============================================================================
- (NSArray *)loadedSubprojects;
- (PCProject *)activeSubproject;
- (BOOL)isSubproject;
- (void)setIsSubproject:(BOOL)yn;
- (PCProject *)superProject;
- (void)setSuperProject:(PCProject *)project;
- (PCProject *)subprojectWithName:(NSString *)name;
- (void)addSubproject:(PCProject *)aSubproject;
- (void)addSubprojectWithName:(NSString *)name;
- (BOOL)removeSubproject:(PCProject *)aSubproject;
- (BOOL)removeSubprojectWithName:(NSString *)subprojectName;
@end
@interface PCProject (ProjectBrowser)
- (NSArray *)rootKeys;
- (NSArray *)rootCategories;
- (NSDictionary *)rootEntries;
- (NSString *)keyForCategory:(NSString *)category;
- (NSString *)categoryForKey:(NSString *)key;
- (NSArray *)contentAtCategoryPath:(NSString *)categoryPath;
- (BOOL)hasChildrenAtCategoryPath:(NSString *)keyPath;
- (NSString *)rootCategoryForCategoryPath:(NSString *)categoryPath;
//- (NSString *)categoryForCategoryPath:(NSString *)categoryPath;
- (NSString *)keyForRootCategoryInCategoryPath:(NSString *)categoryPath;
//- (NSString *)keyForCategoryPath:(NSString *)categoryPath;
@end
#endif

View file

@ -0,0 +1,92 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2000-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
This file is part of GNUstep.
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This application is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _PCProjectBrowser_h_
#define _PCProjectBrowser_h_
#include <AppKit/AppKit.h>
extern NSString *PCBrowserDidSetPathNotification;
@class PCProject;
@interface PCProjectBrowser : NSObject
{
PCProject *project;
NSBrowser *browser;
}
// ============================================================================
// ==== Intialization & deallocation
// ============================================================================
- (id)initWithProject:(PCProject *)aProject;
- (void)dealloc;
// ============================================================================
// ==== Accessory methods
// ============================================================================
- (NSView *)view;
// Returns nil if multiple files selected
- (NSString *)nameOfSelectedFile;
- (NSString *)pathToSelectedFile;
// Returns nil if multiple categories selected
- (NSString *)nameOfSelectedCategory;
// Returns nil of multiple categories selected
- (NSString *)pathToSelectedCategory;
// Returns nil of multiple categories selected
- (NSString *)pathFromSelectedCategory;
- (NSString *)nameOfSelectedRootCategory;
// Returns nil if multiple category selected
- (NSArray *)selectedFiles;
- (NSString *)path;
- (BOOL)setPath:(NSString *)path;
- (void)reloadLastColumnAndNotify:(BOOL)yn;
- (void)reloadLastColumnAndSelectFile:(NSString *)file;
// ============================================================================
// ==== Actions
// ============================================================================
- (void)click:(id)sender;
- (void)doubleClick:(id)sender;
// ============================================================================
// ==== Notifications
// ============================================================================
- (void)projectDictDidChange:(NSNotification *)aNotif;
@end
@interface PCProjectBrowser (ProjectBrowserDelegate)
- (void)browser:(NSBrowser *)sender createRowsForColumn:(int)column
inMatrix:(NSMatrix *)matrix;
@end
#endif

View file

@ -0,0 +1,113 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2000-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
This file is part of GNUstep.
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This application is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _PCProjectBuilder_h_
#define _PCProjectBuilder_h_
#include <AppKit/AppKit.h>
@class PCProject;
@class PCButton;
@interface PCProjectBuilder : NSObject
{
NSBox *componentView;
PCButton *buildButton;
PCButton *cleanButton;
PCButton *installButton;
PCButton *optionsButton;
id buildStatusField;
id targetField;
NSTextView *logOutput;
NSTextView *errorOutput;
NSPopUpButton *popup;
NSPanel *optionsPanel;
NSTextField *buildTargetHostField;
NSTextField *buildTargetArgsField;
NSString *makePath;
PCProject *currentProject;
NSDictionary *currentOptions;
NSString *statusString;
NSMutableString *buildTarget;
NSMutableArray *buildArgs;
SEL postProcess;
NSTask *makeTask;
NSFileHandle *readHandle;
NSFileHandle *errorReadHandle;
BOOL _isBuilding;
BOOL _isCleaning;
}
- (id)initWithProject:(PCProject *)aProject;
- (void)dealloc;
- (NSView *)componentView;
// --- Accessory
- (BOOL)isBuilding;
- (BOOL)isCleaning;
- (void)performStartBuild;
- (void)performStartClean;
- (void)performStopBuild;
// --- Actions
- (void)startBuild:(id)sender;
- (BOOL)stopBuild:(id)sender;
- (void)startClean:(id)sender;
- (void)build:(id)sender;
//- (void)buildDidTerminate;
- (void)popupChanged:(id)sender;
- (void)logStdOut:(NSNotification *)aNotif;
- (void)logErrOut:(NSNotification *)aNotif;
- (void)copyPackageTo:(NSString *)path;
@end
@interface PCProjectBuilder (UserInterface)
- (void)_createComponentView;
- (void)_createOptionsPanel;
@end
@interface PCProjectBuilder (BuildLogging)
- (void)logString:(NSString *)string error:(BOOL)yn;
- (void)logString:(NSString *)string error:(BOOL)yn newLine:(BOOL)newLine;
- (void)logData:(NSData *)data error:(BOOL)yn;
@end
#endif

View file

@ -0,0 +1,44 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2003 Free Software Foundation
Authors: Serg Stoyan
This file is part of GNUstep.
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This application is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _PCProjectBuilderPanel_h_
#define _PCProjectBuilderPanel_h_
#include <AppKit/AppKit.h>
@class PCProjectManager;
@interface PCProjectBuilderPanel : NSPanel
{
PCProjectManager *projectManager;
PCProject *currentProject;
NSBox *contentBox;
NSBox *emptyBox;
}
- (id)initWithProjectManager:(PCProjectManager *)aManager;
@end
#endif

View file

@ -0,0 +1,124 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2002-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
This file is part of GNUstep.
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This application is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _PCProjectEditor_h_
#define _PCProjectEditor_h_
#include <Foundation/Foundation.h>
#include <Protocols/CodeEditor.h>
#include <Protocols/ProjectEditor.h>
#include "PCProject.h"
@class PCProject;
@class PCEditor;
@class PCEditorView;
@class NSBox;
@class NSView;
@class NSScrollView;
@protocol CodeParser;
@interface PCProjectEditor : NSObject <ProjectEditor>
{
PCProject *project;
NSBox *componentView;
NSScrollView *scrollView;
NSDictionary *editorBundlesInfo;
NSDictionary *parserBundlesInfo;
NSMutableDictionary *editorsDict;
id<CodeEditor> activeEditor;
id<CodeParser> aParser;
NSConnection *parserConnection;
}
// ===========================================================================
// ==== Initialisation
// ===========================================================================
- (id)initWithProject:(PCProject *)aProject;
- (void)dealloc;
- (NSView *)componentView;
- (PCProject *)project;
// ===========================================================================
// ==== Project and Editor handling
// ===========================================================================
- (NSDictionary *)infoTableForBundleType:(NSString *)type
andFileType:(NSString *)extension;
- (NSString *)classNameForBundleType:(NSString*)type
andFile:(NSString *)file;
- (BOOL)editorProvidesBrowserItemsForItem:(NSString *)item;
- (id<CodeEditor>)editorForCategoryPath:(NSString *)categoryPath
windowed:(BOOL)windowed;
/*- (id<CodeEditor>)editorForFile:(NSString *)path
categoryPath:(NSString *)categoryPath
windowed:(BOOL)yn;*/
- (id<CodeEditor>)editorForFile:(NSString *)path
categoryPath:(NSString *)categoryPath
editable:(BOOL)editable
windowed:(BOOL)windowed;
- (void)orderFrontEditorForFile:(NSString *)path;
- (id<CodeEditor>)activeEditor;
- (void)setActiveEditor:(id<CodeEditor>)anEditor;
- (NSArray *)allEditors;
- (void)closeActiveEditor:(id)sender;
- (void)closeEditorForFile:(NSString *)file;
- (BOOL)closeAllEditors;
// ===========================================================================
// ==== File handling
// ===========================================================================
- (BOOL)saveEditedFiles:(NSArray *)files;
- (BOOL)saveAllFiles;
- (BOOL)saveFile;
- (BOOL)saveFileAs:(NSString *)file;
- (BOOL)saveFileTo:(NSString *)file;
- (BOOL)revertFileToSaved;
// ===========================================================================
// ==== Delegate
// ===========================================================================
- (void)editorDidClose:(NSNotification *)aNotif;
- (void)editorDidBecomeActive:(NSNotification *)aNotif;
- (void)editorDidResignActive:(NSNotification *)aNotif;
@end
#endif

View file

@ -0,0 +1,124 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2002-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
This file is part of GNUstep.
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This application is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _PCProjectEditor_h_
#define _PCProjectEditor_h_
#include <Foundation/Foundation.h>
#include <Protocols/CodeEditor.h>
#include <Protocols/ProjectEditor.h>
#include "PCProject.h"
@class PCProject;
@class PCEditor;
@class PCEditorView;
@class NSBox;
@class NSView;
@class NSScrollView;
@protocol CodeParser;
@interface PCProjectEditor : NSObject <ProjectEditor>
{
PCProject *project;
NSBox *componentView;
NSScrollView *scrollView;
NSDictionary *editorBundlesInfo;
NSDictionary *parserBundlesInfo;
NSMutableDictionary *editorsDict;
id<CodeEditor> activeEditor;
id<CodeParser> aParser;
NSConnection *parserConnection;
}
// ===========================================================================
// ==== Initialisation
// ===========================================================================
- (id)initWithProject:(PCProject *)aProject;
- (void)dealloc;
- (NSView *)componentView;
- (PCProject *)project;
// ===========================================================================
// ==== Project and Editor handling
// ===========================================================================
- (NSDictionary *)infoTableForBundleType:(NSString *)type
andFileType:(NSString *)extension;
- (NSString *)classNameForBundleType:(NSString*)type
andFile:(NSString *)file;
- (BOOL)editorProvidesBrowserItemsForItem:(NSString *)item;
- (id<CodeEditor>)editorForCategoryPath:(NSString *)categoryPath
windowed:(BOOL)windowed;
/*- (id<CodeEditor>)editorForFile:(NSString *)path
categoryPath:(NSString *)categoryPath
windowed:(BOOL)yn;*/
- (id<CodeEditor>)editorForFile:(NSString *)path
categoryPath:(NSString *)categoryPath
editable:(BOOL)editable
windowed:(BOOL)windowed;
- (void)orderFrontEditorForFile:(NSString *)path;
- (id<CodeEditor>)activeEditor;
- (void)setActiveEditor:(id<CodeEditor>)anEditor;
- (NSArray *)allEditors;
- (void)closeActiveEditor:(id)sender;
- (void)closeEditorForFile:(NSString *)file;
- (BOOL)closeAllEditors;
// ===========================================================================
// ==== File handling
// ===========================================================================
- (BOOL)saveEditedFiles:(NSArray *)files;
- (BOOL)saveAllFiles;
- (BOOL)saveFile;
- (BOOL)saveFileAs:(NSString *)file;
- (BOOL)saveFileTo:(NSString *)file;
- (BOOL)revertFileToSaved;
// ===========================================================================
// ==== Delegate
// ===========================================================================
- (void)editorDidClose:(NSNotification *)aNotif;
- (void)editorDidBecomeActive:(NSNotification *)aNotif;
- (void)editorDidResignActive:(NSNotification *)aNotif;
@end
#endif

View file

@ -0,0 +1,168 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2000-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
This file is part of GNUstep.
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This application is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _PCProjectInspector_h_
#define _PCProjectInspector_h_
#include <ProjectCenter/PCFileNameField.h>
#include <ProjectCenter/PCFileNameIcon.h>
@class PCProjectManager;
@class PCProjectBrowser;
@interface PCProjectInspector : NSObject
{
PCProjectManager *projectManager;
PCProject *project;
NSDictionary *projectDict;
IBOutlet NSPanel *inspectorPanel;
IBOutlet NSBox *contentView;
IBOutlet NSPopUpButton *inspectorPopup;
IBOutlet NSBox *inspectorView;
// Build Attributes
IBOutlet NSBox *buildAttributesView;
IBOutlet NSTextField *projectNameLabel;
IBOutlet NSPopUpButton *searchOrderPopup;
NSTableView *searchOrderList;
NSTableColumn *searchOrderColumn;
NSMutableArray *searchItems;
NSArray *searchHeaders;
NSArray *searchLibs;
IBOutlet NSTextField *searchOrderTF;
IBOutlet NSButton *searchOrderSet;
IBOutlet NSButton *searchOrderRemove;
IBOutlet NSButton *searchOrderAdd;
IBOutlet NSTextField *cppOptField;
IBOutlet NSTextField *objcOptField;
IBOutlet NSTextField *cOptField;
IBOutlet NSTextField *ldOptField;
IBOutlet NSTextField *installPathField;
IBOutlet NSTextField *toolField;
// Project Attributes
// Suplied by concrete project
IBOutlet NSView *projectAttributesView;
NSView *projectAttributesSubview;
IBOutlet NSTextField *projectTypeField;
IBOutlet NSTextField *projectNameField;
IBOutlet NSPopUpButton *projectLanguagePB;
// Project Description
IBOutlet NSBox *projectDescriptionView;
IBOutlet NSTextField *descriptionField;
IBOutlet NSTextField *releaseField;
IBOutlet NSTextField *licenseField;
IBOutlet NSTextField *licDescriptionField;
IBOutlet NSTextField *urlField;
NSTableView *authorsList;
NSTableColumn *authorsColumn;
IBOutlet NSScrollView *authorsScroll;
NSMutableArray *authorsItems;
IBOutlet NSButton *authorAdd;
IBOutlet NSButton *authorRemove;
IBOutlet NSButton *authorUp;
IBOutlet NSButton *authorDown;
// File Attributes
IBOutlet NSBox *fileAttributesView;
IBOutlet PCFileNameIcon *fileIcon;
IBOutlet PCFileNameField *fileIconField;
NSString *fileName;
IBOutlet NSButton *localizableButton;
IBOutlet NSButton *publicHeaderButton;
IBOutlet NSButton *projectHeaderButton;
}
// ============================================================================
// ==== Intialization & deallocation
// ============================================================================
- (id)initWithProjectManager:(PCProjectManager *)manager;
- (void)close;
- (void)dealloc;
// ============================================================================
// ==== Panel and contents
// ============================================================================
- (BOOL)loadPanel;
- (NSPanel *)panel;
- (NSView *)contentView;
// ============================================================================
// ==== Actions
// ============================================================================
- (void)inspectorPopupDidChange:(id)sender;
- (void)changeCommonProjectEntry:(id)sender;
- (void)selectSectionWithTitle:(NSString *)sectionTitle;
// ============================================================================
// ==== Notifications
// ============================================================================
- (void)activeProjectDidChange:(NSNotification *)aNotif;
- (void)updateValues:(NSNotification *)aNotif;
// ============================================================================
// ==== Build Attributes
// ============================================================================
- (void)createBuildAttributes;
// ----------------------------------------------------------------------------
// --- Search Order
// ----------------------------------------------------------------------------
- (void)searchOrderPopupDidChange:(id)sender;
- (void)searchOrderDoubleClick:(id)sender;
- (void)searchOrderClick:(id)sender;
- (void)setSearchOrderButtonsState;
- (void)setSearchOrder:(id)sender;
- (void)removeSearchOrder:(id)sender;
- (void)addSearchOrder:(id)sender;
- (void)syncSearchOrder;
// ============================================================================
// ==== Project Attributes
// ============================================================================
- (void)createProjectAttributes;
- (void)setCurrentLanguage:(id)sender;
// ============================================================================
// ==== Project Description
// ============================================================================
- (void)createProjectDescription;
// ============================================================================
// ==== File Attributes
// ============================================================================
- (void)createFileAttributes;
- (void)updateFileAttributes;
- (void)beginFileRename;
- (void)fileNameDidChange:(id)sender;
- (void)setPublicHeader:(id)sender;
@end
#endif

View file

@ -0,0 +1,87 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2000-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
This file is part of GNUstep.
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This application is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _PCProjectDebugger_h_
#define _PCProjectDebugger_h_
#include <AppKit/AppKit.h>
@class PCProject;
@class PCButton;
@interface PCProjectLauncher : NSObject
{
PCProject *project; // Not retained!
NSDictionary *currentOptions; // Not retained!
NSBox *componentView;
PCButton *runButton;
PCButton *debugButton;
NSTextView *stdOut;
NSDictionary *textAttributes;
NSFileHandle *readHandle;
NSFileHandle *errorReadHandle;
NSTask *launchTask;
BOOL _isRunning;
BOOL _isDebugging;
}
- (id)initWithProject:(PCProject *)aProject;
- (void)dealloc;
- (NSView *) componentView;
- (BOOL)isRunning;
- (BOOL)isDebugging;
- (void)performRun;
- (void)performDebug;
- (void)debug:(id)sender;
- (void)run:(id)sender;
- (void)runDidTerminate:(NSNotification *)aNotif;
- (void)logStdOut:(NSNotification *)aNotif;
- (void)logErrOut:(NSNotification *)aNotif;
@end
@interface PCProjectLauncher (BuildLogging)
- (void)logString:(NSString *)string newLine:(BOOL)newLine;
- (void)logData:(NSData *)data error:(BOOL)yn;
@end
@interface PCProjectLauncher (UserInterface)
- (void)_createComponentView;
@end
#endif

View file

@ -0,0 +1,44 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2003-2004 Free Software Foundation
Authors: Serg Stoyan
This file is part of GNUstep.
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This application is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _PCLaunchPanel_h_
#define _PCLaunchPanel_h_
#include <AppKit/AppKit.h>
@class PCProjectManager;
@interface PCProjectLauncherPanel : NSPanel
{
PCProjectManager *projectManager;
PCProject *currentProject;
NSBox *contentBox;
NSBox *emptyBox;
}
- (id)initWithProjectManager:(PCProjectManager *)aManager;
@end
#endif

View file

@ -0,0 +1,82 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2000-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
This file is part of GNUstep.
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This application is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _PCProjectLoadedFiles_h_
#define _PCProjectLoadedFiles_h_
#include <AppKit/AppKit.h>
@class PCProject;
typedef enum _PHSortType
{
PHSortByTime,
PHSortByName
} PHSortType;
@interface PCProjectLoadedFiles : NSObject
{
PCProject *project;
NSTableView *filesList;
NSTableColumn *filesColumn;
NSScrollView *filesScroll;
NSMutableArray *editedFiles;
PHSortType sortType;
}
- (id)initWithProject:(PCProject *)aProj;
- (void)dealloc;
- (NSView *)componentView;
- (NSArray *)editedFilesRep;
- (void)setSortType:(PHSortType)type;
- (void)setSortByTime;
- (void)setSortByName;
- (void)selectNextFile;
- (void)selectPreviousFile;
- (void)click:(id)sender;
- (void)doubleClick:(id)sender;
@end
@interface PCProjectLoadedFiles (HistoryTableDelegate)
- (int)numberOfRowsInTableView:(NSTableView *)aTableView;
- (id) tableView:(NSTableView *)aTableView
objectValueForTableColumn:(NSTableColumn *)aTableColumn
row:(int)rowIndex;
- (void)tableView:(NSTableView *)aTableView
setObjectValue:anObject
forTableColumn:(NSTableColumn *)aTableColumn
row:(int)rowIndex;
@end
#endif

View file

@ -0,0 +1,44 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2003-2004 Free Software Foundation
Authors: Serg Stoyan
This file is part of GNUstep.
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This application is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _PCLoadedFilesPanel_h_
#define _PCLoadedFilesPanel_h_
#include <AppKit/AppKit.h>
@class PCProjectManager;
@interface PCProjectLoadedFilesPanel : NSPanel
{
PCProjectManager *projectManager;
PCProject *currentProject;
NSBox *contentBox;
NSBox *emptyBox;
}
- (id)initWithProjectManager:(PCProjectManager *)aManager;
@end
#endif

View file

@ -0,0 +1,235 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2000-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
This file is part of GNUstep.
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This application is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _PCProjectManager_h_
#define _PCProjectManager_h_
#include <AppKit/AppKit.h>
@class PCBundleManager;
@class PCFileManager;
@class PCProject;
@class PCProjectInspector;
@class PCProjectBuilder;
@class PCProjectLauncher;
@class PCProjectLoadedFiles;
@class PCProjectFinder;
@class NewSubprojectController;
extern NSString *PCActiveProjectDidChangeNotification;
@interface PCProjectManager : NSObject
{
id delegate;
id prefController;
PCBundleManager *bundleManager;
NSMutableDictionary *projectTypes;
PCFileManager *fileManager;
PCProjectInspector *projectInspector;
NSPanel *buildPanel;
NSPanel *launchPanel;
NSPanel *loadedFilesPanel;
NSPanel *findPanel;
NSMutableDictionary *loadedProjects;
PCProject *activeProject;
NSString *rootBuildPath;
NSTimer *saveTimer;
NSMutableDictionary *nonProjectEditors;
NSBox *projectTypeAccessaryView;
id projectTypePopup;
NSBox *fileTypeAccessaryView;
id fileTypePopup;
IBOutlet NSPanel *nsPanel;
IBOutlet NSImageView *nsImage;
IBOutlet NSTextField *nsTitle;
IBOutlet NSTextField *projectNameField;
IBOutlet NSTextField *nsNameField;
IBOutlet NSPopUpButton *nsTypePB;
IBOutlet NSButton *nsCancelButton;
IBOutlet NSButton *nsCreateButton;
@private
BOOL _needsReleasing;
}
// ============================================================================
// ==== Intialization & deallocation
// ============================================================================
- (id)init;
- (void)dealloc;
- (void)setDelegate:(id)aDelegate;
- (id)delegate;
- (void)setPrefController:(id)aController;
- (id)prefController;
- (void)createProjectTypeAccessaryView;
- (NSMutableDictionary *)loadProjectTypesInfo;
// ============================================================================
// ==== Timer handling
// ============================================================================
- (BOOL)startSaveTimer;
- (BOOL)resetSaveTimer:(NSNotification *)notif;
- (BOOL)stopSaveTimer;
// ============================================================================
// ==== Accessory methods
// ============================================================================
- (PCBundleManager *)bundleManager;
- (PCFileManager *)fileManager;
- (PCProjectInspector *)projectInspector;
- (NSPanel *)inspectorPanel;
- (void)showProjectInspector:(id)sender;
- (NSPanel *)loadedFilesPanel;
- (void)showProjectLoadedFiles:(id)sender;
- (NSPanel *)buildPanel;
- (NSPanel *)launchPanel;
- (NSPanel *)projectFinderPanel;
- (NSString *)rootBuildPath;
- (NSString *)projectPath;
- (NSString *)selectedFileName;
// ============================================================================
// ==== Project management
// ============================================================================
// Returns all currently loaded projects. They are stored with their absolut
// paths as the keys.
- (NSMutableDictionary *)loadedProjects;
- (PCProject *)activeProject;
- (PCProject *)rootActiveProject;
- (void)setActiveProject:(PCProject *)aProject;
// ============================================================================
// ==== Project actions
// ============================================================================
- (PCProject *)convertLegacyProject:(NSMutableDictionary *)pDict
atPath:(NSString *)aPath;
// Returns the loaded project if the builder class is known, nil else.
- (PCProject *)loadProjectAt:(NSString *)aPath;
// Invokes loadProjectAt to load the project properly.
- (BOOL)openProjectAt:(NSString *)aPath;
- (PCProject *)createProjectOfType:(NSString *)projectType
path:(NSString *)aPath;
- (void)openProject;
- (void)newProject;
- (BOOL)saveProject;
// Calls saveAllProjects if the preferences are setup accordingly.
- (void)saveAllProjectsIfNeeded;
// Saves all projects if needed.
- (BOOL)saveAllProjects;
- (BOOL)addProjectFiles;
- (BOOL)saveProjectFiles;
- (BOOL)removeProjectFiles;
- (void)closeProject:(PCProject *)aProject;
- (void)closeProject;
- (BOOL)closeAllProjects;
// ============================================================================
// ==== File actions
// ============================================================================
- (void)openFile;
- (void)newFile;
- (BOOL)saveFile;
- (BOOL)saveFileAs:(NSString *)path;
- (BOOL)saveFileTo;
- (BOOL)revertFileToSaved;
- (BOOL)renameFile;
- (void)closeFile;
// ============================================================================
// ==== Non project editors
// ============================================================================
- (void)openFileWithEditor:(NSString *)path;
- (void)editorDidClose:(NSNotification *)aNotif;
@end
@interface PCProjectManager (FileManagerDelegates)
// Returns the full path if the type is valid, nil else.
- (NSString *)fileManager:(id)sender
willCreateFile:(NSString *)aFile
withKey:(NSString *)key;
// Adds the file to the project and updates the makefile!
- (void)fileManager:(id)sender
didCreateFile:(NSString *)aFile
withKey:(NSString *)key;
@end
@interface NSObject (PCProjectManagerDelegates)
- (void)projectManager:(id)sender willCloseProject:(PCProject *)aProject;
- (void)projectManager:(id)sender didCloseProject:(PCProject *)aProject;
- (void)projectManager:(id)sender didOpenProject:(PCProject *)aProject;
- (BOOL)projectManager:(id)sender shouldOpenProject:(PCProject *)aProject;
@end
@interface NewSubprojectController : NSWindowController
{
id image;
id nameTextField;
id typePopup;
id createButton;
id cancelButton;
}
@end
@interface PCProjectManager (Subprojects)
- (BOOL)newSubproject;
- (BOOL)addSubproject;
- (void)closeNewSubprojectPanel:(id)sender;
- (BOOL)createSubproject:(id)sender;
- (PCProject *)createSubprojectOfType:(NSString *)projectType
path:(NSString *)aPath;
- (BOOL)createSubproject;
@end
#endif

View file

@ -0,0 +1,126 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2000-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
This file is part of GNUstep.
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This application is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _PCProjectWindow_h_
#define _PCProjectWindow_h_
#include <AppKit/AppKit.h>
#include <ProjectCenter/PCFileNameField.h>
#include <ProjectCenter/PCFileNameIcon.h>
@class PCProject;
@class PCProjectBrowser;
@class PCProjectLoadedFiles;
@class PCButton;
@class PCSplitView;
@interface PCProjectWindow : NSObject
{
PCProject *project;
NSWindow *projectWindow;
NSBox *toolbarView;
PCButton *buildButton;
PCButton *launchButton;
PCButton *loadedFilesButton;
PCButton *findButton;
PCButton *inspectorButton;
NSTextField *statusLine;
PCFileNameIcon *fileIcon;
PCFileNameField *fileIconTitle;
NSView *browserView;
PCSplitView *h_split;
PCSplitView *v_split;
NSBox *customView;
NSResponder *firstResponder;
BOOL _isToolbarVisible;
BOOL _hasCustomView;
BOOL _hasLoadedFilesView;
BOOL _splitViewsRestored;
}
// ============================================================================
// ==== Intialization & deallocation
// ============================================================================
// Will go into gorm file
- (void)_initUI;
- (id)initWithProject:(PCProject *)owner;
- (void)setTitle;
// ============================================================================
// ==== Accessory methods
// ============================================================================
- (BOOL)hasCustomView;
- (BOOL)hasLoadedFilesView;
- (NSView *)customContentView;
- (void)setCustomContentView:(NSView *)subview;
- (void)updateStatusLineWithText:(NSString *)text;
// ============================================================================
// ==== Actions
// ============================================================================
- (void)showProjectLoadedFiles:(id)sender;
- (void)showProjectBuild:(id)sender;
- (void)showProjectLaunch:(id)sender;
- (void)showProjectEditor:(id)sender;
- (BOOL)isToolbarVisible;
- (void)toggleToolbar;
// ============================================================================
// ==== Notifications
// ============================================================================
- (void)projectDictDidChange:(NSNotification *)aNotif;
- (void)projectDictDidSave:(NSNotification *)aNotif;
// ============================================================================
// ==== Window delegate
// ============================================================================
- (NSString *)stringWithSavedFrame;
- (void)makeKeyAndOrderFront:(id)sender;
- (void)makeKeyWindow;
- (void)orderFront:(id)sender;
- (void)center;
- (void)close;
- (void)performClose:(id)sender;
- (BOOL)isDocumentEdited;
- (BOOL)isKeyWindow;
- (BOOL)makeFirstResponder:(NSResponder *)aResponder;
- (void)windowDidBecomeKey:(NSNotification *)aNotification;
- (void)windowDidResignKey:(NSNotification *)aNotification;
- (void)windowDidBecomeMain:(NSNotification *)aNotification;
- (void)windowWillClose:(NSNotification *)aNotification;
@end
#endif

View file

@ -0,0 +1,43 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2002-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
This file is part of GNUstep.
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This application is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _PCSplitView_h_
#define _PCSplitView_h_
#include <AppKit/NSSplitView.h>
@interface PCSplitView : NSSplitView
{
}
- (float)dividerThickness;
- (void)drawDividerInRect:(NSRect)aRect;
@end
#endif // _PCSplitView_h_

View file

@ -0,0 +1,44 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2000-2002 Free Software Foundation
Author: Philippe C.D. Robert <probert@siggraph.org>
This file is part of GNUstep.
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This application is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _ProjectCenter_h_
#define _ProjectCenter_h_
#include <ProjectCenter/PCDefines.h>
#include <ProjectCenter/PCBundleManager.h>
#include <ProjectCenter/PCFileManager.h>
#include <ProjectCenter/PCMakefileFactory.h>
#include <ProjectCenter/PCProjectManager.h>
#include <ProjectCenter/PCProject.h>
#include <ProjectCenter/PCProjectWindow.h>
#include <ProjectCenter/PCProjectBrowser.h>
#include <ProjectCenter/PCProjectLoadedFiles.h>
#include <ProjectCenter/PCProjectEditor.h>
#include <ProjectCenter/PCProjectBuilder.h>
#include <ProjectCenter/PCProjectLauncher.h>
#include <ProjectCenter/PCProjectEditor.h>
#endif

View file

@ -0,0 +1,91 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2005 Free Software Foundation
Authors: Serg Stoyan
This file is part of GNUstep.
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This application is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _CodeEditor_h_
#define _CodeEditor_h_
#include <Foundation/Foundation.h>
#include <AppKit/AppKit.h>
//#include <Protocols/ProjectEditor.h>
@protocol ProjectEditor;
@protocol CodeEditor <NSObject>
// ===========================================================================
// ==== Initialization
// ===========================================================================
- (void)setParser:(id)parser;
- (id)openFileAtPath:(NSString *)file
categoryPath:(NSString *)categoryPath
projectEditor:(id<ProjectEditor>)aProjectEditor
editable:(BOOL)editable;
- (id)openExternalEditor:(NSString *)editor
withPath:(NSString *)file
projectEditor:(id<ProjectEditor>)aProjectEditor;
- (void)show;
- (void)setWindowed:(BOOL)yn;
- (BOOL)isWindowed;
// ===========================================================================
// ==== Accessor methods
// ===========================================================================
- (id<ProjectEditor>)projectEditor;
- (NSWindow *)editorWindow;
- (NSView *)editorView;
- (NSView *)componentView;
- (NSString *)path;
- (void)setPath:(NSString *)path;
- (NSString *)categoryPath;
- (void)setCategoryPath:(NSString *)path;
- (BOOL)isEdited;
- (void)setIsEdited:(BOOL)yn;
// ===========================================================================
// ==== Object managment
// ===========================================================================
- (BOOL)saveFileIfNeeded;
- (BOOL)saveFile;
- (BOOL)saveFileTo:(NSString *)path;
- (BOOL)revertFileToSaved;
- (BOOL)closeFile:(id)sender save:(BOOL)save;
// ===========================================================================
// ==== Parser and scrolling
// ===========================================================================
// Returns class or method names
- (NSArray *)browserItemsForItem:(NSString *)item;
- (void)scrollToClassName:(NSString *)className;
- (void)scrollToMethodName:(NSString *)methodName;
- (void)scrollToLineNumber:(int)line;
@end
#endif

View file

@ -0,0 +1,40 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2005 Free Software Foundation
Authors: Serg Stoyan
This file is part of GNUstep.
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This application is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _CodeParserProtocol_h_
#define _CodeParserProtocol_h_
#include <Foundation/NSObject.h>
@class PCEditor;
@protocol CodeParser <NSObject>
- (id)setString:(NSString *)text;
- (NSArray *)classNames;
- (NSArray *)methodNames;
@end
#endif

View file

@ -0,0 +1,67 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2002-2004 Free Software Foundation
Authors: Philippe C.D. Robert
Serg Stoyan
This file is part of GNUstep.
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This application is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _PCProjectEditorProtocol_h_
#define _PCProjectEditorProtocol_h_
#include <Foundation/Foundation.h>
@protocol CodeParser;
@protocol ProjectEditor
// ===========================================================================
// ==== File handling
// ===========================================================================
- (BOOL)saveEditedFiles:(NSArray *)files;
- (BOOL)saveAllFiles;
- (BOOL)saveFile;
- (BOOL)saveFileAs:(NSString *)file;
- (BOOL)saveFileTo:(NSString *)file;
- (BOOL)revertFileToSaved;
@end
extern NSString *PCEditorDidChangeFileNameNotification;
extern NSString *PCEditorWillOpenNotification;
extern NSString *PCEditorDidOpenNotification;
extern NSString *PCEditorDidCloseNotification;
extern NSString *PCEditorDidBecomeActiveNotification;
extern NSString *PCEditorDidResignActiveNotification;
/*extern NSString *PCEditorDidChangeNotification;
extern NSString *PCEditorWillSaveNotification;
extern NSString *PCEditorDidSaveNotification;
extern NSString *PCEditorSaveDidFailNotification;
extern NSString *PCEditorWillRevertNotification;
extern NSString *PCEditorDidRevertNotification;
extern NSString *PCEditorDeletedNotification;
extern NSString *PCEditorRenamedNotification;*/
#endif

View file

@ -0,0 +1,44 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html
Copyright (C) 2000-2002 Free Software Foundation
Author: Philippe C.D. Robert <probert@siggraph.org>
This file is part of GNUstep.
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This application is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*/
#ifndef _PROJECTTYPE_H
#define _PROJECTTYPE_H
/*
Description: A ProjectType is used to create a project of a certain type.
With this approach this procedure can be implemented as a bundle
and therefore PC remains open for future extensions!
*/
#include <Foundation/Foundation.h>
@class PCProject;
@protocol ProjectType
- (PCProject *)createProjectAt:(NSString *)path;
@end
#endif