Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

True Delta-Based Itereation 1 #585

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
move changederivation into Vitruv-Change project
- depends on commit to Vitruv-Change project
h4uges committed Apr 25, 2023
commit 13c9d3926a287c540e4ddbbb431b75c5d02c5e89
Original file line number Diff line number Diff line change
@@ -15,3 +15,4 @@ Require-Bundle: org.apache.log4j,
Export-Package: tools.vitruv.framework.views,
tools.vitruv.framework.views.changederivation
Bundle-Vendor: vitruv.tools
Import-Package: tools.vitruv.change.changederivation
Original file line number Diff line number Diff line change
@@ -8,8 +8,8 @@
import com.google.common.annotations.Beta;
import com.google.common.collect.FluentIterable;

import tools.vitruv.framework.views.changederivation.DefaultStateBasedChangeResolutionStrategy;
import tools.vitruv.framework.views.changederivation.StateBasedChangeResolutionStrategy;
import tools.vitruv.change.changederivation.DefaultStateBasedChangeResolutionStrategy;
import tools.vitruv.change.changederivation.StateBasedChangeResolutionStrategy;

/**
* A Vitruv view on an underlying {@link ChangeableViewSource}.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ import tools.vitruv.change.composite.propagation.ChangePropagationListener
import tools.vitruv.framework.views.ChangeableViewSource
import tools.vitruv.framework.views.ViewSelection
import tools.vitruv.framework.views.ViewSelector
import tools.vitruv.framework.views.changederivation.StateBasedChangeResolutionStrategy
import tools.vitruv.change.changederivation.StateBasedChangeResolutionStrategy

import static com.google.common.base.Preconditions.checkArgument
import static com.google.common.base.Preconditions.checkState
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ import tools.vitruv.change.composite.description.VitruviusChange
import tools.vitruv.change.composite.description.VitruviusChangeFactory
import tools.vitruv.framework.views.CommittableView
import tools.vitruv.framework.views.View
import tools.vitruv.framework.views.changederivation.StateBasedChangeResolutionStrategy
import tools.vitruv.change.changederivation.StateBasedChangeResolutionStrategy

import static com.google.common.base.Preconditions.checkArgument
import static com.google.common.base.Preconditions.checkState
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ import tools.vitruv.change.atomic.id.IdResolver
import tools.vitruv.change.composite.recording.ChangeRecorder
import tools.vitruv.framework.views.CommittableView
import tools.vitruv.framework.views.View
import tools.vitruv.framework.views.changederivation.StateBasedChangeResolutionStrategy
import tools.vitruv.change.changederivation.StateBasedChangeResolutionStrategy

import static com.google.common.base.Preconditions.checkArgument
import static com.google.common.base.Preconditions.checkState
3 changes: 2 additions & 1 deletion bundles/tools.vitruv.framework.vsum/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -13,7 +13,8 @@ Require-Bundle: org.apache.log4j,
org.eclipse.emf.ecore.xmi,
edu.kit.ipd.sdq.activextendannotations,
edu.kit.ipd.sdq.commons.util.emf,
edu.kit.ipd.sdq.commons.util.java
edu.kit.ipd.sdq.commons.util.java,
tools.vitruv.change.changederivation
Export-Package: tools.vitruv.framework.vsum,
tools.vitruv.framework.vsum.internal;x-internal:=true
Bundle-Vendor: vitruv.tools
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl
import tools.vitruv.change.atomic.EChange
import tools.vitruv.change.atomic.id.IdResolver
import tools.vitruv.change.composite.description.VitruviusChangeFactory
import tools.vitruv.framework.views.changederivation.DefaultStateBasedChangeResolutionStrategy
import tools.vitruv.change.changederivation.DefaultStateBasedChangeResolutionStrategy

class ModelInstance extends ResourceImpl {
static val LOGGER = Logger.getLogger(ModelInstance)
3 changes: 2 additions & 1 deletion bundles/tools.vitruv.testutils.vsum/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -7,7 +7,8 @@ Bundle-Vendor: tools.vitruv
Automatic-Module-Name: tools.vitruv.testutils.vsum
Bundle-RequiredExecutionEnvironment: JavaSE-17
Import-Package: org.junit.jupiter.api,
org.junit.jupiter.api.extension
org.junit.jupiter.api.extension,
tools.vitruv.change.changederivation
Require-Bundle: com.google.guava,
org.eclipse.xtext.xbase.lib,
org.eclipse.xtend.lib,
Original file line number Diff line number Diff line change
@@ -7,12 +7,12 @@
import java.util.Collection;
import java.util.function.Consumer;

import tools.vitruv.change.changederivation.StateBasedChangeResolutionStrategy;
import tools.vitruv.framework.views.CommittableView;
import tools.vitruv.framework.views.View;
import tools.vitruv.framework.views.ViewProvider;
import tools.vitruv.framework.views.ViewSelector;
import tools.vitruv.framework.views.ViewTypeFactory;
import tools.vitruv.framework.views.changederivation.StateBasedChangeResolutionStrategy;

public class TestViewFactory {
private final ViewProvider viewProvider;
Original file line number Diff line number Diff line change
@@ -10,7 +10,8 @@ Import-Package: org.junit.jupiter.api,
org.junit.jupiter.api.extension,
org.junit.jupiter.api.function,
org.junit.jupiter.params,
org.junit.jupiter.params.provider
org.junit.jupiter.params.provider,
tools.vitruv.change.changederivation
Require-Bundle: org.apache.log4j,
tools.vitruv.testutils.vsum,
tools.vitruv.testutils.metamodels,
Original file line number Diff line number Diff line change
@@ -23,6 +23,8 @@ import static tools.vitruv.testutils.metamodels.AllElementTypesCreators.aet

import static extension edu.kit.ipd.sdq.commons.util.org.eclipse.emf.ecore.resource.ResourceSetUtil.withGlobalFactories
import static extension tools.vitruv.testutils.Capture.operator_doubleGreaterThan
import tools.vitruv.change.changederivation.StateBasedChangeResolutionStrategy
import tools.vitruv.change.changederivation.DefaultStateBasedChangeResolutionStrategy

class BasicStateChangePropagationTest extends StateChangePropagationTest {
private def getTestUri() {
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ import org.junit.jupiter.params.ParameterizedTest
import org.junit.jupiter.params.provider.MethodSource

import static org.junit.jupiter.api.Assertions.assertThrows
import tools.vitruv.change.changederivation.StateBasedChangeResolutionStrategy

class EdgeCaseStateChangeTest extends StateChangePropagationTest {

Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ import org.junit.jupiter.params.ParameterizedTest
import org.junit.jupiter.params.provider.MethodSource

import static tools.vitruv.testutils.metamodels.PcmMockupCreators.pcm
import tools.vitruv.change.changederivation.StateBasedChangeResolutionStrategy

class PcmStateChangeTest extends StateChangePropagationTest {
@ParameterizedTest()
Original file line number Diff line number Diff line change
@@ -30,6 +30,8 @@ import static tools.vitruv.testutils.metamodels.UmlMockupCreators.uml

import static extension edu.kit.ipd.sdq.commons.util.org.eclipse.emf.common.util.URIUtil.createFileURI
import static extension edu.kit.ipd.sdq.commons.util.org.eclipse.emf.ecore.resource.ResourceSetUtil.withGlobalFactories
import tools.vitruv.change.changederivation.DefaultStateBasedChangeResolutionStrategy
import tools.vitruv.change.changederivation.StateBasedChangeResolutionStrategy

@ExtendWith(TestProjectManager, TestLogging, RegisterMetamodelsInStandalone)
abstract class StateChangePropagationTest {
Original file line number Diff line number Diff line change
@@ -6,6 +6,8 @@ import org.junit.jupiter.params.provider.EnumSource
import org.junit.jupiter.params.provider.MethodSource

import static tools.vitruv.testutils.metamodels.UmlMockupCreators.uml
import tools.vitruv.change.changederivation.StateBasedChangeResolutionStrategy
import tools.vitruv.change.changederivation.DefaultStateBasedChangeResolutionStrategy

class UmlStateChangeTest extends StateChangePropagationTest {
@ParameterizedTest()
Original file line number Diff line number Diff line change
@@ -35,10 +35,10 @@
import tools.vitruv.change.atomic.root.InsertRootEObject;
import tools.vitruv.change.atomic.root.RootFactory;
import tools.vitruv.change.atomic.root.RootPackage;
import tools.vitruv.change.changederivation.DefaultStateBasedChangeResolutionStrategy;
import tools.vitruv.change.composite.description.VitruviusChange;
import tools.vitruv.framework.views.ChangeableViewSource;
import tools.vitruv.framework.views.ModifiableViewSelection;
import tools.vitruv.framework.views.changederivation.DefaultStateBasedChangeResolutionStrategy;
import tools.vitruv.testutils.RegisterMetamodelsInStandalone;
import tools.vitruv.testutils.TestLogging;