mirror of
https://github.com/gnustep/libs-gsweb.git
synced 2025-05-30 16:50:52 +00:00
2002-08-04 Manuel Guesdon <mguesdon@orange-concept.com>
* GSWeb.framework/GSWEmbeddedObject.m o ivar names changes to conform to coding standards * GSWeb.framework/GSWGenericContainer.h/.m o ivar names changes to conform to coding standards * GSWeb.framework/GSWDirectActionRequestHandler.h/.m o ivar names changes to conform to coding standards * GSWeb.framework/GSWDynamicURLString.h/.m o ivar names changes to conform to coding standards * GSWeb.framework/GSWBindingNameAssociation.h/.m o ivar names changes to conform to coding standards * GSWeb.framework/GSWComponentDefinition.h/.m o ivar names changes to conform to coding standards * GSWeb.framework/GSWComponentRequestHandler.h/.m o ivar names changes to conform to coding standards * GSWeb.framework/GSWConstantValueAssociation.h/.m o ivar names changes to conform to coding standards * GSWeb.framework/GSWDisplayGroup.h/.m o ivar names changes to conform to coding standards o include for TCSimpleDB/ * GSWeb.framework/GSWKeyValueAssociation.h/.m o ivar names changes to conform to coding standards * GSWeb.framework/GSWParam.h/.m o ivar names changes to conform to coding standards * GSWeb.framework/GSWRequestHandler.h/.m o ivar names changes to conform to coding standards * GSWeb.framework/GSWResourceRequestHandler.h/.m o ivar names changes to conform to coding standards * GSWeb.framework/NSString+Trimming.h/.m o ivar names changes to conform to coding standards * GSWeb.framework/GSWStats.h/.m o ivar names changes to conform to coding standards * GSWeb.framework/NSNonBlockingFileHandle.h/.m o ivar names changes to conform to coding standards * GSWeb.framework/NSString+HTML.h/.m o ivar names changes to conform to coding standards * GSWeb.framework/GSWStatisticsStore.h/.m o ivar names changes to conform to coding standards * GSWeb.framework/GSWHTMLURLValuedElement.h/.m o ivar names changes to conform to coding standards * GSWeb.framework/GSWApplication.h/.m o ivar names changes to conform to coding standards * GSWeb.framework/GSWBundle.h/.m o ivar names changes to conform to coding standards * GSWeb.framework/GSWDeployedBundle.h/.m o ivar names changes to conform to coding standards * GSWeb.framework/GSWTemplateParserXML.h/.m o ivar names changes to conform to coding standards * GSWeb.framework/GSWHTMLParserExt.h/.m o ivar names changes to conform to coding standards * GSWeb.framework/GSWMultiKeyDictionary.h/.m o ivar names changes to conform to coding standards * GSWeb.framework/GSWProjectBundle.h/.m o ivar names changes to conform to coding standards * GSWeb.framework/GSWTemplateParser.h/.m o ivar names changes to conform to coding standards * GSWeb.framework/GSWPageDefElement.h/.m o ivar names changes to conform to coding standards * GSWeb.framework/GSWUtils.h/.m o ivar names changes to conform to coding standards * GSWeb.framework/GSWeb.h/.m o ivar names changes to conform to coding standards * GSWeb.framework/GSWWOCompatibility.h/.m o ivar names changes to conform to coding standards * GSWeb.framework/GSWQuickTime.h o ivar names changes to conform to coding standards * GSWeb.framework/GSWTemplateParserANTLR.h/.m o ivar names changes to conform to coding standards * GSWeb.framework/GSWDebug.m o ivar names changes to conform to coding standards * GSWeb.framework/GSWComponent.m o NSAsserts git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@14234 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f87b59dfca
commit
1e53c66863
77 changed files with 9292 additions and 8659 deletions
|
@ -1,4 +1,5 @@
|
|||
/** GSWProjectBundle.m - <title>GSWeb: Class GSWProjectBundle</title>
|
||||
|
||||
Copyright (C) 1999-2002 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Manuel Guesdon <mguesdon@orange-concept.com>
|
||||
|
@ -33,16 +34,14 @@ static char rcsId[] = "$Id$";
|
|||
#include <GSWeb/GSWeb.h>
|
||||
#include <Foundation/NSFileManager.h>
|
||||
|
||||
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWProjectBundle
|
||||
|
||||
-(id)initWithPath:(NSString*)path_
|
||||
-(id)initWithPath:(NSString*)aPath
|
||||
{
|
||||
LOGObjectFnStart();
|
||||
NSDebugMLLog(@"bundles",@"path_=%@",path_);
|
||||
if ((self=[super initWithPath:path_]))
|
||||
NSDebugMLLog(@"bundles",@"aPath=%@",aPath);
|
||||
if ((self=[super initWithPath:aPath]))
|
||||
{
|
||||
//TODO
|
||||
};
|
||||
|
@ -53,9 +52,9 @@ static char rcsId[] = "$Id$";
|
|||
//--------------------------------------------------------------------
|
||||
-(void)dealloc
|
||||
{
|
||||
DESTROY(projectName);
|
||||
DESTROY(subprojects);
|
||||
DESTROY(pbProjectDictionary);
|
||||
DESTROY(_projectName);
|
||||
DESTROY(_subprojects);
|
||||
DESTROY(_pbProjectDictionary);
|
||||
[super dealloc];
|
||||
};
|
||||
|
||||
|
@ -63,51 +62,51 @@ static char rcsId[] = "$Id$";
|
|||
-(NSString*)description
|
||||
{
|
||||
return [NSString stringWithFormat:@"<%s %p - bundlePath:[%@] relativePaths:[%@] projectName:[%@] subprojects:[%@] pbProjectDictionary:[%@]>",
|
||||
object_get_class_name(self),
|
||||
(void*)self,
|
||||
bundlePath,
|
||||
relativePathsCache,
|
||||
projectName,
|
||||
subprojects,
|
||||
pbProjectDictionary];
|
||||
object_get_class_name(self),
|
||||
(void*)self,
|
||||
_bundlePath,
|
||||
_relativePathsCache,
|
||||
_projectName,
|
||||
_subprojects,
|
||||
_pbProjectDictionary];
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSArray*)lockedPathsForResourcesOfType:(id)type_
|
||||
-(NSArray*)lockedPathsForResourcesOfType:(id)aType
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
return [super lockedPathsForResourcesOfType:type_];
|
||||
return [super lockedPathsForResourcesOfType:aType];
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSArray*)lockedPathsForResourcesInSubprojectsOfType:(id)type_
|
||||
-(NSArray*)lockedPathsForResourcesInSubprojectsOfType:(id)aType
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
return nil;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSString*)lockedRelativePathForResourceNamed:(NSString*)name_
|
||||
forLanguage:(NSString*)language_
|
||||
-(NSString*)lockedRelativePathForResourceNamed:(NSString*)aName
|
||||
forLanguage:(NSString*)aLanguage
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
return [super lockedRelativePathForResourceNamed:name_
|
||||
forLanguage:language_];
|
||||
return [super lockedRelativePathForResourceNamed:aName
|
||||
forLanguage:aLanguage];
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSString*)lockedRelativePathForResourceNamed:(NSString*)name_
|
||||
forLanguages:(NSArray*)languages_
|
||||
-(NSString*)lockedRelativePathForResourceNamed:(NSString*)aName
|
||||
forLanguages:(NSArray*)someLanguages
|
||||
{
|
||||
LOGObjectFnNotImplemented(); //TODOFN
|
||||
return [super lockedRelativePathForResourceNamed:name_
|
||||
forLanguages:languages_];
|
||||
return [super lockedRelativePathForResourceNamed:aName
|
||||
forLanguages:someLanguages];
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSDictionary*)subprojects
|
||||
{
|
||||
return subprojects;
|
||||
return _subprojects;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -134,98 +133,99 @@ static char rcsId[] = "$Id$";
|
|||
//--------------------------------------------------------------------
|
||||
-(NSString*)projectName
|
||||
{
|
||||
return projectName;
|
||||
return _projectName;
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
-(NSDictionary*)_pbProjectDictionary
|
||||
{
|
||||
return pbProjectDictionary;
|
||||
return _pbProjectDictionary;
|
||||
};
|
||||
|
||||
@end
|
||||
|
||||
//====================================================================
|
||||
@implementation GSWProjectBundle (GSWProjectBundle)
|
||||
+(GSWDeployedBundle*)projectBundleForProjectNamed:(NSString*)name_
|
||||
isFramework:(BOOL)isFramework_
|
||||
+(GSWDeployedBundle*)projectBundleForProjectNamed:(NSString*)aName
|
||||
isFramework:(BOOL)isFramework
|
||||
{
|
||||
//OK
|
||||
//name:ObjCTest3
|
||||
GSWDeployedBundle* _projectBundle=nil;
|
||||
GSWDeployedBundle* _aBundle=nil;
|
||||
NSArray* _projectSearchPath=nil;
|
||||
NSMutableArray* _projectsBundles=nil;
|
||||
NSEnumerator* _projectEnum = nil;
|
||||
NSEnumerator* _projectSearchPathEnum=nil;
|
||||
NSString* _path=nil;
|
||||
GSWDeployedBundle* projectBundle=nil;
|
||||
GSWDeployedBundle* aBundle=nil;
|
||||
NSArray* projectSearchPath=nil;
|
||||
NSMutableArray* projectsBundles=nil;
|
||||
NSEnumerator* projectEnum = nil;
|
||||
NSEnumerator* projectSearchPathEnum=nil;
|
||||
NSString* path=nil;
|
||||
LOGClassFnStart();
|
||||
NSDebugMLLog(@"bundles",@"name_:%@",name_);
|
||||
NSDebugMLLog(@"bundles",@"isFramework_=%s",(isFramework_ ? "YES" : "NO"));
|
||||
NSDebugMLLog(@"bundles",@"aName:%@",aName);
|
||||
NSDebugMLLog(@"bundles",@"isFramework=%s",(isFramework ? "YES" : "NO"));
|
||||
|
||||
_projectSearchPath=[GSWApplication projectSearchPath]; // ("H:\\Wotests")
|
||||
NSDebugMLLog(@"bundles",@"_projectSearchPath:%@",_projectSearchPath);
|
||||
_projectsBundles=[NSMutableArray array];
|
||||
projectSearchPath=[GSWApplication projectSearchPath]; // ("H:\\Wotests")
|
||||
NSDebugMLLog(@"bundles",@"projectSearchPath:%@",projectSearchPath);
|
||||
projectsBundles=[NSMutableArray array];
|
||||
|
||||
_projectSearchPathEnum = [_projectSearchPath objectEnumerator];
|
||||
while ((_path = [_projectSearchPathEnum nextObject]))
|
||||
{
|
||||
NSDirectoryEnumerator* dirEnum=nil;
|
||||
NSString* filePath=nil;
|
||||
NSFileManager* fileManager=[NSFileManager defaultManager];
|
||||
dirEnum = [fileManager enumeratorAtPath:_path];
|
||||
while ((filePath = [dirEnum nextObject]))
|
||||
{
|
||||
NSDictionary* attributes = [dirEnum fileAttributes];
|
||||
NSString* fileType = [attributes objectForKey:NSFileType];
|
||||
filePath=[_path stringByAppendingFormat:@"/%@",filePath];
|
||||
NSDebugMLLog(@"bundles",@"filePath:%@",filePath);
|
||||
// NSDebugMLLog(@"bundles",@"attributes:%@",attributes);
|
||||
// NSDebugMLLog(@"bundles",@"fileType:%@",fileType);
|
||||
if ([fileType isEqual:NSFileTypeDirectory])
|
||||
{
|
||||
BOOL _tmpBundleIsFramework=NO;
|
||||
NSString* _tmpBundleProjectName=nil;
|
||||
GSWDeployedBundle* _tmpBundle=[GSWProjectBundle bundleWithPath:filePath];
|
||||
NSDebugMLLog(@"bundles",@"_tmpBundle:%@",_tmpBundle);
|
||||
_tmpBundleProjectName=[_tmpBundle projectName];
|
||||
NSDebugMLLog(@"bundles",@"_tmpBundleProjectName:%@",_tmpBundleProjectName);
|
||||
_tmpBundleIsFramework=[_tmpBundle isFramework];
|
||||
NSDebugMLLog(@"bundles",@"_tmpBundleIsFramework=%s",(_tmpBundleIsFramework ? "YES" : "NO"));
|
||||
projectSearchPathEnum = [projectSearchPath objectEnumerator];
|
||||
while ((path = [projectSearchPathEnum nextObject]))
|
||||
{
|
||||
NSDirectoryEnumerator* dirEnum=nil;
|
||||
NSString* filePath=nil;
|
||||
NSFileManager* fileManager=[NSFileManager defaultManager];
|
||||
dirEnum = [fileManager enumeratorAtPath:path];
|
||||
while ((filePath = [dirEnum nextObject]))
|
||||
{
|
||||
NSDictionary* attributes = [dirEnum fileAttributes];
|
||||
NSString* fileType = [attributes objectForKey:NSFileType];
|
||||
filePath=[path stringByAppendingFormat:@"/%@",filePath];
|
||||
NSDebugMLLog(@"bundles",@"filePath:%@",filePath);
|
||||
// NSDebugMLLog(@"bundles",@"attributes:%@",attributes);
|
||||
// NSDebugMLLog(@"bundles",@"fileType:%@",fileType);
|
||||
if ([fileType isEqual:NSFileTypeDirectory])
|
||||
{
|
||||
BOOL tmpBundleIsFramework=NO;
|
||||
NSString* tmpBundleProjectName=nil;
|
||||
GSWDeployedBundle* tmpBundle=(GSWDeployedBundle*)[GSWProjectBundle bundleWithPath:filePath];
|
||||
NSDebugMLLog(@"bundles",@"tmpBundle:%@",tmpBundle);
|
||||
tmpBundleProjectName=[tmpBundle projectName];
|
||||
NSDebugMLLog(@"bundles",@"tmpBundleProjectName:%@",tmpBundleProjectName);
|
||||
tmpBundleIsFramework=[tmpBundle isFramework];
|
||||
NSDebugMLLog(@"bundles",@"tmpBundleIsFramework=%s",
|
||||
(tmpBundleIsFramework ? "YES" : "NO"));
|
||||
//Why projectName...
|
||||
if ((isFramework_ && _tmpBundleIsFramework)
|
||||
||(!isFramework_ && !_tmpBundleIsFramework))
|
||||
{
|
||||
NSDebugMLLog(@"bundles",@"adding _tmpBundle:%@",_tmpBundleProjectName);
|
||||
[_projectsBundles addObject:_tmpBundle];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
_projectEnum =[_projectsBundles objectEnumerator];
|
||||
while(!_projectBundle && (_aBundle = [_projectEnum nextObject]))
|
||||
{
|
||||
NSString* suffix1=isFramework_ ? GSFrameworkPSuffix : GSWApplicationPSuffix[GSWebNamingConv];
|
||||
NSString* suffix2=isFramework_ ? GSFrameworkPSuffix : GSWApplicationPSuffix[GSWebNamingConvInversed];
|
||||
NSDebugMLLog(@"bundles",@"suffix1:%@ suffix2",suffix1,suffix2);
|
||||
NSDebugMLLog(@"bundles",@"_aBundle:%@",_aBundle);
|
||||
if ((isFramework && tmpBundleIsFramework)
|
||||
||(!isFramework && !tmpBundleIsFramework))
|
||||
{
|
||||
NSDebugMLLog(@"bundles",@"adding tmpBundle:%@",tmpBundleProjectName);
|
||||
[projectsBundles addObject:tmpBundle];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
projectEnum =[projectsBundles objectEnumerator];
|
||||
while(!projectBundle && (aBundle = [projectEnum nextObject]))
|
||||
{
|
||||
NSString* suffix1=isFramework ? GSFrameworkPSuffix : GSWApplicationPSuffix[GSWebNamingConv];
|
||||
NSString* suffix2=isFramework ? GSFrameworkPSuffix : GSWApplicationPSuffix[GSWebNamingConvInversed];
|
||||
NSDebugMLLog(@"bundles",@"suffix1:%@ suffix2",suffix1,suffix2);
|
||||
NSDebugMLLog(@"bundles",@"aBundle:%@",aBundle);
|
||||
|
||||
if ([[_aBundle bundlePath]hasSuffix:suffix1]
|
||||
|| [[_aBundle bundlePath]hasSuffix:suffix2]
|
||||
|| [[_aBundle bundlePath]hasSuffix:@".debug"])
|
||||
{
|
||||
NSString* _tmpName=[_aBundle projectName];
|
||||
NSDebugMLLog(@"bundles",@"_tmpName:%@",_tmpName);
|
||||
if ([_tmpName isEqual:name_])
|
||||
{
|
||||
_projectBundle=_aBundle;
|
||||
NSDebugMLLog(@"bundles",@"_projectBundle:%@",_projectBundle);
|
||||
};
|
||||
};
|
||||
};
|
||||
NSDebugMLLog(@"bundles",@"_projectBundle:%@",_projectBundle);
|
||||
if ([[aBundle bundlePath]hasSuffix:suffix1]
|
||||
|| [[aBundle bundlePath]hasSuffix:suffix2]
|
||||
|| [[aBundle bundlePath]hasSuffix:@".debug"])
|
||||
{
|
||||
NSString* tmpName=[aBundle projectName];
|
||||
NSDebugMLLog(@"bundles",@"tmpName:%@",tmpName);
|
||||
if ([tmpName isEqual:aName])
|
||||
{
|
||||
projectBundle=aBundle;
|
||||
NSDebugMLLog(@"bundles",@"projectBundle:%@",projectBundle);
|
||||
};
|
||||
};
|
||||
};
|
||||
NSDebugMLLog(@"bundles",@"projectBundle:%@",projectBundle);
|
||||
LOGClassFnStop();
|
||||
return _projectBundle;
|
||||
return projectBundle;
|
||||
};
|
||||
|
||||
@end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue