@ -28,6 +28,7 @@ import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils ;
import com.fr.stable.StringUtils ;
import com.fr.stable.collections.CollectionUtils ;
import com.fr.stable.collections.CollectionUtils ;
import com.fr.stable.project.ProjectConstants ;
import com.fr.stable.project.ProjectConstants ;
import com.fr.workspace.WorkContext ;
import javax.swing.BorderFactory ;
import javax.swing.BorderFactory ;
import javax.swing.JDialog ;
import javax.swing.JDialog ;
@ -229,7 +230,13 @@ public class DefaultTemplateTreeDefineProcessor extends AbstractTemplateTreeDefi
}
}
//确定目标目录并检查权限
//确定目标目录并检查权限
FileOperations selectedOperation = DesignerFrameFileDealerPane . getInstance ( ) . getSelectedOperation ( ) ;
FileOperations selectedOperation = DesignerFrameFileDealerPane . getInstance ( ) . getSelectedOperation ( ) ;
if ( ! selectedOperation . access ( ) ) {
boolean rootAuthority = true ;
if ( selectedOperation . getFileNode ( ) = = null & & selectedOperation instanceof TemplateTreePane ) {
//没有选中文件节点时,默认粘贴到根目录下,所以直接检测根目录是否有权限
ExpandMutableTreeNode root = ( ExpandMutableTreeNode ) ( ( TemplateTreePane ) selectedOperation ) . getTemplateFileTree ( ) . getModel ( ) . getRoot ( ) ;
rootAuthority = root . hasFullAuthority ( ) ;
}
if ( ! rootAuthority & & ! selectedOperation . access ( ) ) {
FineJOptionPane . showMessageDialog ( DesignerContext . getDesignerFrame ( ) ,
FineJOptionPane . showMessageDialog ( DesignerContext . getDesignerFrame ( ) ,
Toolkit . i18nText ( "Fine-Design_Basic_Template_Permission_Denied" ) ,
Toolkit . i18nText ( "Fine-Design_Basic_Template_Permission_Denied" ) ,
Toolkit . i18nText ( "Fine-Design_Basic_Alert" ) ,
Toolkit . i18nText ( "Fine-Design_Basic_Alert" ) ,