How to automatically add user (instead of system library) #import

When I use a type that I haven't yet included the appropriate header for, appCode nicely inserts the header for me. Unfortunately, though, it uses the system library (#import <XXX/XXX>) rather than user (#import "XXX.h") header style, which isn't what I want for headers from my own project.

Is there a way to configure this? I'm new to appCode and am as yet slightly bewildered by the various code-adding facilities.

4 comments
Comment actions Permalink

So far it imports the file where the corresponding symbol is declared. We understand that it is "not always" optimal solution. We are going to make it more flexible.

0
Comment actions Permalink

Sorry, perhaps I didn't explain entirely clearly.

What I mean is that if I have a symbol declared in file.h in my own project directory hierarchy like this:

  • [projecDir]
    • [subDir]
    • file.h


appCode inserts

#import <subDir/file.h>


when what I'd prefer is

#import "file.h"


The angle-bracket style strictly speaking should be used only for references to headers found via the system search paths, not project-local headers.

0
Comment actions Permalink

Ok, this sounds like a bug. However I couldn't reproduce it. Where actually is your first file (where the include is inserted) and the second one (which is being included)? It would be perfect if you attach the sample project.
Please reply to this (and all other bugs/requests) to the tracker. I've created the issue for this thread: http://youtrack.jetbrains.net/issue/OC-1707

0
Comment actions Permalink

OK, I've updated the tracker with some more details. Unfortunately I can't share the actual project.

0

Please sign in to leave a comment.