Package com.intellij.openapi.vfs

Examples of com.intellij.openapi.vfs.VirtualFile.refresh()


            final VirtualFile vDir = lfs.refreshAndFindFileByIoFile(directory);
            result.set(vDir);
            if (vDir != null) {
              final LocalFileSystem.WatchRequest watchRequest = lfs.addRootToWatch(vDir.getPath(), true);
              ((NewVirtualFile)vDir).markDirtyRecursively();
              vDir.refresh(false, true);
              if (watchRequest != null) {
                lfs.removeWatchedRoot(watchRequest);
              }
            }
          }
View Full Code Here


                String migrationPath = yiiProtected.replace(_project.getBasePath(), "").replace("\\", "/");
                VirtualFile baseDir = _project.getBaseDir();
                if (baseDir != null) {
                    VirtualFile migrationsFolder = baseDir.findFileByRelativePath(migrationPath + "migrations/");
                    if (migrationsFolder != null) {
                        migrationsFolder.refresh(false, true);
                        VirtualFile migrationFile = migrationsFolder.findFileByRelativePath(name + ".php"); //migrationPath + "migrations/" +
                        if (migrationFile != null) {
                            OpenFileDescriptor of = new OpenFileDescriptor(_project, migrationFile);
                            if (of.canNavigate()) {
                                of.navigate(true);
View Full Code Here

            final LocalHistoryAction action = startLocalHistoryAction(filePath, revision);
            final VirtualFile vp = filePath.getVirtualFileParent();
            if (vp != null) {
                refresh = new Runnable() {
                    public void run() {
                        vp.refresh(false, true, new Runnable() {
                            public void run() {
                                filePath.refresh();
                                action.finish();
                            }
                        });
View Full Code Here

            final VirtualFile viewsPath = base.findFileByRelativePath(relativePath);

            if (viewsPath != null) {

                viewsPath.refresh(false, false, new Runnable() {
                    @Override
                    public void run() {
                        VirtualFile newCreatedFile = viewsPath.findFileByRelativePath(fileName + ".php");

                        if (newCreatedFile != null) {
View Full Code Here

        }

        // add new
        libModifiableModel.addRoot(libRoot, OrderRootType.CLASSES);

        libRoot.refresh(false, true);
        for (final VirtualFile subFolder : libRoot.getChildren()) {
          if (subFolder.getName().startsWith("_")) {
            libModifiableModel.addExcludedRoot(subFolder.getUrl());
          }
        }
View Full Code Here

    final VirtualFile vFile = VfsUtil.findFileByIoFile(file, true);
    if (vFile != null) {
      ApplicationManager.getApplication().runWriteAction(new Runnable() {
        @Override
        public void run() {
          vFile.refresh(false, false);
        }
      });
    }
  }
View Full Code Here

    new WriteAction() {
      @Override
      protected void run(@NotNull Result result) throws Throwable {
        VirtualFile virtualDir = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(projectDir);
        assertNotNull("Directory not found: " + projectDir, virtualDir);
        virtualDir.refresh(false, true);

        for (File moduleDir : projectDir.listFiles(VISIBLE_DIR_FILTER)) {
          String moduleDirPath = moduleDir.getPath().replace(File.separatorChar, '/') + "/";
          String moduleFileName = moduleDirPath + moduleDir.getName() + ".iml";
          if (new File(moduleFileName).exists()) {
View Full Code Here

        if ( sdkData == null )
            return;

        final VirtualFile sourcesRoot = homeDirectory.findFileByRelativePath("goroot/src/pkg/");
        if (sourcesRoot != null) {
            sourcesRoot.refresh(false, false);
        }

        String goPathFirst = GoSdkUtil.getGoPath();
        VirtualFile goPathDirectory;
        VirtualFile pathSourcesRoot = null;
View Full Code Here

            return;

        final VirtualFile sdkSourcesRoot = GoSdkUtil.getSdkSourcesRoot(sdk);

        if (sdkSourcesRoot != null) {
            sdkSourcesRoot.refresh(false, false);
        }

        String goPathFirst = GoSdkUtil.getGoPath();

        VirtualFile goPathDirectory;
View Full Code Here

            toolWindow.printNormalMessage(String.format("%s%n", StringUtil.join(command, " ")));
            handler.startNotify();

            if (proc.waitFor() == 0) {
                VirtualFileManager.getInstance().syncRefresh();
                selectedFile.refresh(false, false);
            }
        } catch (Exception e) {
            e.printStackTrace();
            Messages.showErrorDialog("Error while processing go fmt command.", "Error on go fmt");
        }
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.