Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 1534 - Formatting of Extract Method

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
swinefeaster Posted - Sep 06 2006 : 5:44:20 PM
Is there any autotext entry that I can use to change an Extract Method result such as:

void DoSomething( CSomeObject &s );

To look like:

void DoSomething(CSomeObject& s);

?

Thanks!
14   L A T E S T    R E P L I E S    (Newest First)
swinefeaster Posted - Sep 19 2006 : 11:22:02 AM
ok great thanks :)
jpizzi Posted - Sep 19 2006 : 12:51:55 AM
I entered a case for this.

case=2580
Admin Posted - Sep 19 2006 : 12:38:09 AM
swinefeaster: You make a good point and we hear you.
jpizzi Posted - Sep 19 2006 : 12:22:47 AM
I'll point support to the thread and see what they say.
swinefeaster Posted - Sep 18 2006 : 3:05:10 PM
so the answer is no ?

i agree that VAX shouldn't be doing code formatting of existing code, but when it adds new code, it should at least be configurable. otherwise it's just plain annoying to do refactoring, cause you have to go back and fix everything.
feline Posted - Sep 10 2006 : 5:55:23 PM
this is an educated guess, but there is a single keyword for ease. this gives everyone a reasonable degree of control over the formatting, while avoiding problems with functions like:

void FelineDoesThis(const QValueList<drugMapping, QPair<int, QString> > &listCheck, const QString &drugName);

virtual void insertItem(const QString &, const QString &) { ; }  // a bit of a hack, but it works


now i know that you can separate each parameter into "type" and "name", but if we want to get picky about control over spaces and formatting code like this opens up a can of worms, just with two lines of code. i have things like this, and worse, in my code and i hardly ever make template functions or classes!

as for GC, this is an excellent program

http://sourceforge.net/projects/gcgreatcode/

but last time i tried it, it did not have enough options! there were things i wanted to do that it would not let me do. *checks* the readme file telling you how to control GC is 4,375 lines long! this is slightly off putting
jpizzi Posted - Sep 09 2006 : 6:28:28 PM
Personally, I prefer

int* foo;

I avoid the confusion by never declaring two variables with the same statement.

I vote that we leave code formatting to programs like GC.

However, why is it that we include the "decorations" within the autotext keyword instead of separately? Maybe instead of an option, a different autotext keyword? Something like, $ParameterListSpace$ ??
rhummer Posted - Sep 09 2006 : 3:24:01 PM
I agree with feline, getting into formatting options is a big can of worms to try and open.

I personally would scream murder if things were formated like:
int* foo;


I prefer:
int *foo;
feline Posted - Sep 09 2006 : 3:20:33 PM
i can see half the forum agreeing with you, and half the forum disagreeing with you.

the answer i recall reading was about defining new variables, and said to prefer:

int *foo, bar;


to:

int* foo, bar;


since the first makes it more clear that only foo will be a pointer. i have always preferred the first style, and the point about clarity makes sense to me.

however i try to avoid imposing my views on others, since then we would spend all of our time arguing and getting no work done

before you ask for a simple check box option, what do i say to the person who posts and wants the format:

void Foo(int * blah);


this is why we try to stay away from code formatting, since you end up with hundreds of options, since that is the only way to keep everyone happy.
swinefeaster Posted - Sep 08 2006 : 12:00:41 PM
no i mean this:

void Foo(int *blah);

is old-school. the more modern coding style is:

void Foo(int* blah);

same with references. if you don't wanna let us change the style, then change it to the first style... ;)
rhummer Posted - Sep 07 2006 : 8:08:59 PM
I'm not sure what you mean.

The parameter list is generated from the $ParameterList$ autotext keyword. Which can't be changed.
swinefeaster Posted - Sep 07 2006 : 7:04:22 PM
then why does it default to old-style?
swinefeaster Posted - Sep 07 2006 : 7:03:20 PM
:(
rhummer Posted - Sep 06 2006 : 5:47:57 PM
Yes there is an auto text for extract method, "Refactor Extract Method"

Though, you cannot edit the placement of the '&' character.


© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000