Re: code format template?
Re: code format template?
- Subject: Re: code format template?
- From: Ray Kiddy <email@hidden>
- Date: Mon, 13 Jul 2009 11:20:55 -0700
On Jul 11, 2009, at 5:56 PM, William Squires wrote:
Hi!
Where are the project templates for Xcode installed? If I change
these, will the corresponding projects made change too? Or will the
settings under "Xcode Preferences | Indentation" always override them?
What I'd like is for the boilerplate code to have the following
formatting
- (void)appWillTerminate:(UIApplication *)application
{
}
instead of
_ (void)applicationWillTerminate:(UIApplication *)application {
}
which is what I get now. In other words, I want the open curly brace
to always be on a new line, not at the end of some other line. Is
there a (combination of) settings under "Syntax-aware indentation"
that will produce this?
Thx
You absolutely can add new templates for files or projects. And you
can even modify the ones that are there now, in /Developer/Platforms/
iPhoneOS.platform/Developer/Library/Xcode/'Project Templates' and /
Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/'File
Templates'.
However, these templates will only take effect when you create a new
file or project. Existing projects and files do not change. Which
makes sense, if you think about it.
And you will lose changed templates when you upgrade Xcode, but I do
not think you will lose new templates, even if they are in Xcode's
internal directories. The installer does not delete things unless
commands are put in to do so by the team creating the installer. Most
installers do not, AFAIK, "clear the boards" before doing an install.
Or you could put these new templates in ~/Library/'Application
Support'/Developer/Shared/Xcode/'File Templates' or ~/
Library/'Application Support'/Developer/Shared/Xcode/'Project
Templates' and they will not get messed with when you upgrade.
I do not like putting templates in ~/Library because I think the icon
that Xcode then uses in the picker is ugly, but O well.
People are not really aware of how flexible the template system in
Xcode can be. On the other hand, the fact that the tools make it a
PITA to create templates and manage user-created templates explains
some of this.
cheers - ray
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden