Skip to content

Commit

Permalink
file refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
mars05 committed Jun 9, 2022
1 parent dd89768 commit 665b60a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import com.github.mars05.crud.intellij.plugin.util.BeanUtils;
import com.github.mars05.crud.intellij.plugin.util.CrudUtils;
import com.intellij.ide.IdeView;
import com.intellij.ide.actions.SynchronizeCurrentFileAction;
import com.intellij.notification.Notification;
import com.intellij.notification.NotificationType;
import com.intellij.notification.Notifications;
Expand All @@ -25,6 +24,7 @@
import com.intellij.openapi.project.Project;
import com.intellij.openapi.roots.ModuleRootManager;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.openapi.vfs.VirtualFileManager;
import org.apache.commons.lang3.StringUtils;
import org.jetbrains.annotations.NotNull;

Expand Down Expand Up @@ -112,7 +112,7 @@ public void run(@NotNull ProgressIndicator indicator) {
+ (fileRespDTOS.size() - successList.size()) + "\n项目路径: " + reqDTO.getProjectPath(), NotificationType.INFORMATION), project);
//优化生成的所有Java类
CrudUtils.doOptimize(project);
new SynchronizeCurrentFileAction().actionPerformed(e);
VirtualFileManager.getInstance().refreshWithoutFileWatcher(true);
} catch (Exception ex) {
Notifications.Bus.notify(new Notification(NOTIFICATION_GROUP, "代码生成失败", ex.getMessage(), NotificationType.INFORMATION), project);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import com.github.mars05.crud.intellij.plugin.util.BeanUtils;
import com.github.mars05.crud.intellij.plugin.util.CrudUtils;
import com.intellij.ide.IdeView;
import com.intellij.ide.actions.SynchronizeCurrentFileAction;
import com.intellij.notification.Notification;
import com.intellij.notification.NotificationType;
import com.intellij.notification.Notifications;
Expand All @@ -25,6 +24,7 @@
import com.intellij.openapi.project.Project;
import com.intellij.openapi.roots.ModuleRootManager;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.openapi.vfs.VirtualFileManager;
import org.apache.commons.lang3.StringUtils;
import org.jetbrains.annotations.NotNull;

Expand Down Expand Up @@ -112,7 +112,7 @@ public void run(@NotNull ProgressIndicator indicator) {
+ (fileRespDTOS.size() - successList.size()) + "\n项目路径: " + reqDTO.getProjectPath(), NotificationType.INFORMATION), project);
//优化生成的所有Java类
CrudUtils.doOptimize(project);
new SynchronizeCurrentFileAction().actionPerformed(e);
VirtualFileManager.getInstance().refreshWithoutFileWatcher(true);
} catch (Exception ex) {
Notifications.Bus.notify(new Notification(NOTIFICATION_GROUP, "代码生成失败", ex.getMessage(), NotificationType.INFORMATION), project);
}
Expand Down

0 comments on commit 665b60a

Please sign in to comment.