Ignore:
Timestamp:
02/03/06 17:17:47 (19 years ago)
Author:
boris
Message:
  • added a 'parent package' field to new package dialog and implemented infrastructure to be animate it among others:
  • IModelicaProject.getPackageRoots() method to fetch all top level package in a project
  • IModelicaProject.getPackage() method to fetch a package by its full name
  • IModelicaProject.findElement() method to fetch project's elements by path
  • modelica source files are now wraped by IModelicaSourceFile
  • plain files are now wraped by IModelicaFile inside a modelica project
  • an abstract wizard page superclass NewTypePage? added wich implemets source and parent package fields which are used in createing new classes/packages
  • some other stuff i forgot about, this kinda got out of hand, smaller commits in the future !
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/org.modelica.mdt.test/src/org/modelica/mdt/test/TestModelicaRoot.java

    r285 r288  
    22 * This file is part of Modelica Development Tooling.
    33 *
    4  * Copyright (c) 2005, Linköpings universitet, Department of
     4 * Copyright (c) 2005, Linkpings universitet, Department of
    55 * Computer and Information Science, PELAB
    66 *
     
    2323 *   distribution.
    2424 *
    25  * * Neither the name of Linköpings universitet nor the names of its
     25 * * Neither the name of Linkpings universitet nor the names of its
    2626 *   contributors may be used to endorse or promote products derived from
    2727 *   this software without specific prior written permission.
     
    138138        TestModelicaRoot.class.getName() + "_MOD";
    139139
     140    /* name of a non existent project */
     141    private static final String PROJECT_NAME_NON_EXISTENT =
     142        TestModelicaRoot.class.getName() + "_NON_EXISTENT";
     143
     144   
    140145    private IWorkspaceRoot workspaceRoot =
    141146            ResourcesPlugin.getWorkspace().getRoot();   
     
    184189    }
    185190   
    186     public void testProjectsEnumeration() throws CoreException
     191    /**
     192     * Test if IModelicaRoot.getProjects() (implemented by ModelicaRoot)
     193     * works as prescribed.
     194     */
     195    public void testGetProjects() throws CoreException
    187196    {
    188197 
     
    211220        }
    212221    }
     222   
     223    /**
     224     * Test if IModelicaRoot.getProject() (implemented by ModelicaRoot)
     225     * works as prescribed.
     226     */
     227    public void testGetProject()
     228    {
     229        IModelicaProject proj;
     230       
     231        proj = modelicaRoot.getProject(PROJECT_NAME_1);
     232        assertEquals(PROJECT_NAME_1, proj.getElementName());
     233       
     234        proj = modelicaRoot.getProject(PROJECT_NAME_3);
     235        assertEquals(PROJECT_NAME_3, proj.getElementName());
     236
     237        proj = modelicaRoot.getProject(PROJECT_NAME_2);
     238        assertEquals(PROJECT_NAME_2, proj.getElementName());
     239       
     240        proj = modelicaRoot.getProject(PROJECT_NAME_NON_EXISTENT);
     241        assertNull("hmm, an non-existent project found?", proj);
     242    }
     243   
    213244   
    214245    /**
Note: See TracChangeset for help on using the changeset viewer.