git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/UNSTABLE_0_4@18954 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Sergii Stoian 2004-03-29 15:05:06 +00:00
parent c075cc2665
commit 926cb09f05
26 changed files with 520 additions and 403 deletions

View file

@ -119,6 +119,7 @@ ProjectCenter_RESOURCE_FILES = \
Resources/class.template \ Resources/class.template \
Resources/gsmarkup.template \ Resources/gsmarkup.template \
Resources/header.template \ Resources/header.template \
Resources/postamble.template \
Resources/protocol.template Resources/protocol.template
-include GNUmakefile.preamble -include GNUmakefile.preamble

View file

@ -60,7 +60,7 @@
[[NSNotificationCenter defaultCenter] [[NSNotificationCenter defaultCenter]
addObserver:self addObserver:self
selector:@selector(activeProjectDidChange:) selector:@selector(activeProjectDidChange:)
name:ActiveProjectDidChangeNotification name:PCActiveProjectDidChangeNotification
object:nil]; object:nil];
if (![self setFrameUsingName: @"ProjectBuilder"]) if (![self setFrameUsingName: @"ProjectBuilder"])

View file

@ -62,7 +62,7 @@
[[NSNotificationCenter defaultCenter] [[NSNotificationCenter defaultCenter]
addObserver:self addObserver:self
selector:@selector(activeProjectDidChange:) selector:@selector(activeProjectDidChange:)
name:ActiveProjectDidChangeNotification name:PCActiveProjectDidChangeNotification
object:nil]; object:nil];
if (![self setFrameUsingName: @"LoadedFiles"]) if (![self setFrameUsingName: @"LoadedFiles"])

View file

@ -62,7 +62,7 @@
[[NSNotificationCenter defaultCenter] [[NSNotificationCenter defaultCenter]
addObserver:self addObserver:self
selector:@selector(activeProjectDidChange:) selector:@selector(activeProjectDidChange:)
name:ActiveProjectDidChangeNotification name:PCActiveProjectDidChangeNotification
object:nil]; object:nil];
if (![self setFrameUsingName: @"ProjectLauncher"]) if (![self setFrameUsingName: @"ProjectLauncher"])

View file

@ -36,27 +36,14 @@
- (void)appendOtherSources:(NSArray *)array forTarget: (NSString *)target; - (void)appendOtherSources:(NSArray *)array forTarget: (NSString *)target;
- (void)appendResources; - (void)appendResources;
- (void)appendResourceItems:(NSArray *)array; - (void)appendResourceItems:(NSArray *)array;
- (void)appendSubprojects:(NSArray*)array; - (void)appendSubprojects:(NSArray*)array;
- (NSData *)encodedMakefile; - (NSData *)encodedMakefile;
- (void)appendTailForLibrary;
- (void)appendTailForTool; - (void)appendTailForTool;
@end @end
@interface PCMakefileFactory (LibraryProject)
- (void)appendLibrary;
- (void)appendLibraryInstallDir:(NSString*)dir;
- (void)appendLibraryLibraries:(NSArray*)array;
- (void)appendLibraryHeaders:(NSArray*)array;
- (void)appendLibraryClasses:(NSArray *)array;
- (void)appendLibraryOtherSources:(NSArray *)array;
@end
@interface PCMakefileFactory (ToolProject) @interface PCMakefileFactory (ToolProject)
- (void)appendTool; - (void)appendTool;

View file

