use of org.palladiosimulator.pcm.allocation.Allocation in project Palladio-Editors-Sirius by PalladioSimulator.
the class AllocationCreationWizard method init.
@Override
protected void init(IStructuredSelection selection) {
String viewpointName = Activator.VIEWPOINT_NAME;
viewpoint = Activator.getDefault().getViewpoint();
String ext = Activator.getDefault().getViewpoint().getModelFileExtension();
modelCreationPage = new ModelCreationPage(selection, viewpointName + " Creation Wizard", "new" + viewpointName, ext);
representationDescription = Activator.getDefault().getRepresentationDescription();
String defaultRepresentationName = "new " + Activator.REPRESENTATION_NAME;
this.representationCreationPage.setDefaultRepresentationName(defaultRepresentationName);
resourceEnvironmentSelectorpage = new ResourceEnvironmentSelectorPage();
systemSelectorPage = new SystemSelectorPage();
additionalPages.add(resourceEnvironmentSelectorpage);
additionalPages.add(systemSelectorPage);
Allocation obj = AllocationFactory.eINSTANCE.createAllocation();
obj.setEntityName("New Allocation");
modelObject = obj;
}
use of org.palladiosimulator.pcm.allocation.Allocation in project iobserve-analysis by research-iobserve.
the class AllocationModelProviderTest method createThenReadByName.
@Override
@Test
public void createThenReadByName() {
final ModelProvider<Allocation> modelProvider = new ModelProvider<>(AllocationModelProviderTest.graph);
final Allocation writtenModel = new TestModelBuilder().getAllocation();
final List<Allocation> readModels;
modelProvider.createComponent(writtenModel);
readModels = modelProvider.readOnlyComponentByName(Allocation.class, writtenModel.getEntityName());
for (final Allocation readModel : readModels) {
Assert.assertTrue(this.equalityHelper.equals(writtenModel, readModel));
}
}
use of org.palladiosimulator.pcm.allocation.Allocation in project iobserve-analysis by research-iobserve.
the class AllocationModelProviderTest method createThenReadRoot.
@Override
@Test
public void createThenReadRoot() {
final ModelProvider<Allocation> modelProvider = new ModelProvider<>(AllocationModelProviderTest.graph);
final Allocation writtenModel = new TestModelBuilder().getAllocation();
final Allocation readModel;
modelProvider.createComponent(writtenModel);
readModel = modelProvider.readOnlyRootComponent(Allocation.class);
Assert.assertTrue(this.equalityHelper.equals(writtenModel, readModel));
}
use of org.palladiosimulator.pcm.allocation.Allocation in project iobserve-analysis by research-iobserve.
the class AllocationModelProviderTest method createThenReadById.
@Override
@Test
public void createThenReadById() {
final ModelProvider<Allocation> modelProvider = new ModelProvider<>(AllocationModelProviderTest.graph);
final Allocation writtenModel = new TestModelBuilder().getAllocation();
final Allocation readModel;
modelProvider.createComponent(writtenModel);
readModel = modelProvider.readOnlyComponentById(Allocation.class, writtenModel.getId());
Assert.assertTrue(this.equalityHelper.equals(writtenModel, readModel));
}
use of org.palladiosimulator.pcm.allocation.Allocation in project iobserve-analysis by research-iobserve.
the class AllocationModelProviderTest method createThenCloneThenRead.
@Override
@Test
public void createThenCloneThenRead() {
final ModelProvider<Allocation> modelProvider1 = new ModelProvider<>(AllocationModelProviderTest.graph);
final ModelProvider<Allocation> modelProvider2;
final Allocation writtenModel = new TestModelBuilder().getAllocation();
final Allocation readModel;
final Graph graph2;
modelProvider1.createComponent(writtenModel);
graph2 = modelProvider1.cloneNewGraphVersion(Allocation.class);
modelProvider2 = new ModelProvider<>(graph2);
readModel = modelProvider2.readOnlyRootComponent(Allocation.class);
graph2.getGraphDatabaseService().shutdown();
Assert.assertTrue(this.equalityHelper.equals(writtenModel, readModel));
}
Aggregations