Changeset 269


Ignore:
Timestamp:
01/20/06 13:23:58 (19 years ago)
Author:
boris
Message:
  • changed the way modelica system library packages are handled for increased flexibility
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/org.modelica.mdt.omc/src/org/modelica/mdt/omc/OMCProxy.java

    r263 r269  
    8585    /* indicates if the Modelica System Library has been loaded */
    8686    private boolean systemLibraryLoaded = false;
     87
     88    private String[] standardLibraryPackages = { "Modelica" };
    8789   
    8890    /* should we trace the calls to sendExpression? */
     
    499501        {
    500502            System.out.println("<< " + tokenizer.nextToken());
    501         }
    502     }
    503 
    504     /**
    505      * Loads in the Modelica System Library.
    506      * @throws ConnectException if we're unable to start communicating with
    507      * the server
    508      */
    509     public void loadSystemLibrary()
    510         throws ConnectException
    511     {
    512         if (!systemLibraryLoaded)
    513         {
    514             sendExpression("loadModel(Modelica)");
    515             systemLibraryLoaded = true;
    516503        }
    517504    }
     
    745732        return "OpenModelica Compiler";
    746733    }
     734
     735    /**
     736     * Loads in the Modelica System Library and returns names of the top-level
     737     * packages.
     738     * 
     739     * @throws ConnectException if we're unable to start communicating with
     740     * the server
     741     */
     742    public String[] getStandardLibrary() throws ConnectException
     743    {
     744        if (!systemLibraryLoaded)
     745        {
     746            sendExpression("loadModel(Modelica)");
     747            systemLibraryLoaded = true;
     748        }
     749
     750        return standardLibraryPackages;
     751    }
    747752}
Note: See TracChangeset for help on using the changeset viewer.