Java Code Examples for com.dd.plist.NSDictionary#getHashMap()
The following examples show how to use
com.dd.plist.NSDictionary#getHashMap() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PBXProjectTest.java From thym with Eclipse Public License 1.0 | 6 votes |
@Test public void testAddToLibrarySearchPaths() throws Exception{ PBXProject project = new PBXProject(pbxFile); String testPath = "my/files/abcd.h"; PBXFile file = new PBXFile(testPath); project.addToLibrarySearchPaths(file); NSDictionary dict = (NSDictionary)ASCIIPropertyListParser.parse(project.getContent().getBytes()); NSDictionary objects = (NSDictionary)dict.objectForKey("objects"); HashMap<String, NSObject> hashmap = objects.getHashMap(); Collection<NSObject> values = hashmap.values(); for (NSObject nsObject : values) { NSDictionary obj = (NSDictionary) nsObject; NSString isa = (NSString) obj.objectForKey("isa"); if(isa != null && isa.getContent().equals("XCBuildConfiguration")){ NSDictionary buildSettings = (NSDictionary) obj.objectForKey("buildSettings"); assertTrue(buildSettings.containsKey("LIBRARY_SEARCH_PATHS")); NSArray searchPaths = (NSArray) buildSettings.get("LIBRARY_SEARCH_PATHS"); assertEquals("$(SRCROOT)/Test_Application/my/files", ((NSString)searchPaths.objectAtIndex(1)).getContent()); } } }
Example 2
Source File: PBXProjectTest.java From thym with Eclipse Public License 1.0 | 5 votes |
private static NSDictionary getGroupByName(NSDictionary objects, String name) throws PBXProjectException{ HashMap<String, NSObject> map = objects.getHashMap(); Collection<NSObject> values = map.values(); for (NSObject nsObject : values) { NSDictionary obj = (NSDictionary)nsObject; NSString isa = (NSString) obj.objectForKey("isa"); NSString nameString = (NSString) obj.objectForKey("name"); if(isa != null && isa.getContent().equals("PBXGroup") && nameString != null && name.equals(nameString.getContent())){ return obj; } } return null; }
Example 3
Source File: PBXProjectTest.java From thym with Eclipse Public License 1.0 | 5 votes |
private static NSDictionary getPhase(NSDictionary objects, String name) throws PBXProjectException{ HashMap<String, NSObject> map = objects.getHashMap(); Collection<NSObject> values = map.values(); for (NSObject nsObject : values) { NSDictionary obj = (NSDictionary)nsObject; NSString isa = (NSString) obj.objectForKey("isa"); if(isa != null && isa.getContent().equals(name)){ return obj; } } return null; }
Example 4
Source File: PBXProject.java From thym with Eclipse Public License 1.0 | 5 votes |
private NSDictionary getPhaseByName(String name) throws PBXProjectException{ NSDictionary objects = getObjects(); HashMap<String, NSObject> map = objects.getHashMap(); Collection<NSObject> values = map.values(); for (NSObject nsObject : values) { NSDictionary obj = (NSDictionary)nsObject; NSString isa = (NSString) obj.objectForKey("isa"); if(isa != null && isa.getContent().equals(name)){ return obj; } } return null; }
Example 5
Source File: PBXProject.java From thym with Eclipse Public License 1.0 | 5 votes |
private NSDictionary getGroupByName(String name) throws PBXProjectException{ NSDictionary objects = getObjects(); HashMap<String, NSObject> map = objects.getHashMap(); Collection<NSObject> values = map.values(); for (NSObject nsObject : values) { NSDictionary obj = (NSDictionary)nsObject; NSString isa = (NSString) obj.objectForKey("isa"); NSString nameString = (NSString) obj.objectForKey("name"); if(isa != null && isa.getContent().equals("PBXGroup") && nameString != null && name.equals(nameString.getContent())){ return obj; } } return null; }