|
|
|
@ -24,6 +24,7 @@ import com.fr.file.FileNodeFILE;
|
|
|
|
|
import com.fr.file.filetree.FileNode; |
|
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
|
import com.fr.stable.ArrayUtils; |
|
|
|
|
import com.fr.stable.StableUtils; |
|
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
import com.fr.stable.collections.CollectionUtils; |
|
|
|
@ -244,7 +245,7 @@ public class DefaultTemplateTreeDefineProcessor extends AbstractTemplateTreeDefi
|
|
|
|
|
if (pasteNodes.isEmpty()) { |
|
|
|
|
//提示:复制的文件都不能黏贴
|
|
|
|
|
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), |
|
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Unable_Delete_Locked_File"), |
|
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Confirm_Paste_Unlock_File"), |
|
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Alert"), |
|
|
|
|
WARNING_MESSAGE); |
|
|
|
|
return; |
|
|
|
@ -508,6 +509,10 @@ public class DefaultTemplateTreeDefineProcessor extends AbstractTemplateTreeDefi
|
|
|
|
|
|
|
|
|
|
private void copyDir(String sourceDir, String targetDir) { |
|
|
|
|
FileNode[] fileNodes = getFileTree().listFile(sourceDir); |
|
|
|
|
if (ArrayUtils.isEmpty(fileNodes)) { |
|
|
|
|
//空目录:相当于新建一个目录
|
|
|
|
|
DesignerFrameFileDealerPane.getInstance().getSelectedOperation().mkdir(targetDir); |
|
|
|
|
} |
|
|
|
|
for (FileNode fileNode : fileNodes) { |
|
|
|
|
if (fileNode.isDirectory()) { |
|
|
|
|
copyDir(StableUtils.pathJoin(fileNode.getParent(), fileNode.getName()), StableUtils.pathJoin(targetDir, fileNode.getName())); |
|
|
|
@ -520,7 +525,7 @@ public class DefaultTemplateTreeDefineProcessor extends AbstractTemplateTreeDefi
|
|
|
|
|
//检查源文件是不是还存在
|
|
|
|
|
if (!WorkContext.getWorkResource().exist(sourcePath)) { |
|
|
|
|
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), |
|
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Source_File_Not_Exist"), |
|
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Source_File_Not_Exist", sourcePath), |
|
|
|
|
Toolkit.i18nText("Fine-Design_Basic_Alert"), |
|
|
|
|
WARNING_MESSAGE); |
|
|
|
|
} else { |
|
|
|
|