}
EditorFacade.getInstance().modifyIntegerInfo(info, i);
break;
}
case ConstantPoolInfo.LONG: {
LongInfo info = (LongInfo) cpi;
long l = 0;
try {
l = Long.parseLong(newValue);
} catch (NumberFormatException nfe) {
throw new BasicInfoEditor.ValidationException(
"Not a valid long. (" + nfe.getMessage() + ")");
}
EditorFacade.getInstance().modifyLongInfo(info, l);
break;
}
case ConstantPoolInfo.STRING: {
StringInfo info = (StringInfo) cpi;
int answer = JOptionPane.showOptionDialog(this,
"Modify underlying UTF-8 info or create a new one.",
"Modify String Info item",
JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.QUESTION_MESSAGE, null, new String[] {
"Modify", "Create new", "Cancel" }, "Modify");
if (answer == JOptionPane.YES_OPTION) {
// Modify UTF-8 Info
UTF8Info ui = info.getUTF8Info();
EditorFacade.getInstance().modifyUTF8Info(ui, newValue);
break;
} else if (answer == JOptionPane.NO_OPTION) {
// Create a new UTF-8 Info