Exemplo n.º 1
0
        public static CWObjects IntellicodeObjectsInFile(CWFile File)
        {
            AssertOpenProject("IntellicodeObjectsInProject");
            AssertValidFile(File, "IntellicodeObjectsInProject");

            CProject.File file = GetFile(File);

            CWObjects objout = new CWObjects(File, new ArrayList());

            foreach (CProject.TokenKey tok in file.TokenList.Values)
            {
                objout.objects.Add(new CWObjects.CWObject(
                                       CWObjectType.DefinedFunction,
                                       "",
                                       tok.FuncName,
                                       String.Join(", ", tok.FuncParams),
                                       tok.FuncDescr,
                                       tok.LineNumber));
            }

            foreach (CProject.TokenObject tokobj in g.Project.TokenObjList.Values)
            {
                if (tokobj.ObjectFileDecl != file)
                {
                    continue;
                }

                objout.objects.Add(new CWObjects.CWObject(
                                       CWObjectType.DefinedClass,
                                       tokobj.ObjectType,
                                       tokobj.ObjectName,
                                       "",
                                       "",
                                       tokobj.ObjectDeclOffset));

                foreach (CProject.TokenObject.ObjectDescr objdescr in tokobj.ObjectFunctions)
                {
                    if (objdescr.FuncFile != file)
                    {
                        continue;
                    }

                    objout.objects.Add(new CWObjects.CWObject(
                                           CWObjectType.DefinedClassFunction,
                                           tokobj.ObjectName,
                                           objdescr.FuncName,
                                           String.Join(", ", objdescr.FuncParams),
                                           objdescr.FuncDescr,
                                           objdescr.FuncOffset));
                }
            }

            return(objout);
        }
Exemplo n.º 2
0
        public static CWObjects[] IntellicodeObjectsInProject()
        {
            AssertOpenProject("IntellicodeObjectsInProject");

            CWObjects[] outobjs = new CWObjects[g.Project.FileList.Count];

            for (int i = 0; i < outobjs.Length; i++)
            {
                outobjs[i] = IntellicodeObjectsInFile((g.Project.FileList[i] as CProject.File).ToCWFile());
            }

            return(outobjs);
        }
Exemplo n.º 3
0
        public static CWObjects IntellicodeGetEngineObjects()
        {
            // Gets all the engine objects
            AssertOpenProject("IntellicodeGetEngineObjects");

            CWObjects outobj = new CWObjects(null, new ArrayList());

            foreach (CAutoComplete.ClassEntry cls in frmMain.ac.ReturnAllClasses().Values)
            {
                outobj.objects.Add(new CWObjects.CWObject(
                                       CWObjectType.EngineClass,
                                       cls.ClassInheritsFrom,
                                       cls.ClassName,
                                       "", "", -1));

                foreach (CAutoComplete.ClassEntry.FuncEntry funcs in cls.func_list)
                {
                    outobj.objects.Add(new CWObjects.CWObject(
                                           CWObjectType.EngineClassFunction,
                                           cls.ClassName,
                                           funcs.func_name,
                                           funcs.func_params,
                                           funcs.func_descr,
                                           -1));
                }

                foreach (CAutoComplete.ClassEntry.PropEntry prop in cls.prop_list)
                {
                    outobj.objects.Add(new CWObjects.CWObject(
                                           CWObjectType.EngineClassProperty,
                                           cls.ClassName,
                                           prop.prop_name,
                                           "",
                                           prop.prop_descr,
                                           -1));
                }
            }

            return(outobj);
        }