|
|
|
@ -4,8 +4,6 @@ import com.fr.base.io.IOFile;
|
|
|
|
|
import com.fr.design.file.HistoryTemplateListCache; |
|
|
|
|
import com.fr.design.mainframe.JTemplate; |
|
|
|
|
import com.fr.esd.core.strategy.config.StrategyConfig; |
|
|
|
|
import com.fr.esd.core.strategy.config.StrategyConfigHelper; |
|
|
|
|
import com.fr.esd.core.strategy.config.service.StrategyConfigService; |
|
|
|
|
import com.fr.esd.core.strategy.persistence.StrategyConfigsAttr; |
|
|
|
|
import com.fr.esd.event.DSMapping; |
|
|
|
|
import com.fr.esd.event.DsNameTarget; |
|
|
|
@ -13,7 +11,6 @@ import com.fr.esd.event.StrategyEventsNotifier;
|
|
|
|
|
import com.fr.esd.event.xml.XMLSavedHook; |
|
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
import com.fr.workspace.WorkContext; |
|
|
|
|
|
|
|
|
|
import java.nio.file.Paths; |
|
|
|
|
import java.util.HashMap; |
|
|
|
@ -48,7 +45,9 @@ public class StrategyConfigAttrUtils {
|
|
|
|
|
//新建模版此时不存在,不需要注册钩子
|
|
|
|
|
//不处理外部路径,保存到设计器才处理
|
|
|
|
|
String path = jTemplate.getPath(); |
|
|
|
|
if (attr.getXmlSavedHook() == null && !Paths.get(path).isAbsolute() && WorkContext.getWorkResource().exist(path)) { |
|
|
|
|
if (attr.getXmlSavedHook() == null |
|
|
|
|
&& !Paths.get(path).isAbsolute() |
|
|
|
|
&& jTemplate.getEditingFILE().isMemFile()) { |
|
|
|
|
attr.setXmlSavedHook(new StrategyConfigsAttrSavedHook(jTemplate.getPath(), attr)); |
|
|
|
|
} |
|
|
|
|
return attr; |
|
|
|
|