Browse Source

Merge pull request #36 in PF/design from ~KERRY/design-pf:9.0 to 9.0

* commit '679087e1207719911c548e32b5fc82a265d0e26b':
  PMD
  PMD
  REPORT-2354 将平台的插件管理和设计器的插件管理统一起来
  REPORT-2354 将平台的插件管理和设计器的插件管理统一起来
master
superman 8 years ago
parent
commit
5fc9fda12b
  1. 16
      designer_base/src/com/fr/design/extra/PluginOperateUtils.java
  2. 7
      designer_base/src/com/fr/design/extra/PluginWebBridge.java
  3. 2
      designer_base/src/com/fr/design/extra/exe/callback/ModifyStatusCallback.java
  4. 1
      designer_base/src/com/fr/design/locale/designer.properties
  5. 3
      designer_base/src/com/fr/design/locale/designer_en_US.properties
  6. 3
      designer_base/src/com/fr/design/locale/designer_ja_JP.properties
  7. 3
      designer_base/src/com/fr/design/locale/designer_ko_KR.properties
  8. 3
      designer_base/src/com/fr/design/locale/designer_zh_CN.properties
  9. 3
      designer_base/src/com/fr/design/locale/designer_zh_TW.properties

16
designer_base/src/com/fr/design/extra/PluginOperateUtils.java

