|
|
|
@ -3,6 +3,7 @@ package com.fr.design.mainframe;
|
|
|
|
|
import com.fr.base.BaseUtils; |
|
|
|
|
import com.fr.base.extension.FileExtension; |
|
|
|
|
import com.fr.base.vcs.DesignerMode; |
|
|
|
|
import com.fr.chartx.TwoTuple; |
|
|
|
|
import com.fr.design.DesignModelAdapter; |
|
|
|
|
import com.fr.design.DesignerEnvManager; |
|
|
|
|
import com.fr.design.ExtraDesignClassManager; |
|
|
|
@ -35,6 +36,8 @@ import com.fr.design.menu.ToolBarDef;
|
|
|
|
|
import com.fr.design.roleAuthority.RolesAlreadyEditedPane; |
|
|
|
|
import com.fr.design.utils.DesignUtils; |
|
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
|
import com.fr.event.Event; |
|
|
|
|
import com.fr.event.EventDispatcher; |
|
|
|
|
import com.fr.file.FileNodeFILE; |
|
|
|
|
import com.fr.file.filetree.FileNode; |
|
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
@ -78,6 +81,8 @@ import java.util.Set;
|
|
|
|
|
import static javax.swing.JOptionPane.WARNING_MESSAGE; |
|
|
|
|
|
|
|
|
|
public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarStateChangeListener, ResponseDataSourceChange { |
|
|
|
|
public static final Event<TwoTuple<String, String>> TEMPLATE_RENAME = new Event<TwoTuple<String, String>>() { |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
private static final String FILE = "file"; |
|
|
|
|
private static volatile DesignerFrameFileDealerPane THIS; |
|
|
|
@ -690,6 +695,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
|
|
|
|
|
boolean success = selectedOperation.rename(fnf, path, newPath); |
|
|
|
|
|
|
|
|
|
if (success) { |
|
|
|
|
EventDispatcher.fire(TEMPLATE_RENAME, new TwoTuple<>(path, newPath)); |
|
|
|
|
HistoryTemplateListCache.getInstance().rename(fnf, path, newPath); |
|
|
|
|
DesignerEnvManager.getEnvManager().replaceRecentOpenedFilePath(fnf.isDirectory(), path, newPath); |
|
|
|
|
selectedOperation.refresh(); |
|
|
|
|