dsl

Cannot add libraries to xtext Project in Eclipse (returns error)

萝らか妹 提交于 2019-12-11 04:13:36
问题 Firstly, I created an xtext project using default values (with the simple Greetings grammar which comes as an example). I created then a .java file with some code (that can be seen below) and added it to the validation folder. I have loaded some jars to the build path as I would do in a normal Java Project. If I run my specific java file as a standalone it will load the libraries and run the code. The java file is quite simple: import org.semanticweb.owlapi.apibinding.OWLManager; import org

How do I reference a diagram in a DSL T4 template?

时光总嘲笑我的痴心妄想 提交于 2019-12-11 02:32:15
问题 Google's not coming to my rescue, here, and I just know this is the perfect place to ask. I'm writing a custom DirectiveProcessor for a DSL and I want to be able to access a diagram from within my T4 template. Within my DirectiveProcessor, I've loaded the domain model and my diagram using (wait for it...) LoadModelAndDiagram(...). So, now the diagram's loaded into the default partition in the Store, but I can't for the life of me work out how to resolve a reference to it later. Can anyone

How to get Rosenbrock23 to work with ODE in ParameterizedFunctions.jl DSL?

*爱你&永不变心* 提交于 2019-12-11 02:28:04
问题 Further to this question, I have the same model implemented in ParameterizedFunctions.jl DSL. The following MWE works: using DifferentialEquations using Plots # Modeling a consecutive / parallel reaction in a CSTR # A --> 2B --> C, C --> 2B, B --> D # PETERSEN-Matrix # No. A B C D Rate # 1 -1 2 k1*A # 2 -2 1 k2*B*B # 3 2 -1 k3*C # 4 -1 1 k4*B fpr! = @ode_def ConsecutiveParallelReaction begin dA = -k_1*A + q_in/V_liq*(A_in - A) dB = 2*k_1*A - 2*k_2*B*B + 2*k_3*C - k_4*B + q_in/V_liq*(B_in - B)

Cannot open workspace-external file in Xtext-based plugin

我的梦境 提交于 2019-12-11 01:27:36
问题 I'm developing an Eclipse Plugin with support for my DSL using the Xtext framework. When I try to open a file on my system with the matching file extension .gf — but which is not in my workspace — I get the following: 0 [main] ERROR org.eclipse.xtext.ui.editor.CompoundXtextEditorCallback - Was configured with another client or not configured at all. java.lang.IllegalStateException: Was configured with another client or not configured at all. at org.eclipse.xtext.ui.editor

Object methods call without parentheses

ぐ巨炮叔叔 提交于 2019-12-10 20:55:30
问题 Is it possible to call an object method without parentheses, after import it ? Here is my test code, based on this article by Martin Odersky: package gardening.fruits object PrintPlanted { def main(args: Array[String]) { // Call method on object import gardening.fruits fruits showFruit(apple) fruits showFruit apple // Import object import gardening.fruits._ showFruit(apple) // showFruit apple // Error: missing arguments for method showFruit in package fruits; // follow this method with `_' if

Headerenricher Spring Integration and java dsl

不问归期 提交于 2019-12-10 20:52:00
问题 I'me using Spring Integration and java dsl specifications to implement my IntegrationFlow. I want to use an custom header enricher to add some file names to the header, it will be something like : public class FileHeaderNamingEnricher { public Message<File> enrichHeader(Message<File> fileMessage) { // getting some details fom the database ... return messageBuilder .setHeader("filename", "somestuff") .build(); } } And my Integration flow will look like : public IntegrationFlow myflow() {

Spring Integration Java DSL - How to invoke int-http:outbound-gateway?

爱⌒轻易说出口 提交于 2019-12-10 17:35:47
问题 I have a piece in the flow where a ReST API call is made: <int:channel id="requestChannel"/> <int-http:outbound-gateway request-channel="requestChannel" reply-channel="logger" url="${api.base.uri}/data" http-method="PUT" expected-response-type="java.lang.String"/> <int:logging-channel-adapter id="logger" logger-name="logger" expression="payload" level="INFO"/> I'm trying to replicate this using Java DSL but could not find adequate documentation. Any help would be much appreciated. 回答1: Right,

Xtext 2.9 scope provider

假装没事ソ 提交于 2019-12-10 14:52:19
问题 Xtext 2.9 changed the way scope providers work and I don't understand how they work now. Let's say I have the following grammar: grammar org.xtext.example.mydsl.MyDsl with org.eclipse.xtext.common.Terminals generate myDsl "http://www.xtext.org/example/mydsl/MyDsl" Model: ((things+=Thing) | (refs+=Reference))* ; Thing: 'thing' name=ID '{' stuff += Stuff* '}' ; Stuff: 'stuff' name=ID ; Reference: 'reference' thing=[Thing] stuff=[Stuff] ; For the Reference clause to work, I need a scope provider

Jenkins DSL script - Test Failure - Found multiple extensions which provide method lastCompleted

最后都变了- 提交于 2019-12-10 11:56:15
问题 Trying to create multijobs in Jenkins with DSL scripting. There are multiple jobs in a phase and I want to create a consolidated report for the multijob from downstream jobs. I am using copy artifact to copy the results of downstream jobs to the multijob's target dir. Using selector - lastCompleted() However I am getting this an error saying multiple extensions providing the method and tests are failing. lastCompleted() is apparently present in copyArtifact and multijob plugins where in this

Code parser for own DSL in C# [closed]

人走茶凉 提交于 2019-12-10 11:23:54
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . I'm looking for something like flex/bison that works with C# code. I want to be able to provide some language descriptors and a parser