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");
message = MessageFormat.format(message, uri);
JOptionPane.showMessageDialog(frame, message,
BUNDLE.getString("Launch_Failed"),
JOptionPane.ERROR_MESSAGE);
return;
}
// If the returned factory is null, it means that the user has cancelled
// the action, so we just return
if (factory == null) {
return;
}
// Get the cell server state, injecting the content URI into it via
// the properties
Properties props = new Properties();
props.put("content-uri", uri);
CellServerState state = factory.getDefaultCellServerState(props);
// Create the new cell at a distance away from the avatar
try {
// OWL issue #224: api update
CellUtils.createCell(state);