guiHandler.uninstallDevice(null);
LOG.info("Installing " + manufacturer + "/" + deviceName);
String infoText = guiHandler.installDevice(manufacturer, deviceName);
FrameWrapper library = guiHandler.openLibrary();
JTableFixture table = library.table();
LOG.info("Receiving drivers for device " + deviceName);
List<Class<? extends IDriver>> driversForDevice =
guiHandler.getDriversForDevice(deviceName);
boolean deviceCreated = false;
Device device = null;
try {
for (Class<? extends IDriver> driverClass : driversForDevice) {
StringBuilder popupBuilder = new StringBuilder();
LOG.info("Using driver: " + driverClass.getName());
PopupListener driverPopupListener = new PopupListener();
guiHandler.newPatch(library, deviceName, driverClass,
driverPopupListener);
List<PopupContainer> driverPopups =
driverPopupListener.getPopups();
for (PopupContainer popup : driverPopups) {
popupBuilder.append(popup.getContents());
popupBuilder.append("\n\n--------------------------\n\n");
}
LOG.info("Opening patch editor");
PopupListener editorPopupListener = new PopupListener();
FrameWrapper patchEditor =
guiHandler.openPatchEditor(table, -1, 0,
editorPopupListener, true);
List<PopupContainer> editorPopups =
editorPopupListener.getPopups();
for (PopupContainer popup : editorPopups) {
popupBuilder.append(popup.getContents());
popupBuilder.append("\n\n--------------------------\n\n");
}
try {
if (patchEditor == null) {
// No editor at all showed up.
continue;
}
Container component = patchEditor.component();
if (component instanceof MDIFrameProxy) {
MDIFrameProxy proxy = (MDIFrameProxy) component;
JSLFrame jslFrame = proxy.getJSLFrame();
if (jslFrame instanceof PatchEditorFrame) {
PatchEditorFrame frame =