Browse Source

代码修改

research/11.0
kerry 4 years ago
parent
commit
d0af9b014c
  1. 12
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java

12
designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java

@ -60,6 +60,7 @@ import com.fr.file.MemFILE;
import com.fr.form.ui.NoneWidget;
import com.fr.form.ui.Widget;
import com.fr.general.ComparatorUtils;
import com.fr.locale.InterProviderFactory;
import com.fr.log.FineLoggerFactory;
import com.fr.plugin.context.PluginContext;
import com.fr.plugin.context.PluginRuntime;
@ -154,13 +155,20 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
consumeTimer.setEnabled(shouldInitForCollectInfo(isNewFile));
initAndStartPlugin();
setPredefinedInfo(isNewFile);
}
private void setPredefinedInfo(boolean isNewFile){
if (this.template.getAttrMark(PredefinedStyleAttrMark.XML_TAG) == null) {
this.template.addAttrMark(new PredefinedStyleAttrMark());
PredefinedStyleAttrMark attrMark= new PredefinedStyleAttrMark();
if (!isNewFile){
attrMark.setPreferenceStyleName(InterProviderFactory.getProvider().getLocText("Fine-Engine_Predefined_Style_Compatibility"));
}
this.template.addAttrMark(attrMark);
}
}
private void initAndStartPlugin() {
initPluginPane();
startListenPlugin();

Loading…
Cancel
Save