package gve.calc.packaging;

Each package should have a PackageDescriptor subclass in it, called bla.bla.bla.PackageInfo. Each PackageDescriptor subclass should have a zero argument constructor. To collect: info about which things have to be placed in the "Insert->New xxx" menu Each PackageDescriptor subclass should have a
public static PartDescriptor [] getParts()
method.
public abstract class PackageDescriptor { abstract public PartDescriptor [] getParts();
Get an instance of the PackageInfo class of the given package.
public static PackageDescriptor get(String pkgname) { try { return (PackageDescriptor)Class.forName(pkgname+".PackageInfo").getConstructor(null).newInstance(null); } catch (Exception e) { e.printStackTrace(); return null; } }
Returns full package name, e.g. "gve.calc.formula"
public String getName() { String name = getClass().getName(); return name.substring(0,name.lastIndexOf('.')); } }