Beispiel #1
0
        private void AddItems(MergableMenu menu, GenericNode node)
        {
            string path = node.BackingPath;

            if (node.IsInvalid)
            {
                if (node is ClasspathNode)
                {
                    AddInvalidClassPathNodes(menu, path);
                }

                /*else if (node is FileNode)
                 * {
                 *  string ext = Path.GetExtension(path).ToLower();
                 *  if (FileInspector.IsSwc(path, ext)) AddInvalidSwcItems(menu, path);
                 * }*/
                return;
            }
            if (node is ProjectNode)
            {
                AddProjectItems(menu);
            }
            else if (node is ClasspathNode)
            {
                AddClasspathItems(menu, path);
            }
            else if (node is DirectoryNode)
            {
                AddFolderItems(menu, path);
            }
            else if (node is ProjectOutputNode)
            {
                AddProjectOutputItems(menu, node as ProjectOutputNode);
            }
            else if (node is ExportNode)
            {
                AddExportItems(menu, node as ExportNode);
            }
            else if (node is FileNode)
            {
                string ext = Path.GetExtension(path).ToLower();
                if (FileInspector.IsActionScript(path, ext))
                {
                    AddClassItems(menu, path);
                }
                else if (FileInspector.IsHaxeFile(path, ext))
                {
                    AddClassItems(menu, path);
                }
                else if (FileInspector.IsMxml(path, ext))
                {
                    AddClassItems(menu, path);
                }
                else if (FileInspector.IsCss(path, ext))
                {
                    AddCssItems(menu, path);
                }
                else if (FileInspector.IsSwf(path, ext))
                {
                    AddSwfItems(menu, path);
                }
                else if (FileInspector.IsSwc(path, ext))
                {
                    AddSwcItems(menu, path);
                }
                else if (FileInspector.IsResource(path, ext))
                {
                    AddOtherResourceItems(menu, path);
                }
                else
                {
                    AddGenericFileItems(menu, path);
                }
            }
        }