Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Refactor: Add Field to class

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
grandchain Posted - May 14 2008 : 06:13:00 AM
Hi,

I quite often find myself adding a field to a class when writing a bit of code, and then having to go to the class and remember exactly what I'd called it. It would be really neat to have a Refactoring of Add Field to Class/Structure so I could right-click on the new field and have it done for me.

For example:

typedef struct foo
{
int x;
} foo;

int func()
{
foo f;

f.y = 14; // I'm working, so I've just realised I need a field y in foo.
// I'd like to click on the y and be able to have it added for me.
}

Obviously in this example it's pretty trivial, but quite often the declaration is in another file in the middle of a rather larger structure, and the field name is rather longer since it's a meaningful name.

Cheers,

Ian
3   L A T E S T    R E P L I E S    (Newest First)
feline Posted - May 15 2008 : 08:41:33 AM
There is some discussion about VA trying to work out the type of a new, undeclared variable in this thread:

http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=7190

The same points apply here. Popping up a dialog with VA's best guess might work well.
grandchain Posted - May 15 2008 : 04:18:07 AM
Hi feline,

> one immediate concern is that the variable type is unknown.

I'd be happy with a pop-up that asks me the type (like Change Signature) if VA can't infer it.

Cheers,

Ian
feline Posted - May 14 2008 : 1:41:36 PM
This is an interesting idea. I am just not sure what to make of it. I like the idea on paper, but one immediate concern is that the variable type is unknown. There have been a few recent discussions about VA trying to infer the type of an unknown variable. This should work some of the time, but there are edge cases that VA is going to struggle with.

I have asked internally about this, to see what people think about it.

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