JaWEController jc = JaWEManager.getInstance().getJaWEController();
if (jc.tryToClosePackage(jc.getMainPackageId(), false)) {
//create new package
jc.newPackage(jc.getJaWETypes().getDefaultType(Package.class));
//pop up properties
XPDLElementEditor ed = JaWEManager.getInstance().getXPDLElementEditor();
ed.editXPDLElement(jc.getSelectionManager().getWorkingPKG());
}
}
}