From c68b4ee0b7d37a0c8760785f9332843f862e5ecf Mon Sep 17 00:00:00 2001 From: Fangjie Hu Date: Tue, 27 Sep 2016 11:12:49 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=AF=8F=E6=AC=A1=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E5=BF=85=E6=9B=B4=E6=96=B0=E6=96=87=E4=BB=B6=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/extra/PluginHelper.java | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/designer_base/src/com/fr/design/extra/PluginHelper.java b/designer_base/src/com/fr/design/extra/PluginHelper.java index 5d0c9fa1a..b258d495d 100644 --- a/designer_base/src/com/fr/design/extra/PluginHelper.java +++ b/designer_base/src/com/fr/design/extra/PluginHelper.java @@ -140,6 +140,14 @@ public class PluginHelper { List list = dependence.getDependPlugins(); for (int i = 0;list != null && i < list.size(); i++){ PluginDependenceUnit dependenceUnit = list.get(i); + //覆盖型依赖,立即下载安装 + if (dependenceUnit.isCover()){ + try { + installCoverDependence(dependenceUnit); + } catch (Exception e) { + throw new PluginDependenceException(); + } + } if (!dependenceUnit.checkFileEnv()){ needInstallDependence.add(dependenceUnit); } @@ -153,6 +161,31 @@ public class PluginHelper { installDependenceOnline(currentID, needInstallDependence); } + public static void installCoverDependence(PluginDependenceUnit dependenceUnit) throws Exception { + HttpClient httpClient = new HttpClient(SiteCenter.getInstance().acquireUrlByKind(dependenceUnit.getDependenceID())); + if (httpClient.getResponseCode() == HttpURLConnection.HTTP_OK) { + InputStream reader = httpClient.getResponseStream(); + String temp = StableUtils.pathJoin(PluginHelper.DEPENDENCE_DOWNLOAD_PATH, PluginHelper.TEMP_FILE); + StableUtils.makesureFileExist(new File(temp)); + FileOutputStream writer = new FileOutputStream(temp); + byte[] buffer = new byte[PluginConstants.BYTES_NUM]; + int bytesRead = 0; + while ((bytesRead = reader.read(buffer)) > 0) { + writer.write(buffer, 0, bytesRead); + buffer = new byte[PluginConstants.BYTES_NUM]; + } + reader.close(); + writer.flush(); + writer.close(); + + + //安装文件 + IOUtils.unZipFilesGBK(temp, FRContext.getCurrentEnv().getPath() + dependenceUnit.getDependenceDir()); + }else { + throw new PluginDependenceException(); + } + } + /** * 构造一个下载UI From 08cba4e505defcb80e2a8aa7b059d987d0f835a4 Mon Sep 17 00:00:00 2001 From: Fangjie Hu Date: Tue, 27 Sep 2016 11:55:57 +0800 Subject: [PATCH 2/3] update --- .../src/com/fr/design/extra/PluginHelper.java | 33 ------------------- 1 file changed, 33 deletions(-) diff --git a/designer_base/src/com/fr/design/extra/PluginHelper.java b/designer_base/src/com/fr/design/extra/PluginHelper.java index b258d495d..5d0c9fa1a 100644 --- a/designer_base/src/com/fr/design/extra/PluginHelper.java +++ b/designer_base/src/com/fr/design/extra/PluginHelper.java @@ -140,14 +140,6 @@ public class PluginHelper { List list = dependence.getDependPlugins(); for (int i = 0;list != null && i < list.size(); i++){ PluginDependenceUnit dependenceUnit = list.get(i); - //覆盖型依赖,立即下载安装 - if (dependenceUnit.isCover()){ - try { - installCoverDependence(dependenceUnit); - } catch (Exception e) { - throw new PluginDependenceException(); - } - } if (!dependenceUnit.checkFileEnv()){ needInstallDependence.add(dependenceUnit); } @@ -161,31 +153,6 @@ public class PluginHelper { installDependenceOnline(currentID, needInstallDependence); } - public static void installCoverDependence(PluginDependenceUnit dependenceUnit) throws Exception { - HttpClient httpClient = new HttpClient(SiteCenter.getInstance().acquireUrlByKind(dependenceUnit.getDependenceID())); - if (httpClient.getResponseCode() == HttpURLConnection.HTTP_OK) { - InputStream reader = httpClient.getResponseStream(); - String temp = StableUtils.pathJoin(PluginHelper.DEPENDENCE_DOWNLOAD_PATH, PluginHelper.TEMP_FILE); - StableUtils.makesureFileExist(new File(temp)); - FileOutputStream writer = new FileOutputStream(temp); - byte[] buffer = new byte[PluginConstants.BYTES_NUM]; - int bytesRead = 0; - while ((bytesRead = reader.read(buffer)) > 0) { - writer.write(buffer, 0, bytesRead); - buffer = new byte[PluginConstants.BYTES_NUM]; - } - reader.close(); - writer.flush(); - writer.close(); - - - //安装文件 - IOUtils.unZipFilesGBK(temp, FRContext.getCurrentEnv().getPath() + dependenceUnit.getDependenceDir()); - }else { - throw new PluginDependenceException(); - } - } - /** * 构造一个下载UI From e7fd18fddce0764298edcbeb34cdbd8f9976b698 Mon Sep 17 00:00:00 2001 From: Fangjie Hu Date: Thu, 29 Sep 2016 07:39:38 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=B8=8D=E8=AE=BE=E7=BD=AE=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/chart/gui/ChartComponent.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/designer_chart/src/com/fr/design/chart/gui/ChartComponent.java b/designer_chart/src/com/fr/design/chart/gui/ChartComponent.java index 186b7eb6c..56c85327d 100644 --- a/designer_chart/src/com/fr/design/chart/gui/ChartComponent.java +++ b/designer_chart/src/com/fr/design/chart/gui/ChartComponent.java @@ -222,12 +222,9 @@ public class ChartComponent extends MiddleChartComponent implements MouseListene /** * 鼠标点击 * @param event 鼠标事件 + * 不设置鼠标点击跳转事件 */ - public void mouseClicked(MouseEvent event) { - int click = event.getClickCount(); - if (click >= 1 && activeGlyph != null && this.isSupportEdit()) { - activeGlyph.goRightPane(); - } + public void mouseClicked(MouseEvent event) { } /**