Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RootGroup isn't correctly resolved for project #12

Open
PaulTaykalo opened this issue May 11, 2012 · 1 comment
Open

RootGroup isn't correctly resolved for project #12

PaulTaykalo opened this issue May 11, 2012 · 1 comment

Comments

@PaulTaykalo
Copy link
Contributor

I have an Xcode project, for which current library will return (null) for root group.
Xcode project successfully parsing

it has next structure:

Groups of project,

      for (xcode_Group * group in [_xcodeProject groups]) {
         NSLog(@"Groupd : %@  : %@ : %@ : %@", 
            [group pathRelativeToParent], 
            [group alias], 
            [group key], 
            [[group parentGroup] key]);
      }

Group (null) : Products : 32005DD2DD4BE82AFAA88C83 : (null)
Group (null) : Products : 320CC833B8AF0ACFD35E6223 : (null)
Group (null) : Products : 3201088596B4756681693703 : (null)
Group (null) : Products : 44B36DE71303E461005FD12F : (null)
Group (null) : core : 44B36B581303DF6D005FD12F : 44B35F971303DE12005FD12F
Group (null) : Products : 320A737074758E53BA54BE93 : (null)
Group (null) : Bundles : 29B97317FDCFA39411CA2CEA : 29B97314FDCFA39411CA2CEA
Group (null) : Resources : 4459EE0F13040CD200AD8ACE : 29B97314FDCFA39411CA2CEA
Group (null) : Products : 320A2827FEC940B25BC42C63 : (null)
Group (null) : Products : 320D7DCCE32703ACAB9A45E3 : (null)
Group (null) : Products : 19C28FACFE9D520D11CA2CBB : 29B97314FDCFA39411CA2CEA
Group (null) : Products : 44B36DC31303E3DB005FD12F : (null)
Group Libs/core/Libs/iphone-news-library/Libs/GData : GData : 44B36F921303E56C005FD12F : 44B36C041303E126005FD12F
Group Libs : (null) : 44B35F971303DE12005FD12F : 29B97314FDCFA39411CA2CEA
Group Config : (null) : 442E0403130E93A100A65FDB : 29B97314FDCFA39411CA2CEA
Group Classes : (null) : 080E96DDFE201D6D7F000001 : 29B97314FDCFA39411CA2CEA
Group (null) : CustomTemplate : 29B97314FDCFA39411CA2CEA : (null)
Group (null) : Products : 320F2C48872C2E2C4DF86203 : (null)
Group Libs/core/Libs/Flurry : Flurry : 44B36DD51303E433005FD12F : 44B36C041303E126005FD12F
Group (null) : Core : E4493B5E155D358B007682BE : 29B97314FDCFA39411CA2CEA
Group (null) : Products : 44B36E091303E4A7005FD12F : (null)
Group (null) : Frameworks : 44B36C041303E126005FD12F : 29B97314FDCFA39411CA2CEA
Group (null) : Products : 320A5A189C235877202780D3 : (null)
Group (null) : Other Sources : 29B97315FDCFA39411CA2CEA : 29B97314FDCFA39411CA2CEA

It seems, that root group can have Alias (CustomTemplate in this example), and one or both items should be fixed:

- (BOOL) isRootGroup {
    return [self pathRelativeToParent] == nil && [self displayName] == nil;
}


- (NSString*) displayName {
    if (_pathRelativeToParent == nil) {  
        return _alias;
    }
    else {
        return [_pathRelativeToParent lastPathComponent];
    }
}

Sorry, cannot provide a .xcodeproj file

@jasperblues
Copy link
Member

Would you like to create an issue? I'm not sure i will have time to look at it right away :(

I will certainly accept a pull request of you have the time.

Otherwise will address ASAP.

Sent from my iPod

On May 11, 2012, at 8:19 PM, "tt.kilew"reply@reply.github.com wrote:

I have an Xcode project, for which current library will return (null) for root group.
Xcode project successfully parsing

it has next structure:

Groups of project,

     for (xcode_Group * group in [_xcodeProject groups]) {
        NSLog(@"Groupd : %@  : %@ : %@ : %@", 
           [group pathRelativeToParent], 
           [group alias], 
           [group key], 
           [[group parentGroup] key]);
     }

Group (null) : Products : 32005DD2DD4BE82AFAA88C83 : (null)
Group (null) : Products : 320CC833B8AF0ACFD35E6223 : (null)
Group (null) : Products : 3201088596B4756681693703 : (null)
Group (null) : Products : 44B36DE71303E461005FD12F : (null)
Group (null) : core : 44B36B581303DF6D005FD12F : 44B35F971303DE12005FD12F
Group (null) : Products : 320A737074758E53BA54BE93 : (null)
Group (null) : Bundles : 29B97317FDCFA39411CA2CEA : 29B97314FDCFA39411CA2CEA
Group (null) : Resources : 4459EE0F13040CD200AD8ACE : 29B97314FDCFA39411CA2CEA
Group (null) : Products : 320A2827FEC940B25BC42C63 : (null)
Group (null) : Products : 320D7DCCE32703ACAB9A45E3 : (null)
Group (null) : Products : 19C28FACFE9D520D11CA2CBB : 29B97314FDCFA39411CA2CEA
Group (null) : Products : 44B36DC31303E3DB005FD12F : (null)
Group Libs/core/Libs/iphone-news-library/Libs/GData : GData : 44B36F921303E56C005FD12F : 44B36C041303E126005FD12F
Group Libs : (null) : 44B35F971303DE12005FD12F : 29B97314FDCFA39411CA2CEA
Group Config : (null) : 442E0403130E93A100A65FDB : 29B97314FDCFA39411CA2CEA
Group Classes : (null) : 080E96DDFE201D6D7F000001 : 29B97314FDCFA39411CA2CEA
Group (null) : CustomTemplate : 29B97314FDCFA39411CA2CEA : (null)
Group (null) : Products : 320F2C48872C2E2C4DF86203 : (null)
Group Libs/core/Libs/Flurry : Flurry : 44B36DD51303E433005FD12F : 44B36C041303E126005FD12F
Group (null) : Core : E4493B5E155D358B007682BE : 29B97314FDCFA39411CA2CEA
Group (null) : Products : 44B36E091303E4A7005FD12F : (null)
Group (null) : Frameworks : 44B36C041303E126005FD12F : 29B97314FDCFA39411CA2CEA
Group (null) : Products : 320A5A189C235877202780D3 : (null)
Group (null) : Other Sources : 29B97315FDCFA39411CA2CEA : 29B97314FDCFA39411CA2CEA

It seems, that root group can have Alias (CustomTemplate in this example), and one or both items should be fixed:

- (BOOL) isRootGroup {
   return [self pathRelativeToParent] == nil && [self displayName] == nil;
}


- (NSString*) displayName {
   if (_pathRelativeToParent == nil) {  
       return _alias;
   }
   else {
       return [_pathRelativeToParent lastPathComponent];
   }
}

Sorry, cannot provide a .xcodeproj file


Reply to this email directly or view it on GitHub:
https://github.com/expanz/xcode-editor/issues/12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants