Browse Source

1.REPORT-11523 @Sung:mac下alphafine打开网页超链有问题

---修复该问题
2.增强程序健壮性;返回按钮增加小手,增强交互性
3.修改一些次要程度的log的级别
final/10.0
alex.sung 6 years ago
parent
commit
ee37af303f
  1. 17
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java
  2. 4
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/preview/RobotPreviewPane.java
  3. 12
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/ComplementAdviceManager.java
  4. 4
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/RecommendSearchManager.java
  5. 4
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SimilarSearchManeger.java

17
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFineDialog.java

@ -947,11 +947,13 @@ public class AlphaFineDialog extends UIDialog {
Thread sendThread = new Thread(new Runnable() {
@Override
public void run() {
RecentSearchManager searchManager = RecentSearchManager.getInstance();
searchManager.addModel(storeText, cellModel);
sendDataToServer(storeText, cellModel);
TemplateInfoCollector.getInstance().sendTemplateInfo();
ErrorInfoUploader.getInstance().sendErrorInfo();
if(StringUtils.isNotEmpty(storeText)){
RecentSearchManager searchManager = RecentSearchManager.getInstance();
searchManager.addModel(storeText, cellModel);
sendDataToServer(storeText, cellModel);
TemplateInfoCollector.getInstance().sendTemplateInfo();
ErrorInfoUploader.getInstance().sendErrorInfo();
}
}
});
sendThread.start();
@ -1376,10 +1378,11 @@ public class AlphaFineDialog extends UIDialog {
private void initBackPane() {
backPane = new JPanel(new BorderLayout());
JLabel jLabel = new JLabel(" < " + com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Back"));
jLabel.setPreferredSize(new Dimension(680, 20));
jLabel.setPreferredSize(new Dimension(80, 20));
jLabel.setFont(AlphaFineConstants.SMALL_FONT);
jLabel.setForeground(AlphaFineConstants.DARK_GRAY);
backPane.add(jLabel, BorderLayout.CENTER);
jLabel.setCursor(new Cursor(Cursor.HAND_CURSOR));
backPane.add(jLabel, BorderLayout.WEST);
jLabel.addMouseListener(new MouseAdapter() {
@Override

4
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/preview/RobotPreviewPane.java

@ -23,6 +23,7 @@ import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.net.URLEncoder;
/**
@ -32,6 +33,7 @@ public class RobotPreviewPane extends JPanel {
private static final int TITLE_AREA_HEIGHT = 15;
private static final int HOT_TITLE_AREA_HEIGHT = 30;
private static final String STRING_ENCODER = "UTF-8";
public RobotPreviewPane(AlphaCellModel model, String content) {
this.setLayout(new BorderLayout());
@ -58,7 +60,7 @@ public class RobotPreviewPane extends JPanel {
.replaceAll("\\('", StringUtils.EMPTY)
.replaceAll("'\\)", StringUtils.EMPTY);
try {
Desktop.getDesktop().browse(new URI(AlphaFineConstants.ALPHA_PREVIEW + s));
Desktop.getDesktop().browse(new URI(AlphaFineConstants.ALPHA_PREVIEW + URLEncoder.encode(s, STRING_ENCODER)));
} catch (IOException e1) {
FineLoggerFactory.getLogger().error(e1.getMessage());
} catch (URISyntaxException e1) {

12
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/ComplementAdviceManager.java

@ -3,18 +3,14 @@ package com.fr.design.mainframe.alphafine.search.manager.impl;
import com.fr.design.DesignerEnvManager;
import com.fr.design.mainframe.alphafine.AlphaFineConstants;
import com.fr.design.mainframe.alphafine.AlphaFineHelper;
import com.fr.design.mainframe.alphafine.cell.model.RobotModel;
import com.fr.design.mainframe.alphafine.model.SearchResult;
import com.fr.general.http.HttpToolbox;
import com.fr.json.JSONArray;
import com.fr.json.JSONException;
import com.fr.json.JSONObject;
import com.fr.json.JSONUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import java.io.IOException;
import com.fr.third.org.apache.commons.codec.digest.DigestUtils;
import java.io.IOException;
/**
* @author alex.sung created on 2018/7/23.
@ -52,9 +48,9 @@ public class ComplementAdviceManager {
AlphaFineHelper.checkCancel();
allModelList = AlphaFineHelper.getModelListFromJSONArray(result,"keywords");
} catch(ClassCastException | JSONException e){
FineLoggerFactory.getLogger().error("complement advice search error: " + e.getMessage());
FineLoggerFactory.getLogger().debug("complement advice search error: " + e.getMessage());
} catch (IOException e1) {
FineLoggerFactory.getLogger().error("complement advice get result error: " + e1.getMessage());
FineLoggerFactory.getLogger().debug("complement advice get result error: " + e1.getMessage());
}
}
if (searchResult.isEmpty()) {

4
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/RecommendSearchManager.java

@ -77,9 +77,9 @@ public class RecommendSearchManager implements AlphaFineSearchProvider {
}
}
} catch (JSONException e) {
FineLoggerFactory.getLogger().error("recommend search error! :" + e.getMessage());
FineLoggerFactory.getLogger().debug("recommend search error! :" + e.getMessage());
} catch (IOException e) {
FineLoggerFactory.getLogger().error("recommend search get result error! :" + e.getMessage());
FineLoggerFactory.getLogger().debug("recommend search get result error! :" + e.getMessage());
}
}

4
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/SimilarSearchManeger.java

@ -56,9 +56,9 @@ public class SimilarSearchManeger implements AlphaFineSearchProvider {
AlphaFineHelper.checkCancel();
allModelList = AlphaFineHelper.getModelListFromJSONArray(result,"title");
} catch (ClassCastException | JSONException e) {
FineLoggerFactory.getLogger().error("similar search error: " + e.getMessage());
FineLoggerFactory.getLogger().debug("similar search error: " + e.getMessage());
} catch (IOException e) {
FineLoggerFactory.getLogger().error("similar search get result error: " + e.getMessage());
FineLoggerFactory.getLogger().debug("similar search get result error: " + e.getMessage());
}
}
moreModelList.clear();

Loading…
Cancel
Save