Messages

Hi Askar,

ad 1: Yes we applied a bottom up approach. We do not intend to create an even less-tech DSL. Working with our toolset requires Programming Skills on Visual Basic level. :)

ad 2: We have a documentation pdf and i can provide some screenshots. It seems that you have read older blog posts. The DSL's have changed a lot. Only the slides on the second post are up to date! Regarding scheme meta, we have a parser which translates SQL desc <<tablename>> commands, so an import from a sql db is possible..

ad 3: We do not model scheme revisions right now, since we use git for version control. However, scheme revisions wont be a problem, since schemes are modeled explecitly.

Getting the DSL right took us almost 2 years. But we are also developing applications to develop know-how. With a Team of 3 sw-engineers we developed the DSL and 4 apps in 2 Years ...

Best,
Dan

    • Apr 02
Hi Community,

i created a concept "Test" which is derived from baselang.ClassConcept. The generator will create a java class with a main() method, so that the class can be executed.


What is the simplest way to execute it directly within mps with a right click - like in the case of classconcepts containing a main().

Best,
Dan

Hi Askar,

we have developed a full stack for modelling business apps. for the past 2 years. UI / Mapping / Process and Commands. Some Information can be found at modellwerkstatt.org. Some docs are also available, although in german only ...

Instead of an ORM, we use simple code to map objects to tables. Object graphs are assembled from the DB manually ...

Best,
Dan

    • Jan 23
Hi MPS Pros,

when writing throw new Exceptin() in a InstanceMethod,
one get s the errormessage "Error: uncaught Exceptions: Exception"

i have concept MyStatement which extends Statement. The MyStatement can throw an Exception in the generated code. I already checked the code of the ThrowStatement but did not figure out how i can get the errormessage to appear..

Any hints?
Dan

My Code

public boolean isGuardClauseStatement()
overrides Statement.isGuardClauseStatement {
true;
}

public void collectUncaughtMethodThrowables(set<node<Classifier>> throwables, boolean ignoreMayBeThrowables)
overrides Statement.collectUncaughtMethodThrowables {
node<Expression> exp = <new Exception()>;
if (!(ignoreMayBeThrowables)) {
Statement.collectUncaughtMethodThrowables(throwables, exp);
}

throwables.add(exp.type : ClassifierType.classifier);

}

    • Dec 11
Hi Mps-Team,

i have a situation where i do not find a simple solution.

i have a $LOOP$ macro around a statement $LOOP$[->[localvariable].->[setterMethod()];]
As can be seen, there are two reference macros. The last reference can simply calculated from the single input-model nodes, the loop macro is providing.

but the first reference macro needs information outside the loop... however, the information can not be retrived by using ancestor<>...


how can i set e.g. a string, when calculating the $LOOP$ and pass it to the first reference?

or is there a better solution to this problem?
Dan

Hi Mihail,

thanks for your answers - long time ago we met in cambridge :)

i have not project, nor a operationContext in "intentions" .. only editor and node itself ...

Dan

Mh. i use mps 2.0.6 ... i do not have a static method editNode ...

    • 11/08/12
Hi MPS Team,

just a simple question i did not found in the userguid..

I have a concept "Command" which is defined as root concept. I added an Intention "CreateCommand" to my other concepts, in order to create commands on the fly by ALT-Enter.

It would be very nice, if i can open the command in a tab, after creating it.. how can i achieve that? I guess editorContext is the solution, but i did not find an apropriate method.


editorContext.selectNode(myCommand) did not do the job...

Best,
Dan

    • 10/24/12
Hi Mps-Team,

i have build a language L1 (concepts, editor, typesystem, etc) and a language L2 with the code generator (only generator). However, when runnig "Preview generated text" nothing appears.

I just added both languages to my source-model1 ...

Whats wrong? Did i miss something to switch on?
Daniel

Ps. Acutally, i have also a generator in L1, i added a dependence in the L2 generator to the L1 generator, priority=run strictly with ... but when having a look at the mapping partionings, L2 does not appear at all ...

Hi Alex,

thanks a lot -> "Languages engaged in generation" is exactly what i was looking for ...

Dan

    • 10/12/12
Hi,

guess this is a more difficult question to answer .. hope there is still an (easy) solution available :)

(1) I have a concept MyStatementList extending StatementList.
(2) I can use MyStatementList in a simple java class

MyStatementList {
FileInputStream f = new FileInputStream("dan");
}

