}
// First look for the SPI that tells us which Cell to use. If there
// is none, then it is a fairly big error. (There should be at least
// one registered in the system).
CellSelectionSPI spi = CellSelectionRegistry.getCellSelectionSPI();
if (spi == null) {
final JFrame frame = JmeClientMain.getFrame().getFrame();
LOGGER.warning("Could not find the CellSelectionSPI factory");
String message = BUNDLE.getString("Launch_Failed_Message");
message = MessageFormat.format(message, uri);
JOptionPane.showMessageDialog(frame, message,
BUNDLE.getString("Launch_Failed"),
JOptionPane.ERROR_MESSAGE);
return;
}
// Next look for a cell type that handles content with this file
// extension and create a new cell with it.
CellFactorySPI factory = null;
try {
factory = spi.getCellSelection(extension);
} catch (CellCreationException excp) {
final JFrame frame = JmeClientMain.getFrame().getFrame();
LOGGER.log(Level.WARNING,
"Could not find cell factory for " + extension);
String message = BUNDLE.getString("Launch_Failed_Message");