Using existing libraries in MPS

Hi!

I am wondering, if it is possible to "import" jar files into MPS projects, so they could be used in TemplateDeclarations and ConceptDeclarations?

I saw that MPS comes with models for some libraries (/models -> junit, jdom). So, if i cannot import jar files into MPS project, then another option would be creation of a model for the desired lib and then import it into the project. If this is the case, then the question is whether this model could be generated automatically?

Thanks in advance,

Anton

4 comments
Comment actions Permalink

Hello, Anton,

> I am wondering, if it is possible to "import" jar files into MPS

> projects, so they could be used in TemplateDeclarations and

> ConceptDeclarations?

To import something from existing class files use import -> import

class/ import package menu. Currently MPS can't import jar files, but

you can extract them to classes folder of IDEA project that you are

using with MPS, and import after that.

0
Comment actions Permalink

i thought that i should do something like this, but the problem is that when i choose Import -> import class/import package opens modal window, where i cant enter the class/package name and select Model Root and the Model Root selection is empty.

It seems like this a manadatory field since if i leave it empty and push OK button, then nothing happens. I just cant figure out what should i do to be able to select something from the Model Root selection.

0
Comment actions Permalink

i thought that i should do something like this, but

the problem is that when i choose Import -> import

class/import package opens modal window, where i cant

enter the class/package name and select Model Root

and the Model Root selection is empty.

Sorry, should be

... opens modal window, where i CAN enter the class/package name ...

The rest stays the same ;-)

0
Comment actions Permalink

Anton Litvinenko wrote:

i thought that i should do something like this, but the problem is

that when i choose Import -> import class/import package opens modal

window, where i cant enter the class/package name and select Model

Root and the Model Root selection is empty.

It seems like this a manadatory field since if i leave it empty and

push OK button, then nothing happens. I just cant figure out what

should i do to be able to select something from the Model Root

selection.

In project properties when you select root you can see in its inspector

field IsSynchronizedWithJava. Set it to true and you can select in

import dialog what you want.

P.S. In next build this functionality will be reorganazied.

0

Please sign in to leave a comment.