|
|
@ -8,6 +8,7 @@ import com.fr.design.mod.impl.change.ChartHyperRelateCellLinkContentChange; |
|
|
|
import com.fr.design.mod.impl.change.ChartHyperRelateFloatLinkContentChange; |
|
|
|
import com.fr.design.mod.impl.change.ChartHyperRelateFloatLinkContentChange; |
|
|
|
import com.fr.design.mod.impl.change.FormulaContentChange; |
|
|
|
import com.fr.design.mod.impl.change.FormulaContentChange; |
|
|
|
import com.fr.design.mod.impl.change.JavaScriptContentChange; |
|
|
|
import com.fr.design.mod.impl.change.JavaScriptContentChange; |
|
|
|
|
|
|
|
import com.fr.design.mod.impl.change.VanChartHtmlLabelContentChange; |
|
|
|
import com.fr.event.Event; |
|
|
|
import com.fr.event.Event; |
|
|
|
import com.fr.event.EventDispatcher; |
|
|
|
import com.fr.event.EventDispatcher; |
|
|
|
import com.fr.event.Listener; |
|
|
|
import com.fr.event.Listener; |
|
|
@ -42,6 +43,9 @@ public class ContentReplacerCenter { |
|
|
|
EventDispatcher.listen(WidgetNameModifyEvent.INSTANCE, new Listener<ContentChangeItem>() { |
|
|
|
EventDispatcher.listen(WidgetNameModifyEvent.INSTANCE, new Listener<ContentChangeItem>() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void on(Event event, ContentChangeItem param) { |
|
|
|
public void on(Event event, ContentChangeItem param) { |
|
|
|
|
|
|
|
if (param.getChangeMap().isEmpty()) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
items.add(param); |
|
|
|
items.add(param); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
@ -52,7 +56,9 @@ public class ContentReplacerCenter { |
|
|
|
items.add(param); |
|
|
|
items.add(param); |
|
|
|
long start = System.currentTimeMillis(); |
|
|
|
long start = System.currentTimeMillis(); |
|
|
|
ContentObjectManager.getInstance().searchObject(param.getObject()); |
|
|
|
ContentObjectManager.getInstance().searchObject(param.getObject()); |
|
|
|
FineLoggerFactory.getLogger().debug("search object spend {} ", (System.currentTimeMillis() - start)); |
|
|
|
FineLoggerFactory.getLogger().debug("search object spend {} ms", (System.currentTimeMillis() - start)); |
|
|
|
|
|
|
|
FineLoggerFactory.getLogger().debug("search result: {}", ContentObjectManager.getInstance().getObjectMap() == null |
|
|
|
|
|
|
|
? null : ContentObjectManager.getInstance().getObjectMap().keySet()); |
|
|
|
List<ContentChangeItem> itemsCopy = new ArrayList<>(items); |
|
|
|
List<ContentChangeItem> itemsCopy = new ArrayList<>(items); |
|
|
|
items.clear(); |
|
|
|
items.clear(); |
|
|
|
onRename(itemsCopy, contentChangeList); |
|
|
|
onRename(itemsCopy, contentChangeList); |
|
|
@ -66,6 +72,7 @@ public class ContentReplacerCenter { |
|
|
|
contentChangeList.add(new ChartHyperRelateFloatLinkContentChange()); |
|
|
|
contentChangeList.add(new ChartHyperRelateFloatLinkContentChange()); |
|
|
|
contentChangeList.add(new FormulaContentChange()); |
|
|
|
contentChangeList.add(new FormulaContentChange()); |
|
|
|
contentChangeList.add(new JavaScriptContentChange()); |
|
|
|
contentChangeList.add(new JavaScriptContentChange()); |
|
|
|
|
|
|
|
contentChangeList.add(new VanChartHtmlLabelContentChange()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void onRename(List<ContentChangeItem> contentChangeItemList, List<ContentChange> contentChangeList) { |
|
|
|
private void onRename(List<ContentChangeItem> contentChangeItemList, List<ContentChange> contentChangeList) { |
|
|
@ -82,7 +89,7 @@ public class ContentReplacerCenter { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
objectMap.clear(); |
|
|
|
objectMap.clear(); |
|
|
|
FineLoggerFactory.getLogger().debug("replace all content spend {} ", (System.currentTimeMillis() - start)); |
|
|
|
FineLoggerFactory.getLogger().debug("replace all content spend {} ms", (System.currentTimeMillis() - start)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|