|
|
@ -18,7 +18,6 @@ import com.fr.design.mainframe.DesignerContext; |
|
|
|
import com.fr.design.mainframe.DesignerFrameFileDealerPane; |
|
|
|
import com.fr.design.mainframe.DesignerFrameFileDealerPane; |
|
|
|
import com.fr.design.utils.TemplateUtils; |
|
|
|
import com.fr.design.utils.TemplateUtils; |
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
import com.fr.event.Event; |
|
|
|
|
|
|
|
import com.fr.event.EventDispatcher; |
|
|
|
import com.fr.event.EventDispatcher; |
|
|
|
import com.fr.file.FileNodeFILE; |
|
|
|
import com.fr.file.FileNodeFILE; |
|
|
|
import com.fr.file.filetree.FileNode; |
|
|
|
import com.fr.file.filetree.FileNode; |
|
|
@ -57,8 +56,6 @@ import static javax.swing.JOptionPane.YES_NO_OPTION; |
|
|
|
public class RenameAction extends UpdateAction { |
|
|
|
public class RenameAction extends UpdateAction { |
|
|
|
|
|
|
|
|
|
|
|
private FileOperations selectedOperation; |
|
|
|
private FileOperations selectedOperation; |
|
|
|
public static final com.fr.event.Event<TwoTuple<String, String>> TEMPLATE_RENAME = new Event<TwoTuple<String, String>>() { |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public RenameAction() { |
|
|
|
public RenameAction() { |
|
|
|
|
|
|
|
|
|
|
@ -273,7 +270,7 @@ public class RenameAction extends UpdateAction { |
|
|
|
boolean success = selectedOperation.rename(fnf, path, newPath); |
|
|
|
boolean success = selectedOperation.rename(fnf, path, newPath); |
|
|
|
|
|
|
|
|
|
|
|
if (success) { |
|
|
|
if (success) { |
|
|
|
EventDispatcher.fire(TEMPLATE_RENAME, new TwoTuple<>(path, newPath)); |
|
|
|
EventDispatcher.fire(DesignerFrameFileDealerPane.TEMPLATE_RENAME, new TwoTuple<>(path, newPath)); |
|
|
|
HistoryTemplateListCache.getInstance().rename(fnf, path, newPath); |
|
|
|
HistoryTemplateListCache.getInstance().rename(fnf, path, newPath); |
|
|
|
DesignerEnvManager.getEnvManager().replaceRecentOpenedFilePath(fnf.isDirectory(), path, newPath); |
|
|
|
DesignerEnvManager.getEnvManager().replaceRecentOpenedFilePath(fnf.isDirectory(), path, newPath); |
|
|
|
selectedOperation.refreshParent(); |
|
|
|
selectedOperation.refreshParent(); |
|
|
|