From 36b48b30dc4c340b5d98d26ff44cc1d9eaf9c151 Mon Sep 17 00:00:00 2001 From: vito Date: Thu, 14 Apr 2016 10:38:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=87=E6=8D=A2=E5=88=86=E6=94=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/extra/PluginWebBridge.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/designer_base/src/com/fr/design/extra/PluginWebBridge.java b/designer_base/src/com/fr/design/extra/PluginWebBridge.java index 6a1ad0f281..0f5122f3e3 100644 --- a/designer_base/src/com/fr/design/extra/PluginWebBridge.java +++ b/designer_base/src/com/fr/design/extra/PluginWebBridge.java @@ -1,6 +1,5 @@ package com.fr.design.extra; -import com.fr.design.actions.server.PluginManagerAction; import com.fr.design.dialog.UIDialog; import com.fr.design.extra.exe.*; import com.fr.general.FRLogger; @@ -114,10 +113,9 @@ public class PluginWebBridge { * 修改选中的插件的活跃状态 * * @param pluginID 插件ID - * @param active 如果要把插件修改为激活状态,则为true,否则为false */ - public void setPluginActive(String pluginID, boolean active, final JSObject callback) { - Task task = new PluginTask<>(webEngine, callback, new ModifyStatusExecutor(pluginID, active)); + public void setPluginActive(String pluginID, final JSObject callback) { + Task task = new PluginTask<>(webEngine, callback, new ModifyStatusExecutor(pluginID)); new Thread(task).start(); } @@ -195,7 +193,7 @@ public class PluginWebBridge { public String getPluginFromStore(String category, String seller, String fee) { - StringBuilder url = new StringBuilder("http://127.0.0.1:8080/ShopServer?pg=plist"); + StringBuilder url = new StringBuilder("http://192.168.101.20/ShopServer?pg=plist"); if (StringUtils.isNotBlank(category)) { url.append("&cid=").append(category.split("-")[1]); } @@ -208,6 +206,7 @@ public class PluginWebBridge { String resText = null; try { HttpClient httpClient = new HttpClient(url.toString()); + //httpClient.setTimeout(5000); resText = httpClient.getResponseText(); } catch (Exception e) { FRLogger.getLogger().error(e.getMessage()); @@ -217,9 +216,8 @@ public class PluginWebBridge { public void closeWindow() { if (uiDialog != null) { - uiDialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE); + uiDialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE); uiDialog.setVisible(false); - uiDialog.dispose(); } } }