Special note on Default Action

 

With the settings you see above turned on, including Activate editor after Service or Action and Automatically paste at editor insertion point, there’s a special case when you set the Default action for the Accessorizer Action Panel service.


The automatic paste at the insertion point is ignored for the default action.  This means that you must manually paste the results of this default action into your code.


Here is why:

When you select your ivar declarations in Xcode to be serviced, that code remains selected when it gets sent over to Accessorizer.   By invoking the Accessorizer Action Panel, and if you have your Default action set to Declaration, for example, Accessorizer will do you the favor of creating your properties for you without having to bring up the Action Menu or Action Panel to choose an action.


It saves you the step of bringing up the Action Menu or Action Panel.  Immediately upon generating the code for you, Xcode is activated.  You’ll notice your ivar declarations are still selected and if Accessorizer automatically inserted the results at the insertion point, it would insert your properties results on top of your ivars and REPLACE your ivar declarations. Normally, this is not what you want! 


Instead, you’ll want to first move your cursor to where you want to place your property statements and then manually paste them in via the cmd-v keyboard shortcut.


This is described and shown in the Quick Start pages. 


However, if you are not declaring ivars in your @interface block and are declaring only properties, then you can take advantage of pasting over and replacing your ivar declarations to speed up writing @property statements.


How?  Just temporarily type your ivar declarations (the TYPE and NAME) where you would normally type your properties.


NSString *name;

id delegate;

CGFloat f;


Select them, invoke the service and paste.  This is also shown in the Quick Start pages.