| 1077 | } |
| 1078 | |
| 1079 | bool ScriptContentPanel::Editor::Actions::rebuild(Editor& e_) |
| 1080 | { |
| 1081 | auto e = &e_; |
| 1082 | auto jp = dynamic_cast<JavascriptProcessor*>(e->getProcessor()); |
| 1083 | auto content = jp->getContent(); |
| 1084 | |
| 1085 | Array<Identifier> ids; |
| 1086 | |
| 1087 | auto b = e->getScriptComponentEditBroadcaster(); |
| 1088 | |
| 1089 | for (auto sc : b->getSelection()) |
| 1090 | { |
| 1091 | ids.add(sc->getName()); |
| 1092 | } |
| 1093 | |
| 1094 | content->resetContentProperties(); |
| 1095 | |
| 1096 | for (auto id : ids) |
| 1097 | { |
| 1098 | auto sc = content->getComponentWithName(id); |
| 1099 | |
| 1100 | if (sc != nullptr) |
| 1101 | b->addToSelection(sc, id == ids.getLast() ? sendNotification : dontSendNotification); |
| 1102 | } |
| 1103 | |
| 1104 | return true; |
| 1105 | } |
| 1106 | |
| 1107 | bool ScriptContentPanel::Editor::Actions::rebuildAndRecompile(Editor& e_) |
| 1108 | { |
no test coverage detected