(3) Of course, MPS will now mark the 'new FileInputStream(" ")' with
'uncaught Excpetion "java.io.FileNotFoundException"'

(4) I will catch that exception in the code-generator. So how can i add some support to
MyStatementList in order to mark the Exception as catched?


I guess this is not easily possible. I checked the try/catch ... lots of code ...


Dan

    • 10/05/12
Hi Mps - Professionals,

just a simple question. In my model i have imported the joda.org.* (just as example). Thus the DateTime class is available. How can i get easily and FAST a reference to the classifier. I need to construct a ClassifierType

node<ClassifierType> ct = new node<ClassifierType>
ct.classifier = SomeSpecialScopeClass.getClassifierByName("joda.org.DateTime")

Best from Austria
Dan

    • 07/20/12
Hi MPS Team,

although changes in the refactoring language were documentated by vaclav at http://confluence.jetbrains.net/display/MPSD25/Refactoring

i can not follow the explanation. I tried to migrate one refactoring but i can not find jetbrains.mps.ide.actions.NodeRefactoring. What is a ui action? A plugin action? I also found no isApplicable clause to the action created ....

Can someone come up with a simple example? Or an example at baselang where i can see how things have to get done?


Dan

Well that enhancement script sounds good to me. On one hand, undeclared properties are visible in the solutions and marked as errors - that is basically correct. On the other hand i can remove them on purpose with the script. For me, this is an ideal solution.

    • 07/04/12
Hi Mps-Team,

i have a very special questions:
(1) If i have a concept "MyConcept" with a boolean property mybool
(2) and there are already instances of MyConcept in some solutions
(3) and i remove the mybool property in the MyConcept

then instances of MyConcept in the solution get red underlined with the message saying "Error: undeclared property mybool"

How can i avoid that - or automatically refactor it in a way, that the mybool gets deleted in the instances ?

Best,
Dan

Ok, seems that in most cases, the <?xml is optional in xml files anyway...

Hi Mihail,

thanks for your patience. well im using it in a refactoring.

refactor(refectoringContext)->void {
sequence<node<Column>> columns = refactoringContext.node.getColumnOfThisProject();


CodeBookGuesser_WordList guesser = new CodeBookGuesser_WordList(refactoringContext.project, columns.toList);

ProgressManager.getInstance().run(guesser);

refactoringContext.node.model.add root(guesser.getCodebook());

}

I do not get a stacktrace - mps simply hangs up...

Mh - i see. But how can i handle this situation in MPS?

public void run(@NotNull() ProgressIndicator indicator) {
init(indicator);
int numColumns = columns.size;

setTotalSteps(indicator, numColumns);

// no problem until here - process and indicator have to be set up in some way..

// now start processing ... read something from the model, e.g. columname
// and expose this name to the indicator for user ...
for (int i = 0; i < columns.size; i++) {
string colName = "";
read action {
colName = columns.get(0).name;
}
indicator.setText("Processing words in column ");

// do time consuming operation here ...
waitASecond();
// done ....
oneMoreStep(indicator);
}

end(indicator);
}

Hi Mps-Team,

Is there any solution to generate the first line within xml language ?

<?xml version="1.0"?>
<!DOCTYPE Gruss [
<!ELEMENT Gruss (#PCDATA)>
]>
<Gruss>Hallo Jupiter!</Gruss>

Best,
Dan

I see,

but then - what could be my problem. no exception - nothing. Is the lock the problem? Or better ... is the read action a blocking statement ?


public void run(@NotNull() ProgressIndicator indicator) {
init(indicator);
int numColumns = columns.size;


setTotalSteps(indicator, numColumns);

for (int i = 0; i < columns.size; i++) {
string colName = "";
read action {
colName = columns.get(0).name;
}

indicator.setText("Processing words in column ");
indicator.setText2("" + i + "/" + numColumns + " ");

waitASecond();
oneMoreStep(indicator);
}

end(indicator);
}

cause now i m locked away.. i need to increment the progress and also access the model.. so this does not work inside of the run() @ Task.Modal

read action {
colName = columns.get(0).name;
}
indicator.setText("Processing words in column " + colName);


seems that read action also spans a thread ... when i remove the read action, everything is fine...

Dan

Ok,

i ll look for an ideal use case to make the point.

Regarding the ProgressManager.getInstance().run(...), where i passed a Task.Modal(), can i simply pass in the model also and edit around in the model (in the thread of the Task?) ?? Is that okay, or should i do that differently?

Dan