Skip to content

Commit

Permalink
Merge pull request #2275 from lf-lang/trace-plugin-property-fix
Browse files Browse the repository at this point in the history
Extensions to the trace-plugin property
  • Loading branch information
lhstrh authored May 11, 2024
2 parents 6f77b37 + 91c81f9 commit 422eb03
Show file tree
Hide file tree
Showing 28 changed files with 1,212 additions and 117 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,9 @@ private static Predicate<List<Diagnostic>> diagnosticsIncludeText(
*/
private void runTest(Path test) {
MockReportProgress reportProgress = new MockReportProgress();
MockCancelIndicator cancelIndicator = new MockCancelIndicator();
try {
builder.run(URI.createFileURI(test.toString()), false, reportProgress, () -> false);
builder.run(URI.createFileURI(test.toString()), "", false, reportProgress, cancelIndicator);
} catch (Exception e) {
e.printStackTrace();
throw e;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package org.lflang.tests.lsp;

import org.eclipse.xtext.util.CancelIndicator;

/**
* Mock the CancelIndicator interface for testing.
*
* @author Erling Jellum
*/
public class MockCancelIndicator implements CancelIndicator {
@Override
public boolean isCanceled() {
return false;
}
}
4 changes: 2 additions & 2 deletions core/src/main/java/org/lflang/LinguaFranca.xtext
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ Watchdog:
'watchdog' name=ID '(' timeout=Expression ')'
('->' effects+=VarRefOrModeTransition (',' effects+=VarRefOrModeTransition)*)?
code=Code;

STP:
'STP' '(' value=Expression ')' code=Code;

Expand All @@ -232,7 +232,7 @@ Instantiation:
(attributes+=Attribute)*
name=ID '=' 'new' (widthSpec=WidthSpec)?
reactorClass=[ReactorDecl] ('<' typeArgs+=Type (',' typeArgs+=Type)* '>')? '('
(parameters+=Assignment (',' parameters+=Assignment)*)?
(parameters+=Assignment (',' parameters+=Assignment)*)?
')' (('at' host=Host ';') | ';'?);

Connection:
Expand Down
Loading

0 comments on commit 422eb03

Please sign in to comment.