-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Class Methods view. Properties view.
- Loading branch information
1 parent
da2a42b
commit 8543543
Showing
21 changed files
with
1,092 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
95 changes: 95 additions & 0 deletions
95
Organismo.xcodeproj/xcshareddata/xcschemes/Organismo-iOS.xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Scheme | ||
LastUpgradeVersion = "1020" | ||
version = "1.3"> | ||
<BuildAction | ||
parallelizeBuildables = "YES" | ||
buildImplicitDependencies = "YES"> | ||
<BuildActionEntries> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "YES" | ||
buildForProfiling = "YES" | ||
buildForArchiving = "YES" | ||
buildForAnalyzing = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "03DA66861CBCEE4700E26CAA" | ||
BuildableName = "Organismo-iOS.framework" | ||
BlueprintName = "Organismo-iOS" | ||
ReferencedContainer = "container:Organismo.xcodeproj"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
</BuildActionEntries> | ||
</BuildAction> | ||
<TestAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
shouldUseLaunchSchemeArgsEnv = "YES"> | ||
<MacroExpansion> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "03DA66861CBCEE4700E26CAA" | ||
BuildableName = "Organismo-iOS.framework" | ||
BlueprintName = "Organismo-iOS" | ||
ReferencedContainer = "container:Organismo.xcodeproj"> | ||
</BuildableReference> | ||
</MacroExpansion> | ||
<Testables> | ||
<TestableReference | ||
skipped = "NO"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "03DA66901CBCEE4700E26CAA" | ||
BuildableName = "OrganismoTests.xctest" | ||
BlueprintName = "OrganismoTests" | ||
ReferencedContainer = "container:Organismo.xcodeproj"> | ||
</BuildableReference> | ||
</TestableReference> | ||
</Testables> | ||
</TestAction> | ||
<LaunchAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
launchStyle = "0" | ||
useCustomWorkingDirectory = "NO" | ||
ignoresPersistentStateOnLaunch = "NO" | ||
debugDocumentVersioning = "YES" | ||
debugServiceExtension = "internal" | ||
allowLocationSimulation = "YES"> | ||
<MacroExpansion> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "03DA66861CBCEE4700E26CAA" | ||
BuildableName = "Organismo-iOS.framework" | ||
BlueprintName = "Organismo-iOS" | ||
ReferencedContainer = "container:Organismo.xcodeproj"> | ||
</BuildableReference> | ||
</MacroExpansion> | ||
</LaunchAction> | ||
<ProfileAction | ||
buildConfiguration = "Release" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
savedToolIdentifier = "" | ||
useCustomWorkingDirectory = "NO" | ||
debugDocumentVersioning = "YES"> | ||
<MacroExpansion> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "03DA66861CBCEE4700E26CAA" | ||
BuildableName = "Organismo-iOS.framework" | ||
BlueprintName = "Organismo-iOS" | ||
ReferencedContainer = "container:Organismo.xcodeproj"> | ||
</BuildableReference> | ||
</MacroExpansion> | ||
</ProfileAction> | ||
<AnalyzeAction | ||
buildConfiguration = "Debug"> | ||
</AnalyzeAction> | ||
<ArchiveAction | ||
buildConfiguration = "Release" | ||
revealArchiveInOrganizer = "YES"> | ||
</ArchiveAction> | ||
</Scheme> |
23 changes: 23 additions & 0 deletions
23
Organismo/Mac/Media.xcassets/NSScrollView_16_Normal.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "NSScrollView.png", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "NSScrollView-1.png", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"filename" : "NSScrollView-2.png", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
} | ||
} |
Binary file added
BIN
+1.04 KB
Organismo/Mac/Media.xcassets/NSScrollView_16_Normal.imageset/NSScrollView-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.04 KB
Organismo/Mac/Media.xcassets/NSScrollView_16_Normal.imageset/NSScrollView-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.04 KB
Organismo/Mac/Media.xcassets/NSScrollView_16_Normal.imageset/NSScrollView.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// | ||
// ORGElementClassView.h | ||
// Organismo-mac | ||
// | ||
// Created by Jon Gabilondo on 12/09/2019. | ||
// Copyright © 2019 organismo-mobile. All rights reserved. | ||
// | ||
|
||
#import <Cocoa/Cocoa.h> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@class ORGUITreeNode; | ||
|
||
@interface ORGElementClassView : NSView | ||
|
||
- (void)showElement:(ORGUITreeNode*)node; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
// | ||
// ORGElementClassView.m | ||
// Organismo-mac | ||
// | ||
// Created by Jon Gabilondo on 12/09/2019. | ||
// Copyright © 2019 organismo-mobile. All rights reserved. | ||
// | ||
|
||
#import "ORGElementClassView.h" | ||
#import "ORGUITreeNode.h" | ||
#import <objc/runtime.h> | ||
|
||
@interface ORGElementClassView() | ||
|
||
@property (weak) IBOutlet NSTableView *methodsTableView; | ||
@property (strong) IBOutlet NSArrayController *methodsArrayController; | ||
|
||
@property (nonatomic) ORGUITreeNode *node; | ||
@property (nonatomic) NSMutableArray<NSString*> *methods; | ||
@property (nonatomic) NSArray<NSString*> *classHierarchy; | ||
|
||
- (NSArray*)buildClassHierarchy:(Class)class; | ||
- (void)showClass:(Class)class; | ||
@end | ||
|
||
@implementation ORGElementClassView | ||
|
||
- (void)showElement:(ORGUITreeNode*)node { | ||
|
||
self.node = node; | ||
self.classHierarchy = [self buildClassHierarchy:node.uiElement.class]; | ||
[self showClass:node.uiElement.class]; | ||
} | ||
|
||
- (NSArray*)buildClassHierarchy:(Class)class { | ||
NSMutableArray *hierarchy = [NSMutableArray array]; | ||
for ( Class currentClass = class; currentClass; currentClass = currentClass.superclass) { | ||
[hierarchy addObject:NSStringFromClass(currentClass)]; | ||
} | ||
return hierarchy; | ||
} | ||
|
||
- (IBAction)hierarchyPathChanged:(NSPopUpButton *)sender { | ||
|
||
NSString *className = self.classHierarchy[sender.indexOfSelectedItem]; | ||
if (!className) { | ||
return; | ||
} | ||
[self showClass:NSClassFromString(className)]; | ||
} | ||
|
||
- (void)showClass:(Class)class { | ||
|
||
if (self.methods) { | ||
[self.methodsArrayController removeObjects:self.methods]; | ||
} else { | ||
self.methods = [NSMutableArray array]; | ||
self.methodsArrayController.content = self.methods; | ||
} | ||
|
||
unsigned int classCount; | ||
Method *methodsList = class_copyMethodList(class, &classCount); | ||
for (unsigned int i = 0; i < classCount; i++) { | ||
SEL selector = method_getName(methodsList[i]); | ||
[self.methodsArrayController addObject:NSStringFromSelector(selector)]; | ||
} | ||
free(methodsList); | ||
|
||
[self.methodsTableView reloadData]; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.