Closed clementpadovani closed 7 years ago
@ClementPadovani I was thinking about this for Peckham... I think we can't do anything that is automagic because you have no awareness if you are currently in the .h
or .m
file...
Creating another action would probably work better, so that you can leave the decision of wether to do #import
or @class
to the user?
Actually with XcodeKit we can, per XCSourceTextBuffer
’s contentUTI
property I get an UTI of public.c-header
for the headers and public.objective-c-source
for Objective-C implementation files.
@ClementPadovani you are perfectly right :) but still sometimes a dev wants to explicitly add a header, so I think just forcing it to @class
wouldn't really work, or do you have a better idea?
Oh yeah, but my idea wasn't to replace #imports by forward declarations. It was just the possibility to add @class to the top like for importa
Thanks, Clément Sent from my iPhone
On Nov 20, 2016, at 12:51 PM, Marko Hlebar notifications@github.com wrote:
@ClementPadovani you are perfectly right :) but still sometimes a dev wants to explicitly add a header, so I think just forcing it to @class wouldn't really work, or do you have a better idea?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Yeah, I didn't mean replacing them. When you add a new one, you should have a choice whether you want to add @class
or #import
right?
Closed with #23
The ability of having Objective-C class/protocol forward declarations in ObjC headers would be great.