Search in sources :

Example 1 with MImportExportData

use of org.obeonetwork.dsl.manifest.MImportExportData in project InformationSystem by ObeoNetwork.

the class ManifestServices method addExportedManifestToSession.

public void addExportedManifestToSession(final Session session, final MManifest manifest) {
    if (session != null) {
        MImportExportData data = getImportExportData(session);
        if (data == null) {
            data = createImportExportData(session);
        }
        final MImportExportData data2 = data;
        executeInRecordingCommand(session, () -> data2.getExportedManifests().add(manifest));
    }
}
Also used : MImportExportData(org.obeonetwork.dsl.manifest.MImportExportData)

Example 2 with MImportExportData

use of org.obeonetwork.dsl.manifest.MImportExportData in project InformationSystem by ObeoNetwork.

the class ManifestServices method createImportExportData.

public MImportExportData createImportExportData(final Session session) {
    MImportExportData data = ManifestFactory.eINSTANCE.createMImportExportData();
    final DAnalysis mainAnalysis = getMainAnalysis(session);
    if (mainAnalysis != null) {
        executeInRecordingCommand(session, () -> {
            FeatureExtensionsManager.INSTANCE.saveFeatureExtensionData(ManifestFeatureExtension.FEATURE_EXTENSION_NAME, session, mainAnalysis, data);
        });
    }
    return data;
}
Also used : MImportExportData(org.obeonetwork.dsl.manifest.MImportExportData) DAnalysis(org.eclipse.sirius.viewpoint.DAnalysis)

Aggregations

MImportExportData (org.obeonetwork.dsl.manifest.MImportExportData)2 DAnalysis (org.eclipse.sirius.viewpoint.DAnalysis)1