diff --git a/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java b/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java index ca659e5f34..4761002648 100644 --- a/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java +++ b/designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java @@ -440,7 +440,7 @@ public class EnvChangeEntrance { Set 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)); diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/sql/PreviewPerformedSqlPane.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/sql/PreviewPerformedSqlPane.java index 4228f5c8da..de784ceb10 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/sql/PreviewPerformedSqlPane.java +++ b/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)); diff --git a/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java b/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java index d60a45135d..b91ac522d0 100644 --- a/designer-base/src/main/java/com/fr/design/file/TemplateTreePane.java +++ b/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; } diff --git a/designer-base/src/main/java/com/fr/design/utils/TemplateUtils.java b/designer-base/src/main/java/com/fr/design/utils/TemplateUtils.java index efaef8695f..ff0afe1e9a 100644 --- a/designer-base/src/main/java/com/fr/design/utils/TemplateUtils.java +++ b/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; diff --git a/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java b/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java index 69ca667bb6..0d10600b64 100644 --- a/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java +++ b/designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java @@ -230,7 +230,7 @@ public class VersionCheckUtils { Set 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)); diff --git a/designer-base/src/main/java/com/fr/start/server/FineEmbedServer.java b/designer-base/src/main/java/com/fr/start/server/FineEmbedServer.java index 13f708e588..fc3d2a4e46 100644 --- a/designer-base/src/main/java/com/fr/start/server/FineEmbedServer.java +++ b/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; diff --git a/designer-realize/src/main/java/com/fanruan/boot/env/DesignEnvChooseComponent.java b/designer-realize/src/main/java/com/fanruan/boot/env/DesignEnvChooseComponent.java index 35bbba6819..d655e511f1 100644 --- a/designer-realize/src/main/java/com/fanruan/boot/env/DesignEnvChooseComponent.java +++ b/designer-realize/src/main/java/com/fanruan/boot/env/DesignEnvChooseComponent.java @@ -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()), diff --git a/designer-realize/src/main/java/com/fr/start/SplashContext.java b/designer-realize/src/main/java/com/fr/start/SplashContext.java index c52726045d..f7f5f3d4f4 100644 --- a/designer-realize/src/main/java/com/fr/start/SplashContext.java +++ b/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; diff --git a/designer-realize/src/main/java/com/fr/start/module/DesignerWorkspaceActivator.java b/designer-realize/src/main/java/com/fr/start/module/DesignerWorkspaceActivator.java index 2fd4a532c8..44fcfb24c3 100644 --- a/designer-realize/src/main/java/com/fr/start/module/DesignerWorkspaceActivator.java +++ b/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();