public void actionPerformed(final ActionEvent e) {
final ModeController modeController = Controller.getCurrentModeController();
final NodeModel node = modeController.getMapController().getSelectedNode();
final ArrayList<AttributeHolder> scripts = new ArrayList<AttributeHolder>();
for (int position = 0; position < NodeAttributeTableModel.getModel(node).getAttributeTableLength(); position++) {
final Attribute attribute = NodeAttributeTableModel.getModel(node).getAttribute(position);
if (attribute.getName().startsWith(ScriptingEngine.SCRIPT_PREFIX)) {
scripts.add(new AttributeHolder(new Attribute(attribute), position));
}
}
final NodeScriptModel nodeScriptModel = new NodeScriptModel(scripts, node);
final ScriptEditorPanel scriptEditorPanel = new ScriptEditorPanel(nodeScriptModel, true);
scriptEditorPanel.setVisible(true);