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 Auto-completion/ browsing for other libraries

MDT Auto-completion/ browsing for other libraries

It would be nice if there was auto-completion/ browsing for other libraries in addition to the Modelica standard library. Is there any way to configure the MDT eclipse plugin to do this?

Re: MDT Auto-completion/ browsing for other libraries

Hi,

I think it will work if you put the libraries in your project or
where the Modelica Standard Library is but I'm not 100%
sure.

Cheers,
Adrian Pop/

Re: MDT Auto-completion/ browsing for other libraries

Thanks Adrian,

I did attempt to add it on eclipse-indigo, but it won't let you add a new library to the project where msl is as far as I can tell. On eclipse-juno it lets you add things but it doesn't seem to work correctly. (running ubuntu 12.04)

Also the autocomplete wasn't working for packages that I was working on/ or for imported projects. The only things that work for me are auto-completing for the standard library, auto-completing within the same file, and words within a file with alt-/

I also attempted to download and build your eclipse-plugin but was having some trouble. There are many dependencies, do you have some guidance on this so I can help contribute.

-James

Re: MDT Auto-completion/ browsing for other libraries

Hi,

There are some issues with Modelica packages and MDT so autocomplete or lookup doesn't always work.
Mostly because we use loadFileInteractive instead of loadModel for the files in the project.

There are some documents on how to build MDT but some of them are rather outdated:
https://openmodelica.org/svn/MDT/trunk/docs
See MDT_building_a_new_version.pdf to see which projects you need to add to your workspace.

Unfortunately I don't have time now to update the build documents for MDT, maybe later.

Cheers,
Adrian Pop/

Re: MDT Auto-completion/ browsing for other libraries

Thanks, I got it building. I'll see what I can do to improve/ debug the auto-complete.

Re: MDT Auto-completion/ browsing for other libraries

Well wasn't too hard to get a new directory added, would  be nice if the user could add libraries manually though. Any idea how I could tie this into a menu of some sort where you could add library names.

svn diff OMCProxy.java
Index: OMCProxy.java
===================================================================
--- OMCProxy.java    (revision 1569)
+++ OMCProxy.java    (working copy)
@@ -1100,10 +1100,12 @@
        if (!systemLibraryLoaded) {
            if (standardLibraryPackages == null) {
                standardLibraryPackages = new ArrayList<String>();
                standardLibraryPackages.add("Modelica");
+                standardLibraryPackages.add("Modelica_LinearSystems2");
            }

            sendExpression("loadModel(Modelica)", true);
+            sendExpression("loadModel(Modelica_LinearSystems2)", true);

            systemLibraryLoaded = true;
        }

Re: MDT Auto-completion/ browsing for other libraries

Hi,

That's easy, see how ModelicaPreferencePage class is used.
Note that the compiler is exposed via CompilerProxy so you might need to add some methods to that interface and OMCProxy.
I can give you write access to the repository to push in your changes if you want, or you can send them to me via email (Adrian DOT Pop AT liu DOT se).

Cheers,
Adrian Pop/

Re: MDT Auto-completion/ browsing for other libraries

Hello,

I just downloaded and installed Open Modelica 1.8.1 and eclipse juno 4.2 classic, I followed all the instruction but code completion, goto definitions and type information display when hoovering does not work. The rest of the features work. Is this a known issue? Any ideas how to resolve this?

Thanks.

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