system/src/sc/layer/LayeredSystem.java
public Object reparseSrcBuffer(SrcEntry srcEnt, ILanguageModel oldModel, boolean enablePartialValues, String buffer, boolean dummy, boolean doInit) {
      IParseNode pnode = oldModel.getParseNode();
      if (pnode == null)
         return parseSrcBuffer(srcEnt, enablePartialValues, buffer, dummy, doInit);

      long modTimeStart = srcEnt.getLastModified();
      IFileProcessor processor = getFileProcessorForSrcEnt(srcEnt, null, false);
      if (processor instanceof Language) {
         Language lang = (Language) processor;
         Object result = ParseUtil.reparse(oldModel.getParseNode(), buffer);
         if (result instanceof ParseError) {
            if (enablePartialValues) {
               Object val = ((ParseError) result).getRootPartialValue();
               initNewBufferModel(srcEnt, val, modTimeStart, dummy, true, doInit);
            }
            return result;
         }
         else {
            Object modelObj = ParseUtil.nodeToSemanticValue(result);

            if (!(modelObj instanceof IFileProcessorResult))
               return modelObj;

            if (modelObj instanceof JavaModel) {
               TypeDeclaration td = ((JavaModel) modelObj).getModelTypeDeclaration();
               if (td != null && td.typeName == null)
                  System.err.println("**** Reparsed buffer has null type name!");
            }

            initNewBufferModel(srcEnt, modelObj, modTimeStart, dummy, true, doInit);

            return modelObj;
         }
      }
      throw new IllegalArgumentException(("No language processor for file: " + srcEnt.relFileName));
   }
/**
    * For IDE-like operations where we need to parse a file but using the current-in memory copy for fast model validation.  This method
    * should not alter the runtime code model
    */
For IDE-like operations where we need to parse a file but using the current-in memory copy for fast model validation.  This method
should not alter the runtime code model
For IDE - like operations where we need to parse a file but using the current - in memory copy for fast model validation . This method should not alter the runtime code model
public Object reparseSrcBuffer(SrcEntry srcEnt, ILanguageModel oldModel, boolean enablePartialValues, String buffer, boolean dummy, boolean doInit) {
      IParseNode pnode = oldModel.getParseNode();
      if (pnode == null)
         return parseSrcBuffer(srcEnt, enablePartialValues, buffer, dummy, doInit);
      long modTimeStart = srcEnt.getLastModified();
      IFileProcessor processor = getFileProcessorForSrcEnt(srcEnt, null, false);
      if (processor instanceof Language) {
         Language lang = (Language) processor;
         Object result = ParseUtil.reparse(oldModel.getParseNode(), buffer);
         if (result instanceof ParseError) {
            if (enablePartialValues) {
               Object val = ((ParseError) result).getRootPartialValue();
               initNewBufferModel(srcEnt, val, modTimeStart, dummy, true, doInit);
            }
            return result;
         }
         else {
            Object modelObj = ParseUtil.nodeToSemanticValue(result);
            if (!(modelObj instanceof IFileProcessorResult))
               return modelObj;
            if (modelObj instanceof JavaModel) {
               TypeDeclaration td = ((JavaModel) modelObj).getModelTypeDeclaration();
               if (td != null && td.typeName == null)
                  System.err.println("**** Reparsed buffer has null type name!");
            }
            initNewBufferModel(srcEnt, modelObj, modTimeStart, dummy, true, doInit);
            return modelObj;
         }
      }
      throw new IllegalArgumentException(("No language processor for file: " + srcEnt.relFileName));
   }
public Object reparseSrcBuffer ( SrcEntry srcEnt , ILanguageModel oldModel , boolean enablePartialValues , String buffer , boolean dummy , boolean doInit ) { IParseNode pnode = oldModel . getParseNode ( ) ; if ( pnode == null ) return parseSrcBuffer ( srcEnt , enablePartialValues , buffer , dummy , doInit ) ; long modTimeStart = srcEnt . getLastModified ( ) ; IFileProcessor processor = getFileProcessorForSrcEnt ( srcEnt , null , false ) ; if ( processor instanceof Language ) { Language lang = ( Language ) processor ; Object result = ParseUtil . reparse ( oldModel . getParseNode ( ) , buffer ) ; if ( result instanceof ParseError ) { if ( enablePartialValues ) { Object val = ( ( ParseError ) result ) . getRootPartialValue ( ) ; initNewBufferModel ( srcEnt , val , modTimeStart , dummy , true , doInit ) ; } return result ; } else { Object modelObj = ParseUtil . nodeToSemanticValue ( result ) ; if ( ! ( modelObj instanceof IFileProcessorResult ) ) return modelObj ; if ( modelObj instanceof JavaModel ) { TypeDeclaration td = ( ( JavaModel ) modelObj ) . getModelTypeDeclaration ( ) ; if ( td != null && td . typeName == null ) System . err . println ( "**** Reparsed buffer has null type name!" ) ; } initNewBufferModel ( srcEnt , modelObj , modTimeStart , dummy , true , doInit ) ; return modelObj ; } } throw new IllegalArgumentException ( ( "No language processor for file: " + srcEnt . relFileName ) ) ; }
For IDE-like operations where we need to parse a file but using the current-in memory copy for fast model validation.
For IDE - like operations where we need to parse a file but using the current - in memory copy for fast model validation .