Browse Source

Merge branch 'feature/10.0' of http://cloud.finedevelop.com:2015/scm/~kerry/design into feature/10.0

master
kerry 7 years ago
parent
commit
3859620344
  1. 14
      designer/src/com/fr/design/mainframe/alphafine/search/manager/impl/RecentSearchManager.java
  2. 2
      designer_base/src/com/fr/design/utils/DesignUtils.java

14
designer/src/com/fr/design/mainframe/alphafine/search/manager/impl/RecentSearchManager.java

@ -12,7 +12,7 @@ import com.fr.design.mainframe.toolbar.UpdateActionManager;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.json.JSONException; import com.fr.json.JSONException;
import com.fr.json.JSONObject; import com.fr.json.JSONObject;
import com.fr.log.FRLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.stable.ProductConstants; import com.fr.stable.ProductConstants;
import com.fr.third.org.apache.lucene.analysis.Analyzer; import com.fr.third.org.apache.lucene.analysis.Analyzer;
import com.fr.third.org.apache.lucene.analysis.standard.StandardAnalyzer; import com.fr.third.org.apache.lucene.analysis.standard.StandardAnalyzer;
@ -98,12 +98,12 @@ public class RecentSearchManager implements AlphaFineSearchProvider {
try { try {
directory = FSDirectory.open(new File(path)); directory = FSDirectory.open(new File(path));
} catch (IOException e) { } catch (IOException e) {
FRLoggerFactory.getLogger().error("cannot open directory " + path); FineLoggerFactory.getLogger().error("cannot open directory " + path);
} }
try { try {
indexWriter = new IndexWriter(directory, config); indexWriter = new IndexWriter(directory, config);
} catch (IOException e) { } catch (IOException e) {
FRLoggerFactory.getLogger().error("not privilege to write to" + path); FineLoggerFactory.getLogger().error("not privilege to write to" + path);
} }
} }
@ -118,7 +118,7 @@ public class RecentSearchManager implements AlphaFineSearchProvider {
directory = FSDirectory.open(new File(path)); directory = FSDirectory.open(new File(path));
indexReader = DirectoryReader.open(directory); indexReader = DirectoryReader.open(directory);
} catch (IOException e) { } catch (IOException e) {
FRLoggerFactory.getLogger().error("not privilege to read " + path); FineLoggerFactory.getLogger().error("not privilege to read " + path);
} }
indexSearcher = new IndexSearcher(indexReader); indexSearcher = new IndexSearcher(indexReader);
} }
@ -140,7 +140,7 @@ public class RecentSearchManager implements AlphaFineSearchProvider {
doc.add(new IntField("searchCount", searchCount, Field.Store.YES)); doc.add(new IntField("searchCount", searchCount, Field.Store.YES));
writeDoc(doc); writeDoc(doc);
} catch (JSONException e) { } catch (JSONException e) {
FRLoggerFactory.getLogger().error("add document error: " + e.getMessage()); FineLoggerFactory.getLogger().error("add document error: " + e.getMessage());
} }
} }
@ -154,7 +154,7 @@ public class RecentSearchManager implements AlphaFineSearchProvider {
indexWriter.commit(); indexWriter.commit();
indexWriter.close(); indexWriter.close();
} catch (IOException e) { } catch (IOException e) {
FRLoggerFactory.getLogger().error("write document error: " + e.getMessage()); FineLoggerFactory.getLogger().error("write document error: " + e.getMessage());
} }
} }
@ -195,7 +195,7 @@ public class RecentSearchManager implements AlphaFineSearchProvider {
} }
} catch (Exception e) { } catch (Exception e) {
FRLoggerFactory.getLogger().error("local search error: " + e.getMessage()); FineLoggerFactory.getLogger().error("local search error: " + e.getMessage());
return recentModelList; return recentModelList;
} }
return recentModelList; return recentModelList;

2
designer_base/src/com/fr/design/utils/DesignUtils.java

@ -353,7 +353,7 @@ public class DesignUtils {
} else { } else {
try { try {
String web = GeneralContext.getCurrentAppNameOfEnv(); String web = GeneralContext.getCurrentAppNameOfEnv();
String url = "http://localhost:" + DesignerEnvManager.getEnvManager().getJettyServerPort() + "/" + web + "/" + ServerConfig.getInstance().getServletName() String url = "http://localhost:" + DesignerEnvManager.getEnvManager().getJettyServerPort() + "/" + web + "/" + ServerConfig.getInstance().getReportServletName()
+ postfixOfUri; + postfixOfUri;
StartServer.browserURLWithLocalEnv(url); StartServer.browserURLWithLocalEnv(url);
} catch (Throwable e) { } catch (Throwable e) {

Loading…
Cancel
Save