Package workspace.elements

Examples of workspace.elements.CodeFile


    {
        if (lib == null)
        {
            return null;
        }
        CodeFile file = lib.getFile(shortName);
        HaxeTree stdTypes = null;
        if (file != null)
        {
            stdTypes = file.getAst();
        }
        if (stdTypes == null)
        {
            file = lib.getFile(primaryTypesFileName);
            if (file == null)
            {
                Activator.logger.error("Could not find lib file");
                return null;
            }
            stdTypes = file.getAst();
        }
        if (stdTypes == null)
        {
            return null;
        }
View Full Code Here


       
        if (lib == null)
        {
            return null;
        }
        CodeFile file = lib.getFile(pack);
        if (file == null)
        {
            return null;
        }
        HaxeTree ast = file.getAst();
        if (ast == null)
        {
            return null;
        }
        for (HaxeTree child : ast.getChildren())
View Full Code Here

    public void testVisit(final HaxeTree searchFor, final HaxeTree ast)
    {
        searchObject = searchFor;
        foundResult = new HashMapForLists<NodeLink>();
       
        currFile = new CodeFile("some file", ast);
        visit(ast, null);
    }
View Full Code Here

            return;
        }
        if (foundNode instanceof IPackageInfo)
        {
            String pack = ((IPackageInfo)foundNode).getPackage();
            CodeFile file = project.getFile(pack);
            addToResults(foundNode, file);
        }
        else
        {
            addToResults(foundNode, currFile);
View Full Code Here

        if (project == null)
        {
            return;
        }
        CodeFile file = project.getFile(longName);
        HaxeTree ast = null;
        if (file == null && projectManager.getHaxeLib() != null)
        {
            file = projectManager.getHaxeLib().getFile(longName);
        }
        if (file != null)
        {
            ast = file.getAst();
        }

        imports.put(shortName, ast);
        if (addToUsings)
        {
View Full Code Here

    }
   
    public void init(final HaxeTree root, final HashMapForLists<NodeLink> list)
    {
        invisibleRoot.clearAllChildren();
        CodeFile hFile = Activator.getProjectManager().getCurrentFile();
       
        CallHierarchyNodeElement visibleRoot =
                new CallHierarchyNodeElement(hFile.getRealFile(), root, hFile.getPackage());
        CallHierarchyFolderElement callsTo = new CallHierarchyFolderElement("Calls To");
        CallHierarchyFolderElement callsFrom = new CallHierarchyFolderElement("Calls From");
       
        invisibleRoot.add(visibleRoot);
        text.setText(treeViewer.toString());
View Full Code Here

            throws CoreException, OperationCanceledException
    {
        String pack = getTargetPackage();
        // check if file is from haxe lib
        HaxeLibProject project = Activator.getProjectManager().getHaxeLib();
        CodeFile file = project.getFile(pack);
        if (file != null)
        {
            return RefactoringStatus.createErrorStatus("Can't edit library file");
        }       
        // available for editing
        HaxeProject proj = Activator.getProjectManager().getCurrentHaxeProject();
        file = proj.getFile(pack);
        if (file.getRealFile().getResourceAttributes().isReadOnly())
        {
            return RefactoringStatus.createErrorStatus("File isn't editable");
        }
       
        return new RefactoringStatus();
View Full Code Here

            IFile file = WorkspaceUtils.getFileFromWorkspace(path);
            if (file == null)
            {
                return;
            }
            CodeFile codeFile = Activator.getProjectManager().getCurrentHaxeProject().getFile(file);
            mainFileField.setText(codeFile.getPackage());
        }
    }
View Full Code Here

    }
   
    private void highlightCurrentNodeUsagesInText()
    {       
        ISourceViewer view = getSourceViewer();
        CodeFile hFile = currentFile;
        IFile activeFile = hFile.getRealFile();
        HaxeProject project = Activator.getProjectManager().getCurrentHaxeProject();
        CodeFile currFile = project.getFile(activeFile);
        String currPack = currFile.getPackage();
       
        TextPresentation presentation = new TextPresentation();
       
        for (NodeLink info : usagesList.get(currPack))
        {
View Full Code Here

TOP

Related Classes of workspace.elements.CodeFile

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.