Example #1
0
        /// <summary>
        /// Creates a new node provider
        /// </summary>
        /// <param name="parser"></param>
        /// <param name="buffer">buffer to watch</param>
        public NodeProvider(IProjectHandler project, string filename, NDjango.TypeResolver.ITypeResolver type_resolver)
        {
            Project = project;
            this.type_resolver = type_resolver;
            Filename = filename;

            // we need to run rebuildNodes on a separate thread. Using timer
            // for this seems to be an overkill, but we need the timer anyway so - why not
            parserTimer =
                new Timer(rebuildNodes, null, 0, Timeout.Infinite);
        }
Example #2
0
        /// <summary>
        /// Creates a new node provider
        /// </summary>
        /// <param name="parser"></param>
        /// <param name="buffer">buffer to watch</param>
        public NodeProvider(IProjectHandler project, string filename, NDjango.TypeResolver.ITypeResolver type_resolver)
        {
            Project            = project;
            this.type_resolver = type_resolver;
            Filename           = filename;

            // we need to run rebuildNodes on a separate thread. Using timer
            // for this seems to be an overkill, but we need the timer anyway so - why not
            parserTimer = new Timer(rebuildNodes, null, 0, Timeout.Infinite);

            djangoSymbolLibrary = new NDjangoSymbolLibrary();
            //GlobalServices.ObjectManager.RegisterSimpleLibrary(djangoSymbolLibrary, out libraryCookie);
        }
Example #3
0
        /// <summary>
        /// Creates a new node provider
        /// </summary>
        /// <param name="parser"></param>
        /// <param name="buffer">buffer to watch</param>
        public NodeProvider(IProjectHandler project, string filename, NDjango.TypeResolver.ITypeResolver type_resolver)
        {
            Project = project;
            this.type_resolver = type_resolver;
            Filename = filename;

            // we need to run rebuildNodes on a separate thread. Using timer
            // for this seems to be an overkill, but we need the timer anyway so - why not
            parserTimer = new Timer(rebuildNodes, null, 0, Timeout.Infinite);

            djangoSymbolLibrary = new NDjangoSymbolLibrary();
            //GlobalServices.ObjectManager.RegisterSimpleLibrary(djangoSymbolLibrary, out libraryCookie);
        }
Example #4
0
 /// <summary>
 /// Parses the template
 /// </summary>
 /// <param name="template">a reader with the template</param>
 /// <returns>A list of the syntax nodes</returns>
 public FSharpList <INodeImpl> ParseTemplate(string filename, NDjango.TypeResolver.ITypeResolver resolver)
 {
     return(parser.GetTemplate(filename, resolver, new NDjango.TypeResolver.ModelDescriptor(GetDefaultModel(filename))).Nodes);
 }