Set up the method name descriptions for actions
try {
// DODEMO()
Method m = Chart.class.getMethod("doDemo", new Class[] {});
MethodDescriptor md1 = new MethodDescriptor(m);
md1.setShortDescription("Run a simple demonstration");
// SETDATA(ChartData[]);
Class argTypes[] = { Class.forName("ChartData[]") };
m = Chart.class.getMethod("setData", argTypes);
MethodDescriptor md2 = new MethodDescriptor(m);
md2.setShortDescription("Provide array of ChartData to plot");
return new MethodDescriptor[] { md1, md2 };
} catch (Exception e) { // if anything fails, fall back to default
System.out.println(e);
return super.getMethodDescriptors();
}