Ejemplo n.º 1
0
        public void buildModel(Knowledge.Editor.AddIn.Environment environment)
        {
            log.Debug(" building model ... ");

            data = new KnowledgeAdapter();
            data.parse(environment);

            log.Debug(" model built. ");
        }
Ejemplo n.º 2
0
        public void parse(Knowledge.Editor.AddIn.Environment environment)
        {
            log.Debug(" parsing model ... ");

            try
            {
                string filepath = KnowledgeAdapter.getKnowledgeFilePath(environment);

                ExpComp.Clear();
                Scanner scanner = new Scanner(filepath);
                ExpComp.parser = new Parser(scanner);
                ExpComp.parser.Parse();

                KnowledgeAdapter.filepath = filepath;
                isEmpty = false;

                log.Debug(" building model successed. ");
            }
            catch (Exception e)
            {
                log.Debug(" building model failed. " + e);
            }
        }