Changeset 152

Show
Ignore:
Timestamp:
10/01/06 20:42:35 (2 years ago)
Author:
rentzsch
Message:

[NEW] mogenerator: "touch" human files when machine files are regenerated.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cocoa/mogenerator/mogenerator.m

    r151 r152  
    100100                        NSString *generatedHumanM = [humanM executeWithObject:entity sender:nil]; 
    101101                         
     102                        BOOL machineDirtied = NO; 
     103                         
    102104                        NSString *machineHFileName = [NSString stringWithFormat:@"_%@.h", [entity name]]; 
    103105                        if (![fm regularFileExistsAtPath:machineHFileName] || ![generatedMachineH isEqualToString:[NSString stringWithContentsOfFile:machineHFileName]]) { 
    104106                                //      If the file doesn't exist or is different than what we just generated, write it out. 
    105107                                [generatedMachineH writeToFile:machineHFileName atomically:NO]; 
     108                                machineDirtied = YES; 
    106109                        } 
    107110                        NSString *machineMFileName = [NSString stringWithFormat:@"_%@.m", [entity name]]; 
     
    109112                                //      If the file doesn't exist or is different than what we just generated, write it out. 
    110113                                [generatedMachineM writeToFile:machineMFileName atomically:NO]; 
     114                                machineDirtied = YES; 
    111115                        } 
    112116                        NSString *humanHFileName = [NSString stringWithFormat:@"%@.h", [entity name]]; 
    113                         if (![fm regularFileExistsAtPath:humanHFileName]) { 
     117                        if ([fm regularFileExistsAtPath:humanHFileName]) { 
     118                                if (machineDirtied) 
     119                                        [fm touchPath:humanHFileName]; 
     120                        } else { 
    114121                                [generatedHumanH writeToFile:humanHFileName atomically:NO]; 
    115122                        } 
    116123                        NSString *humanMFileName = [NSString stringWithFormat:@"%@.m", [entity name]]; 
    117                         if (![fm regularFileExistsAtPath:humanMFileName]) { 
     124                        if ([fm regularFileExistsAtPath:humanMFileName]) { 
     125                                if (machineDirtied) 
     126                                        [fm touchPath:humanMFileName]; 
     127                        } else { 
    118128                                [generatedHumanM writeToFile:humanMFileName atomically:NO]; 
    119129                        } 
  • trunk/cocoa/mogenerator/mogenerator.xcodeproj/wolf.mode1

    r151 r152  
    186186        <array/> 
    187187        <key>OpenEditors</key> 
    188         <array/> 
     188        <array> 
     189                <dict> 
     190                        <key>Content</key> 
     191                        <dict> 
     192                                <key>PBXProjectModuleGUID</key> 
     193                                <string>79E94E590AD0A5EB00CA3E7F</string> 
     194                                <key>PBXProjectModuleLabel</key> 
     195                                <string>mogenerator.m</string> 
     196                                <key>PBXSplitModuleInNavigatorKey</key> 
     197                                <dict> 
     198                                        <key>Split0</key> 
     199                                        <dict> 
     200                                                <key>PBXProjectModuleGUID</key> 
     201                                                <string>79E94E5A0AD0A5EB00CA3E7F</string> 
     202                                                <key>PBXProjectModuleLabel</key> 
     203                                                <string>mogenerator.m</string> 
     204                                                <key>_historyCapacity</key> 
     205                                                <integer>0</integer> 
     206                                                <key>bookmark</key> 
     207                                                <string>79E94E5B0AD0A5EB00CA3E7F</string> 
     208                                                <key>history</key> 
     209                                                <array> 
     210                                                        <string>79E94E520AD0A56C00CA3E7F</string> 
     211                                                </array> 
     212                                        </dict> 
     213                                        <key>SplitCount</key> 
     214                                        <string>1</string> 
     215                                </dict> 
     216                                <key>StatusBarVisibility</key> 
     217                                <true/> 
     218                        </dict> 
     219                        <key>Geometry</key> 
     220                        <dict> 
     221                                <key>Frame</key> 
     222                                <string>{{0, 20}, {1056, 726}}</string> 
     223                                <key>PBXModuleWindowStatusBarHidden2</key> 
     224                                <false/> 
     225                                <key>RubberWindowFrame</key> 
     226                                <string>30 66 1056 767 0 0 1440 878 </string> 
     227                        </dict> 
     228                </dict> 
     229        </array> 
    189230        <key>PerspectiveWidths</key> 
    190231        <array> 
     
    263304                                                        <array> 
    264305                                                                <array> 
    265                                                                         <integer>3</integer> 
     306                                                                        <integer>6</integer> 
    266307                                                                        <integer>1</integer> 
    267308                                                                        <integer>0</integer> 
     
    288329                                                </array> 
    289330                                                <key>RubberWindowFrame</key> 
    290                                                 <string>537 446 690 397 0 0 1440 878 </string> 
     331                                                <string>537 447 690 397 0 0 1440 878 </string> 
    291332                                        </dict> 
    292333                                        <key>Module</key> 
     
    325366                                                                <string>{{0, 0}, {482, 0}}</string> 
    326367                                                                <key>RubberWindowFrame</key> 
    327                                                                 <string>537 446 690 397 0 0 1440 878 </string> 
     368                                                                <string>537 447 690 397 0 0 1440 878 </string> 
    328369                                                        </dict> 
    329370                                                        <key>Module</key> 
     
    333374                                                </dict> 
    334375                                                <dict> 
     376                                                        <key>BecomeActive</key> 
     377                                                        <true/> 
    335378                                                        <key>ContentConfiguration</key> 
    336379                                                        <dict> 
     
    345388                                                                <string>{{0, 5}, {482, 351}}</string> 
    346389                                                                <key>RubberWindowFrame</key> 
    347                                                                 <string>537 446 690 397 0 0 1440 878 </string> 
     390                                                                <string>537 447 690 397 0 0 1440 878 </string> 
    348391                                                        </dict> 
    349392                                                        <key>Module</key> 
     
    369412                        <key>TableOfContents</key> 
    370413                        <array> 
    371                                 <string>79E94DAC0AD09E0200CA3E7F</string> 
     414                                <string>79E94E570AD0A5EB00CA3E7F</string> 
    372415                                <string>1CE0B1FE06471DED0097A5F4</string> 
    373                                 <string>79E94DAD0AD09E0200CA3E7F</string> 
     416                                <string>79E94E580AD0A5EB00CA3E7F</string> 
    374417                                <string>1CE0B20306471E060097A5F4</string> 
    375418                                <string>1CE0B20506471E060097A5F4</string> 
     
    506549        <array> 
    507550                <string>79D2BF1B0ACFAF4A00F3F141</string> 
     551                <string>79E94E590AD0A5EB00CA3E7F</string> 
    508552                <string>/Volumes/Island/wolf/code/sf/redshed/cocoa/mogenerator/mogenerator.xcodeproj</string> 
    509553        </array> 
    510554        <key>WindowString</key> 
    511         <string>537 446 690 397 0 0 1440 878 </string> 
     555        <string>537 447 690 397 0 0 1440 878 </string> 
    512556        <key>WindowTools</key> 
    513557        <array> 
     
    586630                        <array> 
    587631                                <string>79D2BF1B0ACFAF4A00F3F141</string> 
    588                                 <string>79E94DC20AD09FAF00CA3E7F</string> 
     632                                <string>79E94E5C0AD0A5EB00CA3E7F</string> 
    589633                                <string>1CD0528F0623707200166675</string> 
    590634                                <string>XCMainBuildResultsModuleGUID</string> 
  • trunk/cocoa/mogenerator/mogenerator.xcodeproj/wolf.pbxuser

    r151 r152  
    3737                                ); 
    3838                        }; 
    39                         PBXPerProjectTemplateStateSaveDate = 181444072; 
    40                         PBXWorkspaceStateSaveDate = 181444072; 
     39                        PBXPerProjectTemplateStateSaveDate = 181445993; 
     40                        PBXWorkspaceStateSaveDate = 181445993; 
     41                }; 
     42                perUserProjectItems = { 
     43                        79E94E520AD0A56C00CA3E7F /* PBXBookmark */ = 79E94E520AD0A56C00CA3E7F /* PBXBookmark */; 
     44                        79E94E5B0AD0A5EB00CA3E7F /* PBXTextBookmark */ = 79E94E5B0AD0A5EB00CA3E7F /* PBXTextBookmark */; 
    4145                }; 
    4246                sourceControlManager = 79D2BF0B0ACFAE0700F3F141 /* Source Control */; 
     
    4650        08FB7796FE84155DC02AAC07 /* mogenerator.m */ = { 
    4751                uiCtxt = { 
    48                         sepNavIntBoundsRect = "{{0, 0}, {1017, 1862}}"; 
    49                         sepNavSelRange = "{370, 0}"; 
    50                         sepNavVisRect = "{{0, 98}, {1017, 709}}"; 
     52                        sepNavIntBoundsRect = "{{0, 0}, {1017, 2002}}"; 
     53                        sepNavSelRange = "{5807, 0}"; 
     54                        sepNavVisRect = "{{0, 1282}, {1017, 709}}"; 
    5155                        sepNavWindowFrame = "{{30, 66}, {1056, 767}}"; 
    5256                }; 
     
    154158                uiCtxt = { 
    155159                        sepNavIntBoundsRect = "{{0, 0}, {1331, 3710}}"; 
    156                         sepNavSelRange = "{1612, 31}"; 
    157                         sepNavVisRect = "{{0, 0}, {1331, 647}}"; 
     160                        sepNavSelRange = "{7863, 9}"; 
     161                        sepNavVisRect = "{{0, 3030}, {1331, 647}}"; 
    158162                        sepNavWindowFrame = "{{38, 147}, {1370, 705}}"; 
    159163                }; 
     164        }; 
     165        79E94E520AD0A56C00CA3E7F /* PBXBookmark */ = { 
     166                isa = PBXBookmark; 
     167                fRef = 08FB7796FE84155DC02AAC07 /* mogenerator.m */; 
     168        }; 
     169        79E94E5B0AD0A5EB00CA3E7F /* PBXTextBookmark */ = { 
     170                isa = PBXTextBookmark; 
     171                fRef = 08FB7796FE84155DC02AAC07 /* mogenerator.m */; 
     172                name = "mogenerator.m: touchPath"; 
     173                rLen = 0; 
     174                rLoc = 5807; 
     175                rType = 0; 
     176                vrLen = 2502; 
     177                vrLoc = 3508; 
    160178        }; 
    161179        8DD76F960486AA7600D96B5E /* mogenerator */ = {