Container component = patchEditor.component();
if (component instanceof MDIFrameProxy) {
MDIFrameProxy proxy = (MDIFrameProxy) component;
JSLFrame jslFrame = proxy.getJSLFrame();
if (jslFrame instanceof PatchEditorFrame) {
PatchEditorFrame frame =
(PatchEditorFrame) jslFrame;
IDriver driver = frame.getPatch().getDriver();
if (!deviceCreated) {
device = driver.getDevice();
createDevice(device, infoText);
deviceCreated = true;
}
createPatchDriver(patchEditor, infoText,
(IPatchDriver) driver);
} else if (jslFrame instanceof BankEditorFrame) {
BankEditorFrame frame = (BankEditorFrame) jslFrame;
IDriver driver = frame.getBankData().getDriver();
if (!deviceCreated) {
device = driver.getDevice();
createDevice(device, infoText);
deviceCreated = true;
}