The Format Selected Files feature doesn't work since issue #135, the latter Format Active File and Format Selected Lines becomes disabled state since Xcode 9, it causes by the [XCFXcodeFormatter currentSourceCodeDocument] instance is nil. I dig it into the kernel case and compare the result between Xcode 8 and Xcode 9, it seems the editor view's class type changed.
According to the Accessibility Inspector's result, Xcode 8 uses the DVTSourceTextView, 9 uses the SourceEditor.SourceEditorContentView.
XCFXcodeFormatter couldn't get the NSDocument subclass instance anymore in Xcode 9, I tried my best to fix it but failed. :(
Are there any solutions/replacements for this? Please help!
The
Format Selected Files
feature doesn't work since issue #135, the latterFormat Active File
andFormat Selected Lines
becomes disabled state since Xcode 9, it causes by the[XCFXcodeFormatter currentSourceCodeDocument]
instance is nil. I dig it into the kernel case and compare the result between Xcode 8 and Xcode 9, it seems the editor view's class type changed.According to the Accessibility Inspector's result, Xcode 8 uses the
DVTSourceTextView
, 9 uses theSourceEditor.SourceEditorContentView
.XCFXcodeFormatter
couldn't get theNSDocument
subclass instance anymore in Xcode 9, I tried my best to fix it but failed. :(Are there any solutions/replacements for this? Please help!