Plugin.error(e);
}
}
}
else if (obj instanceof IJarEntryResource && ((IJarEntryResource) obj).isFile()) {
IJarEntryResource jef = (IJarEntryResource) obj;
String namespace = jef.getName();
int index = namespace.indexOf("."); //$NON-NLS-1$
if (index >= 0) namespace = namespace.substring(0, index);
InputDialog inputDialog = new InputDialog(
shell, Messages.ConfigurationManager_TITLE_CHOOSE_NAMESPACE,
MessageFormat.format(
Messages.ConfigurationManager_CHOOSE_NAMESPACE_FOR, jef
.getName()),
namespace, null);
int rtn = inputDialog.open();
if (rtn == IDialogConstants.OK_ID) {
namespace = inputDialog.getValue();
try {
InputStream is = null;
try {
is = getProjectClassLoader().getResourceAsStream(
jef.getFullPath().toString());
if (null != is) {
this.macroLibrary.put(namespace,
new MacroLibrary(namespace, is, jef
.getFullPath().toString(),
MacroLibrary.TYPE_JAR_ENTRY));
} else {
// FIXME: add error dialog here
}