From 571f6a8f1f9784dcf11fe786a0446ee2abe2e323 Mon Sep 17 00:00:00 2001 From: Roland Kluge Date: Tue, 6 Nov 2018 13:48:13 +0100 Subject: [PATCH 1/4] Fix PlantUML update site --- org.moflon.deployment.updatesite/associateSites.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/org.moflon.deployment.updatesite/associateSites.xml b/org.moflon.deployment.updatesite/associateSites.xml index 61379a95..d8a26a7e 100644 --- a/org.moflon.deployment.updatesite/associateSites.xml +++ b/org.moflon.deployment.updatesite/associateSites.xml @@ -1,7 +1,7 @@ - - + + From e07c9d235eb580748032d2fa543acc662c2ee4fc Mon Sep 17 00:00:00 2001 From: Roland Kluge Date: Wed, 7 Nov 2018 09:24:54 +0100 Subject: [PATCH 2/4] Remove invalid problem markers in MoslTGGBuilder.java Closes #346 --- .../changelog.txt | 11 ++++++++ org.moflon.deployment.updatesite/site.xml | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../tgg/mosl/builder/MoslTGGBuilder.java | 26 ++++++++++++++++--- org.moflon.tgg.mosl.feature/feature.xml | 2 +- 5 files changed, 36 insertions(+), 7 deletions(-) diff --git a/org.moflon.deployment.updatesite/changelog.txt b/org.moflon.deployment.updatesite/changelog.txt index 862a0200..1b6dd277 100644 --- a/org.moflon.deployment.updatesite/changelog.txt +++ b/org.moflon.deployment.updatesite/changelog.txt @@ -1,3 +1,14 @@ +2018-11-07 eMoflon 3.5.1 released + +Minor bug fix +* The error marker "Unable to construct the correspondence metamodel from the Xtext specification" was not removed during a fresh build + (Related issue: Unable to construct the correspondence metamodel from the Xtext specification #346) + +To obtain the full list, use the following URL/GitHub issue query: + * URL: https://github.com/eMoflon/emoflon-tool/issues?utf8=%E2%9C%93&q=is%3Aissue+closed%3A2018-10-30..2018-11-07 + * GitHub issues query: is:issue closed:2018-10-30..2018-11-07 + + 2018-10-30 eMoflon 3.5.0 released Fixes in internal API diff --git a/org.moflon.deployment.updatesite/site.xml b/org.moflon.deployment.updatesite/site.xml index 8ba34326..9aa6233d 100644 --- a/org.moflon.deployment.updatesite/site.xml +++ b/org.moflon.deployment.updatesite/site.xml @@ -4,7 +4,7 @@ This is the central update site of eMoflon. - + diff --git a/org.moflon.tgg.mosl.codeadapter/META-INF/MANIFEST.MF b/org.moflon.tgg.mosl.codeadapter/META-INF/MANIFEST.MF index 30ab8a3a..16a5299a 100644 --- a/org.moflon.tgg.mosl.codeadapter/META-INF/MANIFEST.MF +++ b/org.moflon.tgg.mosl.codeadapter/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: org.moflon.tgg.mosl.codeadapter Bundle-Vendor: eMoflon Developers -Bundle-Version: 1.0.0.qualifier +Bundle-Version: 1.0.1.qualifier Bundle-SymbolicName: org.moflon.tgg.mosl.codeadapter;singleton:=true Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-1.8 diff --git a/org.moflon.tgg.mosl.codeadapter/src/org/moflon/tgg/mosl/builder/MoslTGGBuilder.java b/org.moflon.tgg.mosl.codeadapter/src/org/moflon/tgg/mosl/builder/MoslTGGBuilder.java index 2207fa77..b884ba6c 100644 --- a/org.moflon.tgg.mosl.codeadapter/src/org/moflon/tgg/mosl/builder/MoslTGGBuilder.java +++ b/org.moflon.tgg.mosl.codeadapter/src/org/moflon/tgg/mosl/builder/MoslTGGBuilder.java @@ -7,6 +7,7 @@ import org.apache.log4j.Logger; import org.eclipse.core.resources.IFolder; +import org.eclipse.core.resources.IMarker; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IResourceDelta; @@ -32,6 +33,8 @@ public class MoslTGGBuilder extends AbstractVisitorBuilder { + private static final String MISSING_CORRESPONDENCE_MODEL_ERROR_MESSAGE_PREFIX = "Unable to construct the correspondence metamodel from the Xtext specification in "; + public static final Logger logger = Logger.getLogger(MoslTGGBuilder.class); public static final String BUILDER_ID = "org.moflon.tgg.mosl.codeadapter.mosltggbuilder"; @@ -73,6 +76,9 @@ protected void postprocess(final RelevantElementCollector buildVisitor, int orig if (getCommand().isBuilding(kind)) { final IFolder moslFolder = getProject().getFolder(new Path(srcFolder)); + + clearProblemMarkers(moslFolder); + if ((isAutoOrIncrementalBuild(kind) && hasRelevantDeltas(buildVisitor)) || (isFullBuild(kind) && hasRelevantResources(buildVisitor))) { processResource(moslFolder, kind, args, subMonitor.split(1)); @@ -117,6 +123,20 @@ public boolean handleResourceDelta(final IResourceDelta delta) { } } + private void clearProblemMarkers(final IFolder moslFolder) { + try { + final IMarker[] markers = moslFolder.findMarkers(IMarker.PROBLEM, true, 1); + for (final IMarker marker : markers) { + final String message = marker.getAttribute(IMarker.MESSAGE, ""); + if (message.startsWith(MISSING_CORRESPONDENCE_MODEL_ERROR_MESSAGE_PREFIX)) { + marker.delete(); + } + } + } catch (final CoreException e) { + logger.error("Problem during deletion of problem markers", e); + } + } + private boolean hasRelevantResources(final RelevantElementCollector buildVisitor) { return !buildVisitor.getRelevantResources().isEmpty(); } @@ -148,13 +168,11 @@ protected void processResource(IResource resource, int kind, Map job.schedule(); } else { - processProblemStatus(new Status(IStatus.ERROR, WorkspaceHelper.getPluginId(getClass()), - "Unable to construct the correspondence metamodel from the Xtext specification in " + resource, - null), resource); + MISSING_CORRESPONDENCE_MODEL_ERROR_MESSAGE_PREFIX + resource, null), resource); } - } catch (CoreException e) { + } catch (final CoreException e) { try { processProblemStatus(e.getStatus(), resource); LogUtils.error(logger, e, "Unable to update created projects: " + e.getMessage()); diff --git a/org.moflon.tgg.mosl.feature/feature.xml b/org.moflon.tgg.mosl.feature/feature.xml index 60a2bd47..8f9ad9f0 100644 --- a/org.moflon.tgg.mosl.feature/feature.xml +++ b/org.moflon.tgg.mosl.feature/feature.xml @@ -2,7 +2,7 @@ From 2add01b94b723beffe0f20c8f0d654fcb6287062 Mon Sep 17 00:00:00 2001 From: Roland Kluge Date: Wed, 7 Nov 2018 10:38:53 +0100 Subject: [PATCH 3/4] Fix version numbers --- org.moflon.deployment.updatesite/site.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/org.moflon.deployment.updatesite/site.xml b/org.moflon.deployment.updatesite/site.xml index 9aa6233d..4d15a6ef 100644 --- a/org.moflon.deployment.updatesite/site.xml +++ b/org.moflon.deployment.updatesite/site.xml @@ -4,13 +4,13 @@ This is the central update site of eMoflon. - + - + From 75e81dc627b0995d3738f3ea6f5a983e0522a4ac Mon Sep 17 00:00:00 2001 From: Roland Kluge Date: Wed, 7 Nov 2018 10:50:53 +0100 Subject: [PATCH 4/4] Reformat changelog --- org.moflon.deployment.updatesite/changelog.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/org.moflon.deployment.updatesite/changelog.txt b/org.moflon.deployment.updatesite/changelog.txt index 1b6dd277..93ace3b4 100644 --- a/org.moflon.deployment.updatesite/changelog.txt +++ b/org.moflon.deployment.updatesite/changelog.txt @@ -1,12 +1,12 @@ 2018-11-07 eMoflon 3.5.1 released -Minor bug fix -* The error marker "Unable to construct the correspondence metamodel from the Xtext specification" was not removed during a fresh build - (Related issue: Unable to construct the correspondence metamodel from the Xtext specification #346) + Minor bug fix + * The error marker "Unable to construct the correspondence metamodel from the Xtext specification" was not removed during a fresh build + (Related issue: Unable to construct the correspondence metamodel from the Xtext specification #346) -To obtain the full list, use the following URL/GitHub issue query: - * URL: https://github.com/eMoflon/emoflon-tool/issues?utf8=%E2%9C%93&q=is%3Aissue+closed%3A2018-10-30..2018-11-07 - * GitHub issues query: is:issue closed:2018-10-30..2018-11-07 + To obtain the full list, use the following URL/GitHub issue query: + * URL: https://github.com/eMoflon/emoflon-tool/issues?utf8=%E2%9C%93&q=is%3Aissue+closed%3A2018-10-30..2018-11-07 + * GitHub issues query: is:issue closed:2018-10-30..2018-11-07 2018-10-30 eMoflon 3.5.0 released