@ -4,8 +4,6 @@
* Project ProjectCenter * Project ProjectCenter
* *
* Created with ProjectCenter - http://www.gnustep.org * Created with ProjectCenter - http://www.gnustep.org
*
* $Id$
*/ */
#include "PCDefines.h" #include "PCDefines.h"
@ -281,22 +279,6 @@ static PCMakefileFactory *_factory = nil;
} }
// Should be removed // Should be removed
- (void)appendTailForLibrary
{
NSString *libnme = [NSString stringWithFormat:@"lib%@",pnme];
NSString *hinst;
[self appendString:@"\n\n"];
hinst = [NSString stringWithFormat:@"HEADERS_INSTALL = $(%@_HEADER_FILES)\n\n",libnme];
[self appendString:hinst];
[self appendString:@"-include GNUmakefile.preamble\n"];
[self appendString:@"-include GNUmakefile.local\n"];
[self appendString:@"include $(GNUSTEP_MAKEFILES)/library.make\n"];
[self appendString:@"-include GNUmakefile.postamble\n"];
}
- (void)appendTailForTool - (void)appendTailForTool
{ {
[self appendString:@"\n\n"]; [self appendString:@"\n\n"];
@ -310,77 +292,6 @@ static PCMakefileFactory *_factory = nil;
@end @end
@implementation PCMakefileFactory (LibraryProject)
- (void)appendLibrary
{
NSString *libnme;
[self appendString:COMMENT_LIBRARY];
[self appendString:[NSString stringWithFormat:@"PACKAGE_NAME=%@\n",pnme]];
[self appendString:[NSString stringWithFormat:@"LIBRARY_VAR=%@\n",[pnme uppercaseString]]];
libnme = [NSString stringWithFormat:@"lib%@",pnme];
[self appendString:[NSString stringWithFormat:@"LIBRARY_NAME=%@\n",libnme]];
[self appendString:[NSString stringWithFormat:@"%@_HEADER_FILES_DIR=.\n",libnme]];
[self appendString:[NSString stringWithFormat:@"%@_HEADER_FILES_INSTALL_DIR=/%@\n",libnme,pnme]];
[self appendString:@"ADDITIONAL_INCLUDE_DIRS = -I..\n"];
[self appendString:@"srcdir = .\n"];
}
- (void)appendLibraryInstallDir:(NSString*)dir
{
[self appendString:[NSString stringWithFormat:@"%@_INSTALLATION_DIR=$(GNUSTEP_INSTALLATION_DIR)\n",[pnme uppercaseString]]];
[self appendString:[NSString stringWithFormat:@"%@_INSTALL_PREFIX=$(GNUSTEP_INSTALLATION_DIR)\n",[pnme uppercaseString]]];
}
- (void)appendLibraryLibraries:(NSArray*)array
{
NSString *libnme = [NSString stringWithFormat:@"lib%@",pnme];
[self appendString:COMMENT_LIBRARIES];
[self appendString:
[NSString stringWithFormat:@"%@_LIBRARIES_DEPEND_UPON += ",libnme]];
if( array && [array count] )
{
NSString *tmp;
NSEnumerator *enumerator = [array objectEnumerator];
while ((tmp = [enumerator nextObject]))
{
if (![tmp isEqualToString:@"gnustep-base"])
{
[self appendString:[NSString stringWithFormat:@"-l%@ ",tmp]];
}
}
}
}
- (void)appendLibraryHeaders:(NSArray*)array
{
NSString *libnme = [NSString stringWithFormat:@"lib%@",pnme];
[self appendHeaders: array forTarget: libnme];
}
- (void)appendLibraryClasses:(NSArray *)array
{
NSString *libnme = [NSString stringWithFormat:@"lib%@",pnme];
[self appendClasses: array forTarget: libnme];
}
- (void)appendLibraryOtherSources:(NSArray *)array
{
NSString *libnme = [NSString stringWithFormat:@"lib%@",pnme];
[self appendOtherSources: array forTarget: libnme];
}
@end
@implementation PCMakefileFactory (ToolProject) @implementation PCMakefileFactory (ToolProject)
- (void)appendTool - (void)appendTool

View file

@ -115,6 +115,8 @@ extern NSString *PCProjectDictDidSaveNotification;
// ==== To be overriden! // ==== To be overriden!
// =========================================================================== // ===========================================================================
- (BOOL)isEditableCategory:(NSString *)category;
// TEMP! For compatibility with old PC*Project subclasses // TEMP! For compatibility with old PC*Project subclasses
- (void)updateValuesFromProjectDict; - (void)updateValuesFromProjectDict;

View file

@ -311,6 +311,14 @@ NSString
- (void)setProjectDictObject:(id)object forKey:(NSString *)key - (void)setProjectDictObject:(id)object forKey:(NSString *)key
{ {
id currentObject = [projectDict objectForKey:key];
if ([object isKindOfClass:[NSString class]]
&& [currentObject isEqualToString:object])
{
return;
}
[projectDict setObject:object forKey:key]; [projectDict setObject:object forKey:key];
[[NSNotificationCenter defaultCenter] [[NSNotificationCenter defaultCenter]
@ -349,6 +357,25 @@ NSString
// ==== To be overriden // ==== To be overriden
// ============================================================================ // ============================================================================
- (BOOL)isEditableCategory:(NSString *)category
{
NSString *key = [self keyForCategory:category];
if ([key isEqualToString:PCClasses]
|| [key isEqualToString:PCHeaders]
|| [key isEqualToString:PCSupportingFiles]
|| [key isEqualToString:PCDocuFiles]
|| [key isEqualToString:PCOtherSources]
|| [key isEqualToString:PCOtherResources]
|| [key isEqualToString:PCNonProject]
|| [key isEqualToString:PCGSMarkupFiles])
{
return YES;
}
return NO;
}
// TEMP! For compatibility with old PC*Project subclasses // TEMP! For compatibility with old PC*Project subclasses
- (void)updateValuesFromProjectDict - (void)updateValuesFromProjectDict
{ {
@ -585,6 +612,7 @@ NSString
[self addFiles:[NSArray arrayWithObjects:toFile,nil] [self addFiles:[NSArray arrayWithObjects:toFile,nil]
forKey:selectedCategoryKey]; forKey:selectedCategoryKey];
NSLog(@"PCproject: move %@ to %@", fromPath, toPath);
[fm movePath:fromPath toPath:toPath handler:nil]; [fm movePath:fromPath toPath:toPath handler:nil];
[projectBrowser setPathForFile:toFile category:selectedCategory]; [projectBrowser setPathForFile:toFile category:selectedCategory];

View file

@ -45,11 +45,10 @@ extern NSString *PCBrowserDidSetPathNotification;
- (void)dealloc; - (void)dealloc;
// ============================================================================ // ============================================================================
// ==== Accessor methods // ==== Accessory methods
// ============================================================================ // ============================================================================
- (NSView *)view; - (NSView *)view;
- (BOOL)isEditableCategory:(NSString *)category file: (NSString *)title;
- (NSString *)nameOfSelectedFile; - (NSString *)nameOfSelectedFile;
- (NSString *)pathOfSelectedFile; - (NSString *)pathOfSelectedFile;
- (NSArray *)selectedFiles; - (NSArray *)selectedFiles;

View file

@ -78,7 +78,7 @@ NSString *PCBrowserDidSetPathNotification = @"PCBrowserDidSetPathNotification";
} }
// ============================================================================ // ============================================================================
// ==== Accessor methods // ==== Accessory methods
// ============================================================================ // ============================================================================
- (NSView *)view - (NSView *)view
@ -86,31 +86,6 @@ NSString *PCBrowserDidSetPathNotification = @"PCBrowserDidSetPathNotification";
return browser; return browser;
} }
// This is responsibility of PC*Project classes
- (BOOL)isEditableCategory:(NSString *)category file:(NSString *)title
{
NSString *key = [project keyForCategory:category];
if ([key isEqualToString:PCClasses]
|| [key isEqualToString:PCHeaders]
|| [key isEqualToString:PCSupportingFiles]
|| [key isEqualToString:PCDocuFiles]
|| [key isEqualToString:PCOtherSources]
|| [key isEqualToString:PCOtherResources]
|| [key isEqualToString:PCNonProject])
{
return YES;
}
if ([key isEqualToString:PCGSMarkupFiles]
&& [[title pathExtension] isEqual: @"gorm"] == NO)
{
return YES;
}
return NO;
}
- (NSString *)nameOfSelectedFile - (NSString *)nameOfSelectedFile
{ {
NSString *name = nil; NSString *name = nil;
@ -183,13 +158,18 @@ NSString *PCBrowserDidSetPathNotification = @"PCBrowserDidSetPathNotification";
- (void)click:(id)sender - (void)click:(id)sender
{ {
if (sender != browser)
{
return;
}
if ([[sender selectedCell] isLeaf] && [[self selectedFiles] count] == 1) if ([[sender selectedCell] isLeaf] && [[self selectedFiles] count] == 1)
{ {
NSString *category = [[sender selectedCellInColumn:0] stringValue]; NSString *category = [[sender selectedCellInColumn:0] stringValue];
NSString *fn = [[sender selectedCell] stringValue]; NSString *fn = [[sender selectedCell] stringValue];
NSString *fp = [[project projectPath] stringByAppendingPathComponent:fn]; NSString *fp = [[project projectPath] stringByAppendingPathComponent:fn];
if ([self isEditableCategory:category file:fn]) if ([project isEditableCategory:category])
{ {
[[project projectEditor] editorForFile:fp [[project projectEditor] editorForFile:fp
category:category category:category
@ -204,13 +184,18 @@ NSString *PCBrowserDidSetPathNotification = @"PCBrowserDidSetPathNotification";
- (void)doubleClick:(id)sender - (void)doubleClick:(id)sender
{ {
if (sender != browser)
{
return;
}
if ([[sender selectedCell] isLeaf]) if ([[sender selectedCell] isLeaf])
{ {
NSString *category = [[sender selectedCellInColumn:0] stringValue]; NSString *category = [[sender selectedCellInColumn:0] stringValue];
NSString *fn = [[sender selectedCell] stringValue]; NSString *fn = [[sender selectedCell] stringValue];
NSString *fp = [[project projectPath] stringByAppendingPathComponent:fn]; NSString *fp = [[project projectPath] stringByAppendingPathComponent:fn];
if ([self isEditableCategory:category file: fn]) if ([project isEditableCategory:category])
{ {
[[project projectEditor] editorForFile:fp [[project projectEditor] editorForFile:fp
category:category category:category
@ -235,21 +220,17 @@ NSString *PCBrowserDidSetPathNotification = @"PCBrowserDidSetPathNotification";
- (void)projectDictDidChange:(NSNotification *)aNotif - (void)projectDictDidChange:(NSNotification *)aNotif
{ {
if (browser) if (browser && ([aNotif object] == project))
{ {
NSString *browserPath = [browser path]; NSString *browserPath = [browser path];
NSString *path = nil;
NSString *slctdCategory = [project selectedRootCategory]; NSString *slctdCategory = [project selectedRootCategory];
if (slctdCategory && browserPath && ![browserPath isEqualToString:@"/"]) if (slctdCategory && browserPath && ![browserPath isEqualToString:@"/"])
{ {
path = [[browserPath componentsSeparatedByString:@"/"]
objectAtIndex:1];
if ([[[project projectEditor] allEditors] count] == 0 if ([[[project projectEditor] allEditors] count] == 0
&& [self isEditableCategory:slctdCategory file:nil]) && [project isEditableCategory:slctdCategory])
{ {
[self setPathForFile:nil category:path]; [self setPathForFile:nil category:slctdCategory];
} }
} }
@ -263,16 +244,20 @@ NSString *PCBrowserDidSetPathNotification = @"PCBrowserDidSetPathNotification";
- (void)browser:(NSBrowser *)sender createRowsForColumn:(int)column inMatrix:(NSMatrix *)matrix - (void)browser:(NSBrowser *)sender createRowsForColumn:(int)column inMatrix:(NSMatrix *)matrix
{ {
NSString *pathToCol = [sender pathToColumn:column]; NSString *pathToCol = nil;
NSArray *files = [project contentAtCategoryPath:pathToCol]; NSArray *files = nil;
int i; int i = 0;
int count = [files count]; int count = 0;
if (sender != browser) if (sender != browser)
{ {
return; return;
} }
pathToCol = [sender pathToColumn:column];
files = [project contentAtCategoryPath:pathToCol];
count = [files count];
for (i = 0; i < count; ++i) for (i = 0; i < count; ++i)
{ {
NSMutableString *categoryPath = nil; NSMutableString *categoryPath = nil;

View file

@ -192,6 +192,11 @@
- (int)numberOfRowsInTableView: (NSTableView *)aTableView - (int)numberOfRowsInTableView: (NSTableView *)aTableView
{ {
if (aTableView != filesList)
{
return 0;
}
return [editedFiles count]; return [editedFiles count];
} }
@ -199,6 +204,11 @@
objectValueForTableColumn: (NSTableColumn *)aTableColumn objectValueForTableColumn: (NSTableColumn *)aTableColumn
row: (int)rowIndex row: (int)rowIndex
{ {
if (aTableView != filesList)
{
return nil;
}
return [editedFiles objectAtIndex: rowIndex]; return [editedFiles objectAtIndex: rowIndex];
} }

View file

@ -69,7 +69,7 @@
- (void)mouseDown:(NSEvent *)theEvent - (void)mouseDown:(NSEvent *)theEvent
{ {
[self setEditableField:YES]; [self setEditableField:YES];
// [super mouseDown:theEvent]; [super mouseDown:theEvent];
} }
- (BOOL)textShouldSetEditable - (BOOL)textShouldSetEditable
@ -109,7 +109,7 @@
[[NSNotificationCenter defaultCenter] [[NSNotificationCenter defaultCenter]
addObserver:self addObserver:self
selector:@selector(activeProjectDidChange:) selector:@selector(activeProjectDidChange:)
name:ActiveProjectDidChangeNotification name:PCActiveProjectDidChangeNotification
object:nil]; object:nil];
[self inspectorPopupDidChange:inspectorPopup]; [self inspectorPopupDidChange:inspectorPopup];
@ -226,7 +226,8 @@
NSString *newEntry = [sender stringValue]; NSString *newEntry = [sender stringValue];
// Build Atributes // Build Atributes
if (sender == installPathField) if (sender == installPathField
&& ![[[project projectDict] objectForKey:PCInstallDir] isEqualToString:newEntry])
{ {
[project setProjectDictObject:newEntry forKey:PCInstallDir]; [project setProjectDictObject:newEntry forKey:PCInstallDir];
} }

View file

@ -47,7 +47,7 @@
#include <ProjectCenter/ProjectDelegate.h> #include <ProjectCenter/ProjectDelegate.h>
#endif #endif
extern NSString *ActiveProjectDidChangeNotification; extern NSString *PCActiveProjectDidChangeNotification;
@interface PCProjectManager : NSObject <ProjectBuilder> @interface PCProjectManager : NSObject <ProjectBuilder>
{ {

View file

@ -48,7 +48,7 @@
#define SavePeriodDCN @"SavePeriodDidChangeNotification" #define SavePeriodDCN @"SavePeriodDidChangeNotification"
NSString *ActiveProjectDidChangeNotification = @"ActiveProjectDidChange"; NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange";
@implementation PCProjectManager @implementation PCProjectManager
@ -308,7 +308,7 @@ NSString *ActiveProjectDidChangeNotification = @"ActiveProjectDidChange";
[activeProject projectName]); [activeProject projectName]);
[[NSNotificationCenter defaultCenter] [[NSNotificationCenter defaultCenter]
postNotificationName:ActiveProjectDidChangeNotification postNotificationName:PCActiveProjectDidChangeNotification
object:activeProject]; object:activeProject];
} }
} }
@ -355,22 +355,42 @@ NSString *ActiveProjectDidChangeNotification = @"ActiveProjectDidChange";
- (PCProject *)loadProjectAt:(NSString *)aPath - (PCProject *)loadProjectAt:(NSString *)aPath
{ {
NSDictionary *projectFile = nil; NSMutableDictionary *projectFile = nil;
NSString *projectTypeName = nil; NSString *projectTypeName = nil;
NSString *projectClassName = nil; NSString *projectClassName = nil;
id<ProjectType> projectCreator; id<ProjectType> projectCreator;
PCProject *project = nil; PCProject *project = nil;
projectFile = [NSDictionary dictionaryWithContentsOfFile:aPath]; projectFile = [NSMutableDictionary dictionaryWithContentsOfFile:aPath];
// For compatibility with 0.3.x projects // For compatibility with 0.3.x projects
projectClassName = [projectFile objectForKey:PCProjectBuilderClass]; projectClassName = [projectFile objectForKey:PCProjectBuilderClass];
if (projectClassName == nil) if (projectClassName == nil)
{ {
projectTypeName = [projectFile objectForKey:PCProjectType]; projectTypeName = [projectFile objectForKey:PCProjectType];
projectClassName = [[delegate projectTypes]objectForKey:projectTypeName]; projectClassName = [[delegate projectTypes]objectForKey:projectTypeName];
} }
projectCreator = [NSClassFromString(projectClassName) sharedCreator]; projectCreator = [NSClassFromString(projectClassName) sharedCreator];
if (projectTypeName == nil)
{
NSString *pPath = nil;
pPath = [[aPath stringByDeletingLastPathComponent]
stringByAppendingPathComponent:@"PC.project"];
[[NSFileManager defaultManager] removeFileAtPath:aPath handler:nil];
[projectFile removeObjectForKey:PCProjectBuilderClass];
projectTypeName = [projectCreator projectTypeName];
[projectFile setObject:projectTypeName forKey:PCProjectType];
[projectFile writeToFile:pPath atomically:YES];
aPath = pPath;
}
if ((project = [projectCreator openProjectAt:aPath])) if ((project = [projectCreator openProjectAt:aPath]))
{ {
NSLog (@"Project loaded as %@", [projectCreator projectTypeName]); NSLog (@"Project loaded as %@", [projectCreator projectTypeName]);

View file

@ -255,7 +255,7 @@
[[NSNotificationCenter defaultCenter] [[NSNotificationCenter defaultCenter]
addObserver:self addObserver:self
selector:@selector(activeProjectDidChange:) selector:@selector(activeProjectDidChange:)
name:ActiveProjectDidChangeNotification name:PCActiveProjectDidChangeNotification
object:project]; object:project];
} }

View file

@ -27,8 +27,6 @@ Resources/AppController.h \
Resources/AppController.m \ Resources/AppController.m \
Resources/main.m \ Resources/main.m \
Resources/PC.project \ Resources/PC.project \
Resources/GNUmakefile.preamble \
Resources/GNUmakefile.postamble \
Resources/Main.gorm \ Resources/Main.gorm \
Resources/Inspector.gorm Resources/Inspector.gorm

View file

@ -51,30 +51,6 @@ NSString *PCITextFieldGetFocus = @"PCITextFieldGetFocusNotification";
- (void)createProjectAttributes - (void)createProjectAttributes
{ {
/* if (projectAttributesView)
{
return;
}*/
// Icons, Main NIB file, Help file
/* _iconsBox = [[NSBox alloc] init];
[_iconsBox setFrame:NSMakeRect(6,6,290,259)];
[_iconsBox setContentViewMargins:NSMakeSize(4.0, 4.0)];
[_iconsBox setTitlePosition:NSNoTitle];
[projectAttributesView addSubview:_iconsBox];*/
// Icon view
/* _iconViewBox = [[NSBox alloc] initWithFrame:NSMakeRect(220,189,56,56)];
[_iconViewBox setTitlePosition:NSNoTitle];
[_iconViewBox setBorderType:NSBezelBorder];
[_iconViewBox setContentViewMargins:NSMakeSize(2.0, 2.0)];
[_iconsBox addSubview:_iconViewBox];
RELEASE(_iconViewBox);
iconView = [[NSImageView alloc] initWithFrame:NSMakeRect(220,0,56,56)];
[_iconViewBox addSubview:iconView];
RELEASE(iconView);*/
// TFs Buttons // TFs Buttons
[setFieldButton setRefusesFirstResponder:YES]; [setFieldButton setRefusesFirstResponder:YES];
[clearFieldButton setRefusesFirstResponder:YES]; [clearFieldButton setRefusesFirstResponder:YES];

View file

@ -316,6 +316,10 @@
success = YES; success = YES;
} }
} }
else if ([super renameFile:ff toFile:tf] == YES)
{
success = YES;
}
[projectBrowser setPathForFile:toFile [projectBrowser setPathForFile:toFile
category:[self categoryForKey:key]]; category:[self categoryForKey:key]];

View file

@ -26,7 +26,6 @@
$Id$ $Id$
*/ */
#include <Foundation/NSString.h>
#include <ProjectCenter/PCFileCreator.h> #include <ProjectCenter/PCFileCreator.h>
#include "PCBundleProj.h" #include "PCBundleProj.h"
@ -70,10 +69,10 @@ static PCBundleProj *_creator = nil;
if ([fm createDirectoryAtPath:path attributes:nil]) if ([fm createDirectoryAtPath:path attributes:nil])
{ {
NSBundle *projectBundle; NSBundle *projectBundle;
NSMutableDictionary *projectDict;
NSString *_file; NSString *_file;
NSString *_2file; NSString *_2file;
// NSString *_resourcePath; // NSString *_resourcePath;
NSMutableDictionary *projectDict;
PCFileCreator *pcfc = [PCFileCreator sharedCreator]; PCFileCreator *pcfc = [PCFileCreator sharedCreator];
project = [[[PCBundleProject alloc] init] autorelease]; project = [[[PCBundleProject alloc] init] autorelease];
@ -90,14 +89,6 @@ static PCBundleProj *_creator = nil;
[projectDict setObject:[path lastPathComponent] forKey:PCPrincipalClass]; [projectDict setObject:[path lastPathComponent] forKey:PCPrincipalClass];
// Copy the project files to the provided path // Copy the project files to the provided path
_file = [projectBundle pathForResource:@"GNUmakefile"
ofType:@"postamble"];
_2file = [path stringByAppendingPathComponent:@"GNUmakefile.postamble"];
[fm copyPath:_file toPath:_2file handler:nil];
_file = [projectBundle pathForResource:@"GNUmakefile" ofType:@"preamble"];
_2file = [path stringByAppendingPathComponent:@"GNUmakefile.preamble"];
[fm copyPath:_file toPath:_2file handler:nil];
// $PROJECTNAME$.m // $PROJECTNAME$.m
_file = [NSString stringWithFormat:@"%@", [path lastPathComponent]]; _file = [NSString stringWithFormat:@"%@", [path lastPathComponent]];
@ -140,15 +131,18 @@ static PCBundleProj *_creator = nil;
writeToFile:[path stringByAppendingPathComponent:@"PC.project"] writeToFile:[path stringByAppendingPathComponent:@"PC.project"]
atomically:YES]; atomically:YES];
} }
return project; return project;
} }
- (PCProject *)openProjectAt:(NSString *)path - (PCProject *)openProjectAt:(NSString *)path
{ {
NSDictionary *dict = [NSDictionary dictionaryWithContentsOfFile:path]; NSDictionary *dict = [NSDictionary dictionaryWithContentsOfFile:path];
NSString *pPath = [path stringByDeletingLastPathComponent];
return [[[PCBundleProject alloc] initWithProjectDictionary:dict return [[[PCBundleProject alloc]
path:[path stringByDeletingLastPathComponent]] autorelease]; initWithProjectDictionary:dict
path:pPath] autorelease];
} }
@end @end

View file

@ -40,7 +40,8 @@
{ {
if ((self = [super init])) if ((self = [super init]))
{ {
rootKeys = [[NSArray arrayWithObjects: PCClasses, rootKeys = [[NSArray arrayWithObjects:
PCClasses,
PCHeaders, PCHeaders,
PCOtherSources, PCOtherSources,
PCInterfaces, PCInterfaces,
@ -53,7 +54,8 @@
PCNonProject, PCNonProject,
nil] retain]; nil] retain];
rootCategories = [[NSArray arrayWithObjects: @"Classes", rootCategories = [[NSArray arrayWithObjects:
@"Classes",
@"Headers", @"Headers",
@"Other Sources", @"Other Sources",
@"Interfaces", @"Interfaces",

View file

@ -17,7 +17,6 @@
LANGUAGE = "English"; LANGUAGE = "English";
LAST_EDITING = ""; LAST_EDITING = "";
LIBRARIES = ("gnustep-base","gnustep-gui"); LIBRARIES = ("gnustep-base","gnustep-gui");
MAININTERFACE = "";
MAKEFILEDIR = "$(GNUSTEP_MAKEFILES)"; MAKEFILEDIR = "$(GNUSTEP_MAKEFILES)";
INSTALLDIR = "$(HOME)/GNUstep/Library/Bundles"; INSTALLDIR = "$(HOME)/GNUstep/Library/Bundles";
OBJC_COMPILEROPTIONS = ""; OBJC_COMPILEROPTIONS = "";

View file

@ -11,12 +11,6 @@
include $(GNUSTEP_MAKEFILES)/common.make include $(GNUSTEP_MAKEFILES)/common.make
#
# Subprojects
#
# #
# Bundle # Bundle
# #
@ -37,8 +31,9 @@ LibraryProject_LIBRARIES_DEPEND_UPON += -lProjectCenter
# #
LibraryProject_RESOURCE_FILES= \ LibraryProject_RESOURCE_FILES= \
PC.proj \ Resources/PC.project \
Version Resources/Version \
Resources/Inspector.gorm
# #
# Header files # Header files
@ -64,3 +59,4 @@ LibraryProject_C_FILES=
include ../GNUmakefile.bundles include ../GNUmakefile.bundles
include $(GNUSTEP_MAKEFILES)/bundle.make include $(GNUSTEP_MAKEFILES)/bundle.make

View file

@ -20,8 +20,6 @@
You should have received a copy of the GNU General Public You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
$Id$
*/ */
#ifndef _PCLIBPROJ_H #ifndef _PCLIBPROJ_H
@ -41,9 +39,7 @@
+ (id)sharedCreator; + (id)sharedCreator;
- (Class)projectClass; - (Class)projectClass;
- (NSString *)projectTypeName; - (NSString *)projectTypeName;
- (NSDictionary *)typeTable;
- (PCProject *)createProjectAt:(NSString *)path; - (PCProject *)createProjectAt:(NSString *)path;
- (PCProject *)openProjectAt:(NSString *)path; - (PCProject *)openProjectAt:(NSString *)path;

View file

@ -20,8 +20,6 @@
You should have received a copy of the GNU General Public You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
$Id$
*/ */
/* /*
@ -31,12 +29,13 @@
*/ */
#include <ProjectCenter/PCFileCreator.h>
#include "PCLibProj.h" #include "PCLibProj.h"
#include "PCLibProject.h" #include "PCLibProject.h"
@implementation PCLibProj @implementation PCLibProj
static NSString *_projTypeName = @"Library";
static PCLibProj *_creator = nil; static PCLibProj *_creator = nil;
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@ -45,9 +44,11 @@ static PCLibProj *_creator = nil;
+ (id)sharedCreator + (id)sharedCreator
{ {
if (!_creator) { if (!_creator)
{
_creator = [[[self class] alloc] init]; _creator = [[[self class] alloc] init];
} }
return _creator; return _creator;
} }
@ -58,14 +59,7 @@ static PCLibProj *_creator = nil;
- (NSString *)projectTypeName - (NSString *)projectTypeName
{ {
return _projTypeName; return @"Library";
}
- (NSDictionary *)typeTable
{
NSString *_path = [[NSBundle bundleForClass:[self class]] pathForResource:@"Info" ofType:@"table"];
return [NSDictionary dictionaryWithContentsOfFile:_path];
} }
- (PCProject *)createProjectAt:(NSString *)path - (PCProject *)createProjectAt:(NSString *)path
@ -75,66 +69,87 @@ static PCLibProj *_creator = nil;
NSAssert(path,@"No valid project path provided!"); NSAssert(path,@"No valid project path provided!");
if ([fm createDirectoryAtPath:path attributes:nil]) { if ([fm createDirectoryAtPath:path attributes:nil])
NSString *_file; {
//NSString *_resourcePath; NSBundle *projectBundle = nil;
NSMutableDictionary *dict; NSMutableDictionary *projectDict;
NSString *projectFile; NSString *_file = nil;
NSString *_2file = nil;
// NSString *_resourcePath;
PCFileCreator *pcfc = [PCFileCreator sharedCreator];
project = [[[PCLibProject alloc] init] autorelease]; project = [[[PCLibProject alloc] init] autorelease];
projectBundle = [NSBundle bundleForClass:[self class]];
_file = [[NSBundle bundleForClass:[self class]] pathForResource:@"PC" ofType:@"proj"]; _file = [projectBundle pathForResource:@"PC" ofType:@"project"];
dict = [NSMutableDictionary dictionaryWithContentsOfFile:_file]; projectDict = [NSMutableDictionary dictionaryWithContentsOfFile:_file];
// Customise the project // Customise the project
[dict setObject:[path lastPathComponent] forKey:PCProjectName]; [project setProjectName:[path lastPathComponent]];
[dict setObject:[self projectTypeName] forKey:PCProjectType]; [projectDict setObject:[path lastPathComponent] forKey:PCProjectName];
[projectDict setObject:[self projectTypeName] forKey:PCProjectType];
// Save the project to disc
projectFile = [NSString stringWithString:[path lastPathComponent]];
projectFile = [projectFile stringByAppendingPathExtension:@"pcproj"];
[dict writeToFile:[path stringByAppendingPathComponent:projectFile]
atomically:YES];
// Copy the project files to the provided path // Copy the project files to the provided path
_file = [[NSBundle bundleForClass:[self class]] pathForResource:@"GNUmakefile" ofType:@"postamble"];
[fm copyPath:_file toPath:[path stringByAppendingPathComponent:@"GNUmakefile.postamble"] handler:nil];
_file = [[NSBundle bundleForClass:[self class]] pathForResource:@"GNUmakefile" ofType:@"preamble"]; // $PROJECTNAME$.m
[fm copyPath:_file toPath:[path stringByAppendingPathComponent:@"GNUmakefile.preamble"] handler:nil]; _file = [NSString stringWithFormat:@"%@", [path lastPathComponent]];
_2file = [NSString stringWithFormat:@"%@.m", [path lastPathComponent]];
[pcfc createFileOfType:ObjCClass
path:[path stringByAppendingPathComponent:_file]
project:project];
[projectDict setObject:[NSArray arrayWithObjects:_2file,nil]
forKey:PCClasses];
_file = [[NSBundle bundleForClass:[self class]] pathForResource:@"main" ofType:@"m"]; // $PROJECTNAME$.h already created by creating $PROJECTNAME$.m
[fm copyPath:_file toPath:[path stringByAppendingPathComponent:@"main.m"] handler:nil]; _file = [NSString stringWithFormat:@"%@.h", [path lastPathComponent]];
[projectDict setObject:[NSArray arrayWithObjects:_file,nil]
forKey:PCHeaders];
// Resources // Resources
/* /*
_resourcePath = [path stringByAppendingPathComponent:@"English.lproj"]; _resourcePath = [path stringByAppendingPathComponent:@"English.lproj"];
[fm createDirectoryAtPath:_resourcePath attributes:nil]; [fm createDirectoryAtPath:_resourcePath attributes:nil];
*/ */
_file = [path stringByAppendingPathComponent:@"Images"];
[fm createDirectoryAtPath:_file attributes:nil];
_file = [path stringByAppendingPathComponent:@"Documentation"];
[fm createDirectoryAtPath:_file attributes:nil];
[fm createDirectoryAtPath:[path stringByAppendingPathComponent:@"Documentation"] attributes:nil]; _file = [projectBundle pathForResource:@"Version" ofType:@""];
_file = [[NSBundle bundleForClass:[self class]] pathForResource:@"Version" ofType:@""]; _2file = [path stringByAppendingPathComponent:@"Version"];
[fm copyPath:_file toPath:[path stringByAppendingPathComponent:@"Version"] handler:nil]; [fm copyPath:_file toPath:_2file handler:nil];
// The path cannot be in the PC.project file! // The path cannot be in the PC.project file!
[project setProjectPath:path]; [project setProjectPath:path];
// Set the new dictionary - this causes the GNUmakefile to be written to disc // Set the new dictionary - this causes the GNUmakefile
if(![project assignProjectDict:dict]) { // to be written to disc
NSRunAlertPanel(@"Attention!",@"Could not load %@!",@"OK",nil,nil,path); if (![project assignProjectDict:projectDict])
{
NSRunAlertPanel(@"Attention!",
@"Could not load %@!",
@"OK",nil,nil,path);
return nil; return nil;
} }
// Save the project to disc
[projectDict
writeToFile:[path stringByAppendingPathComponent:@"PC.project"]
atomically:YES];
} }
return project; return project;
} }
- (PCProject *)openProjectAt:(NSString *)path - (PCProject *)openProjectAt:(NSString *)path
{ {
NSDictionary *dict = [NSDictionary dictionaryWithContentsOfFile:path]; NSDictionary *dict = [NSDictionary dictionaryWithContentsOfFile:path];
NSString *pPath = [path stringByDeletingLastPathComponent];
return [[[PCLibProject alloc] initWithProjectDictionary:dict
path:pPath] autorelease];
if ([[dict objectForKey:PCProjectBuilderClass] isEqualToString:@"PCLibProj"]) {
return [[[PCLibProject alloc] initWithProjectDictionary:dict path:[path stringByDeletingLastPathComponent]] autorelease];
}
return nil; return nil;
} }

View file

@ -20,16 +20,14 @@
You should have received a copy of the GNU General Public You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
$Id$
*/ */
/* /*
Description: Description:
This is the project type 'Application' for GNUstep. You never should create it yourself but This is the project type 'Library' for GNUstep. You never should create it
use PCLibProj for doing this. Otherwise needed files don't get copied to the right place. yourself but use PCLibProj for doing this. Otherwise needed files don't get
copied to the right place.
*/ */
#ifndef _PCLIBPROJECT_H #ifndef _PCLIBPROJECT_H
@ -38,8 +36,14 @@
#include <AppKit/AppKit.h> #include <AppKit/AppKit.h>
#include <ProjectCenter/PCProject.h> #include <ProjectCenter/PCProject.h>
@class PCMakefileFactory;
@interface PCLibProject : PCProject @interface PCLibProject : PCProject
{ {
IBOutlet NSBox *projectAttributesView;
IBOutlet NSTextField *projectTypeField;
IBOutlet NSTextField *projectNameField;
IBOutlet NSTextField *projectLanguageField;
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@ -49,22 +53,23 @@
- (id)init; - (id)init;
- (void)dealloc; - (void)dealloc;
//---------------------------------------------------------------------------- @end
// Project
//----------------------------------------------------------------------------
- (Class)builderClass; @interface PCLibProject (GeneratedFiles)
- (BOOL)writeMakefile; - (BOOL)writeMakefile;
- (void)appendHead:(PCMakefileFactory *)mff;
- (NSArray *)sourceFileKeys; - (void)appendLibraries:(PCMakefileFactory*)mff;
- (NSArray *)resourceFileKeys; - (void)appendTail:(PCMakefileFactory *)mff;
- (NSArray *)otherKeys;
- (NSArray *)buildTargets;
- (NSString *)projectDescription;
- (void)updateValuesFromProjectDict;
@end @end
@interface PCLibProject (Inspector)
- (NSView *)projectAttributesView;
- (void)updateInspectorValues:(NSNotification *)aNotif;
@end
#endif #endif

View file

@ -51,8 +51,10 @@
- (id)init - (id)init
{ {
if ((self = [super init])) { if ((self = [super init]))
rootKeys = [[NSArray arrayWithObjects: PCClasses, {
rootKeys = [[NSArray arrayWithObjects:
PCClasses,
PCHeaders, PCHeaders,
PCOtherSources, PCOtherSources,
PCOtherResources, PCOtherResources,
@ -63,7 +65,8 @@
PCNonProject, PCNonProject,
nil] retain]; nil] retain];
rootCategories = [[NSArray arrayWithObjects: @"Classes", rootCategories = [[NSArray arrayWithObjects:
@"Classes",
@"Headers", @"Headers",
@"Other Sources", @"Other Sources",
@"Other Resources", @"Other Resources",
@ -76,8 +79,8 @@
rootEntries = [[NSDictionary rootEntries = [[NSDictionary
dictionaryWithObjects:rootCategories forKeys:rootKeys] retain]; dictionaryWithObjects:rootCategories forKeys:rootKeys] retain];
} }
return self; return self;
} }
@ -99,32 +102,172 @@
return [PCLibProj class]; return [PCLibProj class];
} }
- (NSString *)projectDescription
{
return @"GNUstep Objective-C library project";
}
- (BOOL)isExecutable
{
return NO;
}
- (NSString *)execToolName
{
return nil;
}
- (NSArray *)fileTypesForCategory:(NSString *)category
{
if ([category isEqualToString:PCClasses])
{
return [NSArray arrayWithObjects:@"m",nil];
}
else if ([category isEqualToString:PCHeaders])
{
return [NSArray arrayWithObjects:@"h",nil];
}
else if ([category isEqualToString:PCOtherSources])
{
return [NSArray arrayWithObjects:@"c",@"C",nil];
}
else if ([category isEqualToString:PCInterfaces])
{
return [NSArray arrayWithObjects:@"gmodel",@"gorm",nil];
}
else if ([category isEqualToString:PCImages])
{
return [NSImage imageFileTypes];
}
else if ([category isEqualToString:PCSubprojects])
{
return [NSArray arrayWithObjects:@"subproj",nil];
}
else if ([category isEqualToString:PCLibraries])
{
return [NSArray arrayWithObjects:@"so",@"a",@"lib",nil];
}
return nil;
}
- (NSString *)dirForCategory:(NSString *)category
{
if ([category isEqualToString:PCImages])
{
return [projectPath stringByAppendingPathComponent:@"Images"];
}
else if ([category isEqualToString:PCDocuFiles])
{
return [projectPath stringByAppendingPathComponent:@"Documentation"];
}
return projectPath;
}
- (NSArray *)buildTargets
{
return [NSArray arrayWithObjects:
@"library", @"debug", @"profile", @"dist", nil];
}
- (NSArray *)sourceFileKeys
{
return [NSArray arrayWithObjects:PCClasses,PCOtherSources,nil];
}
- (NSArray *)resourceFileKeys
{
return [NSArray arrayWithObjects:PCInterfaces,PCOtherResources,PCImages,nil];
}
- (NSArray *)otherKeys
{
return [NSArray arrayWithObjects:PCDocuFiles,PCSupportingFiles,nil];
}
- (NSArray *)allowableSubprojectTypes
{
return [NSArray arrayWithObjects:
@"Bundle", @"Tool", @"Palette", nil];
}
- (NSArray *)defaultLocalizableKeys
{
return [NSArray arrayWithObjects:PCInterfaces, nil];
}
- (NSArray *)localizableKeys
{
return [NSArray arrayWithObjects:
PCInterfaces, PCImages, PCOtherResources, PCDocuFiles, nil];
}
@end
@implementation PCLibProject (GeneratedFiles)
- (BOOL)writeMakefile - (BOOL)writeMakefile
{ {
NSData *mfd;
NSString *mfl = [projectPath stringByAppendingPathComponent:@"GNUmakefile"];
PCMakefileFactory *mf = [PCMakefileFactory sharedFactory]; PCMakefileFactory *mf = [PCMakefileFactory sharedFactory];
NSDictionary *dict = [self projectDict]; int i,j;
NSString *mfl = nil;
NSData *mfd = nil;
// Save the project file // Save the GNUmakefile backup
[super writeMakefile]; [super writeMakefile];
[mf createMakefileForProject:[self projectName]]; // Save GNUmakefile.preamble
[mf appendString:@"include $(GNUSTEP_MAKEFILES)/common.make\n"]; [mf createPreambleForProject:self];
[mf appendString:@"include Version\n"];
[mf appendSubprojects:[dict objectForKey:PCSubprojects]];
[mf appendLibrary]; // Create the new file
[mf appendLibraryInstallDir:[dict objectForKey:PCInstallDir]]; [mf createMakefileForProject:projectName];
[mf appendLibraryLibraries:[dict objectForKey:PCLibraries]];
[mf appendLibraryHeaders:[dict objectForKey:PCHeaders]]; // Head
[mf appendLibraryClasses:[dict objectForKey:PCClasses]]; [self appendHead:mf];
[mf appendLibraryOtherSources:[dict objectForKey:PCOtherSources]];
[mf appendTailForLibrary]; // Libraries
[self appendLibraries:mf];
// Subprojects
if ([[projectDict objectForKey:PCSubprojects] count] > 0)
{
[mf appendSubprojects:[projectDict objectForKey:PCSubprojects]];
}
// Resources
[mf appendResources];
for (i = 0; i < [[self resourceFileKeys] count]; i++)
{
NSString *k = [[self resourceFileKeys] objectAtIndex:i];
NSMutableArray *resources = [[projectDict objectForKey:k] mutableCopy];
if ([k isEqualToString:PCImages])
{
for (j=0; j<[resources count]; j++)
{
[resources replaceObjectAtIndex:j
withObject:[NSString stringWithFormat:@"Images/%@",
[resources objectAtIndex:j]]];
}
}
[mf appendResourceItems:resources];
[resources release];
}
[mf appendHeaders:[projectDict objectForKey:PCHeaders]
forTarget:[NSString stringWithFormat:@"lib%@",projectName]];
[mf appendClasses:[projectDict objectForKey:PCClasses]
forTarget:[NSString stringWithFormat:@"lib%@",projectName]];
[mf appendOtherSources:[projectDict objectForKey:PCOtherSources]
forTarget:[NSString stringWithFormat:@"lib%@",projectName]];
// Tail
[self appendTail:mf];
// Write the new file to disc! // Write the new file to disc!
mfl = [projectPath stringByAppendingPathComponent:@"GNUmakefile"];
if ((mfd = [mf encodedMakefile])) if ((mfd = [mf encodedMakefile]))
{ {
if ([mfd writeToFile:mfl atomically:YES]) if ([mfd writeToFile:mfl atomically:YES])
@ -136,36 +279,81 @@
return NO; return NO;
} }
- (NSArray *)sourceFileKeys - (void)appendHead:(PCMakefileFactory *)mff
{ {
return [NSArray arrayWithObjects:PCClasses,PCOtherSources,nil]; [mff appendString:@"\n#\n# Bundle\n#\n"];
[mff appendString:[NSString stringWithFormat:@"PACKAGE_NAME = %@\n",
projectName]];
[mff appendString:[NSString stringWithFormat:@"LIBRARY_VAR = %@\n",
[projectName uppercaseString]]];
[mff appendString:[NSString stringWithFormat:@"LIBRARY_NAME = lib%@\n",
projectName]];
[mff appendString:[NSString stringWithFormat:@"lib%@_HEADER_FILES_DIR = %@\n",
projectName,@"."]];
[mff appendString:[NSString stringWithFormat:
@"lib%@_HEADER_FILES_INSTALL_DIR = /%@\n", projectName, projectName]];
} }
- (NSArray *)resourceFileKeys - (void)appendLibraries:(PCMakefileFactory *)mff
{ {
return [NSArray array]; NSArray *libs = [projectDict objectForKey:PCLibraries];
[mff appendString:@"\n#\n# Libraries\n#\n"];
[mff appendString:
[NSString stringWithFormat:@"%@_LIBRARIES_DEPEND_UPON += ",projectName]];
if (libs && [libs count])
{
NSString *tmp;
NSEnumerator *enumerator = [libs objectEnumerator];
while ((tmp = [enumerator nextObject]))
{
if (![tmp isEqualToString:@"gnustep-base"] &&
![tmp isEqualToString:@"gnustep-gui"])
{
[mff appendString:[NSString stringWithFormat:@"-l%@ ",tmp]];
}
}
}
} }
- (NSArray *)otherKeys - (void)appendTail:(PCMakefileFactory *)mff
{ {
return [NSArray arrayWithObjects:PCDocuFiles,PCSupportingFiles,nil]; [mff appendString:@"\n\n#\n# Makefiles\n#\n"];
} [mff appendString:@"-include GNUmakefile.preamble\n"];
[mff appendString:@"include $(GNUSTEP_MAKEFILES)/aggregate.make\n"];
- (NSArray *)buildTargets [mff appendString:@"include $(GNUSTEP_MAKEFILES)/library.make\n"];
{ [mff appendString:@"-include GNUmakefile.postamble\n"];
return nil;
}
- (NSString *)projectDescription
{
return @"Project that handles GNUstep/ObjC based libraries.";
}
- (void)updateValuesFromProjectDict
{
[super updateValuesFromProjectDict];
//[appClassField setStringValue:[projectDict objectForKey:PCAppClass]];
} }
@end @end
@implementation PCLibProject (Inspector)
- (NSView *)projectAttributesView
{
if (projectAttributesView == nil)
{
if ([NSBundle loadNibNamed:@"Inspector" owner:self] == NO)
{
NSLog(@"PCLibraryProject: error loading Inspector NIB!");
return nil;
}
[projectAttributesView retain];
[self updateInspectorValues:nil];
}
return projectAttributesView;
}
- (void)updateInspectorValues:(NSNotification *)aNotif
{
[projectTypeField setStringValue:@"Library"];
[projectNameField setStringValue:projectName];
[projectLanguageField setStringValue:[projectDict objectForKey:@"LANGUAGE"]];
}
@end