Browse Source

Pull request #5: 合并

Merge in ~DESTINY.LIN/design from mss/2.0 to fbp-1.0

* commit '67110b56ff8804f43ef1343c77469acf71543e03':
  无jira任务,修复打包报错
  Revert "REPORT-120151 feat: 添加 forkId 和相关埋点"
fbp-1.0
Destiny.Lin-林锦龙 4 months ago
parent
commit
08d0d0b499
  1. 2
      designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java
  2. 2
      designer-base/src/main/java/com/fr/design/data/datapane/preview/sql/PreviewPerformedSqlPane.java
  3. 12
      designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java
  4. 16
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java
  5. 1
      designer-base/src/main/java/com/fr/design/utils/TemplateUtils.java
  6. 2
      designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java
  7. 3
      designer-base/src/main/java/com/fr/start/server/FineEmbedServer.java
  8. 10
      designer-realize/src/main/java/com/fanruan/boot/env/DesignEnvChooseComponent.java
  9. 3
      designer-realize/src/main/java/com/fr/start/SplashContext.java
  10. 8
      designer-realize/src/main/java/com/fr/start/module/DesignerWorkspaceActivator.java

2
designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java

@ -440,7 +440,7 @@ public class EnvChangeEntrance {
Set<Class> localServiceSet = FineObjectPool.getInstance().getServerPool().keySet();
try {
JSONArray serviceArray = new FunctionalHttpRequest(info).getServiceList(info);
JSONArray serviceArray = new FunctionalHttpRequest(info).getServiceList();
for (int i = 0; i < serviceArray.size(); i++) {
try {
Class clazz = Class.forName((String) serviceArray.get(i));

2
designer-base/src/main/java/com/fr/design/data/datapane/preview/sql/PreviewPerformedSqlPane.java

@ -253,7 +253,7 @@ public class PreviewPerformedSqlPane extends JDialog implements ActionListener {
private static Parameter[] processParameters(DBTableData tableData, Calculator calculator) {
ParameterProvider[] parameters = tableData.getParameters();
if (parameters == null || parameters.length == 0) {
tableData.setParameters(ParameterHelper.analyze4Parameters(tableData.getQueryWithoutComments(), false));
tableData.setParameters(ParameterHelper.analyze4Parameters(tableData.getQuery(), false));
return new Parameter[0];
}
return Parameter.providers2Parameter(Calculator.processParameters(calculator, parameters));

12
designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java

@ -515,6 +515,18 @@ public class TemplateTreePane extends JPanel implements FileOperations {
return reportletsTree.getSelectedFileNode();
}
/**
* 是否需要展示锁定信息
*/
public static boolean needShowLockInfo(String lock, String selectedFilePath, FileNode node) {
boolean getLockInfo = LockInfoUtils.isCompatibleOperator() || LockInfoUtils.unableGetLockInfo();
if (!getLockInfo) {
UserInfo info = TemplateRepository.getInstance().showLockInfo(selectedFilePath);
return info.getTplUnLocked() ? (lock != null && !lock.equals(node.getUserID())) : info.getTplLocked();
}
return false;
}
public void setToolbarStateChangeListener(FileToolbarStateChangeListener listener) {
this.toolBarStateChangeListener = listener;
}

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

@ -7,7 +7,6 @@ import com.fr.base.extension.FileExtension;
import com.fr.base.info.TemplateSaveInfoContext;
import com.fr.base.io.BaseBook;
import com.fr.base.iofile.attr.DesignBanCopyAttrMark;
import com.fr.base.iofile.attr.ForkIdAttrMark;
import com.fr.base.iofile.attr.TemplateIdAttrMark;
import com.fr.base.iofile.attr.TemplateThemeAttrMark;
import com.fr.base.svg.IconUtils;
@ -344,18 +343,6 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
generateTemplateId();
}
/**
* 如果没有 forkId, 则计算 forkId
* 要求在 templateId, 创建后执行
*/
protected void computeForkIdIfAbsent() {
ForkIdAttrMark forkIdAttrMark = this.template.getAttrMark(ForkIdAttrMark.XML_TAG);
if (forkIdAttrMark == null || StringUtils.isEmpty(forkIdAttrMark.getForkId())) {
this.template.addAttrMark(new ForkIdAttrMark(this.template.getTemplateID()));
}
}
/**
* 收集图表信息
*/
@ -984,7 +971,6 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
}
// 在保存之前,初始化 templateID
generateNewTemplateIdForSaveAs();
computeForkIdIfAbsent();
this.editingFILE = editingFILE;
TemplateSaveInfoContext.getInstance().startCollect(template);
@ -1854,8 +1840,6 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
}
// 在保存之前,初始化 templateID
generateNewTemplateIdForSaveAs();
computeForkIdIfAbsent();
this.editingFILE = editingFILE;
boolean result = this.saveToNewRealFile(oldName);
if (result) {

1
designer-base/src/main/java/com/fr/design/utils/TemplateUtils.java

@ -16,7 +16,6 @@ import com.fr.log.FineLoggerFactory;
import com.fr.stable.ArrayUtils;
import com.fr.stable.CoreConstants;
import com.fanruan.product.ProductConstants;
import com.fr.stable.ProductConstants;
import com.fr.stable.StringUtils;
import com.fr.workspace.WorkContext;
import com.fr.workspace.server.lock.TplOperator;

2
designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java

@ -230,7 +230,7 @@ public class VersionCheckUtils {
Set<Class> localServiceSet = FineObjectPool.getInstance().getServerPool().keySet();
try {
JSONArray serviceArray = new FunctionalHttpRequest(info).getServiceList(info);
JSONArray serviceArray = new FunctionalHttpRequest(info).getServiceList();
for (int i = 0; i < serviceArray.size(); i++) {
try {
Class clazz = Class.forName((String) serviceArray.get(i));

3
designer-base/src/main/java/com/fr/start/server/FineEmbedServer.java

@ -3,8 +3,6 @@ package com.fr.start.server;
import com.fanruan.carina.Carina;
import com.fr.event.EventDispatcher;
import com.fr.workspace.WorkContext;
import com.fr.module.ModuleContext;
import com.fr.plugin.listener.SpecialPluginEvent;
/**
* Created by juhaoyu on 2018/6/6.
@ -22,7 +20,6 @@ public abstract class FineEmbedServer {
public synchronized static void start() throws Exception {
if (!isRunning()) {
onStarting = true;
EventDispatcher.fire(SpecialPluginEvent.WITH_SERVER_AND_NOT_START_IN_REMOTE);
EventDispatcher.fire(EmbedServerEvent.BeforeStart);
DesignEmbedHelper.start();
onStarting = false;

10
designer-realize/src/main/java/com/fanruan/boot/env/DesignEnvChooseComponent.java vendored

@ -93,6 +93,12 @@ import com.fr.workspace.server.theme.ThemedCellBorderFeature;
import com.fr.workspace.server.vcs.CompatibleVcsOperator;
import com.fr.workspace.server.vcs.VcsOperator;
import com.fr.workspace.server.vcs.VcsOperatorProxy;
import com.fr.workspace.server.vcs.v2.move.CompatibleVcsMoveOperator;
import com.fr.workspace.server.vcs.v2.move.VcsMoveOperator;
import com.fr.workspace.server.vcs.v2.move.VcsMoveOperatorImpl;
import com.fr.workspace.server.vcs.v2.scheduler.CompatibleAutoCleanOperator;
import com.fr.workspace.server.vcs.v2.scheduler.VcsAutoCleanOperator;
import com.fr.workspace.server.vcs.v2.scheduler.VcsAutoCleanService;
import org.jetbrains.annotations.NotNull;
/**
@ -265,6 +271,10 @@ public class DesignEnvChooseComponent extends ResourceAffiliate {
WorkRPCRegister.wrap(EncryptOperator.class, new FineEncryptOperator()),
WorkRPCRegister.wrap(VcsOperator.class, new VcsOperatorProxy()),
WorkRPCRegister.wrap(WorkRPCType.Compatible, VcsOperator.class, new CompatibleVcsOperator()),
WorkRPCRegister.wrap(VcsMoveOperator.class, VcsMoveOperatorImpl.getInstance()),
WorkRPCRegister.wrap(WorkRPCType.Compatible, VcsMoveOperator.class, new CompatibleVcsMoveOperator()),
WorkRPCRegister.wrap(VcsAutoCleanOperator.class, VcsAutoCleanService.getInstance()),
WorkRPCRegister.wrap(WorkRPCType.Compatible, VcsAutoCleanOperator.class, new CompatibleAutoCleanOperator()),
WorkRPCRegister.wrap(TemplateChecker.class, new TemplateCheckerImpl()),
WorkRPCRegister.wrap(ShareComponentOperator.class, new DefaultShareComponentOperator()),
WorkRPCRegister.wrap(ShareEmbeddedConverter.class, new DefaultShareEmbeddedConverter()),

3
designer-realize/src/main/java/com/fr/start/SplashContext.java

@ -11,9 +11,6 @@ import com.fr.event.Listener;
import com.fr.event.Null;
import com.fr.general.GeneralContext;
import com.fr.general.locale.image.I18nImage;
import com.fr.module.ModuleEvent;
import com.fr.general.locale.LocaleCenter;
import com.fr.general.locale.LocaleMark;
import com.fr.stable.StringUtils;
import java.util.Locale;

8
designer-realize/src/main/java/com/fr/start/module/DesignerWorkspaceActivator.java

@ -105,11 +105,11 @@ public class DesignerWorkspaceActivator extends Activator {
if (current.isLocal()) {
ExecutorService service = newSingleThreadExecutor(
new NamedThreadFactory("DesignerWorkspaceActivator"));
service.submit(new Runnable() {
@Override
public void run() {
service.submit(() -> {
try {
FineEmbedServer.start();
} catch (Exception e) {
throw new RuntimeException(e);
}
});
service.shutdown();

Loading…
Cancel
Save