@ -112,12 +112,11 @@ public class PluginOperateUtils {
@Override @Override
public void run() { public void run() {
try { try {
// HttpClient httpClient = new HttpClient(SiteCenter.getInstance().acquireUrlByKind("plugin.plist") + "&keyword=" + keyword); if (StringUtils.isBlank(keyword)) {
if(StringUtils.isBlank(keyword)){
getRecommendPlugins(jsCallback); getRecommendPlugins(jsCallback);
return; return;
} }
HttpClient httpClient = new HttpClient("http://shop.finereport.com/searchApi?type=all" + "&keyword=" + keyword); HttpClient httpClient = new HttpClient(SiteCenter.getInstance().acquireUrlByKind("shop.plugin.store") + "&keyword=" + keyword);
httpClient.asGet(); httpClient.asGet();
String result = httpClient.getResponseText(); String result = httpClient.getResponseText();
JSONObject jsonObject = new JSONObject(result); JSONObject jsonObject = new JSONObject(result);
@ -135,8 +134,7 @@ public class PluginOperateUtils {
new Thread(new Runnable() { new Thread(new Runnable() {
@Override @Override
public void run() { public void run() {
// String plistUrl = SiteCenter.getInstance().acquireUrlByKind("plugin.plist"); String plistUrl = SiteCenter.getInstance().acquireUrlByKind("shop.plugin.plist") + "?";
String plistUrl = "http://shop.finereport.com/plugins" + "?";
boolean getRecommend = StringUtils.isEmpty(category) && StringUtils.isEmpty(seller) && StringUtils.isEmpty(fee); boolean getRecommend = StringUtils.isEmpty(category) && StringUtils.isEmpty(seller) && StringUtils.isEmpty(fee);
if (getRecommend) { if (getRecommend) {
getRecommendPlugins(jsCallback); getRecommendPlugins(jsCallback);
@ -167,8 +165,8 @@ public class PluginOperateUtils {
} }
public static void getRecommendPlugins(JSCallback jsCallback){ public static void getRecommendPlugins(JSCallback jsCallback) {
String plistUrl = "http://shop.finereport.com/ShopServer?pg=feature"; String plistUrl = SiteCenter.getInstance().acquireUrlByKind("shop.plugin.feature");
try { try {
HttpClient httpClient = new HttpClient(plistUrl.toString()); HttpClient httpClient = new HttpClient(plistUrl.toString());
String result = httpClient.getResponseText(); String result = httpClient.getResponseText();
@ -179,7 +177,7 @@ public class PluginOperateUtils {
} }
public static void dealParams(StringBuilder url, String category, String seller, String fee){ public static void dealParams(StringBuilder url, String category, String seller, String fee) {
if (StringUtils.isNotBlank(category)) { if (StringUtils.isNotBlank(category)) {
url.append("cid=").append(category.split("-")[1]); url.append("cid=").append(category.split("-")[1]);
} else { } else {
@ -216,7 +214,7 @@ public class PluginOperateUtils {
@Override @Override
public void run() { public void run() {
String result; String result;
String url = "http://shop.finereport.com/shopServer?pg=category"; String url = SiteCenter.getInstance().acquireUrlByKind("shop.plugin.category");
if (url != null) { if (url != null) {
HttpClient httpClient = new HttpClient(url); HttpClient httpClient = new HttpClient(url);
result = httpClient.getResponseText(); result = httpClient.getResponseText();

7
designer_base/src/com/fr/design/extra/PluginWebBridge.java

@ -44,6 +44,8 @@ public class PluginWebBridge {
private UILabel uiLabel; private UILabel uiLabel;
private static final String DESIGNERI18PREFIX = "FR-Designer-";
/** /**
* 动作枚举 * 动作枚举
*/ */
@ -513,9 +515,8 @@ public class PluginWebBridge {
/** /**
* 国际化 * 国际化
*/ */
public void parseI18(final String key, final JSObject callback){ public String parseI18(final String key){
JSCallback jsCallback = new JSCallback(webEngine, callback); return Inter.getLocText(DESIGNERI18PREFIX + key);
jsCallback.execute(Inter.getLocText("FR-Designer-" + key));
} }
/** /**

2
designer_base/src/com/fr/design/extra/exe/callback/ModifyStatusCallback.java

@ -21,7 +21,7 @@ public class ModifyStatusCallback implements PluginTaskCallback{
public void done(PluginTaskResult result) { public void done(PluginTaskResult result) {
if (result.isSuccess()) { if (result.isSuccess()) {
jsCallback.execute("success"); jsCallback.execute("success");
String modifyMessage = isActive ? Inter.getLocText("FR-Designer-Plugin_Actived") : Inter.getLocText("FR-Designer-Plugin_Disabled"); String modifyMessage = isActive ? Inter.getLocText("FR-Designer-Plugin_Disabled") : Inter.getLocText("FR-Designer-Plugin_Actived");
JOptionPane.showMessageDialog(null, modifyMessage); JOptionPane.showMessageDialog(null, modifyMessage);
} else { } else {
JOptionPane.showMessageDialog(null, result.getMessage(), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE); JOptionPane.showMessageDialog(null, result.getMessage(), Inter.getLocText("FR-Designer-Plugin_Warning"), JOptionPane.ERROR_MESSAGE);

1
designer_base/src/com/fr/design/locale/designer.properties

@ -2009,6 +2009,7 @@ FR-Designer-Alphafine_No_Remind=
FR-Designer-Plugin_Install_Success= FR-Designer-Plugin_Install_Success=
FR-Designer-Plugin_Install_Failed= FR-Designer-Plugin_Install_Failed=
FR-Designer-Plugin_Install_Dependence= FR-Designer-Plugin_Install_Dependence=
FR-Designer-Plugin-Install_Package=
FR-Designer-Plugin_Delete_Dependence= FR-Designer-Plugin_Delete_Dependence=
FR-Designer-Plugin_Delete_Success= FR-Designer-Plugin_Delete_Success=
FR-Designer-Plugin_Delete_Failed= FR-Designer-Plugin_Delete_Failed=

3
designer_base/src/com/fr/design/locale/designer_en_US.properties

@ -2004,9 +2004,10 @@ FR-Designer_AlphaFine_Latest=Recent
FR-Designer_AlphaFine_ShowLess=show less FR-Designer_AlphaFine_ShowLess=show less
FR-Designer_Alphafine=AlphaFine FR-Designer_Alphafine=AlphaFine
FR-Designer-Alphafine_No_Remind=don't remind FR-Designer-Alphafine_No_Remind=don't remind
FR-Designer-Plugin_Install_Success= Designer-Plugin_Install_Success=
FR-Designer-Plugin_Install_Failed= FR-Designer-Plugin_Install_Failed=
FR-Designer-Plugin_Install_Dependence= FR-Designer-Plugin_Install_Dependence=
FR-Designer-Plugin-Install_Package=
FR-Designer-Plugin_Delete_Dependence= FR-Designer-Plugin_Delete_Dependence=
FR-Designer-Plugin_Delete_Success= FR-Designer-Plugin_Delete_Success=
FR-Designer-Plugin_Delete_Failed= FR-Designer-Plugin_Delete_Failed=

3
designer_base/src/com/fr/design/locale/designer_ja_JP.properties

@ -1982,9 +1982,10 @@ FR-Base_UnSignIn=\ \u672A\u30ED\u30B0\u30A4\u30F3
Every=\u6BCF Every=\u6BCF
CellWrite-Preview_Cell_Content=\u30BB\u30EB\u306E\u5185\u5BB9\u3092\u30D7\u30EC\u30D3\u30E5\u30FC\u3059\u308B CellWrite-Preview_Cell_Content=\u30BB\u30EB\u306E\u5185\u5BB9\u3092\u30D7\u30EC\u30D3\u30E5\u30FC\u3059\u308B
FormulaD-Data_Fields=\u30C7\u30FC\u30BF\u30D5\u30A3\u30FC\u30EB\u30C9 FormulaD-Data_Fields=\u30C7\u30FC\u30BF\u30D5\u30A3\u30FC\u30EB\u30C9
FR-Designer-Plugin_Install_Success= Designer-Plugin_Install_Success=
FR-Designer-Plugin_Install_Failed= FR-Designer-Plugin_Install_Failed=
FR-Designer-Plugin_Install_Dependence= FR-Designer-Plugin_Install_Dependence=
FR-Designer-Plugin-Install_Package=
FR-Designer-Plugin_Delete_Dependence= FR-Designer-Plugin_Delete_Dependence=
FR-Designer-Plugin_Delete_Success= FR-Designer-Plugin_Delete_Success=
FR-Designer-Plugin_Delete_Failed= FR-Designer-Plugin_Delete_Failed=

3
designer_base/src/com/fr/design/locale/designer_ko_KR.properties

@ -1983,9 +1983,10 @@ FR-Base_UnSignIn=\uC544\uC9C1 \uB4F1\uB85D
Every=\uAC01 Every=\uAC01
CellWrite-Preview_Cell_Content=\uC140\uB0B4\uC6A9\uBBF8\uB9AC\uBCF4\uAE30 CellWrite-Preview_Cell_Content=\uC140\uB0B4\uC6A9\uBBF8\uB9AC\uBCF4\uAE30
FormulaD-Data_Fields=\uB370\uC774\uD130\uD56D\uBAA9 FormulaD-Data_Fields=\uB370\uC774\uD130\uD56D\uBAA9
FR-Designer-Plugin_Install_Success= Designer-Plugin_Install_Success=
FR-Designer-Plugin_Install_Failed= FR-Designer-Plugin_Install_Failed=
FR-Designer-Plugin_Install_Dependence= FR-Designer-Plugin_Install_Dependence=
FR-Designer-Plugin-Install_Package=
FR-Designer-Plugin_Delete_Dependence= FR-Designer-Plugin_Delete_Dependence=
FR-Designer-Plugin_Delete_Success= FR-Designer-Plugin_Delete_Success=
FR-Designer-Plugin_Delete_Failed= FR-Designer-Plugin_Delete_Failed=

3
designer_base/src/com/fr/design/locale/designer_zh_CN.properties

@ -2003,6 +2003,7 @@ FR-Designer-Alphafine_No_Remind=\u4E0D\u518D\u63D0\u793A
FR-Designer-Plugin_Install_Success=\u63D2\u4EF6\u5B89\u88C5\u6210\u529F FR-Designer-Plugin_Install_Success=\u63D2\u4EF6\u5B89\u88C5\u6210\u529F
FR-Designer-Plugin_Install_Failed=\u63D2\u4EF6\u5B89\u88C5\u5931\u8D25 FR-Designer-Plugin_Install_Failed=\u63D2\u4EF6\u5B89\u88C5\u5931\u8D25
FR-Designer-Plugin_Install_Dependence=\u662F\u5426\u5B89\u88C5\u4F9D\u8D56\u73AF\u5883 FR-Designer-Plugin_Install_Dependence=\u662F\u5426\u5B89\u88C5\u4F9D\u8D56\u73AF\u5883
FR-Designer-Plugin-Install_Package=\u63D2\u4EF6\u5B89\u88C5\u5305
FR-Designer-Plugin_Delete_Dependence=\u662F\u5426\u5220\u9664\u4F9D\u8D56\u73AF\u5883 FR-Designer-Plugin_Delete_Dependence=\u662F\u5426\u5220\u9664\u4F9D\u8D56\u73AF\u5883
FR-Designer-Plugin_Delete_Success=\u63D2\u4EF6\u5220\u9664\u6210\u529F FR-Designer-Plugin_Delete_Success=\u63D2\u4EF6\u5220\u9664\u6210\u529F
FR-Designer-Plugin_Delete_Failed=\u63D2\u4EF6\u5220\u9664\u5931\u8D25 FR-Designer-Plugin_Delete_Failed=\u63D2\u4EF6\u5220\u9664\u5931\u8D25
@ -2071,4 +2072,4 @@ FR-Designer-Plugin-Store_Finereport=\u5E06\u8F6F
FR-Designer-Plugin-Store_Version=\u7248\u672C FR-Designer-Plugin-Store_Version=\u7248\u672C
FR-Designer-Plugin-Store_Developer=\u5F00\u53D1\u8005 FR-Designer-Plugin-Store_Developer=\u5F00\u53D1\u8005
FR-Designer-Plugin-Store_Jar=jar\u5305 FR-Designer-Plugin-Store_Jar=jar\u5305
FS-Plugin-Store_Disconnected=\u65E0\u6CD5\u8FDE\u63A5\u5E94\u7528\u4E2D\u5FC3 FR-Designer-Plugin-Store_Disconnected=\u65E0\u6CD5\u8FDE\u63A5\u5E94\u7528\u4E2D\u5FC3

3
designer_base/src/com/fr/design/locale/designer_zh_TW.properties

@ -2000,9 +2000,10 @@ FR-Designer_AlphaFine_ShowLess=\u6536\u8D77
FR-Designer_Alphafine=AlphaFine\u667A\u80FD\u641C\u7D22 FR-Designer_Alphafine=AlphaFine\u667A\u80FD\u641C\u7D22
FR-Designer_AlphaFine_ShowAll=\u986F\u793A\u5168\u90E8 FR-Designer_AlphaFine_ShowAll=\u986F\u793A\u5168\u90E8
FR-Designer-Alphafine_No_Remind=\u4E0D\u518D\u63D0\u793A FR-Designer-Alphafine_No_Remind=\u4E0D\u518D\u63D0\u793A
FR-Designer-Plugin_Install_Success= Designer-Plugin_Install_Success=
FR-Designer-Plugin_Install_Failed= FR-Designer-Plugin_Install_Failed=
FR-Designer-Plugin_Install_Dependence= FR-Designer-Plugin_Install_Dependence=
FR-Designer-Plugin-Install_Package=
FR-Designer-Plugin_Delete_Dependence= FR-Designer-Plugin_Delete_Dependence=
FR-Designer-Plugin_Delete_Success= FR-Designer-Plugin_Delete_Success=
FR-Designer-Plugin_Delete_Failed= FR-Designer-Plugin_Delete_Failed=

Loading…
Cancel
Save