Broken for quite some time: OC-3347 Allow option to place // for single line comment near the actual code/text.

Using AppCode 3.0.6 here's what my file ~Library/Preferences/appCode30/codestyles/Default _1_.xml

<?xml version="1.0" encoding="UTF-8"?>
<code_scheme name="Default (1)">
  <option name="LINE_COMMENT_AT_FIRST_COLUMN" value="false" />
  <option name="BLOCK_COMMENT_AT_FIRST_COLUMN" value="false" />

  <Objective-C>


Give the this line with the cursor in the middle of the following line:

if (topToBottomHeight < threshold)

Here's the result of hitting "command - /"
 
//    if (topToBottomHeight < threshold)


instead of
 
    //if (topToBottomHeight < threshold)

I'm not sure if there is a way to activate a bug as an external person, or a procedure i should have just followed in the bug itself?  Not sure if a comment in a closed bug gets noticed?


Or if I've got the wrong config file, etc...?

Thanks.
3 comments
Comment actions Permalink

Hi David.

In 3.0.6 the problem with those options was that they didn't persist after IDE restart: OC-10598. The issue was fixed in 3.1.
As for comments in closed issues - yes, we are notified about those.

0
Comment actions Permalink

Nevermind.  I found the settings in the prefs panels.  I don't think these used to exist when this bug was first fixed?  Maybe the bug should mention them.  Do you need both them and the xml file??

3.2 working as expected.

Thanks!


I just paid the upgrade fee and downloaded 3.2.


My preferences file at ~/Library/Preferences/appCode30/codestyles   (is that the right place?)


looks like this at top:


<?xml version="1.0" encoding="UTF-8"?>
<code_scheme name="Default (1)">
  <option name="LINE_COMMENT_AT_FIRST_COLUMN" value="false" />


  <option name="BLOCK_COMMENT_AT_FIRST_COLUMN" value="false" />



I still get the same behavior.
0
Comment actions Permalink

Thanks for the update, glad it works for you now.
In 3.0.6 these options were under Code Style -> Code Generation, then were moved to Code Style -> C/C++/Objective-C -> Code Generation.
Normally any changes to these settings in UI should be saved to xml. For AppCode 3.2 the file is located in ~/Library/Preferences/AppCode32/codestyles.

0

Please sign in to leave a comment.