Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to apply an Xcode extension to multiple source files at once? If so, how?

I want to write an Xcode extension that scans the source code for particular code fragments. However, it seems that such extension would work only on a per-file basis. For example, here you can see that upon pushing a button only the current source file is changed. Is there a way to scan multiple source files at once?

like image 780
You_got_it Avatar asked Oct 30 '22 14:10

You_got_it


1 Answers

I am afraid it is not possible yet. As if you see the documentation in here

https://developer.apple.com/reference/xcodekit

the Framework has really a little few Classes, which none of them indicates multiple files... As you can see, you can edit text from Buffer from current opened tab in Xcode, which makes it a little bit complicated. The buffer can be used only in context of file (imagine hell of 10000000 lines of code loading into buffer and manipulating with such text) I believe in future apple will extend this to the max, but for now, we must be happy with what we have... Sorry for disappointing news.

like image 110
Dominik Bucher Avatar answered Nov 15 '22 08:11

Dominik Bucher