opengds / OpenGDS

Open GOOP Development Suite
MIT License
54 stars 14 forks source link

Renaming IN\OUT Object Controls Automatically upon VI or Class Cloning doesn't work #8

Closed MichaelAivaliotis closed 8 years ago

MichaelAivaliotis commented 8 years ago

@MikaelHolmstrom When you clone a class or VI, the cloned VIs contain the class input and outputs of the new class. However the labels maintain the previous label. This requiring tedious manual editing. It would be logical to rename the input and output object controls to match the localized class name.

At first I thought this was a missing feature. But upon further investigation, it looks like a bug. It seems that the renaming process assumes that the previous class object controls are labeled the same as the class name. If they are not then the renaming fails.

MichaelAivaliotis commented 8 years ago

To add more context. What I would prefer is that the controls get renamed to: "New Localized Name In" and "New Localized Name Out".

You could even get rid of the In and Out. But I think most people would want that to remain. The renaming should happen regardless of what the previous name was. So the previous origin name should be ignored.

MikaelHolmstrom commented 8 years ago

Since I names them Reference IN/Out or Object In/Out I don't get this problem :-) I have added a fix in one place what I can remember but I'll check the Clone feature. Maybe I should add a lvclass menu option to rename all class controls/indicators to this or that.

MichaelAivaliotis commented 8 years ago

Since I names them Reference IN/Out or Object In/Out I don't get this problem :-)

I know you do. I've noticed that in some of your code. However I like reading it mostly on the diagram to help re-orient me. So I know what class I'm working with.

Maybe I should add a lvclass menu option to rename all class controls/indicators to this or that.

That would be awesome. It would be useful for fixing old code as well.

MikaelHolmstrom commented 8 years ago

Do you have a good naming for this feature? Maybe a "Repair class...", and it could be a multi feature tool. E.g. Rename Class Controls/Indicator to whatever you prefer. Fix dynamic dispatch VIs to match other classes or change other classes to match this class settings. Change By value to By Reference and the other way around. Change from singleton to normal and the other way around.

MichaelAivaliotis commented 8 years ago

I think a repair class menu might be good. Then all functions could be grouped into one dialog box? Or separate submenus? I like the dialog box approach. then you can have a list of checkboxes and you pick the actions you want and it does them all in sequence. You could also add the "Auto-Update VI Icons" tool into that group.

One useful tool suggestion. Take one parent class and make all child classes match the parent class project configuration:

MikaelHolmstrom commented 8 years ago

I'll start coding and then you might help out with the GUI layout (so it loot pretty)? And even help me with some of the coding ?!? :-)

MichaelAivaliotis commented 8 years ago

Of course, I can help. If you can help lay down the framework and put the skeleton in place. I can help. I'm not too familiar with developing Project tools. But I'm a quick learner.

MikaelHolmstrom commented 8 years ago

I've started to convert it to 2014, so nice to finally drop the older versions.

MikaelHolmstrom commented 8 years ago

Hi Michael. I've fixed this issue, also I've added a Right Click on lvclass tool. Goop>Class Tool... which allows you to change the Class Control's label on one or more classes.