@ -207,7 +207,7 @@ public class DefaultTemplateTreeDefineProcessor extends AbstractTemplateTreeDefi
for ( ExpandMutableTreeNode treeNode : treeNodeList ) {
for ( ExpandMutableTreeNode treeNode : treeNodeList ) {
FileOperationHelper . getInstance ( ) . checkFreeOrLock ( treeNode , pasteNodes , lockedNodes ) ;
FileOperationHelper . getInstance ( ) . checkFreeOrLock ( treeNode , pasteNodes , lockedNodes ) ;
}
}
if ( pasteNodes . isEmpty ( ) ) {
if ( pasteNodes . isEmpty ( ) | | ! lockedNodes . isEmpty ( ) ) {
//提示:复制的文件都不能黏贴
//提示:复制的文件都不能黏贴
FineJOptionPane . showMessageDialog ( DesignerContext . getDesignerFrame ( ) ,
FineJOptionPane . showMessageDialog ( DesignerContext . getDesignerFrame ( ) ,
Toolkit . i18nText ( "Fine-Design_Basic_Confirm_Paste_Unlock_File" ) ,
Toolkit . i18nText ( "Fine-Design_Basic_Confirm_Paste_Unlock_File" ) ,
@ -215,18 +215,7 @@ public class DefaultTemplateTreeDefineProcessor extends AbstractTemplateTreeDefi
WARNING_MESSAGE ) ;
WARNING_MESSAGE ) ;
return ;
return ;
}
}
if ( lockedNodes . isEmpty ( ) ) {
doPaste ( targetDir , pasteNodes ) ;
doPaste ( targetDir , pasteNodes ) ;
} else {
if ( FineJOptionPane . showConfirmDialog ( DesignerContext . getDesignerFrame ( ) ,
Toolkit . i18nText ( "Fine-Design_Basic_Confirm_Paste_Other_File" ) ,
Toolkit . i18nText ( "Fine-Design_Basic_Confirm" ) ,
YES_NO_OPTION )
= = JOptionPane . YES_OPTION ) {
// 黏贴其他可黏贴的文件
doPaste ( targetDir , pasteNodes ) ;
}
}
}
}
/ * *
/ * *
@ -329,21 +318,20 @@ public class DefaultTemplateTreeDefineProcessor extends AbstractTemplateTreeDefi
WARNING_MESSAGE ) ;
WARNING_MESSAGE ) ;
return ;
return ;
}
}
// 筛选可以移动的文件
ArrayList < ExpandMutableTreeNode > moveNodes = new ArrayList < > ( ) ;
ArrayList < ExpandMutableTreeNode > lockedNodes = new ArrayList < > ( ) ;
for ( ExpandMutableTreeNode treeNode : getFileTree ( ) . getSelectedTreeNodes ( ) ) {
FileOperationHelper . getInstance ( ) . checkFreeOrLock ( treeNode , moveNodes , lockedNodes ) ;
}
ExpandMutableTreeNode [ ] selectedTreeNodes = getFileTree ( ) . getSelectedTreeNodes ( ) ;
if ( ! lockedNodes . isEmpty ( ) ) {
for ( ExpandMutableTreeNode treeNode : selectedTreeNodes ) {
// 提醒被锁定模板无法移动
if ( treeNode . getUserObject ( ) instanceof FileNode ) {
FineJOptionPane . showMessageDialog ( DesignerContext . getDesignerFrame ( ) ,
FileNode node = ( FileNode ) treeNode . getUserObject ( ) ;
Toolkit . i18nText ( "Fine-Design_Basic_Unable_Move_Locked_File" ) ,
String lock = node . getLock ( ) ;
Toolkit . i18nText ( "Fine-Design_Basic_Alert" ) ,
if ( lock ! = null & & ! lock . equals ( node . getUserID ( ) ) ) {
WARNING_MESSAGE ) ;
// 提醒被锁定模板无法移动
return ;
FineJOptionPane . showMessageDialog ( DesignerContext . getDesignerFrame ( ) ,
Toolkit . i18nText ( "Fine-Design_Basic_Unable_Move_Locked_File" ) ,
Toolkit . i18nText ( "Fine-Design_Basic_Alert" ) ,
WARNING_MESSAGE ) ;
return ;
}
}
}
}
new TemplateMoveDialog ( ) ;
new TemplateMoveDialog ( ) ;