[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [henshin-dev] henshin-commits Digest, Vol 17, Issue 1
|
Felix,
please explain your latest commit. I told you how you can find all
matches using the InterpreterUtil class.
Why do you change the interpreter API without discussing it with us???
When I was working on the new API, I explicitly asked you guys for
comments. Nobody had even a single comment on the API.
I really put a lot of thought into the API. I explicitly removed
RuleApplication.findMatches() because the match finding is the job of
the engine. I do not want to have duplicate functionality in
RuleApplication and Engine!!!
The API for the match finding is as follows:
* Engine.findMatches(...) --> this returns an Iterable<Match>, so this
computes matches on-demand
* InterpreterUtil.findAllMatches(...) --> this returns a List<Match>
that contains all matches. It just uses the engine to find all matches
and puts them into list.
I believe this API is enough for finding matches. Please revert the change.
Christian
On 10/04/2012 06:00 PM, henshin-commits-request@xxxxxxxxxxx wrote:
Send henshin-commits mailing list submissions to
henshin-commits@xxxxxxxxxxx
To subscribe or unsubscribe via the World Wide Web, visit
http://dev.eclipse.org/mailman/listinfo/henshin-commits
or, via email, send a message with subject or body 'help' to
henshin-commits-request@xxxxxxxxxxx
You can reach the person managing the list at
henshin-commits-owner@xxxxxxxxxxx
When replying, please edit your Subject line so it is more specific
than "Re: Contents of henshin-commits digest..."
Today's Topics:
1. r1687 - in
trunk/plugins/org.eclipse.emf.henshin.interpreter/src/org/eclipse/emf/henshin/interpreter:
. impl (genie@xxxxxxxxxxx)
----------------------------------------------------------------------
Message: 1
Date: Thu, 4 Oct 2012 08:37:26 -0400 (EDT)
From: genie@xxxxxxxxxxx
To: henshin-commits@xxxxxxxxxxx
Subject: [henshin-commits] r1687 - in
trunk/plugins/org.eclipse.emf.henshin.interpreter/src/org/eclipse/emf/henshin/interpreter:
. impl
Message-ID: <20121004123726.C30DE2DCEFE@xxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8
Author: frieger
Date: 2012-10-04 08:37:26 -0400 (Thu, 04 Oct 2012)
New Revision: 1687
Modified:
trunk/plugins/org.eclipse.emf.henshin.interpreter/src/org/eclipse/emf/henshin/interpreter/RuleApplication.java
trunk/plugins/org.eclipse.emf.henshin.interpreter/src/org/eclipse/emf/henshin/interpreter/impl/RuleApplicationImpl.java
Log:
added findAllMatches() to RuleApplication
Modified: trunk/plugins/org.eclipse.emf.henshin.interpreter/src/org/eclipse/emf/henshin/interpreter/RuleApplication.java
===================================================================
--- trunk/plugins/org.eclipse.emf.henshin.interpreter/src/org/eclipse/emf/henshin/interpreter/RuleApplication.java 2012-09-23 14:28:47 UTC (rev 1686)
+++ trunk/plugins/org.eclipse.emf.henshin.interpreter/src/org/eclipse/emf/henshin/interpreter/RuleApplication.java 2012-10-04 12:37:26 UTC (rev 1687)
@@ -9,6 +9,8 @@
*/
package org.eclipse.emf.henshin.interpreter;
+import java.util.List;
+
import org.eclipse.emf.henshin.model.Rule;
/**
@@ -64,5 +66,10 @@
* @return The match for the result.
*/
Match getResultMatch();
+
+ /**
+ * Get all matches
+ */
+ List<Match> findAllMatches();
}
Modified: trunk/plugins/org.eclipse.emf.henshin.interpreter/src/org/eclipse/emf/henshin/interpreter/impl/RuleApplicationImpl.java
===================================================================
--- trunk/plugins/org.eclipse.emf.henshin.interpreter/src/org/eclipse/emf/henshin/interpreter/impl/RuleApplicationImpl.java 2012-09-23 14:28:47 UTC (rev 1686)
+++ trunk/plugins/org.eclipse.emf.henshin.interpreter/src/org/eclipse/emf/henshin/interpreter/impl/RuleApplicationImpl.java 2012-10-04 12:37:26 UTC (rev 1687)
@@ -9,6 +9,8 @@
*/
package org.eclipse.emf.henshin.interpreter.impl;
+import java.util.List;
+
import org.eclipse.emf.henshin.interpreter.ApplicationMonitor;
import org.eclipse.emf.henshin.interpreter.Assignment;
import org.eclipse.emf.henshin.interpreter.Change;
@@ -16,6 +18,7 @@
import org.eclipse.emf.henshin.interpreter.Engine;
import org.eclipse.emf.henshin.interpreter.Match;
import org.eclipse.emf.henshin.interpreter.RuleApplication;
+import org.eclipse.emf.henshin.interpreter.util.InterpreterUtil;
import org.eclipse.emf.henshin.model.Parameter;
import org.eclipse.emf.henshin.model.Rule;
import org.eclipse.emf.henshin.model.Unit;
@@ -322,5 +325,14 @@
public Assignment getResultAssignment() {
return resultMatch;
}
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.emf.henshin.interpreter.RuleApplication#findAllMatches()
+ */
+ @Override
+ public List<Match> findAllMatches() {
+ return InterpreterUtil.findAllMatches(engine, (Rule) unit, graph, partialMatch);
+ }
}
\ No newline at end of file
------------------------------
_______________________________________________
henshin-commits mailing list
henshin-commits@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/henshin-commits
End of henshin-commits Digest, Vol 17, Issue 1
**********************************************