id = id.substring(0, extensionIndex);
}
// Use the id as the name
URL url = null;
boolean opened = false;
CheatSheetView view = ViewUtilities.showCheatSheetView();
if (view == null) {
return;
}
try {
url = new URL(selectUrlCombo.getText());
view.getCheatSheetViewer().setInput(id, id, url, new DefaultStateManager(), true);
opened = true;
} catch (MalformedURLException e) {
opened = false;
}
if (!opened) {
String message = NLS.bind(Messages.ERROR_OPENING_FILE, (new Object[] {selectUrlCombo.getText()}));
status = new Status(IStatus.ERROR, ICheatSheetResource.CHEAT_SHEET_PLUGIN_ID, ParserStatusUtility.PARSER_ERROR, message, null);
view.getCheatSheetViewer().showError(message);
}
}