Examples of findFile()


Examples of com.intellij.psi.PsiDirectory.findFile()

          return;
        }

        final PsiDirectory directory = PsiManager.getInstance(module.getProject()).findDirectory(sourceRoots[0]);
        if (directory == null ||
            directory.findFile(StrutsConstants.STRUTS_XML_DEFAULT_FILENAME) != null) {
          return;
        }

        final StrutsFileTemplateProvider templateProvider = new StrutsFileTemplateProvider(module);
        final FileTemplate strutsXmlTemplate = templateProvider.determineFileTemplate();
View Full Code Here

Examples of com.intellij.psi.PsiDirectory.findFile()

        content = content.replace("{{ Namespace }}", bundleName).replace("{{ ControllerName }}", fileName);

        fileName = fileName.concat("Controller.php");

        if(initialBaseDir.findFile(fileName) != null) {
            Messages.showInfoMessage("File exists", "Error");
            return;
        }

        final PsiFile file = factory.createFileFromText(fileName, PhpFileType.INSTANCE, content);
View Full Code Here

Examples of com.intellij.psi.PsiDirectory.findFile()

                CodeStyleManager.getInstance(project).reformat(file);
                initialBaseDir.add(file);
            }
        });

        PsiFile psiFile = initialBaseDir.findFile(fileName);
        if(psiFile != null) {
            view.selectElement(psiFile);
        }

    }
View Full Code Here

Examples of com.intellij.psi.PsiDirectory.findFile()

        final PsiDirectory initialBaseDir = view.getOrChooseDirectory();
        if (initialBaseDir == null) {
            return;
        }

        if(initialBaseDir.findFile(fileName) != null) {
            Messages.showInfoMessage("File exists", "Error");
            return;
        }

        String content;
View Full Code Here

Examples of com.intellij.psi.PsiDirectory.findFile()

                CodeStyleManager.getInstance(project).reformat(file);
                initialBaseDir.add(file);
            }
        });

        PsiFile psiFile = initialBaseDir.findFile(fileName);
        if(psiFile != null) {
            view.selectElement(psiFile);
        }

    }
View Full Code Here

Examples of com.intellij.psi.PsiDirectory.findFile()

    PsiFile file = myFixture.configureByText("aaa.erl", "-module(aaa).\nfoo() -> ok.");
    PsiDirectory containingDirectory = file.getContainingDirectory();
    assert containingDirectory != null;
    String newName = "bbb.erl";
    CopyFilesOrDirectoriesHandler.copyToDirectory(file, newName, containingDirectory);
    PsiFile copiedFile = containingDirectory.findFile(newName);
    assert copiedFile != null;
    assertEquals(copiedFile.getText(), "-module(bbb).\nfoo() -> ok.");
  }
}
View Full Code Here

Examples of com.intellij.psi.PsiDirectory.findFile()

            PsiDirectory viewsDir = resourcesDir.findSubdirectory("views");

            if (!ctrl.equals(""))
            {
                PsiDirectory ctlDir = viewsDir.findSubdirectory(ctrl);
                return ctlDir.findFile(viewFileName);
            }
            else
            {
                return viewsDir.findFile(viewFileName);
            }
View Full Code Here

Examples of com.intellij.psi.PsiDirectory.findFile()

                        VirtualFile childDirectory = createDirectories(testFolder, packageName);

                        String testFileName = psiFile.getVirtualFile().getNameWithoutExtension() + "Test";
                        PsiDirectory psiDirectory = PsiManagerImpl.getInstance(project).findDirectory(childDirectory);
                        PsiFile testFile = psiDirectory.findFile(testFileName + ".as");
                        if(testFile == null){
                            testFile = (PsiFile) CreateClassOrInterfaceAction.createClass(testFileName, packageName, psiDirectory, "Test ActionScript Class");
                        }

                        FileEditorManager.getInstance(project).openFile(testFile.getVirtualFile(), true);
View Full Code Here

Examples of com.intellij.psi.PsiManager.findFile()

     */

    public void navigateToSpecification(DBSchemaObject parentObject, DBObjectType objectType, String objectName) {
        DatabaseEditableObjectFile databaseFile = parentObject.getVirtualFile();
        PsiManager psiManager = PsiManager.getInstance(parentObject.getProject());
        PSQLFile file = (PSQLFile) psiManager.findFile(databaseFile.getContentFile(DBContentType.CODE_SPEC));
        if (file != null) {
            BasePsiElement basePsiElement = file.lookupObjectSpecification(objectType, objectName);
            if (basePsiElement != null) {
                BasicTextEditor textEditor = EditorUtil.getFileEditor(databaseFile, file.getVirtualFile());
                EditorUtil.selectEditor(databaseFile, textEditor);
View Full Code Here

Examples of com.intellij.psi.PsiManager.findFile()

     * @deprecated
     */
    public void navigateToDeclaration(DBSchemaObject parentObject, DBObjectType objectType, String objectName) {
        DatabaseEditableObjectFile databaseFile = parentObject.getVirtualFile();
        PsiManager psiManager = PsiManager.getInstance(parentObject.getProject());
        PSQLFile file = (PSQLFile) psiManager.findFile(databaseFile.getContentFile(DBContentType.CODE_BODY));
        if (file != null) {
            BasePsiElement basePsiElement = file.lookupObjectDeclaration(objectType, objectName);
            if (basePsiElement != null) {
                BasicTextEditor textEditor = EditorUtil.getFileEditor(databaseFile, file.getVirtualFile());
                EditorUtil.selectEditor(databaseFile, textEditor);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.