How to import MPS Plugin Project as MPS projects

Hi All,

I have a basic question. I want to see the complete implementation of MPS default plugins such as Java Integrations,MPS Build Language etc. I found the MPS plugins on github and cloned to my computer.How do I Import them to MPS  as MPS project so that I can see all Actions,Groups Nodes etc? Any suggestion.


Cheers
0
18 comments
Hi Kunal,

do you mean you cloned the MPS project from https://github.com/JetBrains/MPS ?

In that case you need to follow these instructions:
1. Clone MPS
2. Open the project in IntelliJ IDEA (either Community or Ultimate Edition)
3. Rebuild the project from the Build menu (will take quite a while the first time)
4. Run the MPSLauncher run configuration in the Run menu
5. Once MPS starts, open the MPS project (point MPS to the root folder of what you've cloned)

Vaclav
0
Avatar
Permanently deleted user
Hi Vaclav,

I want to build the MPS project. I did the same thing as you suggested in the above post,But I am getting lot of errors when i Rebuild the project from the Build menu, Do we need to have any prerequisites for building it. please let me know

Here i am attaching the screen shot for reference.


Thanks
raj
0
Unfortunately, I do not see the screen-shot. I guess you need to insert a link to the attachment using the wiki syntax.
0
Avatar
Permanently deleted user
Untitled.png
  

I have attached the screen shot. please let me know the issues.

Thanks
Raj
0
It is hard to guess from the image. Could I ask you for a full stack trace?
Also, which version of IntelliJ IDEA are you using?
0
Avatar
Permanently deleted user
Hi Vaclav,

I am using Intellij 14.0.2 version.

please find the stack trace here.
stacktrace.txt (20KB)
0
Hi Raj,

I suspect your IDEA has a different (older?) version of Ant jar files configured as a global library. Could this be the case?
(You need to check "Global Libraries" in the "File -> Project Structure" menu.)

To me it seems all the errors indicate differences between expected and existing API of the Ant classes.

Vaclav
0
Avatar
Permanently deleted user
Hi vaclav,

I have checked the global libraries in the project structure menu, It shows me (Nothing is here), do we need to configure any other things. i am still facing problems while setting up the MPS in intellij idea, Are there any pre requisites for setting the project.

globallib.png
0
Avatar
Permanently deleted user
Hey Vaclav,

FYI

I have followed following steps while setting up the mps project,
1)cloned the mps and imported in the intelij idea 14.02 version
2)Next step :Created the project from the existing sources i have selected,

process1.png


3)Next step: SDK selection I have choosen(Intellij platform SDK).

sdkselection.png


4)Next step: Selection of module project structure, It pops up with the dialog saying File already Exist( overwrite or Reuse) I selected Reuse.

module dependencies.png


5) Finally searched for the frameworks it showed nothing is found. then I click on the finish it pops with the dialog saying  (Actions-runtime already exist)

antruntime.png


After Finishing I was facing the issues that i mentioned in the above thread,please let me know do i need to do any setup for importing the mps project.


Thanks,
Raj
0
You should not need to import the project into IDEA. The cloned repository is already an IntelliJ IDEA project, you only need to open it in IDEA - File -> Open (point to the directory of the mps project). No further steps should be necessary.
0
Avatar
Permanently deleted user
Hi Vaclav,
Thanks for the reply. We are able to build and compile the project but while running as MPS Launcher , I am getting below Exception:
Internal error. Please report to http://youtrack.jetbrains.com
com.intellij.ide.plugins.PluginManager$StartupAbortedException: java.lang.ClassNotFoundException: jetbrains.mps.MPSMainImpl
    at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:94)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: jetbrains.mps.MPSMainImpl
    at com.intellij.util.lang.UrlClassLoader.findClass(UrlClassLoader.java:148)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:190)
    at com.intellij.ide.plugins.PluginManager$2.run(PluginManager.java:87)

    ... 1 more


Any clue how this would be fixed?

Cheers
0
Avatar
Permanently deleted user
Hi Kunal
Are you sure project was successfully built? Just guessing: please try
git clean -dfx
in project dir and then re-build the project.
0
Avatar
Permanently deleted user
Hi,
I cleaned and Re-Built the Project and still same error comes while Running.

I can see the MPSMainImpl.class file in mps-workbench/jetbrains.mps.ide/classes/jetbrains.classes.

Any Idea, what may be causing this?

FYI, I am using jdk1.7.0_60

Thanks
0
Avatar
Permanently deleted user
Hi,
I got some clue , I am giving 1024m as heap memory, do I need to give more space for IntelliJ to search the MPSMainImpl.class. Is there anything related to this.?
0
Avatar
Permanently deleted user
Below is VM Argument for MPSLauncher
-client -ea -Xmx1024m -XX:PermSize=250m -Dmps.internal=true -XX:+HeapDumpOnOutOfMemoryError -Dapple.laf.useScreenMenuBar=true -Dcom.apple.mrj.application.apple.menu.about.name="JetBrains MPS" -Dapple.awt.graphics.UseQuartz=true -Didea.paths.selector=MPSSRC32
0
Avatar
Permanently deleted user
Hi, We tried with JDK 1.7.60 with 64 bit and 32 bit on 4 Machines, Out of which on only system MPSLauncher worked and rest all while running give same Exception. Does anyone have any clue for this?

Thanks
0
The project GitHub page https://github.com/JetBrains/MPS mentions that only JDK 5 and 6 are supported at the moment. I'm guessing that on JDK 7 things may go wrong sometimes. Could you please test on JDK 6?
0
Avatar
Permanently deleted user
Thanks , It worked Perfectly :)
0

Please sign in to leave a comment.