Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

MDT on OSX (MAC)

MDT on OSX (MAC)

I installed the MDT plugging in eclipse.

I get the warning that it is no officially supported on OSX. Is this correct?

I also get the error "problems while communicating with the Open modelica compiler".
I use eclipse 4.2.0 and OMC 1.8.1.

OMEdit is working:-) So i assume the environment variables are set oké.
But i would like to use the features of MDT.

So the questions are: Should MDT work on the mac? If yes what should i check/adapt to get it working?

kind regards
Dick Barends

Re: MDT on OSX (MAC)

Hi,

To check if MDT connection to OMC is working you can open a .mo file and
see if in the status bar you have something like: OpenModelica Compiler 1.8.1+ (rNNNNN) is Online.

In general you can safely ignore "problems while communicating with the Open modelica compiler".

The sources are here:
https://openmodelica.org/svn/MDT/trunk/
user: anonymous
pass: none <-- write none here.
Feel free to hack them away.

Cheers,
Adrian Pop/

Re: MDT on OSX (MAC)

Hi,

I do get the "Openmodelica compiler null is online"

I use the following environment variables.
OPENMODELICAHOME=/opt/openmodelica
OPENMODELICALIBRARY=/opt/openmodelica/lib/omlibrary
Is this correct?

Dick

Re: MDT on OSX (MAC)

Hi,

Inside eclipse goto Windows->Preferences then select Modelica and then inside "OpenModelica Compiler (OMC) Binary" section choose "use custom binary" and specify the path where your omc is located.

Adeel.

Re: MDT on OSX (MAC)

Hi,

I did what you suggested, it did not work. I get the message listed below.

eclipse.buildId=I20120608-1400
java.version=1.6.0_33
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=nl_NL
Framework arguments:  -keyring /Users/dbarends/.eclipse_keyring -showlocation
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -keyring /Users/dbarends/.eclipse_keyring -showlocation

Error
Mon Jul 09 19:23:17 CEST 2012
Unable to read OpenModelica Compiler CORBA object from /tmp/openmodelica.dbarends.objid.mdt

org.modelica.mdt.core.compiler.ConnectException: Unable to read OpenModelica Compiler CORBA object from /tmp/openmodelica.dbarends.objid.mdt
    at org.modelica.mdt.omc.OMCProxy.readObjectFromFile(OMCProxy.java:194)
    at org.modelica.mdt.omc.OMCProxy.init(OMCProxy.java:450)
    at org.modelica.mdt.omc.OMCProxy.sendExpression(OMCProxy.java:534)
    at org.modelica.mdt.omc.OMCProxy.getCompilerVersion(OMCProxy.java:1064)
    at org.modelica.mdt.omc.OMCProxy.getCompilerName(OMCProxy.java:1084)
    at org.modelica.mdt.core.CompilerProxy.getCompilerName(CompilerProxy.java:187)
    at org.modelica.mdt.internal.core.ErrorManager.showCompilerError(ErrorManager.java:154)
    at org.modelica.mdt.ui.text.ModelicaCodeResolver.getClassAt(ModelicaCodeResolver.java:340)
    at org.modelica.mdt.ui.editor.ModelicaEditor.getElementAt(ModelicaEditor.java:821)
    at org.modelica.mdt.ui.editor.ModelicaEditor.computeHighlightRangeSourceReference(ModelicaEditor.java:766)
    at org.modelica.mdt.ui.editor.ModelicaEditor.selectionChanged(ModelicaEditor.java:638)
    at org.modelica.mdt.ui.editor.ModelicaEditor$EditorSelectionChangedListener.selectionChanged(ModelicaEditor.java:513)
    at org.eclipse.jface.text.TextViewer.firePostSelectionChanged(TextViewer.java:2755)
    at org.eclipse.jface.text.TextViewer.firePostSelectionChanged(TextViewer.java:2703)
    at org.eclipse.jface.text.TextViewer$5.run(TextViewer.java:2682)
    at org.eclipse.swt.widgets.Display.timerProc(Display.java:4697)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:5455)
    at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
    at org.eclipse.swt.widgets.Display.applicationNextEventMatchingMask(Display.java:4873)
    at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5239)
    at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
    at org.eclipse.swt.internal.cocoa.NSApplication.nextEventMatchingMask(NSApplication.java:94)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3613)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1022)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:916)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:585)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:540)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1438)

Re: MDT on OSX (MAC)

Hi,

Can you check if this file really exists /tmp/openmodelica.dbarends.objid.mdt ?
Also make sure that eclipse has rights to read this file.

Adeel.

Re: MDT on OSX (MAC)

Adeel: The file will *not* be generated in /tmp on OSX. The temp-directory on OSX is much more complicated (look into the sources for OMEdit to see where to look).

Re: MDT on OSX (MAC)

OMEdit uses Qt's default functions to get the temp directory for any platform. I was expecting that something similar was done in MDT as well, but surprisingly the /tmp/ value was hard coded there current/smile
I have fixed it now.

Adeel.

Re: MDT on OSX (MAC)

Update your MDT to 0.7.28.
From eclipse Help->Check for updates

Adeel.

Re: MDT on OSX (MAC)

Adeel,

It works:-) The compiler is recognized.

Thanks very much. It was late last night for you 2:55:48 (early morning).

Dick

Re: MDT on OSX (MAC)

Hi,

I tried to install MDT on my OSX mac.

The installation seems all well but the the when i open a new project , the modelica standard librarys are not being loaded. In the heirachy when i click on the library it is empty. I am not sure how to rectify it . In the binary in the Eclipse preference i have changed to 'use custom binary' and specified the path where omc is located.
Could you help me this ?

config details
OpenModelica 1.9.1
Eclipse 4.2.2

There are 0 guests and 0 other users also viewing this topic
You are here: