_PBXProjectWatcher Class Reference

Collaboration diagram for _PBXProjectWatcher:

Collaboration graph
[legend]

List of all members.

Classes

class  PBXArchive

Static Public Member Functions

static void addFilesToProjectNearFilePreferredInsertionGroupNameAddToTargetsCopyIntoGroupFolderCreateGroupsRecursively (NSArray files, String project, String file, String groupName, NSArray targets, boolean copyIntoGroupFolder, boolean createGroupsRecursively)
static void addGroup (String name, String path, String project, String nearFile)
static void addGroupToPreferredInsertionGroup (String group, String path, String project, String nearFile, String preferredInsertionGroup)
static NSArray filesOfTypesInTargetOfProject (NSArray types, String target, String path)
static String nameOfProject (String project)
static String nameOfTargetInProject (String targetID, String path)
static void openFile (String file, int line, String message)
static NSArray openProjectsAppropriateForFile (String path)
static NSArray targetsInProject (String path)
static NSArray targetsInProjectContainingFile (String project, String file)

Static Package Functions

 [static initializer]

Static Private Member Functions

static final String _sendXMLToPB (String string)
static final String _xmlBoolean (boolean bool)
static final String _xmlStringArray (NSArray nsarray)
static byte[] bytesFromFile (File f, int n) throws IOException
static byte[] bytesFromFile (File f) throws IOException
static boolean hasSearchPaths ()
static NSArray nsProjectSearchPaths ()
static final NSArray pathsForProjectNamed (final String name)
static final PBXArchive pbxArchiveAtPath (String path) throws IOException
static boolean safeEquals (Object v1, Object v2)
static String stringWithContentsOfFile (File file)

Static Private Attributes

static boolean _communicationDisabled = false
static NSMutableArray _nsProjectSearchPaths
static NSMutableDictionary _pathsByName = new NSMutableDictionary()
static String _PBHostname
static int _PBPort
static NSMutableDictionary _pbxArchivesByPath = new NSMutableDictionary()
static volatile boolean _printRapidTurnaroundMessage = true
static Logger fileLog = Logger.getLogger(_PBXProjectWatcher.class.getName() + ".Files")
static Logger log = Logger.getLogger(_PBXProjectWatcher.class)


Detailed Description

Our own implementation for the _PBXProjectWatcher. When put in the classpath before the Apple implementation, it checks for project files, parses them and read the resources from there. This is orders of magnitudes faster than sending the XML over a socket over to XCode. And works on Windows, too.

Author:
ak

Member Function Documentation

[static initializer] (  )  [static, package]

static final String _sendXMLToPB ( String  string  )  [static, private]

static final String _xmlBoolean ( boolean  bool  )  [static, private]

static final String _xmlStringArray ( NSArray  nsarray  )  [static, private]

static void addFilesToProjectNearFilePreferredInsertionGroupNameAddToTargetsCopyIntoGroupFolderCreateGroupsRecursively ( NSArray  files,
String  project,
String  file,
String  groupName,
NSArray  targets,
boolean  copyIntoGroupFolder,
boolean  createGroupsRecursively 
) [static]

static void addGroup ( String  name,
String  path,
String  project,
String  nearFile 
) [static]

static void addGroupToPreferredInsertionGroup ( String  group,
String  path,
String  project,
String  nearFile,
String  preferredInsertionGroup 
) [static]

static byte [] bytesFromFile ( File  f,
int  n 
) throws IOException [static, private]

Returns an array of the first n bytes for a given file.

Parameters:
f file to get the bytes from
n number of bytes to read from input file
Exceptions:
IOException if things go wrong
Returns:
byte array of the first n bytes from the file.

static byte [] bytesFromFile ( File  f  )  throws IOException [static, private]

Returns the byte array for a given file.

Parameters:
f file to get the bytes from
Exceptions:
IOException if things go wrong
Returns:
byte array of the file.

static NSArray filesOfTypesInTargetOfProject ( NSArray  types,
String  target,
String  path 
) [static]

static boolean hasSearchPaths (  )  [static, private]

Returns true if the NSProjectSearchPath is not empty.

Returns:

static String nameOfProject ( String  project  )  [static]

static String nameOfTargetInProject ( String  targetID,
String  path 
) [static]

static NSArray nsProjectSearchPaths (  )  [static, private]

Returns the NSProjectSearchPath as Files

Returns:

static void openFile ( String  file,
int  line,
String  message 
) [static]

static NSArray openProjectsAppropriateForFile ( String  path  )  [static]

static final NSArray pathsForProjectNamed ( final String  name  )  [static, private]

Returns the path for the project with the given name.

Parameters:
name 
Returns:

static final PBXArchive pbxArchiveAtPath ( String  path  )  throws IOException [static, private]

Returns a PBXArchive for the given path.

Parameters:
path 
Returns:
Exceptions:
IOException 

static boolean safeEquals ( Object  v1,
Object  v2 
) [static, private]

A safe comparison method that first checks to see if either of the objects are null before comparing them with the equals method.

Note that if both objects are null then they will be considered equal.

Parameters:
v1 first object
v2 second object
Returns:
true if they are equal, false if not

static String stringWithContentsOfFile ( File  file  )  [static, private]

Reads the contents of a file given by a path into a string.

Parameters:
path to the file in the file system
Returns:
the contents of the file in a string

static NSArray targetsInProject ( String  path  )  [static]

static NSArray targetsInProjectContainingFile ( String  project,
String  file 
) [static]


Member Data Documentation

boolean _communicationDisabled = false [static, private]

String _PBHostname [static, private]

int _PBPort [static, private]

volatile boolean _printRapidTurnaroundMessage = true [static, private]

Logger fileLog = Logger.getLogger(_PBXProjectWatcher.class.getName() + ".Files") [static, private]

Logger log = Logger.getLogger(_PBXProjectWatcher.class) [static, private]


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:42:31 2012 for Project Wonder by  doxygen 1.5.8