NI Home
Cart Cart | Help
Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Currently Being Moderated

Class Tool Plugin

VERSION 8

Created on: Sep 15, 2009 8:38 AM by Jeffrey Habets - Last Modified:  Mar 7, 2010 5:48 AM by Jeffrey Habets

The Class Tool is a plugin for the JKI Right-Click Framework for LabVIEW

 

Introduction

For a longtime I've been hoping we would get the ability to rightclick on class-wires and select what method of that class I want to insert or drop on the diagram. Since the feature is still not there and we now have the wonderfull RCF I started writing my own. So here it is..

 

class-tool-capture.png

 

Steps to Complete

This plugin is packaged for use with the JKI VIPM. Download the VIPM package, right click and select "Add To VIPM Library", then select the "Add To Library & Install" button from the dialog that opens. You'll need to restart the JKI RCF to use the plugin.

 

 

Additional Notes

License: BSD.

Version 1.1.0.

Saved and tested in LabVIEW 8.6 (not tested yet in LV 2009 or higher)

 

Known Issues

  • The error cluster wiring feature (default turned off) will only work correct if the class-wire that's being operated on has one or two other methods of that class as source and sink. Other source and/or sink variants will probably not work, but won't throw an error anymore.

 

Planned changes

  • Full support for error structure rewiring
  • Cleanup code

 

Version history

 

VersionChanges
1.0.0Initial release
1.0.1
  • Show all method types (static and dynamic dispatch) in menu
  • Display methods categorized by type (from top to bottom: public, protected, private, other)
  • Private and protected methods are only displayed when they can actually be called from the VI you're working on
  • Public and protected methods of ancestors are shown (this can be turned of in the options) (Q: would we rather want the ancestor methods be displayed in sub-menus??)
  • The .vi extensions is stripped from the names and ancestor methods are prefixed with ClassName:
1.1.0
  • Joints are now correctly retained when inserting methods on wires. In fact, the complete wire path is retained and the method is inserted at the position where you called the rc-menu instead of 'somewhere in the middle'
  • Added 'New' menu-item from which new class-methods can be created. You have the option to create static or dynamic member VIs and VIs for data member access. Note that this is somewhat experimental and only tested in LabVIEW 8.6
  • Extra seperators in the methods list to also seperate the child class methods and various ancestor class methods within the method type categories
  • When calling the rc-menu on wires that are not on the top-level diagram (e.g. case, event, loops, etc.) the method is now correctly inserted or dropped in that particular diagram in stead of being left floating on top.

 

Downloads:
Average User Rating
(4 ratings)




normandinf normandinf  says:

That's a very useful tool. Thanks Jeffrey!

PJM_JKI PJM_JKI  says:

This looks very interesting.

 

I will definitively try it.

James Kring James Kring  says:

Jeffrey,

 

This is an amazingly useful tool!

 

I have some ideas, which aren't completely well thought out -- they are just based on a first impression:

 

  • If the VI whose block diagram I'm on is not a member of the class, it would be nice to only see the public members of the lvclass.  So, it would be great if the list could be filtered so that it only shows those VIs that are actually allowed to be called in the target VI's BD.
  • In general, I would prefer not to see CTLs of the class -- only method VIs
  • It would be nice if the ".vi" file extension was stripped from each method name (and, since CTLs are not show, per my previous suggestion, this should be a problem)
  • It might be nice to group the Public, Private, and Protected methods into submenus.

 

Cheers,

 

-Jim

Jeffrey Habets Jeffrey Habets  says in response to James Kring:

Jim,

 

I agree on almost all accounts. :-)

Here on my PC's I don't see .ctl class members listed..

 

Most other suggestions where on the todo-list.

Daklu Daklu  says:

I'm sold.  This is the killer "must have" tool that convinced me to install the RCF.

 

Personally I'd prefer not to have submenus for differently scoped methods.  I'd rather see them on a single menu grouped by scope with a separator between them.

PJM_JKI PJM_JKI  says in response to Daklu:

I would agree except for the order.

 

What would you expect it to be? Public, Protected, Private? or Private, Protected, Public? or...

 

Also, in LV 9.0 there is a new scope (community). This start to make a lot of possible combination.

 

Maybe, if it is separated by separator, the order could be an option that is configurable.

 

Jeffrey,

 

I agree with everybody else, this is a must have.

 

Great Job.

 

PJM

Daklu Daklu  says in response to PJM_JKI:

Public should be at the top since that is the most common use case.  Beyond that the order doesn't matter too much to me.  Private methods could be in a submenu since they will won't be used once the class is built.  I'd even be okay (though disappointed) if protected and community methods were in a submenu.  If I have to navigate another submenu just to get to the methods I use most often I'd probably go back to using the proj explorer window.

 

I wonder if it's possible to configure the display based on the active VI's permission to the class without killing performance.  It would be really cool if while I were editing a friend VI the public and community VIs would displayed in the main menu while the other methods would be contained in sub menus.

IPTN IPTN  says:

Is it possible to convert to Labview 8.2 or earlier or is it not compatible with earlier versions? This looks like an amazing tool.

Can't wait to try.

More Like This

  • Retrieving data ...

More by Jeffrey Habets