Browse Source

Pull request #2658: 无jira任务, bugfix/10.0 合 feature/10.0冲突

Merge in DESIGN/design from ~VITO/c-design:bugfix/10.0 to bugfix/10.0

* commit 'd0e4e1e8b65f0ea7c941adfb35c2c5948f5316b3':
  无jira任务, bugfix/10.0 合 feature/10.0冲突
bugfix/10.0
vito 4 years ago
parent
commit
fe5b8aaa4d
  1. 24
      designer-base/src/main/java/com/fr/design/utils/DesignUtils.java

24
designer-base/src/main/java/com/fr/design/utils/DesignUtils.java

@ -6,6 +6,7 @@ import com.fr.concurrent.NamedThreadFactory;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager; import com.fr.design.ExtraDesignClassManager;
import com.fr.design.dialog.FineJOptionPane; import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.env.DesignerWorkspaceInfo;
import com.fr.design.fun.DesignerEnvProcessor; import com.fr.design.fun.DesignerEnvProcessor;
import com.fr.design.gui.UILookAndFeel; import com.fr.design.gui.UILookAndFeel;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
@ -15,6 +16,7 @@ import com.fr.file.FileFILE;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.FRFont; import com.fr.general.FRFont;
import com.fr.general.GeneralContext; import com.fr.general.GeneralContext;
import com.fr.general.GeneralUtils;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.CommonCodeUtils; import com.fr.stable.CommonCodeUtils;
@ -26,6 +28,9 @@ import com.fr.value.NotNullLazyValue;
import com.fr.workspace.WorkContext; import com.fr.workspace.WorkContext;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import com.fr.workspace.connect.WorkspaceConnectionInfo;
import com.fr.workspace.engine.channel.http.FunctionalHttpRequest;
import javax.swing.SwingUtilities; import javax.swing.SwingUtilities;
import javax.swing.UIManager; import javax.swing.UIManager;
import java.awt.Desktop; import java.awt.Desktop;
@ -417,4 +422,23 @@ public class DesignUtils {
public static boolean sendFeedBack(FeedBackInfo feedBackInfo) throws Exception { public static boolean sendFeedBack(FeedBackInfo feedBackInfo) throws Exception {
return true; return true;
} }
public static boolean checkDesignerRemoteVersion() {
if (WorkContext.getCurrent().isLocal()) {
return true;
}
String envName = DesignerEnvManager.getEnvManager().getCurEnvName();
DesignerWorkspaceInfo selectedEnv = DesignerEnvManager.getEnvManager().getWorkspaceInfo(envName);
String localBranch;
String remoteBranch;
WorkspaceConnectionInfo connectionInfo = selectedEnv.getConnection();
localBranch = GeneralUtils.readFullBuildNO();
try {
remoteBranch = new FunctionalHttpRequest(connectionInfo).getServerBranch();
} catch (Exception e) {
return false;
}
return localBranch.contains("#") && localBranch.equals(remoteBranch);
}
} }

Loading…
Cancel
Save