Changeset 843 for trunk/modelicaml


Ignore:
Timestamp:
06/24/11 13:21:17 (13 years ago)
Author:
wschamai
Message:

Validation update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modelicaml/org.openmodelica.modelicaml.editor.xtext.modeleditor/src/org/openmodelica/modelicaml/editor/xtext/model/validation/ModeleditorJavaValidator.java

    r594 r843  
    2626            dotPath = dotPath + ref1DotPath;
    2727        }
    28         if ( !cList.contains(dotPath) ) {
     28        // TODO: do not raise errors for functions from the MSL because there is no validation yet.
     29        // i.e. there is no list of MSL functions available for code completion validation.
     30        if ( !dotPath.startsWith("Modelica.") && !dotPath.startsWith(".Modelica.")
     31                && !cList.contains(dotPath) ) {
    2932            error("component_reference '" + dotPath + "' cannot be resolved to a class component", ModeleditorPackage.COMPONENT_REFERENCE);
    3033        }
     
    3942        cList.addAll(ModelicaMLContentAssist.getTypeSpecifierSortedList()); // use for redeclare in modifications ...
    4043       
    41         if ( !cList.contains(cr.getName_ID()) ) {
     44        // TODO: do not raise errors for functions from the MSL because there is no validation yet.
     45        // i.e. there is no list of MSL functions available for code completion validation.
     46        if ( !cr.getName_ID().startsWith("Modelica.") && !cr.getName_ID().startsWith(".Modelica.")
     47                && !cList.contains(cr.getName_ID()) ) {
    4248            error("name '" + cr.getName_ID() + "' cannot be resolved", ModeleditorPackage.NAME__NAME_ID);
    4349        }
Note: See TracChangeset for help on using the changeset viewer.