|
|
|
@ -15,6 +15,7 @@ import com.fr.design.layout.FRGUIPaneFactory;
|
|
|
|
|
import com.fr.design.mainframe.DesignerContext; |
|
|
|
|
import com.fr.design.mainframe.DesignerFrameFileDealerPane; |
|
|
|
|
import com.fr.design.lock.LockInfoDialog; |
|
|
|
|
import com.fr.design.mainframe.JTemplate; |
|
|
|
|
import com.fr.file.FILE; |
|
|
|
|
import com.fr.file.FileNodeFILE; |
|
|
|
|
import com.fr.file.filetree.FileNode; |
|
|
|
@ -224,8 +225,8 @@ public class TemplateTreePane extends JPanel implements FileOperations {
|
|
|
|
|
} |
|
|
|
|
String reportPath = reportletsTree.getSelectedTemplatePath(); |
|
|
|
|
final String selectedFilePath = StableUtils.pathJoin(ProjectConstants.REPORTLETS_NAME, reportPath); |
|
|
|
|
if (WorkContext.getCurrent().get(LockInfoOperator.class).isTplUnLocked(selectedFilePath)) { |
|
|
|
|
FineLoggerFactory.getLogger().info("{} has been unlocked", selectedFilePath); |
|
|
|
|
if (hasOpenedTemplate(selectedFilePath)) { |
|
|
|
|
FineLoggerFactory.getLogger().info("{} has been opened in designer tab", selectedFilePath); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
String lock = node.getLock(); |
|
|
|
@ -240,6 +241,16 @@ public class TemplateTreePane extends JPanel implements FileOperations {
|
|
|
|
|
DesignerContext.getDesignerFrame().openTemplate(new FileNodeFILE(new FileNode(selectedFilePath, false))); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private boolean hasOpenedTemplate(String path) { |
|
|
|
|
for (JTemplate<?, ?> template : HistoryTemplateListCache.getInstance().getHistoryList()) { |
|
|
|
|
if (ComparatorUtils.equals(template.getEditingFILE().getPath(), path)) { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 打开文件夹 |
|
|
|
|
*/ |
|
|
|
@ -263,6 +274,7 @@ public class TemplateTreePane extends JPanel implements FileOperations {
|
|
|
|
|
// 刷新远程文件夹权限
|
|
|
|
|
NodeAuthProcessor.getInstance().refresh(); |
|
|
|
|
reportletsTree.refresh(); |
|
|
|
|
DesignerFrameFileDealerPane.getInstance().refreshRightToolBarBy(null); |
|
|
|
|
FineLoggerFactory.getLogger().info(Toolkit.i18nText("Fine-Design_Basic_Template_File_Tree_Refresh_Successfully") + "!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|