Skip to content

Commit

Permalink
temporarily expose UuidResolver of NonTransactionalTestView as need…
Browse files Browse the repository at this point in the history
…ed by Java Editor - PCM legacy case study
  • Loading branch information
Jan Wittler committed Dec 13, 2022
1 parent f994afe commit 38837a8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ class ChangePublishingTestView implements NonTransactionalTestView {
override <T extends EObject> T from(Class<T> clazz, Path viewRelativePath) {
clazz.from(viewRelativePath.uri)
}

override getUuidResolver() {
return uuidResolver
}

override disposeViewResources() {
resourceSet.resources.clear()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package tools.vitruv.testutils.views

import org.eclipse.emf.common.notify.Notifier
import com.google.common.annotations.Beta
import java.util.List
import org.eclipse.emf.common.notify.Notifier
import tools.vitruv.change.atomic.uuid.UuidResolver
import tools.vitruv.change.composite.description.PropagatedChange

/**
Expand Down Expand Up @@ -33,6 +35,15 @@ interface NonTransactionalTestView extends TestView {
* Use {@link #record record} to run recording in a transaction that automatically stops recording on return.
*/
def <T extends Notifier> T stopRecordingChanges(T notifier)

/**
* Returns the {@link UuidResolver} associated with resources obtained from this test view. Accessing the UUID resolver
* directly might be necessary for state-based change propagation.
*
* TODO: remove as soon as PCM - Java Editor tests are migrated to view-based API
*/
@Beta
def UuidResolver getUuidResolver()

/**
* Propagates all changes recorded since the last call of this method at all objects for which recording has been started
Expand Down

0 comments on commit 38837a8

Please sign in to comment.