mirror of
https://github.com/qvacua/vimr.git
synced 2024-10-27 02:11:27 +03:00
Compare commits
33 Commits
6045c88d67
...
c9fa7eaeb6
Author | SHA1 | Date | |
---|---|---|---|
|
c9fa7eaeb6 | ||
|
faaf24ab66 | ||
|
b2aa443b09 | ||
|
059d6f84d0 | ||
|
efed07838c | ||
|
8e2a459154 | ||
|
4b5cfbd19e | ||
|
fb6ab1a4b7 | ||
|
0ea0ca2404 | ||
|
df4695c137 | ||
|
d69e747649 | ||
|
522ba02693 | ||
|
f3001cf1e7 | ||
|
0301919b7c | ||
|
15a9074dcf | ||
|
c05d20269a | ||
|
2691d1d41d | ||
|
a33f521531 | ||
|
d241d5392c | ||
|
aa4e18daed | ||
|
ab40c2db25 | ||
|
a472bc8320 | ||
|
9c056876cf | ||
|
050537eeb7 | ||
|
2baf8a437f | ||
|
44043f75a4 | ||
|
9751adcc9d | ||
|
9ff1f0d06c | ||
|
cf91802811 | ||
|
9753861eb9 | ||
|
ceafcf4370 | ||
|
98d411663b | ||
|
1781483dd9 |
58
.github/workflows/vimr-deps-release-on-tag.yml
vendored
58
.github/workflows/vimr-deps-release-on-tag.yml
vendored
@ -1,58 +0,0 @@
|
||||
name: "VimR deps release on tag"
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'vimr-deps-*'
|
||||
|
||||
jobs:
|
||||
Build-universal:
|
||||
runs-on: macos-11
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install brew packages
|
||||
run: |
|
||||
brew update >/dev/null
|
||||
brew upgrade
|
||||
brew install automake coreutils pyenv pyenv-virtualenv
|
||||
- name: Set up Python env
|
||||
run: |
|
||||
export PYENV_ROOT="$HOME/.pyenv"
|
||||
export PATH="$PYENV_ROOT/bin:$PATH"
|
||||
eval "$(pyenv init --path)"
|
||||
eval "$(pyenv init -)"
|
||||
eval "$(pyenv virtualenv-init -)"
|
||||
|
||||
pyenv install 3.9.7
|
||||
pyenv virtualenv 3.9.7 com.qvacua.VimR.bin
|
||||
|
||||
pushd bin >/dev/null
|
||||
pip install -r requirements.txt
|
||||
python setup.py develop
|
||||
popd >/dev/null
|
||||
- name: Build deps
|
||||
run: |
|
||||
export PYENV_ROOT="$HOME/.pyenv"
|
||||
export PATH="$PYENV_ROOT/bin:$PATH"
|
||||
eval "$(pyenv init --path)"
|
||||
eval "$(pyenv init -)"
|
||||
eval "$(pyenv virtualenv-init -)"
|
||||
|
||||
./bin/build_deps.sh
|
||||
- name: Create release and upload artifact
|
||||
env:
|
||||
GH_REPO: ${{ github.repository }}
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
pushd bin/third_party >/dev/null
|
||||
tar cjf vimr-deps.tar.bz2 vimr-deps
|
||||
gh release create -p ${{ github.ref_name }}
|
||||
gh release upload ${{ github.ref_name }} vimr-deps.tar.bz2
|
||||
popd >/dev/null
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: vimr-deps
|
||||
path: bin/third_party/vimr-deps
|
||||
if-no-files-found: error
|
||||
retention-days: 7
|
@ -1,14 +0,0 @@
|
||||
language: objective-c
|
||||
osx_image: xcode9.3
|
||||
|
||||
git:
|
||||
depth: 1
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- Carthage
|
||||
|
||||
before_install: brew update && brew bundle
|
||||
|
||||
script:
|
||||
- ./bin/build_travis.sh
|
@ -10,10 +10,10 @@ private let iconsCache = NSCache<NSURL, NSImage>()
|
||||
|
||||
public final class FileUtils {
|
||||
private static let keysToGet: [URLResourceKey] = [
|
||||
.isRegularFileKey,
|
||||
.isDirectoryKey,
|
||||
.isPackageKey,
|
||||
.isHiddenKey,
|
||||
.isAliasFileKey,
|
||||
.isSymbolicLinkKey,
|
||||
]
|
||||
|
||||
private static let scanOptions: FileManager.DirectoryEnumerationOptions = [
|
||||
@ -56,7 +56,7 @@ public final class FileUtils {
|
||||
let result = pathCompsOnlyMin[0]
|
||||
let possibleParent = NSURL.fileURL(withPathComponents: Array(result[0...commonIdx]))!
|
||||
|
||||
return possibleParent.isDir ? possibleParent : possibleParent.parent
|
||||
return possibleParent.hasDirectoryPath ? possibleParent : possibleParent.parent
|
||||
}
|
||||
|
||||
public static func icon(forType type: String) -> NSImage { workspace.icon(forFileType: type) }
|
||||
|
@ -125,34 +125,13 @@ public extension URL {
|
||||
|
||||
var shellEscapedPath: String { self.path.shellEscapedPath }
|
||||
|
||||
var isDir: Bool { self.resourceValue(URLResourceKey.isDirectoryKey.rawValue) }
|
||||
|
||||
var isHidden: Bool { self.resourceValue(URLResourceKey.isHiddenKey.rawValue) }
|
||||
|
||||
var isPackage: Bool { self.resourceValue(URLResourceKey.isPackageKey.rawValue) }
|
||||
|
||||
/// Wrapper function for NSURL.getResourceValue for Bool values.
|
||||
/// Returns also `false` when
|
||||
/// - there is no value for the given `key` or
|
||||
/// - the value cannot be converted to `NSNumber`.
|
||||
///
|
||||
/// - parameters:
|
||||
/// - key: The `key`-parameter of `NSURL.getResourceValue`.
|
||||
private func resourceValue(_ key: String) -> Bool {
|
||||
var rsrc: AnyObject?
|
||||
|
||||
do {
|
||||
try (self as NSURL).getResourceValue(&rsrc, forKey: URLResourceKey(rawValue: key))
|
||||
} catch let error as NSError {
|
||||
// FIXME: How to error handle?
|
||||
log.error("ERROR while getting \(key): \(error)")
|
||||
return false
|
||||
}
|
||||
|
||||
if let result = rsrc as? NSNumber { return result.boolValue }
|
||||
|
||||
return false
|
||||
var isRegularFile: Bool {
|
||||
(try? self.resourceValues(forKeys: [.isRegularFileKey]))?.isRegularFile ?? false
|
||||
}
|
||||
|
||||
var isHidden: Bool { (try? self.resourceValues(forKeys: [.isHiddenKey]))?.isHidden ?? false }
|
||||
|
||||
var isPackage: Bool { (try? self.resourceValues(forKeys: [.isPackageKey]))?.isPackage ?? false }
|
||||
}
|
||||
|
||||
public extension ValueTransformer {
|
||||
|
@ -51,18 +51,6 @@ class UrlCommonsTest: XCTestCase {
|
||||
expect(URL(fileURLWithPath: "/").parent).to(equal(URL(fileURLWithPath: "/")))
|
||||
}
|
||||
|
||||
func testIsDir() {
|
||||
let resourceUrl = Bundle.module.url(
|
||||
forResource: "UrlCommonsTest",
|
||||
withExtension: "",
|
||||
subdirectory: "Resources"
|
||||
)!
|
||||
let hidden = resourceUrl.appendingPathComponent(".dot-hidden-file")
|
||||
|
||||
expect(resourceUrl.isDir).to(beTrue())
|
||||
expect(hidden.isDir).to(beFalse())
|
||||
}
|
||||
|
||||
func testIsHidden() {
|
||||
let resourceUrl = Bundle.module.url(
|
||||
forResource: "UrlCommonsTest",
|
||||
|
@ -1,9 +0,0 @@
|
||||
import XCTest
|
||||
|
||||
#if !canImport(ObjectiveC)
|
||||
public func allTests() -> [XCTestCaseEntry] {
|
||||
[
|
||||
testCase(CommonsTests.allTests),
|
||||
]
|
||||
}
|
||||
#endif
|
@ -1,7 +0,0 @@
|
||||
import XCTest
|
||||
|
||||
import CommonsTests
|
||||
|
||||
var tests = [XCTestCaseEntry]()
|
||||
tests += CommonsTests.allTests()
|
||||
XCTMain(tests)
|
26
DEVELOP.md
26
DEVELOP.md
@ -38,40 +38,18 @@ then continuously invoke the `build_nvimserver_for_local_dev` script.
|
||||
|
||||
## How to release
|
||||
|
||||
### NvimServer
|
||||
|
||||
* Tag with the name `nvimserver-x.y.z-n`. GitHub actions will build the `x86_64` version,
|
||||
create a release and upload it.
|
||||
* Build the `arm64` version locally and upload it:
|
||||
```bash
|
||||
clean=true build_libnvim=true ./NvimServer/bin/build_nvimserver.sh
|
||||
```
|
||||
* Build a universal binary by the following and upload the artefact:
|
||||
```bash
|
||||
tag=nvimserver-x.y.z-n ./NvimServer/bin/build_release.sh
|
||||
```
|
||||
|
||||
### VimR
|
||||
|
||||
#### Dependencies
|
||||
|
||||
* Tag with the name `vimr-deps-yyyy-mm-dd`. GitHub actions will build the universal version,
|
||||
create a release and upload it.
|
||||
* Update `resources/vimr-deps_version.txt` and push.
|
||||
|
||||
#### Executable
|
||||
|
||||
* Set a new version of VimR via
|
||||
```bash
|
||||
is_snapshot=true ./bin/set_new_versions.sh # for snapshot or
|
||||
is_snapshot=false marketing_version=0.38.3 ./bin/set_new_versions.sh # for release
|
||||
```
|
||||
and commit. This will create a `${bundle_version}-snapshot/release.sh` file to be used
|
||||
with `build_release.sh`.
|
||||
with `build_release.sh` and `release-notes.temp.md` for release notes.
|
||||
* Tag with the name
|
||||
- Snapshot: `snapshot/yyyymmdd.HHMMSS`
|
||||
- Release: `vX.Y.Z-yyyymmdd.HHMMSS`
|
||||
* Push
|
||||
* Add release notes to `release-notes.temp.md`.
|
||||
* Build, package and upload via
|
||||
```bash
|
||||
create_gh_release=true upload=true update_appcast=true \
|
||||
|
23
Ignore/Package.swift
Normal file
23
Ignore/Package.swift
Normal file
@ -0,0 +1,23 @@
|
||||
// swift-tools-version:5.6
|
||||
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "Ignore",
|
||||
platforms: [.macOS(.v10_13)],
|
||||
products: [
|
||||
.library(name: "Ignore", targets: ["Ignore"]),
|
||||
],
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/qvacua/misc.swift", exact: "0.0.1"),
|
||||
.package(url: "https://github.com/Quick/Nimble", from: "10.0.0"),
|
||||
],
|
||||
targets: [
|
||||
.target(name: "Ignore", dependencies: [.product(name: "WildmatchC", package: "misc.swift")]),
|
||||
.testTarget(
|
||||
name: "IgnoreTests",
|
||||
dependencies: ["Ignore", "Nimble"],
|
||||
resources: [.copy("Resources")]
|
||||
),
|
||||
]
|
||||
)
|
@ -1,3 +1,3 @@
|
||||
# RxPack
|
||||
# Ignore
|
||||
|
||||
A description of this package.
|
105
Ignore/Sources/Ignore/FileLineReader.swift
Normal file
105
Ignore/Sources/Ignore/FileLineReader.swift
Normal file
@ -0,0 +1,105 @@
|
||||
/// Tae Won Ha - http://taewon.de - @hataewon
|
||||
/// See LICENSE
|
||||
|
||||
import Foundation
|
||||
|
||||
/// Reads the file at the given ``URL`` line by line.
|
||||
/// The Unix line ending `LF` is used to determine lines.
|
||||
/// Thus, it supports `LF` and `CRLF` files. It does not support the legacy Mac line ending `CR`.
|
||||
public final class FileLineReader: Sequence {
|
||||
public static let defaultLineBufferCount = 1024
|
||||
|
||||
public let url: URL
|
||||
|
||||
public var lineBufferCount: Int
|
||||
public var encoding: String.Encoding
|
||||
|
||||
/// - Parameters:
|
||||
/// - url: URL of the file.
|
||||
/// - encoding: Encoding of the file. It's mutable.
|
||||
/// After mutating, the next iterator will use the new value.
|
||||
/// - lineBufferCount: The initial size of the buffer for reading lines. It's mutable.
|
||||
/// After mutating, the next iterator will use the new value.
|
||||
/// The default is ``FileLineReader/defaultLineBufferCount``.
|
||||
public init(url: URL, encoding: String.Encoding, lineBufferCount: Int = defaultLineBufferCount) {
|
||||
self.lineBufferCount = lineBufferCount
|
||||
self.url = url
|
||||
self.encoding = encoding
|
||||
}
|
||||
|
||||
public func makeIterator() -> AnyIterator<String> {
|
||||
guard let file = fopen(url.path, "r") else { return AnyIterator { nil } }
|
||||
|
||||
let iterator = LfLineIterator(
|
||||
file: file,
|
||||
encoding: self.encoding,
|
||||
lineBufferCount: self.lineBufferCount
|
||||
)
|
||||
return AnyIterator { iterator.next() }
|
||||
}
|
||||
}
|
||||
|
||||
private class LfLineIterator: IteratorProtocol {
|
||||
init(
|
||||
file: UnsafeMutablePointer<FILE>,
|
||||
encoding: String.Encoding,
|
||||
lineBufferCount: Int
|
||||
) {
|
||||
self.file = file
|
||||
self.encoding = encoding
|
||||
self.buffer = Array(repeating: 0, count: lineBufferCount)
|
||||
}
|
||||
|
||||
deinit { fclose(self.file) }
|
||||
|
||||
func next() -> String? {
|
||||
var readCharCount = 0
|
||||
while true {
|
||||
let nextChar = getc(self.file)
|
||||
|
||||
if nextChar == EOF {
|
||||
if readCharCount == 0 { return nil }
|
||||
return String(
|
||||
data: Data(
|
||||
bytesNoCopy: self.buffer[0..<readCharCount].unsafeMutableRawPointer,
|
||||
count: readCharCount,
|
||||
deallocator: .none
|
||||
), encoding: self.encoding
|
||||
)
|
||||
}
|
||||
|
||||
if readCharCount >= self.buffer.count {
|
||||
// Array.append()
|
||||
// https://developer.apple.com/documentation/swift/array/3126937-append
|
||||
// "Complexity: O(1) on average, over many calls to append(_:) on the same array."
|
||||
self.buffer.append(UInt8(nextChar))
|
||||
} else {
|
||||
self.buffer[readCharCount] = UInt8(nextChar)
|
||||
}
|
||||
readCharCount += 1
|
||||
|
||||
if nextChar == Self.unixLineEnding {
|
||||
return String(
|
||||
data: Data(
|
||||
bytesNoCopy: self.buffer[0..<readCharCount].unsafeMutableRawPointer,
|
||||
count: readCharCount,
|
||||
deallocator: .none
|
||||
), encoding: self.encoding
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private let encoding: String.Encoding
|
||||
private var buffer: [UInt8]
|
||||
private let file: UnsafeMutablePointer<FILE>
|
||||
|
||||
private static let unixLineEnding = "\n".utf8.first!
|
||||
}
|
||||
|
||||
private extension ArraySlice {
|
||||
@inline(__always)
|
||||
var unsafeMutableRawPointer: UnsafeMutableRawPointer {
|
||||
UnsafeMutableRawPointer(mutating: self.withUnsafeBytes { $0.baseAddress! })
|
||||
}
|
||||
}
|
105
Ignore/Sources/Ignore/Filter.swift
Normal file
105
Ignore/Sources/Ignore/Filter.swift
Normal file
@ -0,0 +1,105 @@
|
||||
/// Tae Won Ha - http://taewon.de - @hataewon
|
||||
/// See LICENSE
|
||||
|
||||
import Foundation
|
||||
import WildmatchC
|
||||
|
||||
public struct Filter: CustomStringConvertible {
|
||||
public let base: URL
|
||||
public let pattern: String
|
||||
|
||||
public let isAllow: Bool
|
||||
public let isOnlyForDirectories: Bool
|
||||
public let isRelativeToBase: Bool
|
||||
|
||||
public init(base: URL, pattern: String) {
|
||||
self.base = base
|
||||
|
||||
var effectivePattern: String
|
||||
|
||||
self.isAllow = pattern.first == "!"
|
||||
effectivePattern = self.isAllow ? String(pattern.dropFirst()) : pattern
|
||||
|
||||
self.isOnlyForDirectories = effectivePattern.last == "/"
|
||||
effectivePattern =
|
||||
self.isOnlyForDirectories ? String(effectivePattern.dropLast(1)) : effectivePattern
|
||||
|
||||
self.isRelativeToBase = effectivePattern.contains("/")
|
||||
if self.isRelativeToBase {
|
||||
effectivePattern = base.path
|
||||
+ (effectivePattern.first == "/" ? effectivePattern : "/" + effectivePattern)
|
||||
}
|
||||
|
||||
self.pattern = effectivePattern
|
||||
self.patternCstr = Array(self.pattern.utf8CString)
|
||||
}
|
||||
|
||||
public func disallows(_ url: URL) -> Bool {
|
||||
if self.isOnlyForDirectories {
|
||||
guard url.hasDirectoryPath else { return false }
|
||||
}
|
||||
|
||||
if self.isRelativeToBase {
|
||||
let matches = self.matches(url.path)
|
||||
if self.isAllow { return !matches } else { return matches }
|
||||
}
|
||||
|
||||
let matches = self.matches(url.lastPathComponent)
|
||||
if self.isAllow { return false } else { return matches }
|
||||
}
|
||||
|
||||
public func explicitlyAllows(_ url: URL) -> Bool {
|
||||
if self.isOnlyForDirectories {
|
||||
guard url.hasDirectoryPath else { return false }
|
||||
}
|
||||
|
||||
if self.isRelativeToBase {
|
||||
if self.isAllow { return self.matches(url.path) }
|
||||
return false
|
||||
}
|
||||
|
||||
if self.isAllow { return self.matches(url.lastPathComponent) } else { return false }
|
||||
}
|
||||
|
||||
/// Ignores whether the pattern is only applicable for directories.
|
||||
public func disallows(_ string: String) -> Bool {
|
||||
if self.isAllow { return false } else { return self.matches(string) }
|
||||
}
|
||||
|
||||
/// Ignores whether the pattern is only applicable for directories.
|
||||
public func explicitlyAllows(_ string: String) -> Bool {
|
||||
if self.isAllow { return self.matches(string) }
|
||||
return false
|
||||
}
|
||||
|
||||
public func matches(_ url: URL) -> Bool {
|
||||
if self.isOnlyForDirectories {
|
||||
guard url.hasDirectoryPath else { return false }
|
||||
}
|
||||
|
||||
if self.isRelativeToBase {
|
||||
return url.path.withCString { stringCstr in
|
||||
wildmatch(patternCstr, stringCstr, WM_WILDSTAR) == WM_MATCH
|
||||
}
|
||||
}
|
||||
|
||||
return url.lastPathComponent.withCString { stringCstr in
|
||||
wildmatch(patternCstr, stringCstr, WM_WILDSTAR) == WM_MATCH
|
||||
}
|
||||
}
|
||||
|
||||
/// Ignores whether the pattern is only applicable for directories.
|
||||
public func matches(_ string: String) -> Bool {
|
||||
string.withCString {
|
||||
stringCstr in
|
||||
wildmatch(patternCstr, stringCstr, WM_WILDSTAR) == WM_MATCH
|
||||
}
|
||||
}
|
||||
|
||||
public var description: String {
|
||||
"Ignore(isAllow: \(self.isAllow), isOnlyDirectory: \(self.isOnlyForDirectories), "
|
||||
+ "isAbsolute: \(self.isRelativeToBase), pattern: \(self.pattern), baseUrl: \(self.base))"
|
||||
}
|
||||
|
||||
private let patternCstr: [CChar]
|
||||
}
|
65
Ignore/Sources/Ignore/GitUtils.swift
Normal file
65
Ignore/Sources/Ignore/GitUtils.swift
Normal file
@ -0,0 +1,65 @@
|
||||
/// Tae Won Ha - http://taewon.de - @hataewon
|
||||
/// See LICENSE
|
||||
|
||||
import Foundation
|
||||
|
||||
public final class GitUtils {
|
||||
static func globalGitignoreFileUrl() -> URL? {
|
||||
guard let path = shellCommandOutput(
|
||||
"git config --get core.excludesFile",
|
||||
workingDirectory: fm.homeDirectoryForCurrentUser
|
||||
),
|
||||
FileManager.default.fileExists(atPath: path)
|
||||
else { return nil }
|
||||
|
||||
return URL(fileURLWithPath: path)
|
||||
}
|
||||
|
||||
static func gitDirInfoExcludeUrl(base: URL, gitRoot: URL? = nil) -> URL? {
|
||||
guard let gitRoot = gitRoot == nil ? gitRootUrl(base: base) : gitRoot,
|
||||
let gitDirName = shellCommandOutput("git rev-parse --git-dir", workingDirectory: gitRoot)
|
||||
else { return nil }
|
||||
|
||||
let url = gitRoot.appendingPathComponent("\(gitDirName)/info/exclude")
|
||||
guard fm.fileExists(atPath: url.path) else { return nil }
|
||||
|
||||
return url
|
||||
}
|
||||
|
||||
static func gitRootUrl(base: URL) -> URL? {
|
||||
guard let path = shellCommandOutput("git rev-parse --show-toplevel", workingDirectory: base)
|
||||
else { return nil }
|
||||
|
||||
return URL(fileURLWithPath: path, isDirectory: true)
|
||||
}
|
||||
|
||||
private static func shellCommandOutput(_ command: String, workingDirectory: URL) -> String? {
|
||||
let task = Process()
|
||||
let pipe = Pipe()
|
||||
|
||||
task.currentDirectoryURL = workingDirectory
|
||||
task.standardInput = nil
|
||||
task.standardOutput = pipe
|
||||
task.standardError = nil
|
||||
task.executableURL = URL(fileURLWithPath: "/bin/sh")
|
||||
task.arguments = ["-c", command]
|
||||
|
||||
do {
|
||||
try task.run()
|
||||
task.waitUntilExit()
|
||||
} catch {
|
||||
return nil
|
||||
}
|
||||
|
||||
guard task.terminationStatus == 0 else { return nil }
|
||||
guard let output = String(
|
||||
data: pipe.fileHandleForReading.readDataToEndOfFile(),
|
||||
encoding: .utf8
|
||||
) else { return nil }
|
||||
|
||||
let result = output.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||
if result.isEmpty { return nil } else { return result }
|
||||
}
|
||||
}
|
||||
|
||||
private let fm = FileManager.default
|
120
Ignore/Sources/Ignore/Ignore.swift
Normal file
120
Ignore/Sources/Ignore/Ignore.swift
Normal file
@ -0,0 +1,120 @@
|
||||
/// Tae Won Ha - http://taewon.de - @hataewon
|
||||
/// See LICENSE
|
||||
|
||||
import Foundation
|
||||
|
||||
public final class Ignore {
|
||||
public static let defaultIgnoreFileNames = [".ignore", ".gitignore"]
|
||||
public static let vcsFolderPattern = [".svn/", ".hg/", ".git/"]
|
||||
|
||||
public static func globalGitignore(base: URL) -> Ignore? {
|
||||
let gitRoot = GitUtils.gitRootUrl(base: base)
|
||||
let urls = [
|
||||
GitUtils.gitDirInfoExcludeUrl(base: base, gitRoot: gitRoot),
|
||||
GitUtils.globalGitignoreFileUrl(),
|
||||
].compactMap { $0 }
|
||||
|
||||
if urls.isEmpty { return nil }
|
||||
|
||||
if let gitRoot = gitRoot {
|
||||
let vcsFolderFilters = self.vcsFolderPattern.map { Filter(base: gitRoot, pattern: $0) }
|
||||
return Ignore(base: gitRoot, parent: nil, ignoreFileUrls: urls, prepend: vcsFolderFilters)
|
||||
}
|
||||
|
||||
let vcsFolderFilters = self.vcsFolderPattern.map { Filter(base: base, pattern: $0) }
|
||||
return Ignore(base: base, parent: nil, ignoreFileUrls: urls, prepend: vcsFolderFilters)
|
||||
}
|
||||
|
||||
public static func parentOrIgnore(
|
||||
for base: URL,
|
||||
withParent parent: Ignore?,
|
||||
ignoreFileNames: [String] = defaultIgnoreFileNames
|
||||
) -> Ignore? {
|
||||
let urls = ignoreFileNames
|
||||
.map { base.appendingPathComponent($0) }
|
||||
.filter { fm.fileExists(atPath: $0.path) }
|
||||
.reversed()
|
||||
|
||||
if urls.isEmpty { return parent }
|
||||
return Ignore(base: base, parent: parent, ignoreFileUrls: Array(urls))
|
||||
}
|
||||
|
||||
public let filters: [Filter]
|
||||
|
||||
/// `ignoreFileUrls[n]` overrides `ignoreFileUrls[n + 1]`.
|
||||
/// `Ignore`s of `parent` are overridden, if applicable, by the `Ignore`s found in `base`.
|
||||
public init?(
|
||||
base: URL,
|
||||
parent: Ignore?,
|
||||
ignoreFileUrls: [URL],
|
||||
prepend: [Filter] = [],
|
||||
append: [Filter] = []
|
||||
) {
|
||||
if ignoreFileUrls.isEmpty { return nil }
|
||||
let urls = ignoreFileUrls.filter { fm.fileExists(atPath: $0.path) }.reversed()
|
||||
|
||||
self.filters = (parent?.filters ?? [])
|
||||
+ prepend.reversed()
|
||||
+ urls.flatMap {
|
||||
FileLineReader(url: $0, encoding: .utf8)
|
||||
.map { $0.trimmingCharacters(in: .whitespacesAndNewlines) }
|
||||
.filter { !$0.isEmpty && !$0.starts(with: "#") }
|
||||
.map { Filter(base: base, pattern: $0) }
|
||||
}
|
||||
+ append.reversed()
|
||||
|
||||
if self.filters.isEmpty { return nil }
|
||||
|
||||
if let lastAllowIndex = self.filters
|
||||
.enumerated()
|
||||
.filter({ _, ignore in ignore.isAllow })
|
||||
.map(\.offset)
|
||||
.max()
|
||||
{
|
||||
self.mixedIgnores = self.filters[0...lastAllowIndex]
|
||||
self.remainingDisallowIgnores = self.filters[(lastAllowIndex + 1)...]
|
||||
} else {
|
||||
self.mixedIgnores = ArraySlice()
|
||||
self.remainingDisallowIgnores = self.filters[0...]
|
||||
}
|
||||
}
|
||||
|
||||
/// `ignoreFileNames[n]` overrides `ignoreFileNames[n + 1]`.
|
||||
/// `Ignore`s of `parent` are overridden, if applicable, by the `Ignore`s found in `base`.
|
||||
public convenience init?(
|
||||
base: URL,
|
||||
parent: Ignore?,
|
||||
ignoreFileNames: [String] = defaultIgnoreFileNames
|
||||
) {
|
||||
self.init(
|
||||
base: base,
|
||||
parent: parent,
|
||||
ignoreFileUrls: ignoreFileNames.map { base.appendingPathComponent($0) }
|
||||
)
|
||||
}
|
||||
|
||||
public func excludes(_ url: URL) -> Bool {
|
||||
var isExcluded = false
|
||||
|
||||
for ignore in self.mixedIgnores {
|
||||
if ignore.isAllow {
|
||||
if ignore.matches(url) { isExcluded = false }
|
||||
} else {
|
||||
if ignore.matches(url) { isExcluded = true }
|
||||
}
|
||||
}
|
||||
|
||||
if isExcluded { return true }
|
||||
|
||||
for ignore in self.remainingDisallowIgnores {
|
||||
if ignore.matches(url) { return true }
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
let mixedIgnores: ArraySlice<Filter>
|
||||
let remainingDisallowIgnores: ArraySlice<Filter>
|
||||
}
|
||||
|
||||
private let fm = FileManager.default
|
68
Ignore/Tests/IgnoreTests/FileLineReaderTest.swift
Normal file
68
Ignore/Tests/IgnoreTests/FileLineReaderTest.swift
Normal file
@ -0,0 +1,68 @@
|
||||
/// Tae Won Ha - http://taewon.de - @hataewon
|
||||
/// See LICENSE
|
||||
|
||||
@testable import Ignore
|
||||
import Nimble
|
||||
import XCTest
|
||||
|
||||
private struct TestSpec {
|
||||
var fileName: String
|
||||
var result: [String]
|
||||
}
|
||||
|
||||
private let specs = [
|
||||
TestSpec(fileName: "empty", result: []),
|
||||
TestSpec(fileName: "unix-only-new-lines", result: ["\n", "\n", "\n"]),
|
||||
TestSpec(fileName: "unix-no-line-ending-at-the-end", result: ["0123\n", "하태원\n", "abcde"]),
|
||||
TestSpec(fileName: "unix-with-line-ending-at-the-end", result: ["0123\n", "하태원\n", "abcde\n"]),
|
||||
TestSpec(fileName: "dos-only-new-lines", result: ["\r\n", "\r\n", "\r\n"]),
|
||||
TestSpec(fileName: "dos-no-line-ending-at-the-end", result: ["0123\r\n", "하태원\r\n", "abcde"]),
|
||||
TestSpec(
|
||||
fileName: "dos-with-line-ending-at-the-end",
|
||||
result: ["0123\r\n", "하태원\r\n", "abcde\r\n"]
|
||||
),
|
||||
]
|
||||
|
||||
final class FileLineReaderTest: XCTestCase {
|
||||
func testSpecsDefaultBuffer() {
|
||||
specs.forEach { spec in
|
||||
let url = Bundle.module.url(
|
||||
forResource: spec.fileName,
|
||||
withExtension: "txt",
|
||||
subdirectory: "Resources/FileLineReaderTest"
|
||||
)!
|
||||
let lineReader = FileLineReader(url: url, encoding: .utf8)
|
||||
let lines = Array(lineReader)
|
||||
|
||||
expect(lines).to(equal(spec.result))
|
||||
}
|
||||
}
|
||||
|
||||
func testSpecsSmallBuffer() {
|
||||
specs.forEach { spec in
|
||||
let url = Bundle.module.url(
|
||||
forResource: spec.fileName,
|
||||
withExtension: "txt",
|
||||
subdirectory: "Resources/FileLineReaderTest"
|
||||
)!
|
||||
let lineReader = FileLineReader(url: url, encoding: .utf8, lineBufferCount: 5)
|
||||
let lines = Array(lineReader)
|
||||
|
||||
expect(lines).to(equal(spec.result))
|
||||
}
|
||||
}
|
||||
|
||||
func testSpecsBigBuffer() {
|
||||
specs.forEach { spec in
|
||||
let url = Bundle.module.url(
|
||||
forResource: spec.fileName,
|
||||
withExtension: "txt",
|
||||
subdirectory: "Resources/FileLineReaderTest"
|
||||
)!
|
||||
let lineReader = FileLineReader(url: url, encoding: .utf8, lineBufferCount: 2048)
|
||||
let lines = Array(lineReader)
|
||||
|
||||
expect(lines).to(equal(spec.result))
|
||||
}
|
||||
}
|
||||
}
|
129
Ignore/Tests/IgnoreTests/FilterTest.swift
Normal file
129
Ignore/Tests/IgnoreTests/FilterTest.swift
Normal file
@ -0,0 +1,129 @@
|
||||
/// Tae Won Ha - http://taewon.de - @hataewon
|
||||
/// See LICENSE
|
||||
|
||||
@testable import Ignore
|
||||
import Nimble
|
||||
import XCTest
|
||||
|
||||
final class FilterTest: XCTestCase {
|
||||
let root = Bundle.module.url(forResource: "Resources", withExtension: nil)!
|
||||
|
||||
func testProperties() {
|
||||
var ignore = Filter(base: root, pattern: "/a")
|
||||
expect(ignore.isAllow).to(beFalse())
|
||||
expect(ignore.isRelativeToBase).to(beTrue())
|
||||
expect(ignore.isOnlyForDirectories).to(beFalse())
|
||||
|
||||
ignore = Filter(base: self.root, pattern: "a/b")
|
||||
expect(ignore.isAllow).to(beFalse())
|
||||
expect(ignore.isRelativeToBase).to(beTrue())
|
||||
expect(ignore.isOnlyForDirectories).to(beFalse())
|
||||
|
||||
ignore = Filter(base: self.root, pattern: "a/b/")
|
||||
expect(ignore.isAllow).to(beFalse())
|
||||
expect(ignore.isRelativeToBase).to(beTrue())
|
||||
expect(ignore.isOnlyForDirectories).to(beTrue())
|
||||
|
||||
ignore = Filter(base: self.root, pattern: "a/")
|
||||
expect(ignore.isAllow).to(beFalse())
|
||||
expect(ignore.isRelativeToBase).to(beFalse())
|
||||
expect(ignore.isOnlyForDirectories).to(beTrue())
|
||||
|
||||
ignore = Filter(base: self.root, pattern: "!a/")
|
||||
expect(ignore.isAllow).to(beTrue())
|
||||
expect(ignore.isRelativeToBase).to(beFalse())
|
||||
expect(ignore.isOnlyForDirectories).to(beTrue())
|
||||
}
|
||||
|
||||
func testNonRelativeIgnores() {
|
||||
var ignore = Filter(base: root, pattern: "ab\\ ")
|
||||
expect(ignore.disallows("ab ")).to(beTrue())
|
||||
expect(ignore.disallows("ab")).to(beFalse())
|
||||
|
||||
ignore = Filter(base: self.root, pattern: "!include")
|
||||
expect(ignore.explicitlyAllows("include")).to(beTrue())
|
||||
expect(ignore.disallows("include")).to(beFalse())
|
||||
expect(ignore.explicitlyAllows("no-include")).to(beFalse())
|
||||
expect(ignore.disallows("no-include")).to(beFalse())
|
||||
|
||||
ignore = Filter(base: self.root, pattern: "a")
|
||||
expect(ignore.disallows("a")).to(beTrue())
|
||||
|
||||
ignore = Filter(base: self.root, pattern: "*.png")
|
||||
expect(ignore.disallows("a.png")).to(beTrue())
|
||||
expect(ignore.disallows("b.png")).to(beTrue())
|
||||
}
|
||||
|
||||
func testNonRelativeIgnoresUrl() {
|
||||
var ignore = Filter(base: root, pattern: "ab\\ ")
|
||||
expect(ignore.disallows(self.root.appendingPathComponent("ab "))).to(beTrue())
|
||||
expect(ignore.explicitlyAllows(self.root.appendingPathComponent("ab"))).to(beFalse())
|
||||
expect(ignore.disallows(self.root.appendingPathComponent("foo/bar/ab "))).to(beTrue())
|
||||
expect(ignore.explicitlyAllows(self.root.appendingPathComponent("foo/bar/ab")))
|
||||
.to(beFalse())
|
||||
|
||||
ignore = Filter(base: self.root, pattern: "!include")
|
||||
expect(ignore.explicitlyAllows(self.root.appendingPathComponent("include"))).to(beTrue())
|
||||
expect(ignore.disallows(self.root.appendingPathComponent("no-include"))).to(beFalse())
|
||||
expect(ignore.explicitlyAllows(self.root.appendingPathComponent("foo/bar/include")))
|
||||
.to(beTrue())
|
||||
expect(ignore.disallows(self.root.appendingPathComponent("foo/bar/no-include")))
|
||||
.to(beFalse())
|
||||
|
||||
ignore = Filter(base: self.root, pattern: "a")
|
||||
expect(ignore.disallows(self.root.appendingPathComponent("a"))).to(beTrue())
|
||||
expect(ignore.explicitlyAllows(self.root.appendingPathComponent("b"))).to(beFalse())
|
||||
expect(ignore.disallows(self.root.appendingPathComponent("foo/bar/a"))).to(beTrue())
|
||||
expect(ignore.explicitlyAllows(self.root.appendingPathComponent("foo/bar/b")))
|
||||
.to(beFalse())
|
||||
|
||||
ignore = Filter(base: self.root, pattern: "*.png")
|
||||
expect(ignore.disallows(self.root.appendingPathComponent("a.png"))).to(beTrue())
|
||||
expect(ignore.disallows(self.root.appendingPathComponent("b.png"))).to(beTrue())
|
||||
expect(ignore.explicitlyAllows(self.root.appendingPathComponent("c.jpg"))).to(beFalse())
|
||||
expect(ignore.disallows(self.root.appendingPathComponent("foo/bar/a.png"))).to(beTrue())
|
||||
expect(ignore.disallows(self.root.appendingPathComponent("foo/bar/b.png"))).to(beTrue())
|
||||
expect(ignore.explicitlyAllows(self.root.appendingPathComponent("foo/bar/c.jpg")))
|
||||
.to(beFalse())
|
||||
}
|
||||
|
||||
func testRelativeIgnores() {
|
||||
var ignore = Filter(base: root, pattern: "**/foo")
|
||||
expect(ignore.disallows(self.root.appendingPathComponent("foo").path)).to(beTrue())
|
||||
expect(ignore.disallows(self.root.appendingPathComponent("a/b/foo").path)).to(beTrue())
|
||||
expect(ignore.explicitlyAllows(self.root.appendingPathComponent("a").path)).to(beFalse())
|
||||
|
||||
ignore = Filter(base: self.root, pattern: "abc/**")
|
||||
expect(ignore.disallows(self.root.appendingPathComponent("abc/foo").path)).to(beTrue())
|
||||
expect(ignore.disallows(self.root.appendingPathComponent("abc/def/foo").path))
|
||||
.to(beTrue())
|
||||
expect(ignore.explicitlyAllows(self.root.appendingPathComponent("a/b/c").path))
|
||||
.to(beFalse())
|
||||
|
||||
ignore = Filter(base: self.root, pattern: "a/**/b")
|
||||
expect(ignore.disallows(self.root.appendingPathComponent("a/b").path)).to(beTrue())
|
||||
expect(ignore.disallows(self.root.appendingPathComponent("a/x/b").path)).to(beTrue())
|
||||
expect(ignore.disallows(self.root.appendingPathComponent("a/x/y/b").path)).to(beTrue())
|
||||
expect(ignore.explicitlyAllows(self.root.appendingPathComponent("a/x/y/c").path))
|
||||
.to(beFalse())
|
||||
}
|
||||
|
||||
func testRelativeIgnoresUrl() {
|
||||
var ignore = Filter(base: root, pattern: "**/foo")
|
||||
expect(ignore.disallows(self.root.appendingPathComponent("foo"))).to(beTrue())
|
||||
expect(ignore.disallows(self.root.appendingPathComponent("a/b/foo"))).to(beTrue())
|
||||
expect(ignore.explicitlyAllows(self.root.appendingPathComponent("a"))).to(beFalse())
|
||||
|
||||
ignore = Filter(base: self.root, pattern: "abc/**")
|
||||
expect(ignore.disallows(self.root.appendingPathComponent("abc/foo"))).to(beTrue())
|
||||
expect(ignore.disallows(self.root.appendingPathComponent("abc/def/foo")))
|
||||
.to(beTrue())
|
||||
expect(ignore.explicitlyAllows(self.root.appendingPathComponent("a/b/c"))).to(beFalse())
|
||||
|
||||
ignore = Filter(base: self.root, pattern: "a/**/b")
|
||||
expect(ignore.disallows(self.root.appendingPathComponent("a/b"))).to(beTrue())
|
||||
expect(ignore.disallows(self.root.appendingPathComponent("a/x/b"))).to(beTrue())
|
||||
expect(ignore.disallows(self.root.appendingPathComponent("a/x/y/b"))).to(beTrue())
|
||||
expect(ignore.explicitlyAllows(self.root.appendingPathComponent("a/x/y/c"))).to(beFalse())
|
||||
}
|
||||
}
|
56
Ignore/Tests/IgnoreTests/IgnoreSplitTest.swift
Normal file
56
Ignore/Tests/IgnoreTests/IgnoreSplitTest.swift
Normal file
@ -0,0 +1,56 @@
|
||||
/// Tae Won Ha - http://taewon.de - @hataewon
|
||||
/// See LICENSE
|
||||
|
||||
@testable import Ignore
|
||||
import Nimble
|
||||
import XCTest
|
||||
|
||||
private struct IgnoreSplittingTestSpec {
|
||||
var fileName: String
|
||||
var mixed: [String]
|
||||
var disallow: [String]
|
||||
}
|
||||
|
||||
private let ignoreSplittingTestSpecs = [
|
||||
IgnoreSplittingTestSpec(
|
||||
fileName: "ignore-splitting-0",
|
||||
mixed: [],
|
||||
disallow: ["*.a", "*.b", "*.c", "*.d"]
|
||||
),
|
||||
IgnoreSplittingTestSpec(
|
||||
fileName: "ignore-splitting-1",
|
||||
mixed: ["*.a"],
|
||||
disallow: ["*.b", "*.c", "*.d"]
|
||||
),
|
||||
IgnoreSplittingTestSpec(
|
||||
fileName: "ignore-splitting-2",
|
||||
mixed: ["*.a", "*.b"],
|
||||
disallow: ["*.c", "*.d"]
|
||||
),
|
||||
IgnoreSplittingTestSpec(
|
||||
fileName: "ignore-splitting-3",
|
||||
mixed: ["*.a", "*.b", "*.c"],
|
||||
disallow: ["*.d"]
|
||||
),
|
||||
IgnoreSplittingTestSpec(
|
||||
fileName: "ignore-splitting-4",
|
||||
mixed: ["*.a", "*.b", "*.c", "*.d"],
|
||||
disallow: []
|
||||
),
|
||||
]
|
||||
|
||||
final class IgnoreSplitTest: XCTestCase {
|
||||
func testIgnoreSplitting() {
|
||||
ignoreSplittingTestSpecs.forEach { spec in
|
||||
let url = Bundle.module.url(
|
||||
forResource: "IgnoreCollectionTest",
|
||||
withExtension: nil,
|
||||
subdirectory: "Resources"
|
||||
)!
|
||||
let ignoreFile = Ignore(base: url, parent: nil, ignoreFileNames: [spec.fileName])!
|
||||
|
||||
expect(ignoreFile.mixedIgnores.map(\.pattern)).to(equal(spec.mixed))
|
||||
expect(ignoreFile.remainingDisallowIgnores.map(\.pattern)).to(equal(spec.disallow))
|
||||
}
|
||||
}
|
||||
}
|
34
Ignore/Tests/IgnoreTests/IgnoreTest.swift
Normal file
34
Ignore/Tests/IgnoreTests/IgnoreTest.swift
Normal file
@ -0,0 +1,34 @@
|
||||
/// Tae Won Ha - http://taewon.de - @hataewon
|
||||
/// See LICENSE
|
||||
|
||||
@testable import Ignore
|
||||
import Nimble
|
||||
import XCTest
|
||||
|
||||
final class IgnoreTest: XCTestCase {
|
||||
func testIgnoreSplitting() {
|
||||
let root = Bundle.module.url(
|
||||
forResource: "IgnoreCollectionTest",
|
||||
withExtension: nil,
|
||||
subdirectory: "Resources"
|
||||
)!
|
||||
let c = Ignore(base: root, parent: nil)!
|
||||
|
||||
expect(c.excludes(self.url("out", base: root, isDir: true))).to(beTrue())
|
||||
expect(c.excludes(self.url("out", base: root, isDir: false))).to(beFalse())
|
||||
expect(c.excludes(self.url("logs", base: root, isDir: true))).to(beTrue())
|
||||
expect(c.excludes(self.url("logs", base: root, isDir: false))).to(beFalse())
|
||||
|
||||
expect(c.excludes(self.url("a.png", base: root))).to(beTrue())
|
||||
|
||||
expect(c.excludes(self.url("include-me", base: root))).to(beFalse())
|
||||
expect(c.excludes(self.url("a/b/include-me", base: root))).to(beFalse())
|
||||
|
||||
expect(c.excludes(self.url("ignore-me", base: root))).to(beTrue())
|
||||
expect(c.excludes(self.url("a/b/ignore-me", base: root))).to(beTrue())
|
||||
}
|
||||
|
||||
private func url(_ path: String, base: URL, isDir: Bool = false) -> URL {
|
||||
URL(fileURLWithPath: path, isDirectory: isDir, relativeTo: base)
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
0123
|
||||
하태원
|
||||
abcde
|
@ -0,0 +1,3 @@
|
||||
|
||||
|
||||
|
@ -0,0 +1,3 @@
|
||||
0123
|
||||
하태원
|
||||
abcde
|
@ -0,0 +1,3 @@
|
||||
0123
|
||||
하태원
|
||||
abcde
|
@ -0,0 +1,3 @@
|
||||
|
||||
|
||||
|
@ -0,0 +1,3 @@
|
||||
0123
|
||||
하태원
|
||||
abcde
|
8
Ignore/Tests/IgnoreTests/Resources/IgnoreCollectionTest/.gitignore
vendored
Normal file
8
Ignore/Tests/IgnoreTests/Resources/IgnoreCollectionTest/.gitignore
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
*.png
|
||||
|
||||
# will be included below
|
||||
include-me
|
||||
|
||||
vendor/
|
||||
**/ignore-me
|
||||
|
@ -0,0 +1,5 @@
|
||||
# include include-me file
|
||||
!include-me
|
||||
|
||||
/logs/
|
||||
/out/
|
@ -0,0 +1,4 @@
|
||||
*.a
|
||||
*.b
|
||||
*.c
|
||||
*.d
|
@ -0,0 +1,4 @@
|
||||
!*.a
|
||||
*.b
|
||||
*.c
|
||||
*.d
|
@ -0,0 +1,4 @@
|
||||
*.a
|
||||
!*.b
|
||||
*.c
|
||||
*.d
|
@ -0,0 +1,4 @@
|
||||
!*.a
|
||||
*.b
|
||||
!*.c
|
||||
*.d
|
@ -0,0 +1,4 @@
|
||||
*.a
|
||||
*.b
|
||||
*.c
|
||||
!*.d
|
2
LICENSE
2
LICENSE
@ -1,6 +1,6 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016 Tae Won Ha
|
||||
Copyright (c) 2022 Tae Won Ha
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 53c4b2ebbd110c9f9305c1bfe397ebb7d95f4f99
|
||||
Subproject commit eddb2ab7596100215dc9e2723840078281d5a224
|
@ -9,11 +9,11 @@ let package = Package(
|
||||
.library(name: "NvimView", targets: ["NvimView"]),
|
||||
],
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/qvacua/RxPack.swift", from: "0.1.0"),
|
||||
.package(url: "https://github.com/a2/MessagePack.swift", from: "4.0.0"),
|
||||
.package(url: "https://github.com/ReactiveX/RxSwift", from: "6.5.0"),
|
||||
.package(url: "https://github.com/Quick/Nimble", from: "10.0.0"),
|
||||
.package(name: "NvimServer", path: "../NvimServer"),
|
||||
.package(name: "RxPack", path: "../RxPack"),
|
||||
.package(name: "Commons", path: "../Commons"),
|
||||
.package(name: "Tabs", path: "../Tabs"),
|
||||
],
|
||||
@ -21,9 +21,10 @@ let package = Package(
|
||||
.target(
|
||||
name: "NvimView",
|
||||
dependencies: [
|
||||
"RxSwift",
|
||||
"RxPack",
|
||||
.product(name: "RxSwift", package: "RxSwift"),
|
||||
.product(name: "RxPack", package: "RxPack.swift"),
|
||||
"Tabs",
|
||||
.product(name: "RxNeovim", package: "NvimServer"),
|
||||
.product(name: "NvimServerTypes", package: "NvimServer"),
|
||||
.product(name: "MessagePack", package: "MessagePack.swift"),
|
||||
"Commons",
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
import Cocoa
|
||||
|
||||
class KeyUtils {
|
||||
final class KeyUtils {
|
||||
static func isControlCode(key: String) -> Bool {
|
||||
guard key.count == 1 else {
|
||||
return false
|
||||
|
@ -1,98 +0,0 @@
|
||||
/**
|
||||
* Tae Won Ha - http://taewon.de - @hataewon
|
||||
* See LICENSE
|
||||
*/
|
||||
|
||||
import Foundation
|
||||
import RxPack
|
||||
import RxSwift
|
||||
|
||||
public extension RxNeovimApi {
|
||||
func getDirtyStatus(
|
||||
errWhenBlocked: Bool = true
|
||||
) -> Single<Bool> {
|
||||
let params: [RxNeovimApi.Value] = []
|
||||
|
||||
func transform(_ value: Value) throws -> Bool {
|
||||
guard let result = value.boolValue else {
|
||||
throw RxNeovimApi.Error.conversion(type: Bool.self)
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
if errWhenBlocked {
|
||||
return self
|
||||
.checkBlocked(
|
||||
self.rpc(method: "nvim_get_dirty_status", params: params, expectsReturnValue: true)
|
||||
)
|
||||
.map(transform)
|
||||
}
|
||||
|
||||
return self
|
||||
.rpc(method: "nvim_get_dirty_status", params: params, expectsReturnValue: true)
|
||||
.map(transform)
|
||||
}
|
||||
|
||||
func bufGetInfo(
|
||||
buffer: RxNeovimApi.Buffer,
|
||||
errWhenBlocked: Bool = true
|
||||
) -> Single<[String: RxNeovimApi.Value]> {
|
||||
let params: [RxNeovimApi.Value] = [.int(Int64(buffer.handle))]
|
||||
|
||||
func transform(_ value: Value) throws -> [String: RxNeovimApi.Value] {
|
||||
guard let result = msgPackDictToSwift(value.dictionaryValue) else {
|
||||
throw RxNeovimApi.Error.conversion(type: [String: RxNeovimApi.Value].self)
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
if errWhenBlocked {
|
||||
return self
|
||||
.checkBlocked(self.rpc(method: "nvim_buf_get_info", params: params))
|
||||
.map(transform)
|
||||
}
|
||||
|
||||
return self
|
||||
.rpc(method: "nvim_buf_get_info", params: params)
|
||||
.map(transform)
|
||||
}
|
||||
}
|
||||
|
||||
private func msgPackDictToSwift(
|
||||
_ dict: [RxNeovimApi.Value: RxNeovimApi.Value]?
|
||||
) -> [String: RxNeovimApi.Value]? {
|
||||
dict?.flatMapToDict { k, v in
|
||||
guard let strKey = k.stringValue else { return nil }
|
||||
|
||||
return (strKey, v)
|
||||
}
|
||||
}
|
||||
|
||||
private func msgPackArrayDictToSwift(
|
||||
_ array: [RxNeovimApi.Value]?
|
||||
) -> [[String: RxNeovimApi.Value]]? {
|
||||
array?
|
||||
.compactMap { v in v.dictionaryValue }
|
||||
.compactMap { d in msgPackDictToSwift(d) }
|
||||
}
|
||||
|
||||
private extension Dictionary {
|
||||
func flatMapToDict<K, V>(
|
||||
_ transform: ((key: Key, value: Value)) throws -> (K, V)?
|
||||
) rethrows -> [K: V] {
|
||||
let array = try self.compactMap(transform)
|
||||
return self.tuplesToDict(array)
|
||||
}
|
||||
|
||||
func tuplesToDict<K: Hashable, V, S: Sequence>(
|
||||
_ sequence: S
|
||||
) -> [K: V] where S.Iterator.Element == (K, V) {
|
||||
var result = [K: V](minimumCapacity: sequence.underestimatedCount)
|
||||
|
||||
for (key, value) in sequence { result[key] = value }
|
||||
|
||||
return result
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
// Auto generated for nvim v0.7.0
|
||||
// Auto generated for nvim v0.7.2
|
||||
// See bin/generate_autocmds.py
|
||||
|
||||
enum NvimAutoCommandEvent: Int {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Auto generated for nvim v0.7.0
|
||||
// Auto generated for nvim v0.7.2
|
||||
// See bin/generate_cursor_shape.py
|
||||
|
||||
public enum CursorModeShape: UInt {
|
||||
|
@ -8,6 +8,7 @@ import MessagePack
|
||||
import PureLayout
|
||||
import RxPack
|
||||
import RxSwift
|
||||
import RxNeovim
|
||||
import SpriteKit
|
||||
|
||||
public extension NvimView {
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
import Foundation
|
||||
import RxPack
|
||||
import RxNeovim
|
||||
|
||||
public extension NvimView {
|
||||
struct Buffer: Equatable {
|
||||
|
@ -7,6 +7,7 @@
|
||||
import Cocoa
|
||||
import RxPack
|
||||
import RxSwift
|
||||
import RxNeovim
|
||||
|
||||
extension NvimView: NSTouchBarDelegate, NSScrubberDataSource, NSScrubberDelegate {
|
||||
override public func makeTouchBar() -> NSTouchBar? {
|
||||
|
@ -7,6 +7,7 @@ import Cocoa
|
||||
import MessagePack
|
||||
import PureLayout
|
||||
import RxPack
|
||||
import RxNeovim
|
||||
import Tabs
|
||||
|
||||
public extension NvimView {
|
||||
|
@ -11,6 +11,7 @@ import NvimServerTypes
|
||||
import os
|
||||
import RxPack
|
||||
import RxSwift
|
||||
import RxNeovim
|
||||
|
||||
extension NvimView {
|
||||
final func initVimError() {
|
||||
|
@ -9,6 +9,7 @@ import Commons
|
||||
import MessagePack
|
||||
import os
|
||||
import RxPack
|
||||
import RxNeovim
|
||||
import RxSwift
|
||||
import Tabs
|
||||
import SpriteKit
|
||||
@ -24,7 +25,7 @@ public protocol NvimViewDelegate: AnyObject {
|
||||
func isMenuItemKeyEquivalent(_: NSEvent) -> Bool
|
||||
}
|
||||
|
||||
public class NvimView: NSView,
|
||||
public final class NvimView: NSView,
|
||||
UiBridgeConsumer,
|
||||
NSUserInterfaceValidations,
|
||||
NSTextInputClient
|
||||
|
@ -41,7 +41,7 @@ protocol UiBridgeConsumer: AnyObject {
|
||||
func suspend()
|
||||
}
|
||||
|
||||
class UiBridge {
|
||||
final class UiBridge {
|
||||
weak var consumer: UiBridgeConsumer?
|
||||
|
||||
init(uuid: UUID, config: NvimView.Config) {
|
||||
|
@ -22,7 +22,7 @@ class Document: NSDocument, NSWindowDelegate {
|
||||
|
||||
self.nvimView
|
||||
.events
|
||||
.observeOn(MainScheduler.instance)
|
||||
.observe(on: MainScheduler.instance)
|
||||
.subscribe(onNext: { event in
|
||||
switch event {
|
||||
case .neoVimStopped: self.close()
|
||||
|
@ -478,11 +478,9 @@
|
||||
4B022600224AAE270052362B /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../Carthage/Build/Mac";
|
||||
INFOPLIST_FILE = MinimalNvimViewDemo/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
@ -499,11 +497,9 @@
|
||||
4B022601224AAE270052362B /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../Carthage/Build/Mac";
|
||||
INFOPLIST_FILE = MinimalNvimViewDemo/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
@ -689,7 +685,6 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../Carthage/Build/Mac";
|
||||
INFOPLIST_FILE = DrawerDev/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
@ -707,7 +702,6 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../Carthage/Build/Mac";
|
||||
INFOPLIST_FILE = DrawerDev/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
|
@ -1,7 +0,0 @@
|
||||
import XCTest
|
||||
|
||||
import NvimViewTests
|
||||
|
||||
var tests = [XCTestCaseEntry]()
|
||||
tests += NvimViewTests.allTests()
|
||||
XCTMain(tests)
|
@ -1,9 +0,0 @@
|
||||
import XCTest
|
||||
|
||||
#if !canImport(ObjectiveC)
|
||||
public func allTests() -> [XCTestCaseEntry] {
|
||||
[
|
||||
testCase(NvimViewTests.allTests),
|
||||
]
|
||||
}
|
||||
#endif
|
@ -53,7 +53,7 @@ git submodule update
|
||||
xcode-select --install # install the Xcode command line tools, if you haven't already
|
||||
brew bundle
|
||||
|
||||
code_sign=false use_carthage_cache=false download_deps=true ./bin/build_vimr.sh
|
||||
clean=true notarize=false use_carthage_cache=false ./bin/build_vimr.sh
|
||||
# VimR.app will be placed in ./build/Build/Products/Release/
|
||||
```
|
||||
|
||||
|
5
RxPack/.gitignore
vendored
5
RxPack/.gitignore
vendored
@ -1,5 +0,0 @@
|
||||
.DS_Store
|
||||
/.build
|
||||
/Packages
|
||||
/*.xcodeproj
|
||||
xcuserdata/
|
@ -1,77 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1340"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "RxPack"
|
||||
BuildableName = "RxPack"
|
||||
BlueprintName = "RxPack"
|
||||
ReferencedContainer = "container:">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
skipped = "NO">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "RxPackTests"
|
||||
BuildableName = "RxPackTests"
|
||||
BlueprintName = "RxPackTests"
|
||||
ReferencedContainer = "container:">
|
||||
</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">
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "RxPack"
|
||||
BuildableName = "RxPack"
|
||||
BlueprintName = "RxPack"
|
||||
ReferencedContainer = "container:">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
@ -1,25 +0,0 @@
|
||||
// swift-tools-version:5.6
|
||||
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "RxPack",
|
||||
platforms: [.macOS(.v10_13)],
|
||||
products: [
|
||||
.library(name: "RxPack", targets: ["RxPack"]),
|
||||
],
|
||||
dependencies: [
|
||||
.package(url: "https://github.com/ReactiveX/RxSwift", .upToNextMinor(from: "6.5.0")),
|
||||
.package(url: "https://github.com/a2/MessagePack.swift", from: "4.0.0"),
|
||||
.package(url: "https://github.com/IBM-Swift/BlueSocket", from: "2.0.2"),
|
||||
.package(url: "https://github.com/Quick/Nimble", from: "10.0.0"),
|
||||
],
|
||||
targets: [
|
||||
.target(name: "RxPack", dependencies: [
|
||||
"RxSwift",
|
||||
.product(name: "MessagePack", package: "MessagePack.swift"),
|
||||
.product(name: "Socket", package: "BlueSocket"),
|
||||
]),
|
||||
.testTarget(name: "RxPackTests", dependencies: ["RxPack", "Nimble"]),
|
||||
]
|
||||
)
|
@ -1,269 +0,0 @@
|
||||
/**
|
||||
* Tae Won Ha - http://taewon.de - @hataewon
|
||||
* See LICENSE
|
||||
*/
|
||||
|
||||
import Foundation
|
||||
import RxSwift
|
||||
|
||||
public final class RxMessagePortClient {
|
||||
public enum ResponseCode {
|
||||
// Unfortunately, case success = kCFMessagePortSuccess is not possible.
|
||||
case success
|
||||
case sendTimeout
|
||||
case receiveTimeout
|
||||
case isInvalid
|
||||
case transportError
|
||||
case becameInvalidError
|
||||
case unknown
|
||||
|
||||
fileprivate init(rawResponseCode code: Int32) {
|
||||
switch code {
|
||||
case kCFMessagePortSuccess: self = .success
|
||||
case kCFMessagePortSendTimeout: self = .sendTimeout
|
||||
case kCFMessagePortReceiveTimeout: self = .receiveTimeout
|
||||
case kCFMessagePortIsInvalid: self = .isInvalid
|
||||
case kCFMessagePortTransportError: self = .transportError
|
||||
case kCFMessagePortBecameInvalidError: self = .becameInvalidError
|
||||
default: self = .unknown
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum Error: Swift.Error {
|
||||
case serverInit
|
||||
case clientInit
|
||||
case portInvalid
|
||||
case send(msgid: Int32, response: ResponseCode)
|
||||
}
|
||||
|
||||
public static let defaultTimeout = CFTimeInterval(5)
|
||||
|
||||
public let uuid = UUID()
|
||||
public var timeout = RxMessagePortClient.defaultTimeout
|
||||
|
||||
public init(queueQos: DispatchQoS) {
|
||||
self.queue = DispatchQueue(
|
||||
label: "\(String(reflecting: RxMessagePortClient.self))-\(self.uuid.uuidString)",
|
||||
qos: queueQos,
|
||||
target: .global(qos: queueQos.qosClass)
|
||||
)
|
||||
}
|
||||
|
||||
public func send(msgid: Int32, data: Data?, expectsReply: Bool) -> Single<Data?> {
|
||||
Single.create { single in
|
||||
self.queue.async {
|
||||
guard CFMessagePortIsValid(self.port) else {
|
||||
single(.failure(Error.portInvalid))
|
||||
return
|
||||
}
|
||||
|
||||
let returnDataPtr = UnsafeMutablePointer<Unmanaged<CFData>?>.allocate(capacity: 1)
|
||||
defer { returnDataPtr.deallocate() }
|
||||
|
||||
let responseCode = CFMessagePortSendRequest(
|
||||
self.port,
|
||||
msgid,
|
||||
data?.cfdata,
|
||||
self.timeout,
|
||||
self.timeout,
|
||||
expectsReply ? CFRunLoopMode.defaultMode.rawValue : nil,
|
||||
expectsReply ? returnDataPtr : nil
|
||||
)
|
||||
|
||||
guard responseCode == kCFMessagePortSuccess else {
|
||||
single(.failure(
|
||||
Error.send(msgid: msgid, response: ResponseCode(rawResponseCode: responseCode))
|
||||
))
|
||||
return
|
||||
}
|
||||
|
||||
guard expectsReply else {
|
||||
single(.success(nil))
|
||||
return
|
||||
}
|
||||
|
||||
// Upon return, [returnData] contains a CFData object
|
||||
// containing the reply data. Ownership follows the The Create Rule.
|
||||
// From: https://developer.apple.com/documentation/corefoundation/1543076-cfmessageportsendrequest
|
||||
// This means that we have to release the returned CFData.
|
||||
// Thus, we have to use Unmanaged.takeRetainedValue()
|
||||
// See also https://www.mikeash.com/pyblog/friday-qa-2017-08-11-swiftunmanaged.html
|
||||
let data: Data? = returnDataPtr.pointee?.takeRetainedValue().data
|
||||
single(.success(data))
|
||||
}
|
||||
|
||||
return Disposables.create()
|
||||
}
|
||||
}
|
||||
|
||||
public func connect(to name: String) -> Completable {
|
||||
Completable.create { completable in
|
||||
self.queue.async {
|
||||
self.port = CFMessagePortCreateRemote(kCFAllocatorDefault, name.cfstr)
|
||||
|
||||
if self.port == nil {
|
||||
completable(.error(Error.clientInit))
|
||||
return
|
||||
}
|
||||
|
||||
completable(.completed)
|
||||
}
|
||||
|
||||
return Disposables.create()
|
||||
}
|
||||
}
|
||||
|
||||
public func stop() -> Completable {
|
||||
Completable.create { completable in
|
||||
self.queue.async {
|
||||
if self.port != nil && CFMessagePortIsValid(self.port) {
|
||||
CFMessagePortInvalidate(self.port)
|
||||
}
|
||||
completable(.completed)
|
||||
}
|
||||
|
||||
return Disposables.create()
|
||||
}
|
||||
}
|
||||
|
||||
private var port: CFMessagePort?
|
||||
|
||||
private let queue: DispatchQueue
|
||||
}
|
||||
|
||||
public final class RxMessagePortServer {
|
||||
public typealias SyncReplyBody = (Int32, Data?) -> Data?
|
||||
|
||||
public struct Message {
|
||||
public var msgid: Int32
|
||||
public var data: Data?
|
||||
}
|
||||
|
||||
public let uuid = UUID()
|
||||
|
||||
public var syncReplyBody: SyncReplyBody? {
|
||||
get { self.messageHandler.syncReplyBody }
|
||||
set { self.messageHandler.syncReplyBody = newValue }
|
||||
}
|
||||
|
||||
public var stream: Observable<Message> { self.streamSubject.asObservable() }
|
||||
|
||||
public init(queueQos: DispatchQoS) {
|
||||
self.queue = DispatchQueue(
|
||||
label: "\(String(reflecting: RxMessagePortClient.self))-\(self.uuid.uuidString)",
|
||||
qos: queueQos,
|
||||
target: .global(qos: queueQos.qosClass)
|
||||
)
|
||||
self.messageHandler = MessageHandler(subject: self.streamSubject)
|
||||
}
|
||||
|
||||
public func run(as name: String) -> Completable {
|
||||
Completable.create { completable in
|
||||
self.queue.async {
|
||||
var localCtx = CFMessagePortContext(
|
||||
version: 0,
|
||||
info: Unmanaged.passUnretained(self.messageHandler).toOpaque(),
|
||||
retain: nil,
|
||||
release: nil,
|
||||
copyDescription: nil
|
||||
)
|
||||
|
||||
self.port = CFMessagePortCreateLocal(
|
||||
kCFAllocatorDefault,
|
||||
name.cfstr,
|
||||
{ _, msgid, data, info in
|
||||
guard let infoPtr = UnsafeRawPointer(info) else { return nil }
|
||||
|
||||
let handler = Unmanaged<MessageHandler>.fromOpaque(infoPtr).takeUnretainedValue()
|
||||
return handler.handleMessage(msgId: msgid, cfdata: data)
|
||||
},
|
||||
&localCtx,
|
||||
nil
|
||||
)
|
||||
|
||||
if self.port == nil {
|
||||
self.streamSubject.onError(RxMessagePortClient.Error.serverInit)
|
||||
completable(.error(RxMessagePortClient.Error.serverInit))
|
||||
}
|
||||
|
||||
self.portThread = Thread { self.runServer() }
|
||||
self.portThread?.name
|
||||
= "\(String(reflecting: RxMessagePortServer.self))-\(self.uuid.uuidString)"
|
||||
self.portThread?.start()
|
||||
|
||||
completable(.completed)
|
||||
}
|
||||
|
||||
return Disposables.create()
|
||||
}
|
||||
}
|
||||
|
||||
public func stop() -> Completable {
|
||||
Completable.create { completable in
|
||||
self.queue.async {
|
||||
self.messageHandler.syncReplyBody = nil
|
||||
self.streamSubject.onCompleted()
|
||||
|
||||
if let portRunLoop = self.portRunLoop { CFRunLoopStop(portRunLoop) }
|
||||
|
||||
if self.port != nil && CFMessagePortIsValid(self.port) {
|
||||
CFMessagePortInvalidate(self.port)
|
||||
}
|
||||
|
||||
completable(.completed)
|
||||
}
|
||||
|
||||
return Disposables.create()
|
||||
}
|
||||
}
|
||||
|
||||
private var port: CFMessagePort?
|
||||
private var portThread: Thread?
|
||||
private var portRunLoop: CFRunLoop?
|
||||
|
||||
private let queue: DispatchQueue
|
||||
|
||||
private var messageHandler: MessageHandler
|
||||
private let streamSubject = PublishSubject<Message>()
|
||||
|
||||
private func runServer() {
|
||||
self.portRunLoop = CFRunLoopGetCurrent()
|
||||
let runLoopSrc = CFMessagePortCreateRunLoopSource(kCFAllocatorDefault, self.port, 0)
|
||||
CFRunLoopAddSource(self.portRunLoop, runLoopSrc, .defaultMode)
|
||||
CFRunLoopRun()
|
||||
}
|
||||
}
|
||||
|
||||
private class MessageHandler {
|
||||
fileprivate var syncReplyBody: RxMessagePortServer.SyncReplyBody?
|
||||
|
||||
fileprivate init(subject: PublishSubject<RxMessagePortServer.Message>) { self.subject = subject }
|
||||
|
||||
fileprivate func handleMessage(msgId: Int32, cfdata: CFData?) -> Unmanaged<CFData>? {
|
||||
let d = cfdata?.data
|
||||
|
||||
self.subject.onNext(RxMessagePortServer.Message(msgid: msgId, data: d))
|
||||
|
||||
guard let reply = self.syncReplyBody?(msgId, d) else { return nil }
|
||||
|
||||
// The system releases the returned CFData object.
|
||||
// From https://developer.apple.com/documentation/corefoundation/cfmessageportcallback
|
||||
// See also https://www.mikeash.com/pyblog/friday-qa-2017-08-11-swiftunmanaged.html
|
||||
return Unmanaged.passRetained(reply.cfdata)
|
||||
}
|
||||
|
||||
private let subject: PublishSubject<RxMessagePortServer.Message>
|
||||
}
|
||||
|
||||
private extension Data {
|
||||
var cfdata: CFData { self as NSData }
|
||||
}
|
||||
|
||||
private extension CFData {
|
||||
var data: Data { self as NSData as Data }
|
||||
}
|
||||
|
||||
private extension String {
|
||||
var cfstr: CFString { self as NSString }
|
||||
}
|
@ -1,297 +0,0 @@
|
||||
/**
|
||||
* Tae Won Ha - http://taewon.de - @hataewon
|
||||
* See LICENSE
|
||||
*/
|
||||
|
||||
import Foundation
|
||||
import MessagePack
|
||||
import RxSwift
|
||||
import Socket
|
||||
|
||||
public final class RxMsgpackRpc {
|
||||
public typealias Value = MessagePackValue
|
||||
|
||||
enum MessageType: UInt64 {
|
||||
case request = 0
|
||||
case response = 1
|
||||
case notification = 2
|
||||
}
|
||||
|
||||
public enum Message {
|
||||
case response(msgid: UInt32, error: Value, result: Value)
|
||||
case notification(method: String, params: [Value])
|
||||
case error(value: Value, msg: String)
|
||||
}
|
||||
|
||||
public struct Response {
|
||||
public let msgid: UInt32
|
||||
public let error: Value
|
||||
public let result: Value
|
||||
}
|
||||
|
||||
public struct Error: Swift.Error {
|
||||
var msg: String
|
||||
var cause: Swift.Error?
|
||||
|
||||
init(msg: String, cause: Swift.Error? = nil) {
|
||||
self.msg = msg
|
||||
self.cause = cause
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Streams `Message.notification`s and `Message.error`s by default.
|
||||
When `streamResponses` is set to `true`, then also `Message.response`s.
|
||||
*/
|
||||
public var stream: Observable<Message> { self.streamSubject.asObservable() }
|
||||
|
||||
/**
|
||||
When `true`, all messages of type `MessageType.response` are also streamed
|
||||
to `stream` as `Message.response`. When `false`, only the `Single`s
|
||||
you get from `request(msgid, method, params, expectsReturnValue)` will
|
||||
get the response as `Response`.
|
||||
*/
|
||||
public var streamResponses = false
|
||||
|
||||
public let uuid = UUID()
|
||||
|
||||
public init(queueQos: DispatchQoS) {
|
||||
self.queue = DispatchQueue(
|
||||
label: "\(String(reflecting: RxMsgpackRpc.self))-\(self.uuid.uuidString)",
|
||||
qos: queueQos,
|
||||
target: .global(qos: queueQos.qosClass)
|
||||
)
|
||||
}
|
||||
|
||||
public func run(at path: String) -> Completable {
|
||||
Completable.create { completable in
|
||||
self.queue.async {
|
||||
do {
|
||||
try self.socket = Socket.create(family: .unix, type: .stream, proto: .unix)
|
||||
try self.socket?.connect(to: path)
|
||||
self.setUpThreadAndStartReading()
|
||||
} catch {
|
||||
self.streamSubject.onError(Error(msg: "Could not get socket", cause: error))
|
||||
completable(.error(Error(msg: "Could not get socket at \(path)", cause: error)))
|
||||
}
|
||||
|
||||
completable(.completed)
|
||||
}
|
||||
|
||||
return Disposables.create()
|
||||
}
|
||||
}
|
||||
|
||||
public func stop() -> Completable {
|
||||
Completable.create { completable in
|
||||
self.queue.async {
|
||||
self.cleanUpAndCloseSocket()
|
||||
completable(.completed)
|
||||
}
|
||||
|
||||
return Disposables.create()
|
||||
}
|
||||
}
|
||||
|
||||
public func request(
|
||||
method: String,
|
||||
params: [Value],
|
||||
expectsReturnValue: Bool
|
||||
) -> Single<Response> {
|
||||
Single.create { single in
|
||||
self.queue.async {
|
||||
let msgid = self.nextMsgid
|
||||
self.nextMsgid += 1
|
||||
|
||||
let packed = pack(
|
||||
[
|
||||
.uint(MessageType.request.rawValue),
|
||||
.uint(UInt64(msgid)),
|
||||
.string(method),
|
||||
.array(params),
|
||||
]
|
||||
)
|
||||
|
||||
if self.socket?.remoteConnectionClosed == true {
|
||||
single(.failure(Error(
|
||||
msg: "Connection stopped, but trying to send a request with msg id \(msgid)"
|
||||
)))
|
||||
return
|
||||
}
|
||||
|
||||
guard let socket = self.socket else {
|
||||
single(.failure(Error(
|
||||
msg: "Socket is invalid, but trying to send a request with " +
|
||||
"msg id \(msgid): \(method) with \(params)"
|
||||
)))
|
||||
return
|
||||
}
|
||||
|
||||
if expectsReturnValue { self.singles[msgid] = single }
|
||||
|
||||
do {
|
||||
let writtenBytes = try socket.write(from: packed)
|
||||
if writtenBytes < packed.count {
|
||||
single(.failure(Error(
|
||||
msg: "(Written) = \(writtenBytes) < \(packed.count) = " +
|
||||
"(requested) for msg id: \(msgid)"
|
||||
)))
|
||||
|
||||
return
|
||||
}
|
||||
} catch {
|
||||
self.streamSubject.onError(Error(
|
||||
msg: "Could not write to socket for msg id: \(msgid)", cause: error
|
||||
))
|
||||
|
||||
single(.failure(Error(
|
||||
msg: "Could not write to socket for msg id: \(msgid)", cause: error
|
||||
)))
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
if !expectsReturnValue { single(.success(self.nilResponse(with: msgid))) }
|
||||
}
|
||||
|
||||
return Disposables.create()
|
||||
}
|
||||
}
|
||||
|
||||
private var nextMsgid: UInt32 = 0
|
||||
|
||||
private var socket: Socket?
|
||||
private var thread: Thread?
|
||||
private let queue: DispatchQueue
|
||||
|
||||
private var singles: [UInt32: SingleResponseObserver] = [:]
|
||||
|
||||
private let streamSubject = PublishSubject<Message>()
|
||||
|
||||
private func nilResponse(with msgid: UInt32) -> Response {
|
||||
Response(msgid: msgid, error: .nil, result: .nil)
|
||||
}
|
||||
|
||||
private func cleanUpAndCloseSocket() {
|
||||
self.streamSubject.onCompleted()
|
||||
|
||||
self.singles.forEach { msgid, single in single(.success(self.nilResponse(with: msgid))) }
|
||||
self.singles.removeAll()
|
||||
|
||||
self.socket?.close()
|
||||
}
|
||||
|
||||
private func setUpThreadAndStartReading() {
|
||||
self.thread = Thread {
|
||||
guard let socket = self.socket else { return }
|
||||
|
||||
var readData = Data(capacity: 10240)
|
||||
repeat {
|
||||
do {
|
||||
let readBytes = try socket.read(into: &readData)
|
||||
defer { readData.count = 0 }
|
||||
if readBytes > 0 {
|
||||
let values = try unpackAll(readData)
|
||||
values.forEach(self.processMessage)
|
||||
} else if readBytes == 0 {
|
||||
if socket.remoteConnectionClosed {
|
||||
self.queue.async { self.cleanUpAndCloseSocket() }
|
||||
return
|
||||
}
|
||||
|
||||
continue
|
||||
}
|
||||
} catch let error as Socket.Error {
|
||||
self.streamSubject.onError(Error(msg: "Could not read from socket", cause: error))
|
||||
self.queue.async { self.cleanUpAndCloseSocket() }
|
||||
return
|
||||
} catch {
|
||||
self.streamSubject.onNext(
|
||||
.error(value: .nil, msg: "Data from socket could not be unpacked")
|
||||
)
|
||||
self.queue.async { self.cleanUpAndCloseSocket() }
|
||||
return
|
||||
}
|
||||
} while self.socket?.remoteConnectionClosed == false
|
||||
}
|
||||
|
||||
self.thread?.start()
|
||||
}
|
||||
|
||||
private func processMessage(_ unpacked: Value) {
|
||||
guard let array = unpacked.arrayValue else {
|
||||
self.streamSubject.onNext(.error(
|
||||
value: unpacked,
|
||||
msg: "Could not get the array from the message"
|
||||
))
|
||||
return
|
||||
}
|
||||
|
||||
guard let rawType = array[0].uint64Value, let type = MessageType(rawValue: rawType) else {
|
||||
self.streamSubject.onNext(.error(
|
||||
value: unpacked, msg: "Could not get the type of the message"
|
||||
))
|
||||
return
|
||||
}
|
||||
|
||||
switch type {
|
||||
case .response:
|
||||
guard array.count == 4 else {
|
||||
self.streamSubject.onNext(.error(
|
||||
value: unpacked,
|
||||
msg: "Got an array of length \(array.count) for a message type response"
|
||||
))
|
||||
return
|
||||
}
|
||||
|
||||
guard let msgid64 = array[1].uint64Value else {
|
||||
self.streamSubject.onNext(.error(value: unpacked, msg: "Could not get the msgid"))
|
||||
return
|
||||
}
|
||||
|
||||
self.queue.async {
|
||||
self.processResponse(msgid: UInt32(msgid64), error: array[2], result: array[3])
|
||||
}
|
||||
|
||||
case .notification:
|
||||
guard array.count == 3 else {
|
||||
self.streamSubject.onNext(.error(
|
||||
value: unpacked,
|
||||
msg: "Got an array of length \(array.count) for a message type notification"
|
||||
))
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
guard let method = array[1].stringValue, let params = array[2].arrayValue else {
|
||||
self.streamSubject.onNext(.error(
|
||||
value: unpacked,
|
||||
msg: "Could not get the method and params"
|
||||
))
|
||||
return
|
||||
}
|
||||
|
||||
self.streamSubject.onNext(.notification(method: method, params: params))
|
||||
|
||||
case .request:
|
||||
self.streamSubject.onNext(.error(
|
||||
value: unpacked,
|
||||
msg: "Got message type request from remote"
|
||||
))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
private func processResponse(msgid: UInt32, error: Value, result: Value) {
|
||||
if self.streamResponses {
|
||||
self.streamSubject.onNext(.response(msgid: msgid, error: error, result: result))
|
||||
}
|
||||
|
||||
guard let single: SingleResponseObserver = self.singles[msgid] else { return }
|
||||
|
||||
single(.success(Response(msgid: msgid, error: error, result: result)))
|
||||
self.singles.removeValue(forKey: msgid)
|
||||
}
|
||||
}
|
||||
|
||||
private typealias SingleResponseObserver = (SingleEvent<RxMsgpackRpc.Response>) -> Void
|
File diff suppressed because it is too large
Load Diff
@ -1,71 +0,0 @@
|
||||
/**
|
||||
* Tae Won Ha - http://taewon.de - @hataewon
|
||||
* See LICENSE
|
||||
*/
|
||||
|
||||
import Foundation
|
||||
import RxSwift
|
||||
|
||||
public final class RxNeovimApi {
|
||||
public enum Event {
|
||||
case error(msg: String)
|
||||
}
|
||||
|
||||
public struct Buffer: Equatable, Hashable {
|
||||
public let handle: Int
|
||||
public init(_ handle: Int) { self.handle = handle }
|
||||
}
|
||||
|
||||
public struct Window: Equatable, Hashable {
|
||||
public let handle: Int
|
||||
public init(_ handle: Int) { self.handle = handle }
|
||||
}
|
||||
|
||||
public struct Tabpage: Equatable, Hashable {
|
||||
public let handle: Int
|
||||
public init(_ handle: Int) { self.handle = handle }
|
||||
}
|
||||
|
||||
public typealias Value = RxMsgpackRpc.Value
|
||||
|
||||
public var streamResponses: Bool {
|
||||
get { self.msgpackRpc.streamResponses }
|
||||
set { self.msgpackRpc.streamResponses = newValue }
|
||||
}
|
||||
|
||||
public var msgpackRawStream: Observable<RxMsgpackRpc.Message> { self.msgpackRpc.stream }
|
||||
|
||||
public func run(at path: String) -> Completable { self.msgpackRpc.run(at: path) }
|
||||
|
||||
public func stop() -> Completable { self.msgpackRpc.stop() }
|
||||
|
||||
public func checkBlocked<T>(_ single: Single<T>) -> Single<T> {
|
||||
self
|
||||
.getMode()
|
||||
.flatMap { dict -> Single<T> in
|
||||
guard (dict["blocking"]?.boolValue ?? false) == false else {
|
||||
throw RxNeovimApi.Error.blocked
|
||||
}
|
||||
|
||||
return single
|
||||
}
|
||||
}
|
||||
|
||||
public func rpc(
|
||||
method: String,
|
||||
params: [RxNeovimApi.Value],
|
||||
expectsReturnValue: Bool = true
|
||||
) -> Single<RxNeovimApi.Value> {
|
||||
self.msgpackRpc
|
||||
.request(method: method, params: params, expectsReturnValue: expectsReturnValue)
|
||||
.map { response -> RxMsgpackRpc.Value in
|
||||
guard response.error.isNil else { throw RxNeovimApi.Error(response.error) }
|
||||
|
||||
return response.result
|
||||
}
|
||||
}
|
||||
|
||||
public init() {}
|
||||
|
||||
private let msgpackRpc = RxMsgpackRpc(queueQos: .userInitiated)
|
||||
}
|
@ -1,102 +0,0 @@
|
||||
/**
|
||||
* Tae Won Ha - http://taewon.de - @hataewon
|
||||
* See LICENSE
|
||||
*/
|
||||
|
||||
import Foundation
|
||||
import os
|
||||
import RxSwift
|
||||
|
||||
public extension ObservableType {
|
||||
func compactMap<R>(_ transform: @escaping (Element) throws -> R?) -> Observable<R> {
|
||||
self
|
||||
.map(transform)
|
||||
.filter { $0 != nil }
|
||||
.map { $0! }
|
||||
}
|
||||
}
|
||||
|
||||
public extension PrimitiveSequence where Element == Never, Trait == CompletableTrait {
|
||||
func andThen(using body: () -> Completable) -> Completable { self.andThen(body()) }
|
||||
|
||||
func wait(
|
||||
timeout: TimeInterval = 5,
|
||||
onCompleted: (() -> Void)? = nil,
|
||||
onError: ((Swift.Error) -> Void)? = nil
|
||||
) throws {
|
||||
var trigger = false
|
||||
var err: Swift.Error?
|
||||
|
||||
let condition = NSCondition()
|
||||
|
||||
condition.lock()
|
||||
defer { condition.unlock() }
|
||||
|
||||
let disposable = self.subscribe(onCompleted: {
|
||||
onCompleted?()
|
||||
|
||||
condition.lock()
|
||||
defer { condition.unlock() }
|
||||
trigger = true
|
||||
condition.broadcast()
|
||||
}, onError: { error in
|
||||
onError?(error)
|
||||
err = error
|
||||
|
||||
condition.lock()
|
||||
defer { condition.unlock() }
|
||||
trigger = true
|
||||
condition.broadcast()
|
||||
})
|
||||
|
||||
while !trigger {
|
||||
condition.wait(until: Date(timeIntervalSinceNow: timeout))
|
||||
trigger = true
|
||||
}
|
||||
|
||||
disposable.dispose()
|
||||
|
||||
if let e = err { throw e }
|
||||
}
|
||||
}
|
||||
|
||||
public extension PrimitiveSequence where Trait == SingleTrait {
|
||||
static func fromSinglesToSingleOfArray(_ singles: [Single<Element>]) -> Single<[Element]> {
|
||||
Observable
|
||||
.merge(singles.map { $0.asObservable() })
|
||||
.toArray()
|
||||
}
|
||||
|
||||
func syncValue(timeout: TimeInterval = 5) -> Element? {
|
||||
var trigger = false
|
||||
var value: Element?
|
||||
|
||||
let condition = NSCondition()
|
||||
|
||||
condition.lock()
|
||||
defer { condition.unlock() }
|
||||
|
||||
let disposable = self.subscribe(onSuccess: { result in
|
||||
value = result
|
||||
|
||||
condition.lock()
|
||||
defer { condition.unlock() }
|
||||
trigger = true
|
||||
condition.broadcast()
|
||||
}, onFailure: { _ in
|
||||
condition.lock()
|
||||
defer { condition.unlock() }
|
||||
trigger = true
|
||||
condition.broadcast()
|
||||
})
|
||||
|
||||
while !trigger {
|
||||
condition.wait(until: Date(timeIntervalSinceNow: timeout))
|
||||
trigger = true
|
||||
}
|
||||
|
||||
disposable.dispose()
|
||||
|
||||
return value
|
||||
}
|
||||
}
|
@ -1,121 +0,0 @@
|
||||
/**
|
||||
* Tae Won Ha - http://taewon.de - @hataewon
|
||||
* See LICENSE
|
||||
*/
|
||||
|
||||
import Cocoa
|
||||
import RxPack
|
||||
import RxSwift
|
||||
|
||||
@NSApplicationMain
|
||||
class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
@IBOutlet var window: NSWindow!
|
||||
|
||||
@IBOutlet var clientTextField: NSTextField!
|
||||
|
||||
@IBOutlet var serverTextView: NSTextView!
|
||||
@IBOutlet var clientTextView: NSTextView!
|
||||
|
||||
private let server = RxMessagePortServer(queueQos: .default)
|
||||
private let client = RxMessagePortClient(queueQos: .default)
|
||||
|
||||
private var msgid = Int32(0)
|
||||
|
||||
private let disposeBag = DisposeBag()
|
||||
|
||||
@IBAction func serverStop(sender _: Any?) {
|
||||
self.server.stop().subscribe().disposed(by: self.disposeBag)
|
||||
}
|
||||
|
||||
@IBAction func clientStop(sender _: Any?) {
|
||||
self.client.stop().subscribe().disposed(by: self.disposeBag)
|
||||
}
|
||||
|
||||
@IBAction func clientSend(sender _: Any?) {
|
||||
let text = self.clientTextField.stringValue
|
||||
|
||||
self.logClient("Sending msg (\(self.msgid), \(text))")
|
||||
self.client.send(msgid: self.msgid, data: text.data(using: .utf8)!, expectsReply: true)
|
||||
.observeOn(MainScheduler.instance)
|
||||
.subscribe(onSuccess: { data in
|
||||
if let d = data {
|
||||
self.logClient("Got reply from server: \(String(data: d, encoding: .utf8)!)")
|
||||
} else {
|
||||
self.logClient("Got reply from server: nil")
|
||||
}
|
||||
}, onError: { error in
|
||||
self.logClient("Could not send msg: \(error)")
|
||||
})
|
||||
.disposed(by: self.disposeBag)
|
||||
|
||||
self.msgid += 1
|
||||
}
|
||||
|
||||
func applicationDidFinishLaunching(_: Notification) {
|
||||
self
|
||||
.startServer()
|
||||
.andThen(self.startClient())
|
||||
.subscribe(onCompleted: {
|
||||
DispatchQueue.main.async {
|
||||
self.logServer("Server started with name: com.qvacua.RxMessagePort.demo.server")
|
||||
self.logClient("Connected to com.qvacua.RxMessagePort.demo.server")
|
||||
}
|
||||
}, onError: { error in
|
||||
DispatchQueue.main.async {
|
||||
self.logServer("There was an error: \(error)")
|
||||
self.logClient("There was an error: \(error)")
|
||||
}
|
||||
})
|
||||
.disposed(by: self.disposeBag)
|
||||
}
|
||||
|
||||
func applicationWillTerminate(_: Notification) {
|
||||
self.client.stop().subscribe().disposed(by: self.disposeBag)
|
||||
self.server.stop().subscribe().disposed(by: self.disposeBag)
|
||||
}
|
||||
|
||||
private func startServer() -> Completable {
|
||||
self.logServer("Starting server...")
|
||||
|
||||
self.server.stream
|
||||
.observeOn(MainScheduler.instance)
|
||||
.subscribe(onNext: { message in
|
||||
self.logServer("Got event in stream \(message)")
|
||||
})
|
||||
.disposed(by: self.disposeBag)
|
||||
|
||||
self.server.syncReplyBody = { (msgid, data) -> Data? in
|
||||
DispatchQueue.main.async {
|
||||
self.logServer("Preparing synchronous reply to (\(msgid), \(String(describing: data)))")
|
||||
}
|
||||
|
||||
if let d = data {
|
||||
return "Reply to (\(msgid), \(String(data: d, encoding: .utf8)!))".data(using: .utf8)
|
||||
}
|
||||
|
||||
return "Reply to (\(msgid), nil)".data(using: .utf8)
|
||||
}
|
||||
|
||||
return self.server.run(as: "com.qvacua.RxMessagePort.demo.server")
|
||||
}
|
||||
|
||||
private func startClient() -> Completable {
|
||||
self.logClient("Starting client...")
|
||||
return self.client.connect(to: "com.qvacua.RxMessagePort.demo.server")
|
||||
}
|
||||
|
||||
private func logServer(_ msg: String) {
|
||||
self.serverTextView.append(string: "\(msg)\n")
|
||||
}
|
||||
|
||||
private func logClient(_ msg: String) {
|
||||
self.clientTextView.append(string: "\(msg)\n")
|
||||
}
|
||||
}
|
||||
|
||||
extension NSTextView {
|
||||
func append(string: String) {
|
||||
self.textStorage?.append(NSAttributedString(string: string))
|
||||
self.scrollToEndOfDocument(nil)
|
||||
}
|
||||
}
|
@ -1,58 +0,0 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "16x16",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "16x16",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "32x32",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "32x32",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "128x128",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "128x128",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "256x256",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "256x256",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "512x512",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "mac",
|
||||
"size" : "512x512",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
@ -1,862 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="17147" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
|
||||
<dependencies>
|
||||
<deployment identifier="macosx"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17147"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
|
||||
<connections>
|
||||
<outlet property="delegate" destination="Voe-Tx-rLC" id="GzC-gU-4Uq"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
|
||||
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
|
||||
<customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModule="RxMessagePortDemo" customModuleProvider="target">
|
||||
<connections>
|
||||
<outlet property="clientTextField" destination="jeU-0r-k3Z" id="fTA-Ay-9jX"/>
|
||||
<outlet property="clientTextView" destination="9yk-iE-DFP" id="Kar-uz-x9f"/>
|
||||
<outlet property="serverTextView" destination="7xs-KD-PNk" id="e7b-b5-HdR"/>
|
||||
<outlet property="window" destination="QvC-M9-y7g" id="gIp-Ho-8D9"/>
|
||||
</connections>
|
||||
</customObject>
|
||||
<customObject id="YLy-65-1bz" customClass="NSFontManager"/>
|
||||
<menu title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
|
||||
<items>
|
||||
<menuItem title="RxMessagePortDemo" id="1Xt-HY-uBw">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="RxMessagePortDemo" systemMenu="apple" id="uQy-DD-JDr">
|
||||
<items>
|
||||
<menuItem title="About RxMessagePortDemo" id="5kV-Vb-QxS">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="orderFrontStandardAboutPanel:" target="-1" id="Exp-CZ-Vem"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/>
|
||||
<menuItem title="Preferences…" keyEquivalent="," id="BOF-NM-1cW"/>
|
||||
<menuItem isSeparatorItem="YES" id="wFC-TO-SCJ"/>
|
||||
<menuItem title="Services" id="NMo-om-nkz">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="4je-JR-u6R"/>
|
||||
<menuItem title="Hide RxMessagePortDemo" keyEquivalent="h" id="Olw-nP-bQN">
|
||||
<connections>
|
||||
<action selector="hide:" target="-1" id="PnN-Uc-m68"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Hide Others" keyEquivalent="h" id="Vdr-fp-XzO">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="hideOtherApplications:" target="-1" id="VT4-aY-XCT"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Show All" id="Kd2-mp-pUS">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="unhideAllApplications:" target="-1" id="Dhg-Le-xox"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/>
|
||||
<menuItem title="Quit RxMessagePortDemo" keyEquivalent="q" id="4sb-4s-VLi">
|
||||
<connections>
|
||||
<action selector="terminate:" target="-1" id="Te7-pn-YzF"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="File" id="dMs-cI-mzQ">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="File" id="bib-Uj-vzu">
|
||||
<items>
|
||||
<menuItem title="New" keyEquivalent="n" id="Was-JA-tGl">
|
||||
<connections>
|
||||
<action selector="newDocument:" target="-1" id="4Si-XN-c54"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Open…" keyEquivalent="o" id="IAo-SY-fd9">
|
||||
<connections>
|
||||
<action selector="openDocument:" target="-1" id="bVn-NM-KNZ"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Open Recent" id="tXI-mr-wws">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Open Recent" systemMenu="recentDocuments" id="oas-Oc-fiZ">
|
||||
<items>
|
||||
<menuItem title="Clear Menu" id="vNY-rz-j42">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="clearRecentDocuments:" target="-1" id="Daa-9d-B3U"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="m54-Is-iLE"/>
|
||||
<menuItem title="Close" keyEquivalent="w" id="DVo-aG-piG">
|
||||
<connections>
|
||||
<action selector="performClose:" target="-1" id="HmO-Ls-i7Q"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Save…" keyEquivalent="s" id="pxx-59-PXV">
|
||||
<connections>
|
||||
<action selector="saveDocument:" target="-1" id="teZ-XB-qJY"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Save As…" keyEquivalent="S" id="Bw7-FT-i3A">
|
||||
<connections>
|
||||
<action selector="saveDocumentAs:" target="-1" id="mDf-zr-I0C"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Revert to Saved" keyEquivalent="r" id="KaW-ft-85H">
|
||||
<connections>
|
||||
<action selector="revertDocumentToSaved:" target="-1" id="iJ3-Pv-kwq"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="aJh-i4-bef"/>
|
||||
<menuItem title="Page Setup…" keyEquivalent="P" id="qIS-W8-SiK">
|
||||
<modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="runPageLayout:" target="-1" id="Din-rz-gC5"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Print…" keyEquivalent="p" id="aTl-1u-JFS">
|
||||
<connections>
|
||||
<action selector="print:" target="-1" id="qaZ-4w-aoO"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Edit" id="5QF-Oa-p0T">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Edit" id="W48-6f-4Dl">
|
||||
<items>
|
||||
<menuItem title="Undo" keyEquivalent="z" id="dRJ-4n-Yzg">
|
||||
<connections>
|
||||
<action selector="undo:" target="-1" id="M6e-cu-g7V"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Redo" keyEquivalent="Z" id="6dh-zS-Vam">
|
||||
<connections>
|
||||
<action selector="redo:" target="-1" id="oIA-Rs-6OD"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="WRV-NI-Exz"/>
|
||||
<menuItem title="Cut" keyEquivalent="x" id="uRl-iY-unG">
|
||||
<connections>
|
||||
<action selector="cut:" target="-1" id="YJe-68-I9s"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Copy" keyEquivalent="c" id="x3v-GG-iWU">
|
||||
<connections>
|
||||
<action selector="copy:" target="-1" id="G1f-GL-Joy"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Paste" keyEquivalent="v" id="gVA-U4-sdL">
|
||||
<connections>
|
||||
<action selector="paste:" target="-1" id="UvS-8e-Qdg"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Paste and Match Style" keyEquivalent="V" id="WeT-3V-zwk">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="pasteAsPlainText:" target="-1" id="cEh-KX-wJQ"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Delete" id="pa3-QI-u2k">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="delete:" target="-1" id="0Mk-Ml-PaM"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Select All" keyEquivalent="a" id="Ruw-6m-B2m">
|
||||
<connections>
|
||||
<action selector="selectAll:" target="-1" id="VNm-Mi-diN"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="uyl-h8-XO2"/>
|
||||
<menuItem title="Find" id="4EN-yA-p0u">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Find" id="1b7-l0-nxx">
|
||||
<items>
|
||||
<menuItem title="Find…" tag="1" keyEquivalent="f" id="Xz5-n4-O0W">
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="-1" id="cD7-Qs-BN4"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Find and Replace…" tag="12" keyEquivalent="f" id="YEy-JH-Tfz">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="-1" id="WD3-Gg-5AJ"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Find Next" tag="2" keyEquivalent="g" id="q09-fT-Sye">
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="-1" id="NDo-RZ-v9R"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Find Previous" tag="3" keyEquivalent="G" id="OwM-mh-QMV">
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="-1" id="HOh-sY-3ay"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Use Selection for Find" tag="7" keyEquivalent="e" id="buJ-ug-pKt">
|
||||
<connections>
|
||||
<action selector="performFindPanelAction:" target="-1" id="U76-nv-p5D"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Jump to Selection" keyEquivalent="j" id="S0p-oC-mLd">
|
||||
<connections>
|
||||
<action selector="centerSelectionInVisibleArea:" target="-1" id="IOG-6D-g5B"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Spelling and Grammar" id="Dv1-io-Yv7">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Spelling" id="3IN-sU-3Bg">
|
||||
<items>
|
||||
<menuItem title="Show Spelling and Grammar" keyEquivalent=":" id="HFo-cy-zxI">
|
||||
<connections>
|
||||
<action selector="showGuessPanel:" target="-1" id="vFj-Ks-hy3"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Check Document Now" keyEquivalent=";" id="hz2-CU-CR7">
|
||||
<connections>
|
||||
<action selector="checkSpelling:" target="-1" id="fz7-VC-reM"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="bNw-od-mp5"/>
|
||||
<menuItem title="Check Spelling While Typing" id="rbD-Rh-wIN">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleContinuousSpellChecking:" target="-1" id="7w6-Qz-0kB"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Check Grammar With Spelling" id="mK6-2p-4JG">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleGrammarChecking:" target="-1" id="muD-Qn-j4w"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Correct Spelling Automatically" id="78Y-hA-62v">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticSpellingCorrection:" target="-1" id="2lM-Qi-WAP"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Substitutions" id="9ic-FL-obx">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Substitutions" id="FeM-D8-WVr">
|
||||
<items>
|
||||
<menuItem title="Show Substitutions" id="z6F-FW-3nz">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="orderFrontSubstitutionsPanel:" target="-1" id="oku-mr-iSq"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="gPx-C9-uUO"/>
|
||||
<menuItem title="Smart Copy/Paste" id="9yt-4B-nSM">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleSmartInsertDelete:" target="-1" id="3IJ-Se-DZD"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Smart Quotes" id="hQb-2v-fYv">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticQuoteSubstitution:" target="-1" id="ptq-xd-QOA"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Smart Dashes" id="rgM-f4-ycn">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticDashSubstitution:" target="-1" id="oCt-pO-9gS"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Smart Links" id="cwL-P1-jid">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticLinkDetection:" target="-1" id="Gip-E3-Fov"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Data Detectors" id="tRr-pd-1PS">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticDataDetection:" target="-1" id="R1I-Nq-Kbl"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Text Replacement" id="HFQ-gK-NFA">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleAutomaticTextReplacement:" target="-1" id="DvP-Fe-Py6"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Transformations" id="2oI-Rn-ZJC">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Transformations" id="c8a-y6-VQd">
|
||||
<items>
|
||||
<menuItem title="Make Upper Case" id="vmV-6d-7jI">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="uppercaseWord:" target="-1" id="sPh-Tk-edu"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Make Lower Case" id="d9M-CD-aMd">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="lowercaseWord:" target="-1" id="iUZ-b5-hil"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Capitalize" id="UEZ-Bs-lqG">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="capitalizeWord:" target="-1" id="26H-TL-nsh"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Speech" id="xrE-MZ-jX0">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Speech" id="3rS-ZA-NoH">
|
||||
<items>
|
||||
<menuItem title="Start Speaking" id="Ynk-f8-cLZ">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="startSpeaking:" target="-1" id="654-Ng-kyl"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Stop Speaking" id="Oyz-dy-DGm">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="stopSpeaking:" target="-1" id="dX8-6p-jy9"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Format" id="jxT-CU-nIS">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Format" id="GEO-Iw-cKr">
|
||||
<items>
|
||||
<menuItem title="Font" id="Gi5-1S-RQB">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Font" systemMenu="font" id="aXa-aM-Jaq">
|
||||
<items>
|
||||
<menuItem title="Show Fonts" keyEquivalent="t" id="Q5e-8K-NDq">
|
||||
<connections>
|
||||
<action selector="orderFrontFontPanel:" target="YLy-65-1bz" id="WHr-nq-2xA"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Bold" tag="2" keyEquivalent="b" id="GB9-OM-e27">
|
||||
<connections>
|
||||
<action selector="addFontTrait:" target="YLy-65-1bz" id="hqk-hr-sYV"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Italic" tag="1" keyEquivalent="i" id="Vjx-xi-njq">
|
||||
<connections>
|
||||
<action selector="addFontTrait:" target="YLy-65-1bz" id="IHV-OB-c03"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Underline" keyEquivalent="u" id="WRG-CD-K1S">
|
||||
<connections>
|
||||
<action selector="underline:" target="-1" id="FYS-2b-JAY"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="5gT-KC-WSO"/>
|
||||
<menuItem title="Bigger" tag="3" keyEquivalent="+" id="Ptp-SP-VEL">
|
||||
<connections>
|
||||
<action selector="modifyFont:" target="YLy-65-1bz" id="Uc7-di-UnL"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Smaller" tag="4" keyEquivalent="-" id="i1d-Er-qST">
|
||||
<connections>
|
||||
<action selector="modifyFont:" target="YLy-65-1bz" id="HcX-Lf-eNd"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="kx3-Dk-x3B"/>
|
||||
<menuItem title="Kern" id="jBQ-r6-VK2">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Kern" id="tlD-Oa-oAM">
|
||||
<items>
|
||||
<menuItem title="Use Default" id="GUa-eO-cwY">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="useStandardKerning:" target="-1" id="6dk-9l-Ckg"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Use None" id="cDB-IK-hbR">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="turnOffKerning:" target="-1" id="U8a-gz-Maa"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Tighten" id="46P-cB-AYj">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="tightenKerning:" target="-1" id="hr7-Nz-8ro"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Loosen" id="ogc-rX-tC1">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="loosenKerning:" target="-1" id="8i4-f9-FKE"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Ligatures" id="o6e-r0-MWq">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Ligatures" id="w0m-vy-SC9">
|
||||
<items>
|
||||
<menuItem title="Use Default" id="agt-UL-0e3">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="useStandardLigatures:" target="-1" id="7uR-wd-Dx6"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Use None" id="J7y-lM-qPV">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="turnOffLigatures:" target="-1" id="iX2-gA-Ilz"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Use All" id="xQD-1f-W4t">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="useAllLigatures:" target="-1" id="KcB-kA-TuK"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Baseline" id="OaQ-X3-Vso">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Baseline" id="ijk-EB-dga">
|
||||
<items>
|
||||
<menuItem title="Use Default" id="3Om-Ey-2VK">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="unscript:" target="-1" id="0vZ-95-Ywn"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Superscript" id="Rqc-34-cIF">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="superscript:" target="-1" id="3qV-fo-wpU"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Subscript" id="I0S-gh-46l">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="subscript:" target="-1" id="Q6W-4W-IGz"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Raise" id="2h7-ER-AoG">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="raiseBaseline:" target="-1" id="4sk-31-7Q9"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Lower" id="1tx-W0-xDw">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="lowerBaseline:" target="-1" id="OF1-bc-KW4"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="Ndw-q3-faq"/>
|
||||
<menuItem title="Show Colors" keyEquivalent="C" id="bgn-CT-cEk">
|
||||
<connections>
|
||||
<action selector="orderFrontColorPanel:" target="-1" id="mSX-Xz-DV3"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="iMs-zA-UFJ"/>
|
||||
<menuItem title="Copy Style" keyEquivalent="c" id="5Vv-lz-BsD">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="copyFont:" target="-1" id="GJO-xA-L4q"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Paste Style" keyEquivalent="v" id="vKC-jM-MkH">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="pasteFont:" target="-1" id="JfD-CL-leO"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Text" id="Fal-I4-PZk">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Text" id="d9c-me-L2H">
|
||||
<items>
|
||||
<menuItem title="Align Left" keyEquivalent="{" id="ZM1-6Q-yy1">
|
||||
<connections>
|
||||
<action selector="alignLeft:" target="-1" id="zUv-R1-uAa"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Center" keyEquivalent="|" id="VIY-Ag-zcb">
|
||||
<connections>
|
||||
<action selector="alignCenter:" target="-1" id="spX-mk-kcS"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Justify" id="J5U-5w-g23">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="alignJustified:" target="-1" id="ljL-7U-jND"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Align Right" keyEquivalent="}" id="wb2-vD-lq4">
|
||||
<connections>
|
||||
<action selector="alignRight:" target="-1" id="r48-bG-YeY"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="4s2-GY-VfK"/>
|
||||
<menuItem title="Writing Direction" id="H1b-Si-o9J">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Writing Direction" id="8mr-sm-Yjd">
|
||||
<items>
|
||||
<menuItem title="Paragraph" enabled="NO" id="ZvO-Gk-QUH">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
</menuItem>
|
||||
<menuItem id="YGs-j5-SAR">
|
||||
<string key="title"> Default</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeBaseWritingDirectionNatural:" target="-1" id="qtV-5e-UBP"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem id="Lbh-J2-qVU">
|
||||
<string key="title"> Left to Right</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeBaseWritingDirectionLeftToRight:" target="-1" id="S0X-9S-QSf"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem id="jFq-tB-4Kx">
|
||||
<string key="title"> Right to Left</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeBaseWritingDirectionRightToLeft:" target="-1" id="5fk-qB-AqJ"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="swp-gr-a21"/>
|
||||
<menuItem title="Selection" enabled="NO" id="cqv-fj-IhA">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
</menuItem>
|
||||
<menuItem id="Nop-cj-93Q">
|
||||
<string key="title"> Default</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeTextWritingDirectionNatural:" target="-1" id="lPI-Se-ZHp"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem id="BgM-ve-c93">
|
||||
<string key="title"> Left to Right</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeTextWritingDirectionLeftToRight:" target="-1" id="caW-Bv-w94"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem id="RB4-Sm-HuC">
|
||||
<string key="title"> Right to Left</string>
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="makeTextWritingDirectionRightToLeft:" target="-1" id="EXD-6r-ZUu"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="fKy-g9-1gm"/>
|
||||
<menuItem title="Show Ruler" id="vLm-3I-IUL">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="toggleRuler:" target="-1" id="FOx-HJ-KwY"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Copy Ruler" keyEquivalent="c" id="MkV-Pr-PK5">
|
||||
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="copyRuler:" target="-1" id="71i-fW-3W2"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Paste Ruler" keyEquivalent="v" id="LVM-kO-fVI">
|
||||
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="pasteRuler:" target="-1" id="cSh-wd-qM2"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="View" id="H8h-7b-M4v">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="View" id="HyV-fh-RgO">
|
||||
<items>
|
||||
<menuItem title="Show Toolbar" keyEquivalent="t" id="snW-S8-Cw5">
|
||||
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="toggleToolbarShown:" target="-1" id="BXY-wc-z0C"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Customize Toolbar…" id="1UK-8n-QPP">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="runToolbarCustomizationPalette:" target="-1" id="pQI-g3-MTW"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="hB3-LF-h0Y"/>
|
||||
<menuItem title="Show Sidebar" keyEquivalent="s" id="kIP-vf-haE">
|
||||
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="toggleSidebar:" target="-1" id="iwa-gc-5KM"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Enter Full Screen" keyEquivalent="f" id="4J7-dP-txa">
|
||||
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
|
||||
<connections>
|
||||
<action selector="toggleFullScreen:" target="-1" id="dU3-MA-1Rq"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Window" id="aUF-d1-5bR">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Window" systemMenu="window" id="Td7-aD-5lo">
|
||||
<items>
|
||||
<menuItem title="Minimize" keyEquivalent="m" id="OY7-WF-poV">
|
||||
<connections>
|
||||
<action selector="performMiniaturize:" target="-1" id="VwT-WD-YPe"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem title="Zoom" id="R4o-n2-Eq4">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="performZoom:" target="-1" id="DIl-cC-cCs"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
<menuItem isSeparatorItem="YES" id="eu3-7i-yIM"/>
|
||||
<menuItem title="Bring All to Front" id="LE2-aR-0XJ">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<connections>
|
||||
<action selector="arrangeInFront:" target="-1" id="DRN-fu-gQh"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
<menuItem title="Help" id="wpr-3q-Mcd">
|
||||
<modifierMask key="keyEquivalentModifierMask"/>
|
||||
<menu key="submenu" title="Help" systemMenu="help" id="F2S-fz-NVQ">
|
||||
<items>
|
||||
<menuItem title="RxMessagePortDemo Help" keyEquivalent="?" id="FKE-Sm-Kum">
|
||||
<connections>
|
||||
<action selector="showHelp:" target="-1" id="y7X-2Q-9no"/>
|
||||
</connections>
|
||||
</menuItem>
|
||||
</items>
|
||||
</menu>
|
||||
</menuItem>
|
||||
</items>
|
||||
<point key="canvasLocation" x="94" y="663"/>
|
||||
</menu>
|
||||
<window title="RxMessagePortDemo" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" frameAutosaveName="RxMessagePortDemo" animationBehavior="default" id="QvC-M9-y7g">
|
||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
||||
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
||||
<rect key="contentRect" x="335" y="390" width="722" height="670"/>
|
||||
<rect key="screenRect" x="0.0" y="0.0" width="1680" height="1027"/>
|
||||
<view key="contentView" wantsLayer="YES" id="EiT-Mj-1SZ">
|
||||
<rect key="frame" x="0.0" y="0.0" width="722" height="670"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<splitView arrangesAllSubviews="NO" vertical="YES" translatesAutoresizingMaskIntoConstraints="NO" id="wT0-Tp-Tyg">
|
||||
<rect key="frame" x="20" y="20" width="682" height="630"/>
|
||||
<subviews>
|
||||
<customView id="bEk-ft-FxA">
|
||||
<rect key="frame" x="0.0" y="0.0" width="339" height="630"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="5HO-qr-t9F">
|
||||
<rect key="frame" x="18" y="594" width="44" height="16"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Server" id="0Ln-7O-vOB">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<scrollView horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LWC-uV-61p">
|
||||
<rect key="frame" x="20" y="20" width="294" height="566"/>
|
||||
<clipView key="contentView" drawsBackground="NO" id="ZBU-vj-ZDa">
|
||||
<rect key="frame" x="1" y="1" width="292" height="564"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<textView editable="NO" importsGraphics="NO" verticallyResizable="YES" usesFontPanel="YES" findStyle="panel" continuousSpellChecking="YES" allowsUndo="YES" usesRuler="YES" allowsNonContiguousLayout="YES" quoteSubstitution="YES" dashSubstitution="YES" smartInsertDelete="YES" id="7xs-KD-PNk">
|
||||
<rect key="frame" x="0.0" y="0.0" width="292" height="564"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
<size key="minSize" width="292" height="564"/>
|
||||
<size key="maxSize" width="635" height="10000000"/>
|
||||
<color key="insertionPointColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
</textView>
|
||||
</subviews>
|
||||
</clipView>
|
||||
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="cOI-TH-fVa">
|
||||
<rect key="frame" x="-100" y="-100" width="87" height="18"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</scroller>
|
||||
<scroller key="verticalScroller" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="SgK-2R-R5T">
|
||||
<rect key="frame" x="277" y="1" width="16" height="564"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</scroller>
|
||||
</scrollView>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="9NE-hx-XCL">
|
||||
<rect key="frame" x="62" y="584" width="69" height="32"/>
|
||||
<buttonCell key="cell" type="push" title="Stop" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="8uF-tt-4W2">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="serverStopWithSender:" target="Voe-Tx-rLC" id="SpG-SQ-yJ3"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="LWC-uV-61p" firstAttribute="top" secondItem="5HO-qr-t9F" secondAttribute="bottom" constant="8" symbolic="YES" id="BEv-pe-mS0"/>
|
||||
<constraint firstItem="5HO-qr-t9F" firstAttribute="top" secondItem="bEk-ft-FxA" secondAttribute="top" constant="20" symbolic="YES" id="H79-dC-qnD"/>
|
||||
<constraint firstItem="5HO-qr-t9F" firstAttribute="baseline" secondItem="9NE-hx-XCL" secondAttribute="baseline" id="I7Y-Ey-ftx"/>
|
||||
<constraint firstItem="5HO-qr-t9F" firstAttribute="leading" secondItem="LWC-uV-61p" secondAttribute="leading" id="IMu-gE-hy4"/>
|
||||
<constraint firstAttribute="trailing" secondItem="LWC-uV-61p" secondAttribute="trailing" constant="25" id="Kog-7X-Kcw"/>
|
||||
<constraint firstAttribute="bottom" secondItem="LWC-uV-61p" secondAttribute="bottom" constant="20" symbolic="YES" id="UNR-yf-DnS"/>
|
||||
<constraint firstItem="9NE-hx-XCL" firstAttribute="leading" secondItem="5HO-qr-t9F" secondAttribute="trailing" constant="8" symbolic="YES" id="aHQ-OY-VxX"/>
|
||||
<constraint firstItem="5HO-qr-t9F" firstAttribute="leading" secondItem="bEk-ft-FxA" secondAttribute="leading" constant="20" symbolic="YES" id="mO3-uP-EzA"/>
|
||||
</constraints>
|
||||
</customView>
|
||||
<customView id="uNc-80-ErM">
|
||||
<rect key="frame" x="348" y="0.0" width="334" height="630"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="yva-SU-nLt">
|
||||
<rect key="frame" x="18" y="594" width="40" height="16"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Client" id="PaR-00-kFg">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
</textField>
|
||||
<scrollView horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="n8A-Ih-oc9">
|
||||
<rect key="frame" x="20" y="20" width="294" height="525"/>
|
||||
<clipView key="contentView" drawsBackground="NO" id="OAT-lb-TK0">
|
||||
<rect key="frame" x="1" y="1" width="292" height="523"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<textView editable="NO" importsGraphics="NO" verticallyResizable="YES" usesFontPanel="YES" findStyle="panel" continuousSpellChecking="YES" allowsUndo="YES" usesRuler="YES" allowsNonContiguousLayout="YES" quoteSubstitution="YES" dashSubstitution="YES" smartInsertDelete="YES" id="9yk-iE-DFP">
|
||||
<rect key="frame" x="0.0" y="0.0" width="292" height="523"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
<size key="minSize" width="292" height="523"/>
|
||||
<size key="maxSize" width="640" height="10000000"/>
|
||||
<color key="insertionPointColor" name="textColor" catalog="System" colorSpace="catalog"/>
|
||||
</textView>
|
||||
</subviews>
|
||||
</clipView>
|
||||
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="s8P-Hq-0wK">
|
||||
<rect key="frame" x="-100" y="-100" width="87" height="18"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</scroller>
|
||||
<scroller key="verticalScroller" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="IZ6-GW-cSQ">
|
||||
<rect key="frame" x="277" y="1" width="16" height="523"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</scroller>
|
||||
</scrollView>
|
||||
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="jeU-0r-k3Z">
|
||||
<rect key="frame" x="20" y="565" width="227" height="21"/>
|
||||
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" drawsBackground="YES" id="eGE-L6-3qa">
|
||||
<font key="font" metaFont="system"/>
|
||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
||||
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
|
||||
</textFieldCell>
|
||||
<connections>
|
||||
<action selector="clientSendWithSender:" target="Voe-Tx-rLC" id="Tsd-Me-Nde"/>
|
||||
</connections>
|
||||
</textField>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="RUb-zk-z5U">
|
||||
<rect key="frame" x="249" y="558" width="71" height="32"/>
|
||||
<buttonCell key="cell" type="push" title="Send" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="7mY-fg-cYT">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="clientSendWithSender:" target="Voe-Tx-rLC" id="lbo-Gj-F68"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="e6Q-9T-9z8">
|
||||
<rect key="frame" x="58" y="584" width="69" height="32"/>
|
||||
<buttonCell key="cell" type="push" title="Stop" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="etT-3j-7gZ">
|
||||
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
|
||||
<font key="font" metaFont="system"/>
|
||||
</buttonCell>
|
||||
<connections>
|
||||
<action selector="clientStopWithSender:" target="Voe-Tx-rLC" id="M5A-Vo-kuE"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="RUb-zk-z5U" firstAttribute="trailing" secondItem="n8A-Ih-oc9" secondAttribute="trailing" id="0Mu-4t-bl8"/>
|
||||
<constraint firstItem="yva-SU-nLt" firstAttribute="leading" secondItem="uNc-80-ErM" secondAttribute="leading" constant="20" symbolic="YES" id="1KH-tA-Ova"/>
|
||||
<constraint firstItem="RUb-zk-z5U" firstAttribute="leading" secondItem="jeU-0r-k3Z" secondAttribute="trailing" constant="8" symbolic="YES" id="5FL-nh-dmW"/>
|
||||
<constraint firstItem="yva-SU-nLt" firstAttribute="baseline" secondItem="e6Q-9T-9z8" secondAttribute="baseline" id="5VV-iZ-GXm"/>
|
||||
<constraint firstAttribute="trailing" secondItem="RUb-zk-z5U" secondAttribute="trailing" constant="20" symbolic="YES" id="9mp-wY-R1O"/>
|
||||
<constraint firstAttribute="bottom" secondItem="n8A-Ih-oc9" secondAttribute="bottom" constant="20" symbolic="YES" id="Ee8-Yg-nKn"/>
|
||||
<constraint firstItem="yva-SU-nLt" firstAttribute="leading" secondItem="jeU-0r-k3Z" secondAttribute="leading" id="NWr-uB-65h"/>
|
||||
<constraint firstItem="jeU-0r-k3Z" firstAttribute="leading" secondItem="n8A-Ih-oc9" secondAttribute="leading" id="TfG-Dg-krF"/>
|
||||
<constraint firstItem="e6Q-9T-9z8" firstAttribute="leading" secondItem="yva-SU-nLt" secondAttribute="trailing" constant="8" symbolic="YES" id="VX4-Du-0OT"/>
|
||||
<constraint firstItem="jeU-0r-k3Z" firstAttribute="top" secondItem="yva-SU-nLt" secondAttribute="bottom" constant="8" symbolic="YES" id="Zzg-Ia-2nz"/>
|
||||
<constraint firstItem="jeU-0r-k3Z" firstAttribute="baseline" secondItem="RUb-zk-z5U" secondAttribute="baseline" id="te7-wJ-p6x"/>
|
||||
<constraint firstItem="yva-SU-nLt" firstAttribute="top" secondItem="uNc-80-ErM" secondAttribute="top" constant="20" symbolic="YES" id="u9F-b5-Pe2"/>
|
||||
<constraint firstItem="n8A-Ih-oc9" firstAttribute="top" secondItem="RUb-zk-z5U" secondAttribute="bottom" constant="20" symbolic="YES" id="uDb-Oh-wgP"/>
|
||||
</constraints>
|
||||
</customView>
|
||||
</subviews>
|
||||
<holdingPriorities>
|
||||
<real value="250"/>
|
||||
<real value="250"/>
|
||||
</holdingPriorities>
|
||||
</splitView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="wT0-Tp-Tyg" firstAttribute="top" secondItem="EiT-Mj-1SZ" secondAttribute="top" constant="20" symbolic="YES" id="J1y-VT-SJO"/>
|
||||
<constraint firstItem="wT0-Tp-Tyg" firstAttribute="leading" secondItem="EiT-Mj-1SZ" secondAttribute="leading" constant="20" symbolic="YES" id="eic-22-p0S"/>
|
||||
<constraint firstAttribute="bottom" secondItem="wT0-Tp-Tyg" secondAttribute="bottom" constant="20" symbolic="YES" id="ivM-2p-que"/>
|
||||
<constraint firstAttribute="trailing" secondItem="wT0-Tp-Tyg" secondAttribute="trailing" constant="20" symbolic="YES" id="vz1-Gi-cPG"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<point key="canvasLocation" x="260" y="50"/>
|
||||
</window>
|
||||
</objects>
|
||||
</document>
|
@ -1,32 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2019 Tae Won Ha. All rights reserved.</string>
|
||||
<key>NSMainNibFile</key>
|
||||
<string>MainMenu</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>NSApplication</string>
|
||||
</dict>
|
||||
</plist>
|
@ -1,375 +0,0 @@
|
||||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 52;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
4B022661224AB1490052362B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4B022660224AB1490052362B /* Assets.xcassets */; };
|
||||
4B022664224AB1490052362B /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4B022662224AB1490052362B /* MainMenu.xib */; };
|
||||
4B7FBFCD24EC8616002D12A1 /* RxPack in Frameworks */ = {isa = PBXBuildFile; productRef = 4B7FBFCC24EC8616002D12A1 /* RxPack */; };
|
||||
4B7FBFD024EC8632002D12A1 /* RxSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 4B7FBFCF24EC8632002D12A1 /* RxSwift */; };
|
||||
4B7FBFD124EC8851002D12A1 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B02265E224AB1490052362B /* AppDelegate.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
4B022671224ACCE80052362B /* Embed Frameworks */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
);
|
||||
name = "Embed Frameworks";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
4B02265C224AB1490052362B /* RxMessagePortDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RxMessagePortDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
4B02265E224AB1490052362B /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
4B022660224AB1490052362B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
4B022663224AB1490052362B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
||||
4B022665224AB1490052362B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
4B022659224AB1490052362B /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
4B7FBFD024EC8632002D12A1 /* RxSwift in Frameworks */,
|
||||
4B7FBFCD24EC8616002D12A1 /* RxPack in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
4B02263A224AB11A0052362B = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4B02265D224AB1490052362B /* RxMessagePortDemo */,
|
||||
4B022644224AB11A0052362B /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4B022644224AB11A0052362B /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4B02265C224AB1490052362B /* RxMessagePortDemo.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4B02265D224AB1490052362B /* RxMessagePortDemo */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4B02265E224AB1490052362B /* AppDelegate.swift */,
|
||||
4B022660224AB1490052362B /* Assets.xcassets */,
|
||||
4B022662224AB1490052362B /* MainMenu.xib */,
|
||||
4B022665224AB1490052362B /* Info.plist */,
|
||||
);
|
||||
path = RxMessagePortDemo;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
4B02265B224AB1490052362B /* RxMessagePortDemo */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 4B022667224AB1490052362B /* Build configuration list for PBXNativeTarget "RxMessagePortDemo" */;
|
||||
buildPhases = (
|
||||
4B022658224AB1490052362B /* Sources */,
|
||||
4B022659224AB1490052362B /* Frameworks */,
|
||||
4B02265A224AB1490052362B /* Resources */,
|
||||
4B022671224ACCE80052362B /* Embed Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = RxMessagePortDemo;
|
||||
packageProductDependencies = (
|
||||
4B7FBFCC24EC8616002D12A1 /* RxPack */,
|
||||
4B7FBFCF24EC8632002D12A1 /* RxSwift */,
|
||||
);
|
||||
productName = RxMessagePortDemo;
|
||||
productReference = 4B02265C224AB1490052362B /* RxMessagePortDemo.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
4B02263B224AB11A0052362B /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 1020;
|
||||
LastUpgradeCheck = 1340;
|
||||
ORGANIZATIONNAME = "Tae Won Ha";
|
||||
TargetAttributes = {
|
||||
4B02265B224AB1490052362B = {
|
||||
CreatedOnToolsVersion = 10.2;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 4B02263E224AB11A0052362B /* Build configuration list for PBXProject "RxPackSupport" */;
|
||||
compatibilityVersion = "Xcode 9.3";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = 4B02263A224AB11A0052362B;
|
||||
packageReferences = (
|
||||
4B7FBFCE24EC8632002D12A1 /* XCRemoteSwiftPackageReference "RxSwift" */,
|
||||
);
|
||||
productRefGroup = 4B022644224AB11A0052362B /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
4B02265B224AB1490052362B /* RxMessagePortDemo */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
4B02265A224AB1490052362B /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
4B022661224AB1490052362B /* Assets.xcassets in Resources */,
|
||||
4B022664224AB1490052362B /* MainMenu.xib in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
4B022658224AB1490052362B /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
4B7FBFD124EC8851002D12A1 /* AppDelegate.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
4B022662224AB1490052362B /* MainMenu.xib */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
4B022663224AB1490052362B /* Base */,
|
||||
);
|
||||
name = MainMenu.xib;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
4B02264F224AB11A0052362B /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.13;
|
||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||
MTL_FAST_MATH = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_DISABLE_SAFETY_CHECKS = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
4B022650224AB11A0052362B /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = fast;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.13;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
MTL_FAST_MATH = YES;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_DISABLE_SAFETY_CHECKS = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
4B022668224AB1490052362B /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../Carthage/Build/Mac";
|
||||
INFOPLIST_FILE = RxMessagePortDemo/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.qvacua.RxMessagePortDemo;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
4B022669224AB1490052362B /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/../Carthage/Build/Mac";
|
||||
INFOPLIST_FILE = RxMessagePortDemo/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.qvacua.RxMessagePortDemo;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
4B02263E224AB11A0052362B /* Build configuration list for PBXProject "RxPackSupport" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
4B02264F224AB11A0052362B /* Debug */,
|
||||
4B022650224AB11A0052362B /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
4B022667224AB1490052362B /* Build configuration list for PBXNativeTarget "RxMessagePortDemo" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
4B022668224AB1490052362B /* Debug */,
|
||||
4B022669224AB1490052362B /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
|
||||
/* Begin XCRemoteSwiftPackageReference section */
|
||||
4B7FBFCE24EC8632002D12A1 /* XCRemoteSwiftPackageReference "RxSwift" */ = {
|
||||
isa = XCRemoteSwiftPackageReference;
|
||||
repositoryURL = "https://github.com/ReactiveX/RxSwift";
|
||||
requirement = {
|
||||
kind = upToNextMajorVersion;
|
||||
minimumVersion = 6.5.0;
|
||||
};
|
||||
};
|
||||
/* End XCRemoteSwiftPackageReference section */
|
||||
|
||||
/* Begin XCSwiftPackageProductDependency section */
|
||||
4B7FBFCC24EC8616002D12A1 /* RxPack */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
productName = RxPack;
|
||||
};
|
||||
4B7FBFCF24EC8632002D12A1 /* RxSwift */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 4B7FBFCE24EC8632002D12A1 /* XCRemoteSwiftPackageReference "RxSwift" */;
|
||||
productName = RxSwift;
|
||||
};
|
||||
/* End XCSwiftPackageProductDependency section */
|
||||
};
|
||||
rootObject = 4B02263B224AB11A0052362B /* Project object */;
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
import XCTest
|
||||
|
||||
import RxPackTests
|
||||
|
||||
var tests = [XCTestCaseEntry]()
|
||||
tests += RxPackTests.allTests()
|
||||
XCTMain(tests)
|
@ -1,89 +0,0 @@
|
||||
/**
|
||||
* Tae Won Ha - http://taewon.de - @hataewon
|
||||
* See LICENSE
|
||||
*/
|
||||
|
||||
import RxSwift
|
||||
import XCTest
|
||||
|
||||
@testable import RxPack
|
||||
|
||||
class RxMsgpackRpcTests: XCTestCase {
|
||||
private var connection: RxMsgpackRpc!
|
||||
private let disposeBag = DisposeBag()
|
||||
|
||||
override func setUp() {
|
||||
super.setUp()
|
||||
|
||||
// $ NVIM_LISTEN_ADDRESS=/tmp/nvim.sock nvim --headless $SOMEFILE
|
||||
self.connection = RxMsgpackRpc(queueQos: .default)
|
||||
self.connection.stream
|
||||
.subscribe(
|
||||
onNext: { msg in
|
||||
switch msg {
|
||||
case let .notification(method, params):
|
||||
print("NOTIFICATION: \(method): array of \(params.count) elements")
|
||||
case let .error(value, msg):
|
||||
print("ERROR: \(msg) with \(value)")
|
||||
default:
|
||||
print("???")
|
||||
}
|
||||
},
|
||||
onError: { print("ERROR: \($0)") },
|
||||
onCompleted: { print("COMPLETED!") }
|
||||
)
|
||||
.disposed(by: self.disposeBag)
|
||||
|
||||
_ = try? self.connection.run(at: "/tmp/nvim.sock").wait()
|
||||
// .andThen(self.connection.request(
|
||||
// method: "nvim_ui_attach",
|
||||
// params: [.int(40), .int(40), .map([:])],
|
||||
// expectsReturnValue: true
|
||||
// ))
|
||||
// .syncValue()
|
||||
}
|
||||
|
||||
override func tearDown() {
|
||||
super.tearDown()
|
||||
try? self.connection
|
||||
.request(
|
||||
method: "nvim_command", params: [.string("q!")],
|
||||
expectsReturnValue: false
|
||||
)
|
||||
.asCompletable()
|
||||
.wait()
|
||||
try? self.connection.stop().wait()
|
||||
}
|
||||
|
||||
func testExample() {
|
||||
let disposeBag = DisposeBag()
|
||||
|
||||
let lineCount = self.connection
|
||||
.request(
|
||||
method: "nvim_buf_line_count",
|
||||
params: [.int(0)],
|
||||
expectsReturnValue: true
|
||||
)
|
||||
.syncValue()
|
||||
print(lineCount ?? "???")
|
||||
|
||||
let formatter = DateFormatter()
|
||||
formatter.dateFormat = "mm:ss.SSS"
|
||||
for i in 0...100 {
|
||||
let date = Date()
|
||||
connection
|
||||
.request(
|
||||
method: "nvim_command_output",
|
||||
params: [.string("echo '\(i) \(formatter.string(from: date))'")],
|
||||
expectsReturnValue: true
|
||||
)
|
||||
.subscribe(
|
||||
onSuccess: { response in print(response) },
|
||||
onError: { error in print(error) }
|
||||
)
|
||||
.disposed(by: disposeBag)
|
||||
}
|
||||
|
||||
sleep(30)
|
||||
}
|
||||
}
|
@ -1,100 +0,0 @@
|
||||
/**
|
||||
* Tae Won Ha - http://taewon.de - @hataewon
|
||||
* See LICENSE
|
||||
*/
|
||||
|
||||
import MessagePack
|
||||
import RxSwift
|
||||
import XCTest
|
||||
|
||||
@testable import RxPack
|
||||
|
||||
class NvimMsgPackTests: XCTestCase {
|
||||
var nvim = RxNeovimApi()
|
||||
let disposeBag = DisposeBag()
|
||||
|
||||
override func setUp() {
|
||||
super.setUp()
|
||||
|
||||
// $ NVIM_LISTEN_ADDRESS=/tmp/nvim.sock nvim $SOME_FILES
|
||||
try? self.nvim.run(at: "/tmp/nvim.sock").wait()
|
||||
}
|
||||
|
||||
override func tearDown() {
|
||||
super.tearDown()
|
||||
try? self.nvim
|
||||
.command(command: "q!")
|
||||
.wait()
|
||||
try? self.nvim.stop().wait()
|
||||
}
|
||||
|
||||
func testSth() {
|
||||
let colorNames = [
|
||||
"Normal", // color and background-color
|
||||
"Directory", // a
|
||||
"StatusLine", // code background and foreground
|
||||
"NonText", // hr and block quote border
|
||||
"Question", // blockquote foreground
|
||||
]
|
||||
|
||||
typealias HlResult = [String: RxNeovimApi.Value]
|
||||
typealias ColorNameHlResultTuple = (colorName: String, hlResult: HlResult)
|
||||
typealias ColorNameObservableTuple = (colorName: String, observable: Observable<HlResult>)
|
||||
|
||||
Observable
|
||||
.from(colorNames.map { colorName -> ColorNameObservableTuple in
|
||||
(
|
||||
colorName: colorName,
|
||||
observable: self.nvim
|
||||
.getHlByName(name: colorName, rgb: true)
|
||||
.asObservable()
|
||||
)
|
||||
})
|
||||
.flatMap { tuple -> Observable<(String, HlResult)> in
|
||||
Observable.zip(Observable.just(tuple.colorName), tuple.observable)
|
||||
}
|
||||
.subscribe(onNext: { (tuple: ColorNameHlResultTuple) in
|
||||
print(tuple)
|
||||
})
|
||||
.disposed(by: self.disposeBag)
|
||||
|
||||
// Observable
|
||||
// .concat(colorNames.map { colorName in
|
||||
// self.nvim
|
||||
// .getHlByName(name: colorName, rgb: true)
|
||||
// .asObservable()
|
||||
// })
|
||||
// .enumerated()
|
||||
// .subscribe(onNext: { dict in print(dict) })
|
||||
// .disposed(by: self.disposeBag)
|
||||
|
||||
// self.nvim
|
||||
// .getHlByName(name: "Normal", rgb: true)
|
||||
// .subscribe(onSuccess: { dict in
|
||||
// guard let f = dict["foreground"]?.uint64Value,
|
||||
// let b = dict["background"]?.uint64Value else { return }
|
||||
// print(String(format: "%06X %06X", f, b))
|
||||
// }, onError: { err in print(err) })
|
||||
// .disposed(by: self.disposeBag)
|
||||
|
||||
sleep(1)
|
||||
}
|
||||
|
||||
func testExample() {
|
||||
let formatter = DateFormatter()
|
||||
formatter.dateStyle = .short
|
||||
formatter.timeStyle = .full
|
||||
let now = Date()
|
||||
let dispose = DisposeBag()
|
||||
for i in 0...5 {
|
||||
self.nvim
|
||||
.command(
|
||||
command: "echo '\(formatter.string(from: now)) \(i)'"
|
||||
)
|
||||
.subscribe(onCompleted: { print("\(i) handled") })
|
||||
.disposed(by: dispose)
|
||||
}
|
||||
|
||||
sleep(1)
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
import XCTest
|
||||
|
||||
#if !canImport(ObjectiveC)
|
||||
public func allTests() -> [XCTestCaseEntry] {
|
||||
[
|
||||
testCase(RxPackTests.allTests),
|
||||
]
|
||||
}
|
||||
#endif
|
@ -1,431 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import subprocess
|
||||
|
||||
import msgpack
|
||||
from string import Template
|
||||
import re
|
||||
import textwrap
|
||||
import os
|
||||
import io
|
||||
|
||||
|
||||
void_func_template = Template('''\
|
||||
public func ${func_name}(${args}
|
||||
expectsReturnValue: Bool = false
|
||||
) -> Completable {
|
||||
|
||||
let params: [RxNeovimApi.Value] = [
|
||||
${params}
|
||||
]
|
||||
|
||||
if expectsReturnValue {
|
||||
return self
|
||||
.checkBlocked(
|
||||
self.rpc(method: "${nvim_func_name}", params: params, expectsReturnValue: expectsReturnValue)
|
||||
)
|
||||
.asCompletable()
|
||||
}
|
||||
|
||||
return self
|
||||
.rpc(method: "${nvim_func_name}", params: params, expectsReturnValue: expectsReturnValue)
|
||||
.asCompletable()
|
||||
}
|
||||
''')
|
||||
|
||||
get_mode_func_template = Template('''\
|
||||
public func ${func_name}(${args}
|
||||
) -> Single<${result_type}> {
|
||||
|
||||
let params: [RxNeovimApi.Value] = [
|
||||
${params}
|
||||
]
|
||||
return self
|
||||
.rpc(method: "${nvim_func_name}", params: params, expectsReturnValue: true)
|
||||
.map { value in
|
||||
guard let result = (${return_value}) else {
|
||||
throw RxNeovimApi.Error.conversion(type: ${result_type}.self)
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
}
|
||||
''')
|
||||
|
||||
func_template = Template('''\
|
||||
public func ${func_name}(${args}
|
||||
errWhenBlocked: Bool = true
|
||||
) -> Single<${result_type}> {
|
||||
|
||||
let params: [RxNeovimApi.Value] = [
|
||||
${params}
|
||||
]
|
||||
|
||||
func transform(_ value: Value) throws -> ${result_type} {
|
||||
guard let result = (${return_value}) else {
|
||||
throw RxNeovimApi.Error.conversion(type: ${result_type}.self)
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
if errWhenBlocked {
|
||||
return self
|
||||
.checkBlocked(
|
||||
self.rpc(method: "${nvim_func_name}", params: params, expectsReturnValue: true)
|
||||
)
|
||||
.map(transform)
|
||||
}
|
||||
|
||||
return self
|
||||
.rpc(method: "${nvim_func_name}", params: params, expectsReturnValue: true)
|
||||
.map(transform)
|
||||
}
|
||||
''')
|
||||
|
||||
extension_template = Template('''\
|
||||
// Auto generated for nvim version ${version}.
|
||||
// See bin/generate_api_methods.py
|
||||
|
||||
import Foundation
|
||||
import MessagePack
|
||||
import RxSwift
|
||||
|
||||
extension RxNeovimApi {
|
||||
|
||||
public enum Error: Swift.Error {
|
||||
|
||||
${error_types}
|
||||
|
||||
case exception(message: String)
|
||||
case validation(message: String)
|
||||
case blocked
|
||||
case conversion(type: Any.Type)
|
||||
case unknown
|
||||
|
||||
init(_ value: RxNeovimApi.Value?) {
|
||||
let array = value?.arrayValue
|
||||
guard array?.count == 2 else {
|
||||
self = .unknown
|
||||
return
|
||||
}
|
||||
|
||||
guard let rawValue = array?[0].uint64Value, let message = array?[1].stringValue else {
|
||||
self = .unknown
|
||||
return
|
||||
}
|
||||
|
||||
switch rawValue {
|
||||
${error_cases}
|
||||
default: self = .unknown
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension RxNeovimApi {
|
||||
|
||||
$body
|
||||
}
|
||||
|
||||
extension RxNeovimApi.Buffer {
|
||||
|
||||
public init?(_ value: RxNeovimApi.Value) {
|
||||
guard let (type, data) = value.extendedValue else {
|
||||
return nil
|
||||
}
|
||||
|
||||
guard type == ${buffer_type} else {
|
||||
return nil
|
||||
}
|
||||
|
||||
guard let handle = (try? unpack(data))?.value.int64Value else {
|
||||
return nil
|
||||
}
|
||||
|
||||
self.handle = Int(handle)
|
||||
}
|
||||
}
|
||||
|
||||
extension RxNeovimApi.Window {
|
||||
|
||||
public init?(_ value: RxNeovimApi.Value) {
|
||||
guard let (type, data) = value.extendedValue else {
|
||||
return nil
|
||||
}
|
||||
|
||||
guard type == ${window_type} else {
|
||||
return nil
|
||||
}
|
||||
|
||||
guard let handle = (try? unpack(data))?.value.int64Value else {
|
||||
return nil
|
||||
}
|
||||
|
||||
self.handle = Int(handle)
|
||||
}
|
||||
}
|
||||
|
||||
extension RxNeovimApi.Tabpage {
|
||||
|
||||
public init?(_ value: RxNeovimApi.Value) {
|
||||
guard let (type, data) = value.extendedValue else {
|
||||
return nil
|
||||
}
|
||||
|
||||
guard type == ${tabpage_type} else {
|
||||
return nil
|
||||
}
|
||||
|
||||
guard let handle = (try? unpack(data))?.value.int64Value else {
|
||||
return nil
|
||||
}
|
||||
|
||||
self.handle = Int(handle)
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate func msgPackDictToSwift(_ dict: Dictionary<RxNeovimApi.Value, RxNeovimApi.Value>?) -> Dictionary<String, RxNeovimApi.Value>? {
|
||||
return dict?.compactMapToDict { k, v in
|
||||
guard let strKey = k.stringValue else {
|
||||
return nil
|
||||
}
|
||||
|
||||
return (strKey, v)
|
||||
}
|
||||
}
|
||||
|
||||
fileprivate func msgPackArrayDictToSwift(_ array: [RxNeovimApi.Value]?) -> [Dictionary<String, RxNeovimApi.Value>]? {
|
||||
return array?
|
||||
.compactMap { v in v.dictionaryValue }
|
||||
.compactMap { d in msgPackDictToSwift(d) }
|
||||
}
|
||||
|
||||
extension Dictionary {
|
||||
|
||||
fileprivate func mapToDict<K, V>(_ transform: ((key: Key, value: Value)) throws -> (K, V)) rethrows -> Dictionary<K, V> {
|
||||
let array = try self.map(transform)
|
||||
return tuplesToDict(array)
|
||||
}
|
||||
|
||||
fileprivate func compactMapToDict<K, V>(_ transform: ((key: Key, value: Value)) throws -> (K, V)?) rethrows -> Dictionary<K, V> {
|
||||
let array = try self.compactMap(transform)
|
||||
return tuplesToDict(array)
|
||||
}
|
||||
|
||||
fileprivate func tuplesToDict<K:Hashable, V, S:Sequence>(_ sequence: S)
|
||||
-> Dictionary<K, V> where S.Iterator.Element == (K, V) {
|
||||
|
||||
var result = Dictionary<K, V>(minimumCapacity: sequence.underestimatedCount)
|
||||
|
||||
for (key, value) in sequence {
|
||||
result[key] = value
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
}
|
||||
''')
|
||||
|
||||
|
||||
def snake_to_camel(snake_str):
|
||||
components = snake_str.split('_')
|
||||
return components[0] + "".join(x.title() for x in components[1:])
|
||||
|
||||
|
||||
def nvim_type_to_swift(nvim_type):
|
||||
if nvim_type == 'Boolean':
|
||||
return 'Bool'
|
||||
|
||||
if nvim_type == 'Integer':
|
||||
return 'Int'
|
||||
|
||||
if nvim_type == 'Float':
|
||||
return nvim_type
|
||||
|
||||
if nvim_type == 'void':
|
||||
return 'Void'
|
||||
|
||||
if nvim_type == 'String':
|
||||
return 'String'
|
||||
|
||||
if nvim_type == 'Array':
|
||||
return 'RxNeovimApi.Value'
|
||||
|
||||
if nvim_type == 'Dictionary':
|
||||
return 'Dictionary<String, RxNeovimApi.Value>'
|
||||
|
||||
if nvim_type == 'Buffer':
|
||||
return 'RxNeovimApi.Buffer'
|
||||
|
||||
if nvim_type == 'Window':
|
||||
return 'RxNeovimApi.Window'
|
||||
|
||||
if nvim_type == 'Tabpage':
|
||||
return 'RxNeovimApi.Tabpage'
|
||||
|
||||
if nvim_type == 'Object':
|
||||
return 'RxNeovimApi.Value'
|
||||
|
||||
if nvim_type.startswith('ArrayOf('):
|
||||
match = re.match(r'ArrayOf\((.*?)(?:, \d+)*\)', nvim_type)
|
||||
return '[{}]'.format(nvim_type_to_swift(match.group(1)))
|
||||
|
||||
return 'RxNeovimApi.Value'
|
||||
|
||||
|
||||
def msgpack_to_swift(msgpack_value_name, type):
|
||||
if type == 'Bool':
|
||||
return f'{msgpack_value_name}.boolValue'
|
||||
|
||||
if type == 'Int':
|
||||
return f'({msgpack_value_name}.int64Value == nil ? nil : Int({msgpack_value_name}.int64Value!))'
|
||||
|
||||
if type == 'Float':
|
||||
return f'{msgpack_value_name}.floatValue'
|
||||
|
||||
if type == 'Void':
|
||||
return f'()'
|
||||
|
||||
if type == 'String':
|
||||
return f'{msgpack_value_name}.stringValue'
|
||||
|
||||
if type == 'RxNeovimApi.Value':
|
||||
return f'Optional({msgpack_value_name})'
|
||||
|
||||
if type in 'RxNeovimApi.Buffer':
|
||||
return f'RxNeovimApi.Buffer({msgpack_value_name})'
|
||||
|
||||
if type in 'RxNeovimApi.Window':
|
||||
return f'RxNeovimApi.Window({msgpack_value_name})'
|
||||
|
||||
if type in 'RxNeovimApi.Tabpage':
|
||||
return f'RxNeovimApi.Tabpage({msgpack_value_name})'
|
||||
|
||||
if type.startswith('Dictionary<'):
|
||||
return f'msgPackDictToSwift({msgpack_value_name}.dictionaryValue)'
|
||||
|
||||
if type.startswith('[Dictionary<'):
|
||||
return f'msgPackArrayDictToSwift({msgpack_value_name}.arrayValue)'
|
||||
|
||||
if type.startswith('['):
|
||||
element_type = re.match(r'\[(.*)\]', type).group(1)
|
||||
return f'{msgpack_value_name}.arrayValue?.compactMap({{ v in {msgpack_to_swift("v", element_type)} }})'
|
||||
|
||||
return 'RxNeovimApi.Value'
|
||||
|
||||
|
||||
def swift_to_msgpack_value(name, type):
|
||||
if type == 'Bool':
|
||||
return f'.bool({name})'
|
||||
|
||||
if type == 'Int':
|
||||
return f'.int(Int64({name}))'
|
||||
|
||||
if type == 'Float':
|
||||
return f'.float({name})'
|
||||
|
||||
if type == 'Void':
|
||||
return f'.nil()'
|
||||
|
||||
if type == 'String':
|
||||
return f'.string({name})'
|
||||
|
||||
if type == 'Dictionary<String, RxNeovimApi.Value>':
|
||||
return f'.map({name}.mapToDict({{ (Value.string($0), $1) }}))'
|
||||
|
||||
if type == 'RxNeovimApi.Value':
|
||||
return name
|
||||
|
||||
if type in ['RxNeovimApi.Buffer', 'RxNeovimApi.Window', 'RxNeovimApi.Tabpage']:
|
||||
return f'.int(Int64({name}.handle))'
|
||||
|
||||
if type.startswith('['):
|
||||
match = re.match(r'\[(.*)\]', type)
|
||||
test = '$0'
|
||||
return f'.array({name}.map {{ {swift_to_msgpack_value(test, match.group(1))} }})'
|
||||
|
||||
|
||||
def parse_args(raw_params):
|
||||
types = [nvim_type_to_swift(p[0]) for p in raw_params]
|
||||
names = [p[1] for p in raw_params]
|
||||
params = dict(zip(names, types))
|
||||
|
||||
result = '\n'.join([n + ': ' + t + ',' for n, t in params.items()])
|
||||
if not result:
|
||||
return ''
|
||||
|
||||
return '\n' + textwrap.indent(result, ' ')
|
||||
|
||||
|
||||
def parse_params(raw_params):
|
||||
types = [nvim_type_to_swift(p[0]) for p in raw_params]
|
||||
names = [p[1] for p in raw_params]
|
||||
params = dict(zip(names, types))
|
||||
|
||||
result = '\n'.join([swift_to_msgpack_value(n, t) + ',' for n, t in params.items()])
|
||||
return textwrap.indent(result, ' ').strip()
|
||||
|
||||
|
||||
def parse_function(f):
|
||||
args = parse_args(f['parameters'])
|
||||
template = void_func_template if f['return_type'] == 'void' else func_template
|
||||
template = get_mode_func_template if f['name'] == 'nvim_get_mode' else template
|
||||
result = template.substitute(
|
||||
func_name=snake_to_camel(f['name'][5:]),
|
||||
nvim_func_name=f['name'],
|
||||
args=args,
|
||||
params=parse_params(f['parameters']),
|
||||
result_type=nvim_type_to_swift(f['return_type']),
|
||||
return_value=msgpack_to_swift('value', nvim_type_to_swift(f['return_type']))
|
||||
)
|
||||
|
||||
return result
|
||||
|
||||
|
||||
def parse_version(version):
|
||||
return '.'.join([str(v) for v in [version['major'], version['minor'], version['patch']]])
|
||||
|
||||
|
||||
def parse_error_types(error_types):
|
||||
return textwrap.indent(
|
||||
'\n'.join(
|
||||
[f'public static let {t.lower()}RawValue = UInt64({v["id"]})' for t, v in error_types.items()]
|
||||
),
|
||||
' '
|
||||
).lstrip()
|
||||
|
||||
|
||||
def parse_error_cases(error_types):
|
||||
return textwrap.indent(
|
||||
'\n'.join(
|
||||
[f'case Error.{t.lower()}RawValue: self = .{t.lower()}(message: message)' for t, v in error_types.items()]
|
||||
),
|
||||
' '
|
||||
).lstrip()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
result_file_path = './Sources/RxPack/RxNeovimApi.generated.swift'
|
||||
|
||||
nvim_path = os.environ['NVIM_PATH'] if 'NVIM_PATH' in os.environ else 'nvim'
|
||||
|
||||
nvim_output = subprocess.run([nvim_path, '--api-info'], stdout=subprocess.PIPE)
|
||||
api = msgpack.unpackb(nvim_output.stdout)
|
||||
|
||||
version = parse_version(api['version'])
|
||||
functions = [f for f in api['functions'] if 'deprecated_since' not in f]
|
||||
body = '\n'.join([parse_function(f) for f in functions])
|
||||
|
||||
result = extension_template.substitute(
|
||||
body=body,
|
||||
version=version,
|
||||
error_types=parse_error_types(api['error_types']),
|
||||
error_cases=parse_error_cases(api['error_types']),
|
||||
buffer_type=api['types']['Buffer']['id'],
|
||||
window_type=api['types']['Window']['id'],
|
||||
tabpage_type=api['types']['Tabpage']['id']
|
||||
)
|
||||
|
||||
with io.open(result_file_path, 'w') as api_methods_file:
|
||||
api_methods_file.write(result)
|
@ -1,47 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Executing this script will replace the download step of pre-built NvimServer.
|
||||
set -Eeuo pipefail
|
||||
BUILD_DIR=".deps"
|
||||
|
||||
pushd "$(dirname "${BASH_SOURCE[0]}")/.." >/dev/null
|
||||
|
||||
mkdir -p ${BUILD_DIR}
|
||||
|
||||
target_version=$(cat ./nvim-version.txt | awk '{$1=$1}1')
|
||||
nvim="./${BUILD_DIR}/nvim-osx64/bin/nvim"
|
||||
if [[ -f ${nvim} ]] ; then
|
||||
version="$($nvim --version | grep ^NVIM | awk '{print $2}')" || "n/a"
|
||||
else
|
||||
version="n/a"
|
||||
fi
|
||||
|
||||
echo "Downloaded version: $version"
|
||||
echo "Target version: $target_version"
|
||||
|
||||
download=false
|
||||
if [[ "$target_version" == "nightly" ]]; then
|
||||
echo "Target version is nightly => Downloading..."
|
||||
download=true
|
||||
else
|
||||
if ! [[ "$version" =~ "$target_version".* ]]; then
|
||||
echo "Target version differs from the downloaded version => Downloading..."
|
||||
download=true
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$download" == true ]]; then
|
||||
curl -L -o ./${BUILD_DIR}/nvim-macos.tar.gz "https://github.com/neovim/neovim/releases/download/$target_version/nvim-macos.tar.gz"
|
||||
echo "Downloaded $target_version"
|
||||
pushd ./${BUILD_DIR}
|
||||
tar xf nvim-macos.tar.gz
|
||||
popd
|
||||
echo "Extracted $target_version"
|
||||
else
|
||||
echo "No download necessary"
|
||||
fi
|
||||
|
||||
echo "Generating sources..."
|
||||
NVIM_PATH="$nvim" ./bin/generate_api_methods.py
|
||||
|
||||
popd >/dev/null
|
||||
echo "Generated sources"
|
@ -1 +0,0 @@
|
||||
nightly
|
@ -11,7 +11,7 @@
|
||||
|
||||
import Cocoa
|
||||
|
||||
class DraggingSingleRowStackView: NSStackView {
|
||||
final class DraggingSingleRowStackView: NSStackView {
|
||||
var postDraggingHandler: ((NSStackView, NSView) -> Void)?
|
||||
|
||||
override func mouseDragged(with event: NSEvent) {
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
import Cocoa
|
||||
|
||||
class HorizontalOnlyScrollView: NSScrollView {
|
||||
final class HorizontalOnlyScrollView: NSScrollView {
|
||||
// Needed to be able to override scrollWheel(with:)
|
||||
// https://stackoverflow.com/a/31201614
|
||||
override static var isCompatibleWithResponsiveScrolling: Bool { true }
|
||||
|
@ -13,7 +13,7 @@ struct TabPosition: OptionSet {
|
||||
let rawValue: Int
|
||||
}
|
||||
|
||||
class Tab<Rep: TabRepresentative>: NSView {
|
||||
final class Tab<Rep: TabRepresentative>: NSView {
|
||||
var title: String { self.tabRepresentative.title }
|
||||
|
||||
var tabRepresentative: Rep {
|
||||
|
@ -11,7 +11,7 @@ public protocol TabRepresentative: Hashable {
|
||||
var isSelected: Bool { get }
|
||||
}
|
||||
|
||||
public class TabBar<Rep: TabRepresentative>: NSView {
|
||||
public final class TabBar<Rep: TabRepresentative>: NSView {
|
||||
public typealias TabCallback = (Int, Rep, [Rep]) -> Void
|
||||
|
||||
public var theme: Theme { self._theme }
|
||||
|
@ -1,7 +0,0 @@
|
||||
import XCTest
|
||||
|
||||
import TabsTests
|
||||
|
||||
var tests = [XCTestCaseEntry]()
|
||||
tests += TabsTests.allTests()
|
||||
XCTMain(tests)
|
@ -1,9 +0,0 @@
|
||||
import XCTest
|
||||
|
||||
#if !canImport(ObjectiveC)
|
||||
public func allTests() -> [XCTestCaseEntry] {
|
||||
[
|
||||
testCase(TabsTests.allTests),
|
||||
]
|
||||
}
|
||||
#endif
|
9
VimR.xcworkspace/contents.xcworkspacedata
generated
9
VimR.xcworkspace/contents.xcworkspacedata
generated
@ -1,6 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:Ignore">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:Commons">
|
||||
</FileRef>
|
||||
@ -10,9 +13,6 @@
|
||||
<FileRef
|
||||
location = "group:Tabs">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:RxPack">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:NvimServer">
|
||||
</FileRef>
|
||||
@ -25,9 +25,6 @@
|
||||
<FileRef
|
||||
location = "group:Tabs/Support/TabsSupport.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:RxPack/Support/RxPackSupport.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:NvimView/Support/NvimViewSupport.xcodeproj">
|
||||
</FileRef>
|
||||
|
@ -72,6 +72,15 @@
|
||||
"version" : "4.0.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "misc.swift",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/qvacua/misc.swift",
|
||||
"state" : {
|
||||
"revision" : "e963af99e5eddc14b0f28c5c87a1f582c88bf128",
|
||||
"version" : "0.0.1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "nimble",
|
||||
"kind" : "remoteSourceControl",
|
||||
@ -90,6 +99,15 @@
|
||||
"version" : "3.1.9"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "rxpack.swift",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/qvacua/RxPack.swift",
|
||||
"state" : {
|
||||
"revision" : "c47c1a1bf33f6f8380bc74fb788d9b5554c09f93",
|
||||
"version" : "0.1.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "rxswift",
|
||||
"kind" : "remoteSourceControl",
|
||||
@ -126,6 +144,15 @@
|
||||
"version" : "0.5.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "swift-collections",
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/apple/swift-collections.git",
|
||||
"state" : {
|
||||
"revision" : "48254824bb4248676bf7ce56014ff57b142b77eb",
|
||||
"version" : "1.0.2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"identity" : "swifter",
|
||||
"kind" : "remoteSourceControl",
|
||||
|
@ -24,7 +24,6 @@
|
||||
1929B3A6C332FFAAEC7FD219 /* MainWindow+CustomTitle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B71B4BB6550F5BC6D4CF /* MainWindow+CustomTitle.swift */; };
|
||||
1929B3AC66EFE35D68C020E3 /* MarkdownToolReducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BFB0F294F3714D5E095F /* MarkdownToolReducer.swift */; };
|
||||
1929B4219A68586E2CED6E96 /* FileMonitor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B333D8752E2E68F35122 /* FileMonitor.swift */; };
|
||||
1929B443B7AB2176A7818CA1 /* fuzzy_match.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1929B1B01340283D6AAD6B06 /* fuzzy_match.cc */; };
|
||||
1929B4B00D7BB191A9A6532D /* HtmlPreviewToolReducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BE5AEA3D0980860EED50 /* HtmlPreviewToolReducer.swift */; };
|
||||
1929B4B70926DE113E6BF990 /* MarkdownPreviewReducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BE37AA2843779CAFA76F /* MarkdownPreviewReducer.swift */; };
|
||||
1929B4E54E2F13A7F5F2B682 /* BufferListReducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B67A10E6BB2986B2416E /* BufferListReducer.swift */; };
|
||||
@ -43,6 +42,7 @@
|
||||
1929B6C0393DE40E34F4A49A /* ToolsPrefReducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B694508FB5FDE607513A /* ToolsPrefReducer.swift */; };
|
||||
1929B6D8F5FC723B7109031F /* OpenQuicklyReducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B12CE56A9B36980288A4 /* OpenQuicklyReducer.swift */; };
|
||||
1929B71381946860626E5224 /* FileBrowserReducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BDC8F5D48578A90236E9 /* FileBrowserReducer.swift */; };
|
||||
1929B7D1665BBB75DC89E391 /* IgnoreService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B71F6A82A34F16BB52BE /* IgnoreService.swift */; };
|
||||
1929B805633C40EC1642121C /* RxCommons.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B7609C0C23AC29BDC09B /* RxCommons.swift */; };
|
||||
1929B8DDACEB28E6672AEC42 /* MainWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B6E01216D49BB9F3B6A3 /* MainWindow.swift */; };
|
||||
1929B8F498D1E7C53F572CE2 /* KeysPref.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B14A5949FB64C4B2646F /* KeysPref.swift */; };
|
||||
@ -62,15 +62,14 @@
|
||||
1929BCC9D3604933DFF07E2E /* FileBrowser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BA5C7099CDEB04B76BA4 /* FileBrowser.swift */; };
|
||||
1929BCF7F7B9CC5499A3F506 /* AdvancedPrefReducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B7039C5689CE45F53888 /* AdvancedPrefReducer.swift */; };
|
||||
1929BD3878A3A47B8D685CD2 /* AppDelegateReducer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B7A68B7109CEFAF105E8 /* AppDelegateReducer.swift */; };
|
||||
1929BDFDBDA7180D02ACB37E /* RxSwiftCommonsTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B6C215ACCBE12672A8D7 /* RxSwiftCommonsTest.swift */; };
|
||||
1929BE0DAEE9664C5BCFA211 /* States.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BB6608B4F0E037CA0F4C /* States.swift */; };
|
||||
1929BE0F64A6CE5BCE2A5092 /* MainWindow+Delegates.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B714EB137AE448CE8ABD /* MainWindow+Delegates.swift */; };
|
||||
1929BE2F3E0182CC51F2763A /* ThemedTableSubviews.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BD2CA8DD198A6BCDBCB7 /* ThemedTableSubviews.swift */; };
|
||||
1929BE511088E082529199CB /* IgnoreServiceTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B07A72CA7CCA31337713 /* IgnoreServiceTest.swift */; };
|
||||
1929BEAE0592096BC1191B67 /* PrefPane.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B07A4A9209C88380E015 /* PrefPane.swift */; };
|
||||
1929BEDE1BE950EDA9497363 /* GeneralPref.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BB55946DAEBF55D24048 /* GeneralPref.swift */; };
|
||||
1929BF03FD6465F289AA80B2 /* ToolsPref.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929BB2AD21A10A0ECA66A5E /* ToolsPref.swift */; };
|
||||
1929BF3253594E5B1908C6CE /* RpcAppearanceEpic.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B230EE8F1428980988F0 /* RpcAppearanceEpic.swift */; };
|
||||
1929BF5D0EFCC56A733BB4B7 /* FuzzySearch.xcdatamodel in Sources */ = {isa = PBXBuildFile; fileRef = 1929B656C04BA6F950BFA2F5 /* FuzzySearch.xcdatamodel */; };
|
||||
1929BFDE22D155F7C4B19E96 /* HtmlPreviewTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B85023B042C485409CE1 /* HtmlPreviewTool.swift */; };
|
||||
4B029F1A1D45E349004EE0D3 /* PrefWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4B029F1C1D45E349004EE0D3 /* PrefWindow.xib */; };
|
||||
4B0B36202595236000B06899 /* Swifter in Frameworks */ = {isa = PBXBuildFile; productRef = 4BD5655224E8014100D52809 /* Swifter */; };
|
||||
@ -155,23 +154,30 @@
|
||||
4B94341620B95EC7005807BA /* MacVim-css.icns in Resources */ = {isa = PBXBuildFile; fileRef = 4B9433DB20B95EC6005807BA /* MacVim-css.icns */; };
|
||||
4B97E2CC1D33F53D00FC0660 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4B97E2CE1D33F53D00FC0660 /* MainWindow.xib */; };
|
||||
4B9D049D273481AD007E8614 /* Down in Frameworks */ = {isa = PBXBuildFile; productRef = 4B9D049C273481AD007E8614 /* Down */; };
|
||||
4BA19812285B4BA600B49309 /* Misc in Frameworks */ = {isa = PBXBuildFile; productRef = 4BA19811285B4BA600B49309 /* Misc */; };
|
||||
4BA19817285B599400B49309 /* FuzzySearch.xcdatamodel in Sources */ = {isa = PBXBuildFile; fileRef = 1929B656C04BA6F950BFA2F5 /* FuzzySearch.xcdatamodel */; };
|
||||
4BADD55B283A847100C6B16D /* Ignore in Frameworks */ = {isa = PBXBuildFile; productRef = 4BADD55A283A847100C6B16D /* Ignore */; };
|
||||
4BADD55E283ABD0200C6B16D /* OrderedCollections in Frameworks */ = {isa = PBXBuildFile; productRef = 4BADD55D283ABD0200C6B16D /* OrderedCollections */; };
|
||||
4BB409E51DD68CCC005F39A2 /* FileBrowserMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4BB409E71DD68CCC005F39A2 /* FileBrowserMenu.xib */; };
|
||||
4BCB697F285DD4C400BDD358 /* RxPack in Frameworks */ = {isa = PBXBuildFile; productRef = 4BCB697E285DD4C400BDD358 /* RxPack */; };
|
||||
4BDF50171D77540900D8FBC3 /* OpenQuicklyWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4BDF50191D77540900D8FBC3 /* OpenQuicklyWindow.xib */; };
|
||||
4BE73F99285C9A9A00B63585 /* IgnoreService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B71F6A82A34F16BB52BE /* IgnoreService.swift */; };
|
||||
4BE73F9B285C9AC100B63585 /* Ignore in Frameworks */ = {isa = PBXBuildFile; productRef = 4BE73F9A285C9AC100B63585 /* Ignore */; };
|
||||
4BE73F9D285C9AD600B63585 /* OrderedCollections in Frameworks */ = {isa = PBXBuildFile; productRef = 4BE73F9C285C9AD600B63585 /* OrderedCollections */; };
|
||||
4BE73FA2285C9C6C00B63585 /* FoundationCommons.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1929B9AF20D7BD6E5C975128 /* FoundationCommons.swift */; };
|
||||
4BE73FA4285C9C7700B63585 /* Commons in Frameworks */ = {isa = PBXBuildFile; productRef = 4BE73FA3285C9C7700B63585 /* Commons */; };
|
||||
4BE73FA6285CA9D100B63585 /* Resources in Resources */ = {isa = PBXBuildFile; fileRef = 4BE73FA5285CA9D100B63585 /* Resources */; };
|
||||
4BEBA5091CFF374B00673FDF /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BEBA5081CFF374B00673FDF /* AppDelegate.swift */; };
|
||||
4BEBA50B1CFF374B00673FDF /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4BEBA50A1CFF374B00673FDF /* Assets.xcassets */; };
|
||||
4BEBA50E1CFF374B00673FDF /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4BEBA50C1CFF374B00673FDF /* MainMenu.xib */; };
|
||||
4BF07EE41D51326A009BECEB /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 4BF07EE61D51326A009BECEB /* Credits.rtf */; };
|
||||
4BF70EC423D1B3F9009E51E9 /* FuzzyMatcher.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4BF70EBF23D1B3F9009E51E9 /* FuzzyMatcher.mm */; };
|
||||
4BF70EC823D1B3F9009E51E9 /* FuzzyMatcherPool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BF70EC323D1B3F9009E51E9 /* FuzzyMatcherPool.swift */; };
|
||||
4BF70ED223D1B4AF009E51E9 /* FoundationCommons.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF70ED123D1B4AF009E51E9 /* FoundationCommons.m */; };
|
||||
4BF70ED623D1B54F009E51E9 /* ScoredUrl.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF70ED523D1B54F009E51E9 /* ScoredUrl.m */; };
|
||||
4BF70EE123D1B5B3009E51E9 /* FileScanBaton.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF70EDF23D1B5B3009E51E9 /* FileScanBaton.m */; };
|
||||
4BF70EE523D1B5EC009E51E9 /* FuzzySearchService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BF70EE323D1B5EC009E51E9 /* FuzzySearchService.swift */; };
|
||||
4BF70EEA23D1B5FF009E51E9 /* CoreDataStack.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4BF70EE923D1B5FF009E51E9 /* CoreDataStack.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
4BEBA5151CFF374B00673FDF /* PBXContainerItemProxy */ = {
|
||||
4BE73F9E285C9C4500B63585 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 4BEBA4FD1CFF374B00673FDF /* Project object */;
|
||||
proxyType = 1;
|
||||
@ -195,18 +201,15 @@
|
||||
/* Begin PBXFileReference section */
|
||||
1929B067B3247675BCD09218 /* MainWindow+Actions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "MainWindow+Actions.swift"; sourceTree = "<group>"; };
|
||||
1929B07A4A9209C88380E015 /* PrefPane.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PrefPane.swift; sourceTree = "<group>"; };
|
||||
1929B07A72CA7CCA31337713 /* IgnoreServiceTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IgnoreServiceTest.swift; sourceTree = "<group>"; };
|
||||
1929B07F0085B7AE10413346 /* ShortcutsTableSubviews.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ShortcutsTableSubviews.swift; sourceTree = "<group>"; };
|
||||
1929B0E63986F95E2F8DFF21 /* FileItem+CoreDataClass.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "FileItem+CoreDataClass.h"; sourceTree = "<group>"; };
|
||||
1929B0E9B2F018D3E31D4B0B /* ShortcutsPref.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ShortcutsPref.swift; sourceTree = "<group>"; };
|
||||
1929B0EB3F49C42A57D083AF /* GeneralPrefReducer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneralPrefReducer.swift; sourceTree = "<group>"; };
|
||||
1929B0FBFB766042CF06E463 /* AppearancePref.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppearancePref.swift; sourceTree = "<group>"; };
|
||||
1929B12CE56A9B36980288A4 /* OpenQuicklyReducer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OpenQuicklyReducer.swift; sourceTree = "<group>"; };
|
||||
1929B14A5949FB64C4B2646F /* KeysPref.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeysPref.swift; sourceTree = "<group>"; };
|
||||
1929B1534B8857C519D7C0FB /* FileItem+CoreDataProperties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "FileItem+CoreDataProperties.h"; sourceTree = "<group>"; };
|
||||
1929B1558455B3A74D93EF2A /* OpenQuicklyFileViewRow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OpenQuicklyFileViewRow.swift; sourceTree = "<group>"; };
|
||||
1929B17B1BC7CA08DC76495C /* FileItem+CoreDataProperties.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "FileItem+CoreDataProperties.m"; sourceTree = "<group>"; };
|
||||
1929B18E9BE35750BF2BA571 /* HtmlPreviewMiddleware.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HtmlPreviewMiddleware.swift; sourceTree = "<group>"; };
|
||||
1929B1B01340283D6AAD6B06 /* fuzzy_match.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = fuzzy_match.cc; path = FuzzyMatcher/fuzzy_match.cc; sourceTree = "<group>"; };
|
||||
1929B1DC584C89C477E83FA2 /* HttpServerMiddleware.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HttpServerMiddleware.swift; sourceTree = "<group>"; };
|
||||
1929B230EE8F1428980988F0 /* RpcAppearanceEpic.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RpcAppearanceEpic.swift; sourceTree = "<group>"; };
|
||||
1929B333D8752E2E68F35122 /* FileMonitor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FileMonitor.swift; sourceTree = "<group>"; };
|
||||
@ -218,17 +221,16 @@
|
||||
1929B617C229B19DB3E987B8 /* MarkdownPreviewMiddleware.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MarkdownPreviewMiddleware.swift; sourceTree = "<group>"; };
|
||||
1929B656C04BA6F950BFA2F5 /* FuzzySearch.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = FuzzySearch.xcdatamodel; sourceTree = "<group>"; };
|
||||
1929B66A5E2D00EA143AFD86 /* RxRedux.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RxRedux.swift; sourceTree = "<group>"; };
|
||||
1929B672CE187B4D3EA1D3EE /* fuzzy_match.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = fuzzy_match.hh; path = FuzzyMatcher/fuzzy_match.hh; sourceTree = "<group>"; };
|
||||
1929B67A10E6BB2986B2416E /* BufferListReducer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BufferListReducer.swift; sourceTree = "<group>"; };
|
||||
1929B694508FB5FDE607513A /* ToolsPrefReducer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ToolsPrefReducer.swift; sourceTree = "<group>"; };
|
||||
1929B6AD3396160AA2C46919 /* Debouncer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Debouncer.swift; sourceTree = "<group>"; };
|
||||
1929B6C215ACCBE12672A8D7 /* RxSwiftCommonsTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RxSwiftCommonsTest.swift; sourceTree = "<group>"; };
|
||||
1929B6C6C7792B05164B0216 /* MarkdownTool.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MarkdownTool.swift; sourceTree = "<group>"; };
|
||||
1929B6E01216D49BB9F3B6A3 /* MainWindow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainWindow.swift; sourceTree = "<group>"; };
|
||||
1929B7039C5689CE45F53888 /* AdvancedPrefReducer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AdvancedPrefReducer.swift; sourceTree = "<group>"; };
|
||||
1929B714EB137AE448CE8ABD /* MainWindow+Delegates.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "MainWindow+Delegates.swift"; sourceTree = "<group>"; };
|
||||
1929B71A92C24FEFE79A851E /* OpenQuicklyWindow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OpenQuicklyWindow.swift; sourceTree = "<group>"; };
|
||||
1929B71B4BB6550F5BC6D4CF /* MainWindow+CustomTitle.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "MainWindow+CustomTitle.swift"; sourceTree = "<group>"; };
|
||||
1929B71F6A82A34F16BB52BE /* IgnoreService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IgnoreService.swift; sourceTree = "<group>"; };
|
||||
1929B7609C0C23AC29BDC09B /* RxCommons.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RxCommons.swift; sourceTree = "<group>"; };
|
||||
1929B7A68B7109CEFAF105E8 /* AppDelegateReducer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegateReducer.swift; sourceTree = "<group>"; };
|
||||
1929B7F7A4B3FD52263D211D /* Defs.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Defs.swift; sourceTree = "<group>"; };
|
||||
@ -236,7 +238,6 @@
|
||||
1929B85023B042C485409CE1 /* HtmlPreviewTool.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HtmlPreviewTool.swift; sourceTree = "<group>"; };
|
||||
1929B88B5FA08E897A3C2168 /* KeysPrefReducer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeysPrefReducer.swift; sourceTree = "<group>"; };
|
||||
1929B93256AF7F9137223E36 /* DefaultShortcuts.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DefaultShortcuts.swift; sourceTree = "<group>"; };
|
||||
1929B98192F6873508F8D76A /* FileItem+CoreDataClass.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "FileItem+CoreDataClass.m"; sourceTree = "<group>"; };
|
||||
1929B9AF20D7BD6E5C975128 /* FoundationCommons.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FoundationCommons.swift; sourceTree = "<group>"; };
|
||||
1929BA05F1FE30CA74F006C4 /* CssUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CssUtils.swift; sourceTree = "<group>"; };
|
||||
1929BA43449BA41666CD55ED /* BufferList.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BufferList.swift; sourceTree = "<group>"; };
|
||||
@ -334,6 +335,7 @@
|
||||
4B97E2CD1D33F53D00FC0660 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainWindow.xib; sourceTree = "<group>"; };
|
||||
4BB409E61DD68CCC005F39A2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/FileBrowserMenu.xib; sourceTree = "<group>"; };
|
||||
4BDF50181D77540900D8FBC3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/OpenQuicklyWindow.xib; sourceTree = "<group>"; };
|
||||
4BE73FA5285CA9D100B63585 /* Resources */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Resources; sourceTree = "<group>"; };
|
||||
4BEBA5051CFF374B00673FDF /* VimR-dev.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "VimR-dev.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
4BEBA5081CFF374B00673FDF /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
4BEBA50A1CFF374B00673FDF /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
@ -342,16 +344,8 @@
|
||||
4BEBA5141CFF374B00673FDF /* VimRTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = VimRTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
4BEBA51A1CFF374B00673FDF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
4BF07EE51D51326A009BECEB /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = Base; path = Base.lproj/Credits.rtf; sourceTree = "<group>"; };
|
||||
4BF18C371FD2E2AB00DF95D1 /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Sparkle.framework; path = ../Carthage/Build/Mac/Sparkle.framework; sourceTree = "<group>"; };
|
||||
4BF70EBF23D1B3F9009E51E9 /* FuzzyMatcher.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = FuzzyMatcher.mm; path = FuzzyMatcher/FuzzyMatcher.mm; sourceTree = "<group>"; };
|
||||
4BF70EC123D1B3F9009E51E9 /* FuzzyMatcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FuzzyMatcher.h; path = FuzzyMatcher/FuzzyMatcher.h; sourceTree = "<group>"; };
|
||||
4BF70EC323D1B3F9009E51E9 /* FuzzyMatcherPool.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = FuzzyMatcherPool.swift; path = FuzzyMatcher/FuzzyMatcherPool.swift; sourceTree = "<group>"; };
|
||||
4BF70ED023D1B4AF009E51E9 /* FoundationCommons.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FoundationCommons.h; sourceTree = "<group>"; };
|
||||
4BF70ED123D1B4AF009E51E9 /* FoundationCommons.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FoundationCommons.m; sourceTree = "<group>"; };
|
||||
4BF70ED423D1B54F009E51E9 /* ScoredUrl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScoredUrl.h; sourceTree = "<group>"; };
|
||||
4BF70ED523D1B54F009E51E9 /* ScoredUrl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ScoredUrl.m; sourceTree = "<group>"; };
|
||||
4BF70EDF23D1B5B3009E51E9 /* FileScanBaton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FileScanBaton.m; sourceTree = "<group>"; };
|
||||
4BF70EE023D1B5B3009E51E9 /* FileScanBaton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileScanBaton.h; sourceTree = "<group>"; };
|
||||
4BF70EE323D1B5EC009E51E9 /* FuzzySearchService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FuzzySearchService.swift; sourceTree = "<group>"; };
|
||||
4BF70EE923D1B5FF009E51E9 /* CoreDataStack.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CoreDataStack.swift; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
@ -361,9 +355,12 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
4BA19812285B4BA600B49309 /* Misc in Frameworks */,
|
||||
4BCB697F285DD4C400BDD358 /* RxPack in Frameworks */,
|
||||
4B0B362A2595236000B06899 /* ShortcutRecorder in Frameworks */,
|
||||
4B0B36242595236000B06899 /* EonilFSEvents in Frameworks */,
|
||||
4B9D049D273481AD007E8614 /* Down in Frameworks */,
|
||||
4BADD55E283ABD0200C6B16D /* OrderedCollections in Frameworks */,
|
||||
4B6C6AE5267C71ED00F77527 /* RxRelay in Frameworks */,
|
||||
4B0B36212595236000B06899 /* PureLayout in Frameworks */,
|
||||
4B6C6AE3267C71ED00F77527 /* RxCocoa in Frameworks */,
|
||||
@ -371,6 +368,7 @@
|
||||
4B0B362C2595236000B06899 /* Commons in Frameworks */,
|
||||
4B0B36202595236000B06899 /* Swifter in Frameworks */,
|
||||
4B0B362F2595236000B06899 /* Sparkle in Frameworks */,
|
||||
4BADD55B283A847100C6B16D /* Ignore in Frameworks */,
|
||||
4B0B36232595236000B06899 /* DictionaryCoding in Frameworks */,
|
||||
4B0B362D2595236000B06899 /* MaterialIcons in Frameworks */,
|
||||
4B6C6AE7267C71ED00F77527 /* RxSwift in Frameworks */,
|
||||
@ -383,7 +381,10 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
4BE73FA4285C9C7700B63585 /* Commons in Frameworks */,
|
||||
4BE73F9B285C9AC100B63585 /* Ignore in Frameworks */,
|
||||
4B0B36312595236000B06899 /* RxTest in Frameworks */,
|
||||
4BE73F9D285C9AD600B63585 /* OrderedCollections in Frameworks */,
|
||||
4B0B36302595236000B06899 /* Nimble in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@ -445,26 +446,6 @@
|
||||
name = Reducers;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1929B79B3F03D2E050438074 /* Commons */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1929B6C215ACCBE12672A8D7 /* RxSwiftCommonsTest.swift */,
|
||||
);
|
||||
name = Commons;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1929BA1E1547FE22A342BFD4 /* Core Data */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1929B17B1BC7CA08DC76495C /* FileItem+CoreDataProperties.m */,
|
||||
1929B1534B8857C519D7C0FB /* FileItem+CoreDataProperties.h */,
|
||||
1929B98192F6873508F8D76A /* FileItem+CoreDataClass.m */,
|
||||
1929B0E63986F95E2F8DFF21 /* FileItem+CoreDataClass.h */,
|
||||
1929B656C04BA6F950BFA2F5 /* FuzzySearch.xcdatamodel */,
|
||||
);
|
||||
name = "Core Data";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1929BA652D3B88FC071531EC /* UI */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -480,15 +461,6 @@
|
||||
name = UI;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1929BAD7FC1CCB6E95D6C098 /* ccls */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1929B1B01340283D6AAD6B06 /* fuzzy_match.cc */,
|
||||
1929B672CE187B4D3EA1D3EE /* fuzzy_match.hh */,
|
||||
);
|
||||
name = ccls;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
1929BB4CF1C1FFEE6CCDD6FD /* Preferences */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -558,14 +530,6 @@
|
||||
name = Middlewares;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4B5012001EBA791000F76C46 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4BF18C371FD2E2AB00DF95D1 /* Sparkle.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4B8C64D023F024D9008733D8 /* Build configurations */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -661,11 +625,16 @@
|
||||
name = resources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4BADD559283A847100C6B16D /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4BDF50101D760AB700D8FBC3 /* Commons */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4BF70ED023D1B4AF009E51E9 /* FoundationCommons.h */,
|
||||
4BF70ED123D1B4AF009E51E9 /* FoundationCommons.m */,
|
||||
4B6A70931D60E04200E12030 /* AppKitCommons.swift */,
|
||||
1929B9AF20D7BD6E5C975128 /* FoundationCommons.swift */,
|
||||
1929B7609C0C23AC29BDC09B /* RxCommons.swift */,
|
||||
@ -679,8 +648,8 @@
|
||||
4B8C64D023F024D9008733D8 /* Build configurations */,
|
||||
4BEBA5071CFF374B00673FDF /* VimR */,
|
||||
4BEBA5171CFF374B00673FDF /* VimRTests */,
|
||||
4B5012001EBA791000F76C46 /* Frameworks */,
|
||||
4BEBA5061CFF374B00673FDF /* Products */,
|
||||
4BADD559283A847100C6B16D /* Frameworks */,
|
||||
);
|
||||
indentWidth = 2;
|
||||
sourceTree = "<group>";
|
||||
@ -716,8 +685,9 @@
|
||||
4BEBA5171CFF374B00673FDF /* VimRTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4BE73FA5285CA9D100B63585 /* Resources */,
|
||||
4BEBA51A1CFF374B00673FDF /* Info.plist */,
|
||||
1929B79B3F03D2E050438074 /* Commons */,
|
||||
1929B07A72CA7CCA31337713 /* IgnoreServiceTest.swift */,
|
||||
);
|
||||
path = VimRTests;
|
||||
sourceTree = "<group>";
|
||||
@ -725,17 +695,12 @@
|
||||
4BF70ECB23D1B40A009E51E9 /* Fuzzy Search */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1929B656C04BA6F950BFA2F5 /* FuzzySearch.xcdatamodel */,
|
||||
4BF70EE923D1B5FF009E51E9 /* CoreDataStack.swift */,
|
||||
4BF70EE323D1B5EC009E51E9 /* FuzzySearchService.swift */,
|
||||
4BF70ED423D1B54F009E51E9 /* ScoredUrl.h */,
|
||||
4BF70ED523D1B54F009E51E9 /* ScoredUrl.m */,
|
||||
4BF70EC123D1B3F9009E51E9 /* FuzzyMatcher.h */,
|
||||
4BF70EBF23D1B3F9009E51E9 /* FuzzyMatcher.mm */,
|
||||
4BF70EC323D1B3F9009E51E9 /* FuzzyMatcherPool.swift */,
|
||||
4BF70EE023D1B5B3009E51E9 /* FileScanBaton.h */,
|
||||
4BF70EDF23D1B5B3009E51E9 /* FileScanBaton.m */,
|
||||
1929BAD7FC1CCB6E95D6C098 /* ccls */,
|
||||
1929BA1E1547FE22A342BFD4 /* Core Data */,
|
||||
1929B71F6A82A34F16BB52BE /* IgnoreService.swift */,
|
||||
);
|
||||
name = "Fuzzy Search";
|
||||
sourceTree = "<group>";
|
||||
@ -785,6 +750,10 @@
|
||||
4B6C6AE4267C71ED00F77527 /* RxRelay */,
|
||||
4B6C6AE6267C71ED00F77527 /* RxSwift */,
|
||||
4B9D049C273481AD007E8614 /* Down */,
|
||||
4BADD55A283A847100C6B16D /* Ignore */,
|
||||
4BADD55D283ABD0200C6B16D /* OrderedCollections */,
|
||||
4BA19811285B4BA600B49309 /* Misc */,
|
||||
4BCB697E285DD4C400BDD358 /* RxPack */,
|
||||
);
|
||||
productName = VimR;
|
||||
productReference = 4BEBA5051CFF374B00673FDF /* VimR-dev.app */;
|
||||
@ -802,12 +771,15 @@
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
4BEBA5161CFF374B00673FDF /* PBXTargetDependency */,
|
||||
4BE73F9F285C9C4500B63585 /* PBXTargetDependency */,
|
||||
);
|
||||
name = VimRTests;
|
||||
packageProductDependencies = (
|
||||
4BD67CDB24EE45E900147C51 /* Nimble */,
|
||||
4BD67CDF24EE465B00147C51 /* RxTest */,
|
||||
4BE73F9A285C9AC100B63585 /* Ignore */,
|
||||
4BE73F9C285C9AD600B63585 /* OrderedCollections */,
|
||||
4BE73FA3285C9C7700B63585 /* Commons */,
|
||||
);
|
||||
productName = VimRTests;
|
||||
productReference = 4BEBA5141CFF374B00673FDF /* VimRTests.xctest */;
|
||||
@ -856,6 +828,9 @@
|
||||
4BD67CD824EE45CA00147C51 /* XCRemoteSwiftPackageReference "Nimble" */,
|
||||
4BA284B0256471ED00CFDF7F /* XCRemoteSwiftPackageReference "Sparkle" */,
|
||||
4B9D049B273481AD007E8614 /* XCRemoteSwiftPackageReference "Down" */,
|
||||
4BADD55C283ABD0200C6B16D /* XCRemoteSwiftPackageReference "swift-collections" */,
|
||||
4BA19810285B4BA600B49309 /* XCRemoteSwiftPackageReference "misc" */,
|
||||
4BCB697D285DD4C400BDD358 /* XCRemoteSwiftPackageReference "RxPack" */,
|
||||
);
|
||||
productRefGroup = 4BEBA5061CFF374B00673FDF /* Products */;
|
||||
projectDirPath = "";
|
||||
@ -949,6 +924,7 @@
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
4BE73FA6285CA9D100B63585 /* Resources in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -975,6 +951,7 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
4BA19817285B599400B49309 /* FuzzySearch.xcdatamodel in Sources */,
|
||||
4B238BE11D3BF24200CBDD98 /* Application.swift in Sources */,
|
||||
4B6A70941D60E04200E12030 /* AppKitCommons.swift in Sources */,
|
||||
4BEBA5091CFF374B00673FDF /* AppDelegate.swift in Sources */,
|
||||
@ -986,7 +963,6 @@
|
||||
1929B29B95AD176D57942E08 /* UiRootReducer.swift in Sources */,
|
||||
1929BB4A9B2FA42A64CCCC76 /* MainWindowReducer.swift in Sources */,
|
||||
4BF70ED623D1B54F009E51E9 /* ScoredUrl.m in Sources */,
|
||||
4BF70EC823D1B3F9009E51E9 /* FuzzyMatcherPool.swift in Sources */,
|
||||
1929B8FB248D71BF88A35761 /* MarkdownTool.swift in Sources */,
|
||||
1929B4B70926DE113E6BF990 /* MarkdownPreviewReducer.swift in Sources */,
|
||||
1929B5C1BABBC0D09D97C3EF /* MarkdownPreviewMiddleware.swift in Sources */,
|
||||
@ -994,7 +970,6 @@
|
||||
1929B3AC66EFE35D68C020E3 /* MarkdownToolReducer.swift in Sources */,
|
||||
1929B59FA5C286E010F70BEE /* Types.swift in Sources */,
|
||||
1929B6D8F5FC723B7109031F /* OpenQuicklyReducer.swift in Sources */,
|
||||
4BF70EE123D1B5B3009E51E9 /* FileScanBaton.m in Sources */,
|
||||
1929B71381946860626E5224 /* FileBrowserReducer.swift in Sources */,
|
||||
1929BA715337FE26155B2071 /* BufferList.swift in Sources */,
|
||||
1929B4E54E2F13A7F5F2B682 /* BufferListReducer.swift in Sources */,
|
||||
@ -1015,12 +990,10 @@
|
||||
1929BA76A1D97D8226F7CFB1 /* Debouncer.swift in Sources */,
|
||||
1929BFDE22D155F7C4B19E96 /* HtmlPreviewTool.swift in Sources */,
|
||||
1929B4B00D7BB191A9A6532D /* HtmlPreviewToolReducer.swift in Sources */,
|
||||
4BF70ED223D1B4AF009E51E9 /* FoundationCommons.m in Sources */,
|
||||
1929BCF7F7B9CC5499A3F506 /* AdvancedPrefReducer.swift in Sources */,
|
||||
1929BF03FD6465F289AA80B2 /* ToolsPref.swift in Sources */,
|
||||
1929B6C0393DE40E34F4A49A /* ToolsPrefReducer.swift in Sources */,
|
||||
1929B542A071BD03C846F6EF /* PrefUtils.swift in Sources */,
|
||||
4BF70EC423D1B3F9009E51E9 /* FuzzyMatcher.mm in Sources */,
|
||||
1929BE2F3E0182CC51F2763A /* ThemedTableSubviews.swift in Sources */,
|
||||
1929B6460862447A31B5B082 /* ImageAndTextTableCell.swift in Sources */,
|
||||
1929BBE28654E4307AF1E2FD /* Theme.swift in Sources */,
|
||||
@ -1040,14 +1013,13 @@
|
||||
1929BF3253594E5B1908C6CE /* RpcAppearanceEpic.swift in Sources */,
|
||||
1929B5A0EDD1119CFF7BB84C /* Defs.swift in Sources */,
|
||||
1929B376DB09AB5FDBF42BA1 /* MainWindow+Types.swift in Sources */,
|
||||
1929B443B7AB2176A7818CA1 /* fuzzy_match.cc in Sources */,
|
||||
1929BF5D0EFCC56A733BB4B7 /* FuzzySearch.xcdatamodel in Sources */,
|
||||
1929B4219A68586E2CED6E96 /* FileMonitor.swift in Sources */,
|
||||
1929B223C6E97C090474B2C2 /* Resources.swift in Sources */,
|
||||
1929BC64D3C195A92BE3FD64 /* HtmlPreviewMiddleware.swift in Sources */,
|
||||
1929B29FF537A339CF4075BD /* CssUtils.swift in Sources */,
|
||||
1929B805633C40EC1642121C /* RxCommons.swift in Sources */,
|
||||
1929B28EF1D4135A94C07558 /* ShortcutService.swift in Sources */,
|
||||
1929B7D1665BBB75DC89E391 /* IgnoreService.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -1055,17 +1027,19 @@
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
1929BDFDBDA7180D02ACB37E /* RxSwiftCommonsTest.swift in Sources */,
|
||||
4BE73FA2285C9C6C00B63585 /* FoundationCommons.swift in Sources */,
|
||||
4BE73F99285C9A9A00B63585 /* IgnoreService.swift in Sources */,
|
||||
1929BE511088E082529199CB /* IgnoreServiceTest.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
4BEBA5161CFF374B00673FDF /* PBXTargetDependency */ = {
|
||||
4BE73F9F285C9C4500B63585 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = 4BEBA5041CFF374B00673FDF /* VimR */;
|
||||
targetProxy = 4BEBA5151CFF374B00673FDF /* PBXContainerItemProxy */;
|
||||
targetProxy = 4BE73F9E285C9C4500B63585 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
@ -1153,7 +1127,7 @@
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 20220419.180005;
|
||||
CURRENT_PROJECT_VERSION = 20220628.220813;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
@ -1214,7 +1188,7 @@
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 20220419.180005;
|
||||
CURRENT_PROJECT_VERSION = 20220628.220813;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
@ -1243,21 +1217,15 @@
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 20220419.180005;
|
||||
CURRENT_PROJECT_VERSION = 20220628.220813;
|
||||
DEFINES_MODULE = YES;
|
||||
HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/.deps/include";
|
||||
IBC_MODULE = VimR;
|
||||
INFOPLIST_FILE = VimR/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
"$(PROJECT_DIR)/.deps/lib/liblzma.a",
|
||||
"$(PROJECT_DIR)/.deps/lib/libpcre.a",
|
||||
"$(PROJECT_DIR)/.deps/lib/libag.a",
|
||||
"-pthread",
|
||||
);
|
||||
OTHER_LDFLAGS = "-pthread";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "$(VIMR_BUNDLE_IDENTIFIER)";
|
||||
PRODUCT_MODULE_NAME = VimR;
|
||||
PRODUCT_NAME = "$(VIMR_DISPLAY_NAME)";
|
||||
@ -1271,21 +1239,15 @@
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
CURRENT_PROJECT_VERSION = 20220419.180005;
|
||||
CURRENT_PROJECT_VERSION = 20220628.220813;
|
||||
DEFINES_MODULE = YES;
|
||||
HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/.deps/include";
|
||||
IBC_MODULE = VimR;
|
||||
INFOPLIST_FILE = VimR/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/../Frameworks",
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
"$(PROJECT_DIR)/.deps/lib/liblzma.a",
|
||||
"$(PROJECT_DIR)/.deps/lib/libpcre.a",
|
||||
"$(PROJECT_DIR)/.deps/lib/libag.a",
|
||||
"-pthread",
|
||||
);
|
||||
OTHER_LDFLAGS = "-pthread";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "$(VIMR_BUNDLE_IDENTIFIER)";
|
||||
PRODUCT_MODULE_NAME = VimR;
|
||||
PRODUCT_NAME = "$(VIMR_DISPLAY_NAME)";
|
||||
@ -1297,11 +1259,6 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/../Carthage/Build/Mac",
|
||||
);
|
||||
HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/../third-party/vimr-deps/include";
|
||||
INFOPLIST_FILE = VimRTests/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
@ -1310,7 +1267,6 @@
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.qvacua.VimRTests;
|
||||
PRODUCT_NAME = VimRTests;
|
||||
SWIFT_OBJC_BRIDGING_HEADER = VimR/Bridge.h;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
@ -1318,11 +1274,6 @@
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/../Carthage/Build/Mac",
|
||||
);
|
||||
HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/../third-party/vimr-deps/include";
|
||||
INFOPLIST_FILE = VimRTests/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
@ -1331,7 +1282,6 @@
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.qvacua.VimRTests;
|
||||
PRODUCT_NAME = VimRTests;
|
||||
SWIFT_OBJC_BRIDGING_HEADER = VimR/Bridge.h;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
@ -1408,6 +1358,14 @@
|
||||
version = 0.11.0;
|
||||
};
|
||||
};
|
||||
4BA19810285B4BA600B49309 /* XCRemoteSwiftPackageReference "misc" */ = {
|
||||
isa = XCRemoteSwiftPackageReference;
|
||||
repositoryURL = "https://github.com/qvacua/misc.swift";
|
||||
requirement = {
|
||||
kind = exactVersion;
|
||||
version = 0.0.1;
|
||||
};
|
||||
};
|
||||
4BA284B0256471ED00CFDF7F /* XCRemoteSwiftPackageReference "Sparkle" */ = {
|
||||
isa = XCRemoteSwiftPackageReference;
|
||||
repositoryURL = "https://github.com/sparkle-project/Sparkle";
|
||||
@ -1416,6 +1374,22 @@
|
||||
version = 2.1.0;
|
||||
};
|
||||
};
|
||||
4BADD55C283ABD0200C6B16D /* XCRemoteSwiftPackageReference "swift-collections" */ = {
|
||||
isa = XCRemoteSwiftPackageReference;
|
||||
repositoryURL = "https://github.com/apple/swift-collections.git";
|
||||
requirement = {
|
||||
kind = upToNextMajorVersion;
|
||||
minimumVersion = 1.0.0;
|
||||
};
|
||||
};
|
||||
4BCB697D285DD4C400BDD358 /* XCRemoteSwiftPackageReference "RxPack" */ = {
|
||||
isa = XCRemoteSwiftPackageReference;
|
||||
repositoryURL = "https://github.com/qvacua/RxPack.swift";
|
||||
requirement = {
|
||||
kind = exactVersion;
|
||||
version = 0.1.0;
|
||||
};
|
||||
};
|
||||
4BD5655124E8014100D52809 /* XCRemoteSwiftPackageReference "swifter" */ = {
|
||||
isa = XCRemoteSwiftPackageReference;
|
||||
repositoryURL = "https://github.com/httpswift/swifter";
|
||||
@ -1502,11 +1476,30 @@
|
||||
package = 4B9D049B273481AD007E8614 /* XCRemoteSwiftPackageReference "Down" */;
|
||||
productName = Down;
|
||||
};
|
||||
4BA19811285B4BA600B49309 /* Misc */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 4BA19810285B4BA600B49309 /* XCRemoteSwiftPackageReference "misc" */;
|
||||
productName = Misc;
|
||||
};
|
||||
4BA284B1256471ED00CFDF7F /* Sparkle */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 4BA284B0256471ED00CFDF7F /* XCRemoteSwiftPackageReference "Sparkle" */;
|
||||
productName = Sparkle;
|
||||
};
|
||||
4BADD55A283A847100C6B16D /* Ignore */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
productName = Ignore;
|
||||
};
|
||||
4BADD55D283ABD0200C6B16D /* OrderedCollections */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 4BADD55C283ABD0200C6B16D /* XCRemoteSwiftPackageReference "swift-collections" */;
|
||||
productName = OrderedCollections;
|
||||
};
|
||||
4BCB697E285DD4C400BDD358 /* RxPack */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 4BCB697D285DD4C400BDD358 /* XCRemoteSwiftPackageReference "RxPack" */;
|
||||
productName = RxPack;
|
||||
};
|
||||
4BD5655224E8014100D52809 /* Swifter */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 4BD5655124E8014100D52809 /* XCRemoteSwiftPackageReference "swifter" */;
|
||||
@ -1541,6 +1534,19 @@
|
||||
package = 4B9BC41F24EB2E45000209B5 /* XCRemoteSwiftPackageReference "RxSwift" */;
|
||||
productName = RxTest;
|
||||
};
|
||||
4BE73F9A285C9AC100B63585 /* Ignore */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
productName = Ignore;
|
||||
};
|
||||
4BE73F9C285C9AD600B63585 /* OrderedCollections */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
package = 4BADD55C283ABD0200C6B16D /* XCRemoteSwiftPackageReference "swift-collections" */;
|
||||
productName = OrderedCollections;
|
||||
};
|
||||
4BE73FA3285C9C7700B63585 /* Commons */ = {
|
||||
isa = XCSwiftPackageProductDependency;
|
||||
productName = Commons;
|
||||
};
|
||||
/* End XCSwiftPackageProductDependency section */
|
||||
};
|
||||
rootObject = 4BEBA4FD1CFF374B00673FDF /* Project object */;
|
||||
|
@ -57,6 +57,16 @@
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "4BEBA5041CFF374B00673FDF"
|
||||
BuildableName = "VimR.app"
|
||||
BlueprintName = "VimR"
|
||||
ReferencedContainer = "container:VimR.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
class AdvancedPrefReducer: ReducerType {
|
||||
final class AdvancedPrefReducer: ReducerType {
|
||||
typealias StateType = AppState
|
||||
typealias ActionType = AdvancedPref.Action
|
||||
|
||||
|
@ -7,7 +7,7 @@ import Cocoa
|
||||
import PureLayout
|
||||
import RxSwift
|
||||
|
||||
class AdvancedPref: PrefPane, UiComponent, NSTextFieldDelegate {
|
||||
final class AdvancedPref: PrefPane, UiComponent, NSTextFieldDelegate {
|
||||
typealias StateType = AppState
|
||||
|
||||
enum Action {
|
||||
|
@ -14,12 +14,12 @@ import Sparkle
|
||||
|
||||
let debugMenuItemIdentifier = NSUserInterfaceItemIdentifier("debug-menu-item")
|
||||
|
||||
class UpdaterDelegate: NSObject, SPUUpdaterDelegate {
|
||||
final class UpdaterDelegate: NSObject, SPUUpdaterDelegate {
|
||||
var useSnapshotChannel = false
|
||||
|
||||
func feedURLString(for _: SPUUpdater) -> String? {
|
||||
if self.useSnapshotChannel {
|
||||
return "https://raw.githubusercontent.com/qvacua/vimr/develop/appcast_snapshot.xml"
|
||||
return "https://raw.githubusercontent.com/qvacua/vimr/master/appcast_snapshot.xml"
|
||||
} else {
|
||||
return "https://raw.githubusercontent.com/qvacua/vimr/master/appcast.xml"
|
||||
}
|
||||
@ -27,7 +27,7 @@ class UpdaterDelegate: NSObject, SPUUpdaterDelegate {
|
||||
}
|
||||
|
||||
@NSApplicationMain
|
||||
class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDelegate {
|
||||
final class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDelegate {
|
||||
struct OpenConfig {
|
||||
var urls: [URL]
|
||||
var cwd: URL
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
class AppDelegateReducer: ReducerType {
|
||||
final class AppDelegateReducer: ReducerType {
|
||||
typealias StateType = AppState
|
||||
typealias ActionType = AppDelegate.Action
|
||||
|
||||
|
@ -8,7 +8,9 @@ import NvimView
|
||||
import PureLayout
|
||||
import RxSwift
|
||||
|
||||
class AppearancePref: PrefPane, NSComboBoxDelegate, NSControlTextEditingDelegate, NSFontChanging {
|
||||
final class AppearancePref: PrefPane, NSComboBoxDelegate, NSControlTextEditingDelegate,
|
||||
NSFontChanging
|
||||
{
|
||||
typealias StateType = AppState
|
||||
|
||||
enum Action {
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
class AppearancePrefReducer: ReducerType {
|
||||
final class AppearancePrefReducer: ReducerType {
|
||||
typealias StateType = AppState
|
||||
typealias ActionType = AppearancePref.Action
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
import Cocoa
|
||||
import Sparkle
|
||||
|
||||
class Application: NSApplication {
|
||||
final class Application: NSApplication {
|
||||
override init() {
|
||||
setPressAndHoldSetting()
|
||||
super.init()
|
||||
|
@ -1,15 +1,12 @@
|
||||
{\rtf1\ansi\ansicpg1252\cocoartf2513
|
||||
{\rtf1\ansi\ansicpg1252\cocoartf2638
|
||||
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fswiss\fcharset0 Helvetica-Bold;}
|
||||
{\colortbl;\red255\green255\blue255;}
|
||||
{\*\expandedcolortbl;;}
|
||||
\paperw11900\paperh16840\vieww10960\viewh15520\viewkind0
|
||||
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
|
||||
{\field{\*\fldinst{HYPERLINK "http://vimr.org"}}{\fldrslt
|
||||
\f0\fs24 \cf0 http://vimr.org}}
|
||||
\f0\fs24 \
|
||||
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0
|
||||
{\field{\*\fldinst{HYPERLINK "https://github.com/qvacua/vimr"}}{\fldrslt \cf0 https://github.com/qvacua/vimr}}
|
||||
\f1\b \
|
||||
{\field{\*\fldinst{HYPERLINK "https://github.com/qvacua/vimr"}}{\fldrslt
|
||||
\f0\fs24 \cf0 https://github.com/qvacua/vimr}}
|
||||
\f1\b\fs24 \
|
||||
\
|
||||
By:
|
||||
\f0\b0 \
|
||||
@ -34,6 +31,7 @@ By:
|
||||
|
||||
\f1\b Backers
|
||||
\f0\b0 \
|
||||
{\field{\*\fldinst{HYPERLINK "https://github.com/qvacua/"}}{\fldrslt https://github.com/qvacua/}}\
|
||||
{\field{\*\fldinst{HYPERLINK "https://www.bountysource.com/teams/vimr/backers"}}{\fldrslt https://www.bountysource.com/teams/vimr/backers}}\
|
||||
\
|
||||
|
||||
@ -106,16 +104,17 @@ By:
|
||||
{\field{\*\fldinst{HYPERLINK "https://github.com/Kentzo/ShortcutRecorder"}}{\fldrslt https://github.com/Kentzo/ShortcutRecorder}}\
|
||||
\
|
||||
|
||||
\f1\b ccls\
|
||||
{\field{\*\fldinst{HYPERLINK "https://github.com/MaskRay/ccls"}}{\fldrslt
|
||||
\f0\b0 https://github.com/MaskRay/ccls}}
|
||||
\f0\b0 \
|
||||
\f1\b wildmatch\
|
||||
|
||||
\f0\b0 {\field{\*\fldinst{HYPERLINK "https://github.com/davvid/wildmatch"}}{\fldrslt https://github.com/davvid/wildmatch}}\
|
||||
via {\field{\*\fldinst{HYPERLINK "https://github.com/qvacua/misc.swift"}}{\fldrslt https://github.com/qvacua/misc.swift}}\
|
||||
\
|
||||
|
||||
\f1\b The Silver Searcher\
|
||||
{\field{\*\fldinst{HYPERLINK "https://github.com/ggreer/the_silver_searcher"}}{\fldrslt
|
||||
\f0\b0 https://github.com/ggreer/the_silver_searcher}}
|
||||
\f1\b fzy\
|
||||
{\field{\*\fldinst{HYPERLINK "https://github.com/jhawthorn/fzy"}}{\fldrslt
|
||||
\f0\b0 https://github.com/jhawthorn/fzy}}
|
||||
\f0\b0 \
|
||||
via {\field{\*\fldinst{HYPERLINK "https://github.com/qvacua/misc.swift"}}{\fldrslt https://github.com/qvacua/misc.swift}}\
|
||||
\
|
||||
|
||||
\f1\b Nimble
|
||||
|
@ -3,8 +3,5 @@
|
||||
* See LICENSE
|
||||
*/
|
||||
|
||||
#import "FuzzyMatcher.h"
|
||||
#import "FoundationCommons.h"
|
||||
#import "ScoredUrl.h"
|
||||
#import "FileScanBaton.h"
|
||||
#import "FileItem+CoreDataProperties.h"
|
||||
|
@ -9,7 +9,7 @@ import NvimView
|
||||
import PureLayout
|
||||
import RxSwift
|
||||
|
||||
class BuffersList: NSView,
|
||||
final class BuffersList: NSView,
|
||||
UiComponent,
|
||||
NSTableViewDataSource,
|
||||
NSTableViewDelegate,
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
class BuffersListReducer: ReducerType {
|
||||
final class BuffersListReducer: ReducerType {
|
||||
typealias StateType = MainWindow.State
|
||||
typealias ActionType = UuidAction<BuffersList.Action>
|
||||
|
||||
|
@ -12,7 +12,7 @@ extension ReduxTypes {
|
||||
typealias ActionType = AnyAction
|
||||
}
|
||||
|
||||
class Context: ReduxContext {
|
||||
final class Context: ReduxContext {
|
||||
// The following should only be used when Cmd-Q'ing
|
||||
func savePrefs() { self.prefMiddleware.applyPref(from: self.state) }
|
||||
|
||||
|
@ -8,7 +8,7 @@ import CoreData
|
||||
import Foundation
|
||||
import os
|
||||
|
||||
class CoreDataStack {
|
||||
final class CoreDataStack {
|
||||
enum Error: Swift.Error {
|
||||
case noCacheFolder
|
||||
case pathDoesNotExit
|
||||
@ -62,7 +62,7 @@ class CoreDataStack {
|
||||
guard fileManager.fileExists(atPath: path) else { throw Error.pathDoesNotExit }
|
||||
|
||||
let parentFolder = URL(fileURLWithPath: path)
|
||||
guard parentFolder.isDir else { throw Error.pathNotFolder }
|
||||
guard parentFolder.hasDirectoryPath else { throw Error.pathNotFolder }
|
||||
|
||||
url = parentFolder.appendingPathComponent(modelName)
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
import Cocoa
|
||||
|
||||
class CssUtils {
|
||||
final class CssUtils {
|
||||
static let cssOverridesTemplate: String = try! String(
|
||||
contentsOf: Resources.cssOverridesTemplateUrl
|
||||
)
|
||||
|
@ -6,7 +6,7 @@
|
||||
import Foundation
|
||||
import RxSwift
|
||||
|
||||
class Debouncer<T> {
|
||||
final class Debouncer<T> {
|
||||
let observable: Observable<T>
|
||||
|
||||
init(interval: RxTimeInterval) {
|
||||
|
@ -10,7 +10,7 @@ import PureLayout
|
||||
import RxSwift
|
||||
import Workspace
|
||||
|
||||
class FileBrowser: NSView,
|
||||
final class FileBrowser: NSView,
|
||||
UiComponent
|
||||
{
|
||||
typealias StateType = MainWindow.State
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
class FileBrowserReducer: ReducerType {
|
||||
final class FileBrowserReducer: ReducerType {
|
||||
typealias StateType = MainWindow.State
|
||||
typealias ActionType = UuidAction<FileBrowser.Action>
|
||||
|
||||
|
@ -1,39 +0,0 @@
|
||||
//
|
||||
// FileItem+CoreDataProperties.h
|
||||
// VimR
|
||||
//
|
||||
// Created by Tae Won Ha on 18.01.20.
|
||||
// Copyright © 2020 Tae Won Ha. All rights reserved.
|
||||
//
|
||||
//
|
||||
|
||||
#import "FileItem+CoreDataClass.h"
|
||||
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface FileItem (CoreDataProperties)
|
||||
|
||||
+ (NSFetchRequest<FileItem *> *)fetchRequest;
|
||||
|
||||
@property (nonatomic) int16_t direntType;
|
||||
@property (nonatomic) BOOL isHidden;
|
||||
@property (nonatomic) BOOL isPackage;
|
||||
@property (nonatomic) BOOL needsScanChildren;
|
||||
@property (nullable, nonatomic, copy) NSString *pathStart;
|
||||
@property (nullable, nonatomic, copy) NSURL *url;
|
||||
@property (nullable, nonatomic, retain) NSSet<FileItem *> *children;
|
||||
@property (nullable, nonatomic, retain) FileItem *parent;
|
||||
|
||||
@end
|
||||
|
||||
@interface FileItem (CoreDataGeneratedAccessors)
|
||||
|
||||
- (void)addChildrenObject:(FileItem *)value;
|
||||
- (void)removeChildrenObject:(FileItem *)value;
|
||||
- (void)addChildren:(NSSet<FileItem *> *)values;
|
||||
- (void)removeChildren:(NSSet<FileItem *> *)values;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user