### Eclipse Workspace Patch 1.0
#P org.sophie2.main.app.commons
|
|
|
|
| 88 | 88 | |
| 89 | 89 | final ResourceRefList templates = book.get(templatesKey); |
| 90 | 90 | final ResourceRefR4 relativeRef = |
| 91 | | ResourceRefR4.getRelativeRef(bookAccess.getRef(), ref); |
| | 91 | ResourceRefR4.getRelativeRef(bookAccess.getRef(), ref); |
| 92 | 92 | final String kind = templatedElement.model().get().getKind(); |
| | 93 | final ResourceRefList newTemplates = |
| | 94 | templates.contains(templateRef) ? templates : templates.add(templateRef); |
| 93 | 95 | |
| 94 | | |
| 95 | 96 | new AutoAction(description, isSign) { |
| 96 | 97 | @Override |
| 97 | 98 | public void performAuto() { |
| 98 | 99 | getChanger().copyResource(relativeRef, templateRef); |
| 99 | | getChanger().setRaw(templatesKey, templates.add(templateRef)); |
| | 100 | getChanger().setRaw(templatesKey, newTemplates); |
| 100 | 101 | |
| 101 | 102 | ResourceChanger subCh = getChanger().getSub(templateRef); |
| 102 | 103 | subCh.setRaw(ResourceR4.KEY_TITLE, templateTitle); |