Commit 282bedf
authored
feat(mps-sync-plugin): synchronizing read-only modules and models (#154)
* feat(mps-sync-plugin): transform read-only model imports
* feat(mps-sync-plugin): transform read-only module dependencies
* feat(mps-sync-plugin): disable the sync and unbind actions on read-only models and modules
* feat(mps-sync-plugin): transform read-only node references
* fix(mps-sync-plugin-lib): serialize MPSModelImportReference by hand
to avoid a serializer not found exception at runtime
* fix(mps-sync-plugin-lib): move creating read-only model import to a separate method
because we have to do some more checks and steps than just simply creating the MPSModelImportReference
* fix(mps-sync-plugin-lib): encapsulate the MPSNodeReference in a NodeReference
otherwise the reference cannot be serialized
* fix(mps-sync-plugin-lib): setting a reference for a read-only node
* fix(mps-sync-plugin-lib): fix cahing read-only model import during modelix traversal
* fix(mps-sync-plugin-lib): model imports can be added and resolved at any time
Track if the ResolvableModelImport has been resolved (i.e. synced to the cloud) and if so then remove it from the pending this. This way, we can sync model imports directly after they were added to the model.
* refactor(mps-sync-plugin-lib): do not use SNode, SModel, SModule in the cache
Because they may change behind-the-scenes without any warning. As a consequence, they will not be found in the cache as keys, even though they did not change. (MODELIX-787)
* feat(mps-sync-plugin-lib): add SRepository as a new field to the ServiceLocator
so the MPS Repository is always directly accessible and we do not have to go to the MPS Project first
* fix(mps-sync-plugin-lib): create mapping link for the read-only model imports
* fix(mps-sync-plugin-lib): remove outgoing model and module dependency mappings
from the cache, when the corresponding ModelImport, ModuleDependency, LanguageDependency, DevKitDependency is removed
* refactor(mps-sync-plugin-lib): reclassify missed node removal error to warning
* fix(mps-sync-plugin-lib): add null-checks where returned object may be null
* refactor(mps-sync-plugin-lib): inline a variable that is used only once1 parent 90fad13 commit 282bedf
File tree
20 files changed
+349
-132
lines changed- mps-sync-plugin-lib/src/main/kotlin/org/modelix/mps/sync
- modelix
- branch
- util
- mps
- factories
- services
- transformation
- cache
- modelixToMps
- incremental
- transformers
- mpsToModelix
- incremental
- initial
- mps-sync-plugin/src/main/kotlin/org/modelix/mps/sync/plugin/action
20 files changed
+349
-132
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | 19 | | |
21 | 20 | | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
| 41 | + | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| |||
mps-sync-plugin-lib/src/main/kotlin/org/modelix/mps/sync/modelix/util/ModuleDependencyConstants.kt
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
Lines changed: 24 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
| 33 | + | |
32 | 34 | | |
| 35 | + | |
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
| |||
53 | 56 | | |
54 | 57 | | |
55 | 58 | | |
| 59 | + | |
56 | 60 | | |
57 | 61 | | |
58 | 62 | | |
| |||
125 | 129 | | |
126 | 130 | | |
127 | 131 | | |
128 | | - | |
129 | | - | |
130 | | - | |
| 132 | + | |
| 133 | + | |
131 | 134 | | |
| 135 | + | |
132 | 136 | | |
133 | 137 | | |
134 | 138 | | |
135 | 139 | | |
136 | 140 | | |
137 | | - | |
138 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
139 | 158 | | |
140 | 159 | | |
141 | 160 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| 44 | + | |
| 45 | + | |
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
| |||
0 commit comments