Using xcode with externally modified files

Discussion in 'Mac Programming' started by eddyq, Feb 7, 2010.

  1. eddyq macrumors member

    Joined:
    Jun 10, 2009
    #1
    I'm doing kernel development with Xcode. Since it is kernel development I keep my source on another computer and then copy the source changes to the computer under test for compile, build and test.

    But, unlike Windows Visual Studio, Xcode does not see that the files have changed outside of the editor. So far I have only been able to resolve this problem by quitting Xcode and restarting it.

    Is there a way to refresh Xcode after I do the copy?
     
  2. lloyddean macrumors 6502a

    Joined:
    May 10, 2009
    Location:
    Des Moines, WA
    #2
    Unless I'm misunderstanding this is not true. You can modify files using an external editor and Xcode will pickup the changes once changes have been saved from within the external editor.
     
  3. eddyq thread starter macrumors member

    Joined:
    Jun 10, 2009
    #3
    That seems to be the case when you use an external editor within the same machine but doesn't seem to be the case if the file is copied from another machine to the target machine (target being where the Xcode editor is).

    The compiler does however read the copied file.
     
  4. lloyddean macrumors 6502a

    Joined:
    May 10, 2009
    Location:
    Des Moines, WA
    #4
    First of all I have nothing and am unlikely to give you any useful information but have questions anyway if you don't mind.

    What OS are these files coming from and how are they being transferred?

    From your original question I now presume you're editing on the Windows machine, transferring the file (somehow), compiling on the Mac and rebooting to test.
     
  5. eddyq thread starter macrumors member

    Joined:
    Jun 10, 2009
    #5
    That is correct, I edit and "pre-compile" on Windows then transfer the files with xcopy.
     
  6. gnasher729 macrumors P6

    gnasher729

    Joined:
    Nov 25, 2005
    #6
    I would have thought that XCode checks the modification dates on all the files it needs to compile and would pick up the changes. If it doesn't, Build->Clean All Targets, then Build->Build.
     
  7. eddyq thread starter macrumors member

    Joined:
    Jun 10, 2009
    #7
    It does and does build only the files that have changed. But the problem is that when it flags an error it "opens" the file to display the error. If the file had already been open it does not read from disk again. I.E., the editor does not detect that the file was changed externally (even if you clean then build again).

    One way to fix this would be to tell Xcode close out all of the files it has open. Is there a way to do that (i.e., there is a pane at the bottom that has all of the open files ... tell it to close all of those)?
     

Share This Page