Skip to content
This repository was archived by the owner on Mar 11, 2024. It is now read-only.

Commit 87d20d6

Browse files
committed
Log files as they are stored up for injection.
1 parent b9344b9 commit 87d20d6

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

InjectionBundle/SwiftEval.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Created by John Holdsworth on 02/11/2017.
66
// Copyright © 2017 John Holdsworth. All rights reserved.
77
//
8-
// $Id: //depot/ResidentEval/InjectionBundle/SwiftEval.swift#110 $
8+
// $Id: //depot/ResidentEval/InjectionBundle/SwiftEval.swift#111 $
99
//
1010
// Basic implementation of a Swift "eval()" including the
1111
// mechanics of recompiling a class and loading the new

InjectionIII/Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<key>CFBundleShortVersionString</key>
2020
<string>1.2</string>
2121
<key>CFBundleVersion</key>
22-
<string>1355</string>
22+
<string>1357</string>
2323
<key>LSApplicationCategoryType</key>
2424
<string>public.app-category.developer-tools</string>
2525
<key>LSMinimumSystemVersion</key>

InjectionIII/InjectionServer.mm

+7-1
Original file line numberDiff line numberDiff line change
@@ -172,14 +172,20 @@ - (void)runInBackground {
172172
}
173173

174174
NSTimeInterval now = [NSDate timeIntervalSinceReferenceDate];
175+
BOOL automatic = appDelegate.enableWatcher.state == NSControlStateValueOn;
175176
for (NSString *swiftSource in changedFiles)
176177
if (![pending containsObject:swiftSource])
177178
if (now > lastInjected[swiftSource].doubleValue + MIN_INJECTION_INTERVAL && now > pause) {
178179
lastInjected[swiftSource] = [NSNumber numberWithDouble:now];
179180
[pending addObject:swiftSource];
181+
if (!automatic)
182+
[self writeCommand:InjectionLog
183+
withString:[NSString stringWithFormat:
184+
@"'%@' saved, type ctrl-= to inject",
185+
swiftSource.lastPathComponent]];
180186
}
181187

182-
if (appDelegate.enableWatcher.state == NSControlStateValueOn)
188+
if (automatic)
183189
[self injectPending];
184190
};
185191

0 commit comments

Comments
 (0)