public void signalEditorPrepare() {
        signalEditorSetEnabled(true);
        boolean libraryCorrect = false;
        boolean schemeCorrect = false;
        boolean signalsCorrect = false;
        se_signal.removeAll();
        
        try {
            libraryCorrect = library != null ? ModelingEngine.checkLibrary(library) : false;
            schemeCorrect = libraryCorrect ? scheme != null ? ModelingEngine.checkScheme(library, scheme) : false : false;
        } catch (ModelingException e) {
            MainWindow.showMessage(e.getMessage(), "Error");
            e.printStackTrace();
        }
        
        if(schemeCorrect) {
            for(String input : scheme.getInputs()) {
                se_signal.add(new Contact(input, -1).toString());
            }
            for(String output : scheme.getOutputs()) {
                se_signal.add(new Contact(output, -1).toString());
            }
            for(String elementName : scheme.getElements().keySet()) {
                Element element = library.getLibrary().get(scheme.getElements().get(elementName));
                for(int n = 0; n < element.getIcnt() + element.getOcnt() + element.getEcnt(); n++)
                {
                    se_signal.add(new Contact(elementName, n).toString());
                }
            }
            Yaml yaml = new Yaml();
            se_view.setText(yaml.dump(signals));
        }
        if(signalsCorrect) {
            Contact contact = new Contact(se_signal.getText());
            Signal signal = signals.getSignals().get(contact);
            if(signal != null) {
                StringBuilder sb_time = new StringBuilder();
                StringBuilder sb_state = new StringBuilder();
                for(Long key : signal.getSignalSet().keySet()) {
                    sb_time.append(key).append(' ');
                    sb_state.append(signal.getState(key)).append(' ');
                }
                se_time.setText(sb_time.toString());
                se_state.setText(sb_state.toString());
            } else {
                se_time.setText("");
                se_state.setText("");
            }
        }
    }