From 3dfb4f1aadcd124ec835d3f1d4a3758f5ff3dd8a Mon Sep 17 00:00:00 2001 From: Michael Chen Date: Tue, 2 Dec 2014 15:47:49 +0800 Subject: [PATCH] Fix the multi-tab issue and add a UUID for Xcode 6.2 beta. Fix issue #2. --- MCLog/MCLog-Info.plist | 1 + MCLog/MCLog.m | 19 ++++--------------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/MCLog/MCLog-Info.plist b/MCLog/MCLog-Info.plist index c52a69b..b35c3f0 100644 --- a/MCLog/MCLog-Info.plist +++ b/MCLog/MCLog-Info.plist @@ -25,6 +25,7 @@ DVTPlugInCompatibilityUUIDs C4A681B0-4A26-480E-93EC-1218098B9AA0 + FEC992CC-CA4A-4CFD-8881-77300FCB848A A2E4D43F-41F4-4FB9-BB94-7177011C9AED 37B30044-3B14-46BA-ABAA-F01000C27B63 AD68E85B-441B-4301-B564-A45E4919A6AD diff --git a/MCLog/MCLog.m b/MCLog/MCLog.m index cb75efd..0405c7e 100644 --- a/MCLog/MCLog.m +++ b/MCLog/MCLog.m @@ -531,9 +531,6 @@ - (void)outputForStandardOutput:(id)arg1 isPrompt:(BOOL)arg2 isOutputRequestedBy /////////////////////////////////////////////////////////////////////////////////////////// @interface MCLog () -{ - NSMutableDictionary *workspace; -} @end @implementation MCLog @@ -575,8 +572,7 @@ - (id)init { self = [super init]; if (self) { - workspace = [NSMutableDictionary dictionary]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(activate:) name:@"IDEIndexWillIndexWorkspaceNotification" object:nil]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(activate:) name:@"IDEControlGroupDidChangeNotificationName" object:nil]; } return self; } @@ -733,16 +729,9 @@ - (void)searchFieldDidEndEditing:(NSNotification *)notification #pragma clang diagnostic pop } -- (void)activate:(NSNotification *)notification { - - id IDEIndex = [notification object]; - BOOL isAdded = [[workspace objectForKey:hash(IDEIndex)] boolValue]; - if (isAdded) { - return; - } - if ([self addCustomViews]) { - [workspace setObject:@(YES) forKey:hash(IDEIndex)]; - } +- (void)activate:(NSNotification *)notification +{ + [self addCustomViews]; } @end