Navigation Menu

Skip to content
This repository has been archived by the owner on Jan 7, 2019. It is now read-only.

Commit

Permalink
Merge pull request #347 from eMoflon/rkluge-dev
Browse files Browse the repository at this point in the history
eMoflon::TIE-SDM 3.5.1
  • Loading branch information
RolandKluge committed Nov 7, 2018
2 parents 21aea37 + 75e81dc commit f836a1d
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 11 deletions.
8 changes: 4 additions & 4 deletions org.moflon.deployment.updatesite/associateSites.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<associateSites>
<associateSite url="http://files.idi.ntnu.no/publish/plantuml/repository/"
label="PlantUML update site" />
<associateSite url="http://download.eclipse.org/modeling/tmf/xtext/updates/composite/releases/"
label="XText update site (release)" />
<associateSite url="http://hallvard.github.io/plantuml"
label="PlantUML update site" />
<associateSite url="http://download.eclipse.org/modeling/tmf/xtext/updates/composite/releases/"
label="XText update site (release)" />
</associateSites>
11 changes: 11 additions & 0 deletions 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
Expand Down
2 changes: 1 addition & 1 deletion org.moflon.deployment.updatesite/site.xml
Expand Up @@ -10,7 +10,7 @@
<feature url="features/org.moflon.ide.visualization.feature_3.0.0.qualifier.jar" id="org.moflon.ide.visualization.feature" version="3.0.0.qualifier">
<category name="org.moflon.tool.main"/>
</feature>
<feature url="features/org.moflon.tgg.mosl.feature_3.0.0.qualifier.jar" id="org.moflon.tgg.mosl.feature" version="3.0.0.qualifier">
<feature url="features/org.moflon.tgg.mosl.feature_3.0.1.qualifier.jar" id="org.moflon.tgg.mosl.feature" version="3.0.1.qualifier">
<category name="org.moflon.tool.main"/>
</feature>
<category-def name="org.moflon.tool.main" label="eMoflon Tool">
Expand Down
2 changes: 1 addition & 1 deletion org.moflon.tgg.mosl.codeadapter/META-INF/MANIFEST.MF
Expand Up @@ -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
Expand Down
Expand Up @@ -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;
Expand All @@ -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";
Expand Down Expand Up @@ -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));
Expand Down Expand Up @@ -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();
}
Expand Down Expand Up @@ -148,13 +168,11 @@ protected void processResource(IResource resource, int kind, Map<String, String>
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());
Expand Down
2 changes: 1 addition & 1 deletion org.moflon.tgg.mosl.feature/feature.xml
Expand Up @@ -2,7 +2,7 @@
<feature
id="org.moflon.tgg.mosl.feature"
label="eMoflon MOSL-TGG (required)"
version="3.0.0.qualifier"
version="3.0.1.qualifier"
provider-name="eMoflon Developers"
plugin="org.moflon.ide.ui">

Expand Down

0 comments on commit f836a1d

Please sign in to comment.