Permalink
Browse files

update to 2.1.6 and additional changes

  • Loading branch information...
1 parent e2ca9c7 commit 90d38e1143af6d09e64873619bbaad629c82f018 @bpasero bpasero committed Mar 15, 2013
Showing with 1,331 additions and 427 deletions.
  1. +10 −10 org.rssowl.build/build-files/fetchSvnAll.xml
  2. +2 −2 org.rssowl.build/pluginbuilder.config
  3. +2 −2 org.rssowl.build/releases/HEAD.properties
  4. +9 −9 org.rssowl.build/rssowl.product
  5. +3 −2 org.rssowl.core.tests/Launch RSSOwl 2.0 Tests.launch
  6. +1 −1 org.rssowl.core.tests/META-INF/MANIFEST.MF
  7. +1 −1 org.rssowl.core.tests/src/org/rssowl/core/tests/connection/ConnectionTests.java
  8. +31 −6 org.rssowl.core.tests/src/org/rssowl/core/tests/model/ApplicationLayerTest.java
  9. +20 −20 org.rssowl.core.tests/src/org/rssowl/core/tests/model/NewsFilterTest.java
  10. +7 −3 org.rssowl.core.tests/src/org/rssowl/core/tests/ui/FolderNewsMarkTest.java
  11. +1 −1 org.rssowl.core/META-INF/MANIFEST.MF
  12. +3 −1 org.rssowl.core/src/org/rssowl/core/IApplicationService.java
  13. +50 −7 org.rssowl.core/src/org/rssowl/core/connection/PlatformCredentialsProvider.java
  14. +3 −3 org.rssowl.core/src/org/rssowl/core/internal/ApplicationServiceImpl.java
  15. +96 −18 org.rssowl.core/src/org/rssowl/core/internal/LogBridge.java
  16. +9 −1 org.rssowl.core/src/org/rssowl/core/internal/connection/DefaultProtocolHandler.java
  17. +1 −1 org.rssowl.core/src/org/rssowl/core/internal/connection/EasySSLProtocolSocketFactory.java
  18. +6 −3 org.rssowl.core/src/org/rssowl/core/internal/interpreter/RDFInterpreter.java
  19. +6 −3 org.rssowl.core/src/org/rssowl/core/internal/interpreter/RSSInterpreter.java
  20. +7 −2 org.rssowl.core/src/org/rssowl/core/internal/interpreter/json/JSONInterpreter.java
  21. +1 −1 org.rssowl.core/src/org/rssowl/core/internal/interpreter/json/JSONObject.java
  22. +3 −3 org.rssowl.core/src/org/rssowl/core/internal/persist/Feed.java
  23. +19 −1 org.rssowl.core/src/org/rssowl/core/internal/persist/News.java
  24. +2 −1 org.rssowl.core/src/org/rssowl/core/internal/persist/Preference.java
  25. +3 −0 org.rssowl.core/src/org/rssowl/core/internal/persist/pref/DefaultPreferences.java
  26. +1 −2 org.rssowl.core/src/org/rssowl/core/internal/persist/service/DBManager.java
  27. +3 −0 org.rssowl.core/src/org/rssowl/core/persist/pref/Preference.java
  28. +13 −3 org.rssowl.core/src/org/rssowl/core/util/CoreUtils.java
  29. +2 −7 org.rssowl.core/src/org/rssowl/core/util/DateUtils.java
  30. +1 −1 org.rssowl.core/src/org/rssowl/core/util/HTMLFilterReader.java
  31. +0 −1 org.rssowl.core/src/org/rssowl/core/util/Messages.java
  32. +0 −1 org.rssowl.core/src/org/rssowl/core/util/messages.properties
  33. +1 −1 org.rssowl.feature.eclipse/feature.xml
  34. +1 −1 org.rssowl.feature.tests/feature.xml
  35. +1 −1 org.rssowl.feature/feature.xml
  36. +1 −1 org.rssowl.lib.db4o/META-INF/MANIFEST.MF
  37. +1 −1 org.rssowl.lib.httpclient/META-INF/MANIFEST.MF
  38. +1 −1 org.rssowl.lib.jdom/META-INF/MANIFEST.MF
  39. +1 −1 org.rssowl.lib.lucene/META-INF/MANIFEST.MF
  40. +1 −1 org.rssowl.ui/META-INF/MANIFEST.MF
  41. +2 −2 org.rssowl.ui/about.ini
  42. +2 −2 org.rssowl.ui/config.ini
  43. BIN org.rssowl.ui/icons/elcl16/languages.gif
  44. BIN org.rssowl.ui/icons/obj16/classic_layout.gif
  45. BIN org.rssowl.ui/icons/obj16/headlines_layout.gif
  46. BIN org.rssowl.ui/icons/obj16/list_layout.gif
  47. BIN org.rssowl.ui/icons/obj16/newspaper_layout.gif
  48. BIN org.rssowl.ui/icons/obj16/share_pocket.gif
  49. BIN org.rssowl.ui/icons/obj16/vertical_layout.gif
  50. +81 −41 org.rssowl.ui/pack200jars.bat
  51. +4 −1 org.rssowl.ui/plugin.eclipse.properties
  52. +4 −4 org.rssowl.ui/plugin.eclipse.xml
  53. +6 −2 org.rssowl.ui/plugin.properties
  54. +45 −8 org.rssowl.ui/plugin.xml
  55. +6 −5 org.rssowl.ui/rssowl.product
  56. +14 −14 org.rssowl.ui/rssowl_installer.nsi
  57. +14 −1 org.rssowl.ui/src/org/rssowl/ui/internal/ApplicationActionBarAdvisor.java
  58. +4 −1 org.rssowl.ui/src/org/rssowl/ui/internal/ApplicationWorkbenchWindowAdvisor.java
  59. +42 −2 org.rssowl.ui/src/org/rssowl/ui/internal/Controller.java
  60. +22 −0 org.rssowl.ui/src/org/rssowl/ui/internal/FolderNewsMark.java
  61. +18 −0 org.rssowl.ui/src/org/rssowl/ui/internal/OwlUI.java
  62. +1 −1 org.rssowl.ui/src/org/rssowl/ui/internal/PreferencesInitializer.java
  63. +1 −1 org.rssowl.ui/src/org/rssowl/ui/internal/SplashHandler.java
  64. +30 −3 org.rssowl.ui/src/org/rssowl/ui/internal/actions/CopyLinkAction.java
  65. +66 −0 org.rssowl.ui/src/org/rssowl/ui/internal/actions/DownloadLanguagesAction.java
  66. +13 −1 org.rssowl.ui/src/org/rssowl/ui/internal/actions/FindExtensionsAction.java
  67. +1 −1 org.rssowl.ui/src/org/rssowl/ui/internal/actions/MakeNewsStickyAction.java
  68. +9 −0 org.rssowl.ui/src/org/rssowl/ui/internal/actions/MarkTypesReadAction.java
  69. +5 −2 org.rssowl.ui/src/org/rssowl/ui/internal/actions/ToggleReadStateAction.java
  70. +61 −0 org.rssowl.ui/src/org/rssowl/ui/internal/actions/TranslateRSSOwlAction.java
  71. +0 −4 org.rssowl.ui/src/org/rssowl/ui/internal/dialogs/Messages.java
  72. +0 −4 org.rssowl.ui/src/org/rssowl/ui/internal/dialogs/messages.properties
  73. +46 −31 org.rssowl.ui/src/org/rssowl/ui/internal/dialogs/preferences/BrowserPreferencePage.java
  74. +13 −1 org.rssowl.ui/src/org/rssowl/ui/internal/dialogs/preferences/FeedsPreferencePage.java
  75. +1 −0 org.rssowl.ui/src/org/rssowl/ui/internal/dialogs/preferences/Messages.java
  76. +0 −13 org.rssowl.ui/src/org/rssowl/ui/internal/dialogs/preferences/MiscPreferencePage.java
  77. +2 −1 org.rssowl.ui/src/org/rssowl/ui/internal/dialogs/preferences/messages.properties
  78. +11 −0 org.rssowl.ui/src/org/rssowl/ui/internal/dialogs/properties/RetentionPropertyPage.java
  79. +2 −2 org.rssowl.ui/src/org/rssowl/ui/internal/editors/browser/WebBrowserView.java
  80. +116 −4 org.rssowl.ui/src/org/rssowl/ui/internal/editors/feed/FeedView.java
  81. +102 −16 org.rssowl.ui/src/org/rssowl/ui/internal/editors/feed/FilterBar.java
  82. +0 −1 org.rssowl.ui/src/org/rssowl/ui/internal/editors/feed/Messages.java
  83. +7 −5 org.rssowl.ui/src/org/rssowl/ui/internal/editors/feed/NewsBrowserLabelProvider.java
  84. +1 −0 org.rssowl.ui/src/org/rssowl/ui/internal/editors/feed/NewsBrowserViewer.java
  85. +7 −0 org.rssowl.ui/src/org/rssowl/ui/internal/editors/feed/NewsTableViewer.java
  86. +0 −1 org.rssowl.ui/src/org/rssowl/ui/internal/editors/feed/messages.properties
  87. +6 −0 org.rssowl.ui/src/org/rssowl/ui/internal/services/DownloadService.java
  88. +95 −89 org.rssowl.ui/src/org/rssowl/ui/internal/services/SyncService.java
  89. +106 −34 org.rssowl.ui/src/org/rssowl/ui/internal/util/CBrowser.java
  90. +3 −0 org.rssowl.update.sites/addons/site.xml
  91. +1 −1 org.rssowl.update.sites/eclipse/site.xml
  92. +1 −1 org.rssowl.update.sites/nightly/site.xml
  93. +34 −0 org.rssowl.update.sites/nls/site.xml
  94. +2 −2 org.rssowl.update.sites/program/site.xml
@@ -3,43 +3,43 @@
<antcall target="svn.co">
<param name="target" value="features"/>
<param name="element.id" value="org.rssowl"/>
- <param name="project.name" value="/trunk/org.rssowl.feature"/>
+ <param name="project.name" value="/branches/2.1.x/org.rssowl.feature"/>
<param name="url" value="https://rssowl.svn.sourceforge.net/svnroot/rssowl"/>
</antcall>
<antcall target="svn.co">
<param name="target" value="plugins"/>
<param name="element.id" value="org.rssowl.lib.jdom"/>
- <param name="project.name" value="/trunk/org.rssowl.lib.jdom"/>
+ <param name="project.name" value="/branches/2.1.x/org.rssowl.lib.jdom"/>
<param name="url" value="https://rssowl.svn.sourceforge.net/svnroot/rssowl"/>
</antcall>
<antcall target="svn.co">
<param name="target" value="plugins"/>
<param name="element.id" value="org.rssowl.ui"/>
- <param name="project.name" value="/trunk/org.rssowl.ui"/>
+ <param name="project.name" value="/branches/2.1.x/org.rssowl.ui"/>
<param name="url" value="https://rssowl.svn.sourceforge.net/svnroot/rssowl"/>
</antcall>
<antcall target="svn.co">
<param name="target" value="plugins"/>
<param name="element.id" value="org.rssowl.lib.db4o"/>
- <param name="project.name" value="/trunk/org.rssowl.lib.db4o"/>
+ <param name="project.name" value="/branches/2.1.x/org.rssowl.lib.db4o"/>
<param name="url" value="https://rssowl.svn.sourceforge.net/svnroot/rssowl"/>
</antcall>
<antcall target="svn.co">
<param name="target" value="plugins"/>
<param name="element.id" value="org.rssowl.core"/>
- <param name="project.name" value="/trunk/org.rssowl.core"/>
+ <param name="project.name" value="/branches/2.1.x/org.rssowl.core"/>
<param name="url" value="https://rssowl.svn.sourceforge.net/svnroot/rssowl"/>
</antcall>
<antcall target="svn.co">
<param name="target" value="plugins"/>
<param name="element.id" value="org.rssowl.lib.httpclient"/>
- <param name="project.name" value="/trunk/org.rssowl.lib.httpclient"/>
+ <param name="project.name" value="/branches/2.1.x/org.rssowl.lib.httpclient"/>
<param name="url" value="https://rssowl.svn.sourceforge.net/svnroot/rssowl"/>
</antcall>
<antcall target="svn.co">
<param name="target" value="plugins"/>
<param name="element.id" value="org.rssowl.lib.lucene"/>
- <param name="project.name" value="/trunk/org.rssowl.lib.lucene"/>
+ <param name="project.name" value="/branches/2.1.x/org.rssowl.lib.lucene"/>
<param name="url" value="https://rssowl.svn.sourceforge.net/svnroot/rssowl"/>
</antcall>
<antcall target="svn.co">
@@ -57,19 +57,19 @@
<antcall target="svn.co">
<param name="target" value="features"/>
<param name="element.id" value="org.rssowl.tests"/>
- <param name="project.name" value="/trunk/org.rssowl.feature.tests"/>
+ <param name="project.name" value="/branches/2.1.x/org.rssowl.feature.tests"/>
<param name="url" value="https://rssowl.svn.sourceforge.net/svnroot/rssowl"/>
</antcall>
<antcall target="svn.co">
<param name="target" value="plugins"/>
<param name="element.id" value="org.rssowl.core.tests"/>
- <param name="project.name" value="/trunk/org.rssowl.core.tests"/>
+ <param name="project.name" value="/branches/2.1.x/org.rssowl.core.tests"/>
<param name="url" value="https://rssowl.svn.sourceforge.net/svnroot/rssowl"/>
</antcall>
<antcall target="svn.co">
<param name="target" value="features"/>
<param name="element.id" value="org.rssowl.dependencies"/>
- <param name="project.name" value="/trunk/org.rssowl.feature.dependencies"/>
+ <param name="project.name" value="/branches/2.1.x/org.rssowl.feature.dependencies"/>
<param name="url" value="https://rssowl.svn.sourceforge.net/svnroot/rssowl"/>
</antcall>
<antcall target="svn.co">
@@ -1,4 +1,4 @@
-#Tue May 17 11:01:29 CEST 2011
+#Fri Aug 19 10:02:04 CEST 2011
autotestsuite.class.exclusions=.*All(Tests|PDE_Tests|_Tests|PDETests).*;.*PerformanceTest.*
pluginbuilder.eclipse.url=http\://www.rssowl.org/dl/target/eclipse-SDK-3.4.2_3.5.2-linux-gtk-x86_64_3.zip
pluginbuilder.feature.urls=http\://www.rssowl.org/dl/target/eclipse-3.4.2_3.5.2-delta-pack_2.zip
@@ -7,7 +7,7 @@ pluginbuilder.server.user=rssowl
pluginbuilder.is.svn=true
autotestsuite.class.inclusions=.*
pluginbuilder.is.runtests=true
-pluginbuilder.svn.url=https\://rssowl.svn.sourceforge.net/svnroot/rssowl/trunk
+pluginbuilder.svn.url=https\://rssowl.svn.sourceforge.net/svnroot/rssowl/branches/2.1.x
autotestsuite.plugin.inclusions=.*(test|tests)$
pluginbuilder.is.cvs=false
pluginbuilder.is.copy=false
@@ -1,6 +1,6 @@
#Written from Plug-in Builder Editor
-#Sun Apr 17 18:43:12 CEST 2011
+#Fri Aug 19 10:02:01 CEST 2011
buildType=N
-version=2.1.0
+version=2.1.2
fetchTag=HEAD
buildTypePresentation=
@@ -6,14 +6,14 @@
<aboutInfo>
<image path="/org.rssowl.ui/icons/product/about.gif"/>
<text>
- RSSOwl
-
-Version: 2.1
-Build Id: 2011-07-15
-
-RSSOwl is licensed under the terms of the Eclipse Public License version 1.0.
-http://www.rssowl.org/legal/epl-v10.html
-
+ RSSOwl
+
+Version: 2.1
+Build Id: 2011-07-15
+
+RSSOwl is licensed under the terms of the Eclipse Public License version 1.0.
+http://www.rssowl.org/legal/epl-v10.html
+
(c) Copyright RSSOwl contributors and others 2005, 2011. All rights reserved.
</text>
</aboutInfo>
@@ -73,7 +73,7 @@ RSSOwl Development Team - initial API and implementation
<features>
<feature id="org.eclipse.rcp" version="3.4.200.R342_v20090122-989JESTEbig-SVaL8UJHcYBr4A63"/>
<feature id="org.rssowl.dependencies" version="2.0.0"/>
- <feature id="org.rssowl" version="2.1.0.qualifier"/>
+ <feature id="org.rssowl" version="2.1.2.qualifier"/>
</features>
@@ -33,11 +33,12 @@
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.rssowl.ui.product"/>
<booleanAttribute key="run_in_ui_thread" value="true"/>
-<stringAttribute key="selected_target_plugins" value="org.eclipse.text@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.core.resources.compatibility@default:false,org.eclipse.ecf.identity@default:default,org.eclipse.equinox.p2.artifact.repository@default:default,org.eclipse.osgi.services@default:default,org.eclipse.core.resources.win32.x86@default:false,org.eclipse.jface@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.net@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.ecf@default:default,org.eclipse.core.filesystem@default:default,com.ibm.icu@default:default,org.hamcrest.core@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.osgi,org.eclipse.core.databinding.property@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.equinox.security@default:default,org.eclipse.equinox.p2.jarprocessor@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.help@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.ui.views@default:default,javax.servlet@default:default,org.eclipse.core.resources@default:default,org.eclipse.update.core.win32@default:false,org.eclipse.core.filesystem.win32.x86@default:false,org.eclipse.equinox.common@default:default,org.eclipse.core.commands@default:default,org.eclipse.equinox.security.win32.x86@default:false,org.eclipse.core.net.win32.x86@default:false,org.eclipse.equinox.preferences@default:default,org.eclipse.core.jobs@default:default,org.eclipse.swt.win32.win32.x86@default:false,org.eclipse.ui.win32@default:false,org.eclipse.swt@default:default,org.eclipse.ui.forms@default:default,org.eclipse.core.runtime@default:true,org.eclipse.equinox.p2.engine@default:default,org.eclipse.update.ui@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.ui@default:default,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.update.configurator@default:default,org.eclipse.jface.text@default:default,org.eclipse.equinox.concurrent@default:default,org.junit4@default:default,org.eclipse.ant.core@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.app@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.variables@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.update.core@default:default,org.eclipse.ui.ide@default:default"/>
-<stringAttribute key="selected_workspace_plugins" value="org.rssowl.lib.httpclient@default:default,org.rssowl.ui@default:default,org.rssowl.core@default:default,org.rssowl.core.tests@default:default,org.rssowl.lib.db4o@default:default,org.rssowl.lib.lucene@default:default,org.rssowl.lib.jdom@default:default"/>
+<stringAttribute key="selected_target_plugins" value="com.ibm.icu.base@default:default,org.eclipse.core.commands@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.core.databinding@default:default,org.eclipse.core.expressions@default:default,org.eclipse.core.jobs@default:default,org.eclipse.core.net.win32.x86@default:false,org.eclipse.core.net@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.core.runtime@default:true,org.eclipse.equinox.app@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.preferences@default:default,org.eclipse.equinox.registry@default:default,org.eclipse.equinox.security.win32.x86@default:false,org.eclipse.equinox.security@default:default,org.eclipse.help@default:default,org.eclipse.jface.databinding@default:default,org.eclipse.jface@default:default,org.eclipse.osgi@-1:true,org.eclipse.swt.win32.win32.x86@default:false,org.eclipse.swt@default:default,org.eclipse.ui.forms@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui@default:default,org.eclipse.update.configurator@3:true,org.eclipse.update.core.win32@default:false,org.eclipse.update.core@default:default,org.eclipse.update.ui@default:default,org.junit4@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="org.rssowl.core.tests@default:default,org.rssowl.core@default:default,org.rssowl.lib.db4o@default:default,org.rssowl.lib.httpclient@default:default,org.rssowl.lib.jdom@default:default,org.rssowl.lib.lucene@default:default,org.rssowl.ui@default:default"/>
<booleanAttribute key="show_selected_only" value="false"/>
<stringAttribute key="templateConfig" value="${target_home}\configuration\config.ini"/>
<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
<booleanAttribute key="useDefaultConfig" value="true"/>
<booleanAttribute key="useDefaultConfigArea" value="false"/>
<booleanAttribute key="useProduct" value="false"/>
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Tests Plug-in
Bundle-SymbolicName: org.rssowl.core.tests;singleton:=true
-Bundle-Version: 2.1.0.qualifier
+Bundle-Version: 2.1.6.qualifier
Bundle-Vendor: RSSOwl.org
Require-Bundle: org.eclipse.core.runtime,
org.rssowl.lib.jdom,
@@ -727,7 +727,7 @@ public void testNewsTransformer() throws Exception {
*/
@Test
public void testNewsTransformerEmbedded() throws Exception {
- String link = "http://www.rssowl.org/node/258";
+ String link = "http://www.rssowl.org/help";
String transformedUrl = Controller.getDefault().getEmbeddedTransformedUrl(link);
InputStream inS = Owl.getConnectionService().getHandler(new URI(transformedUrl)).openStream(new URI(transformedUrl), null, new HashMap<Object, Object>());
@@ -129,7 +129,7 @@ public void testHandleReloadedWithAsyncLoadingOfEquivalentNews() throws Exceptio
feed1 = fFactory.createFeed(null, new URI("http://www.feed1.com"));
INews news1 = fFactory.createNews(null, feed1, new Date());
news1.setLink(newsLink);
- fAppService.handleFeedReload(mark1, feed1, null, false, new NullProgressMonitor());
+ fAppService.handleFeedReload(mark1, feed1, null, false, true, new NullProgressMonitor());
assertEquals(INews.State.READ, DynamicDAO.load(INews.class, news1.getId()).getState());
}
@@ -152,13 +152,13 @@ public void testBookMarkLastNewNewsDateIsSetDuringReload() throws Exception {
long time = System.currentTimeMillis();
feed1 = fFactory.createFeed(null, new URI("http://www.feed1.com"));
fFactory.createNews(null, feed1, new Date());
- fAppService.handleFeedReload(mark1, feed1, null, false, new NullProgressMonitor());
+ fAppService.handleFeedReload(mark1, feed1, null, false, true, new NullProgressMonitor());
assertNotNull(mark1.getMostRecentNewsDate());
long lastUpdatedDate = mark1.getMostRecentNewsDate().getTime();
assertTrue(time <= lastUpdatedDate);
feed1 = fFactory.createFeed(null, new URI("http://www.feed1.com"));
- fAppService.handleFeedReload(mark1, feed1, null, false, new NullProgressMonitor());
+ fAppService.handleFeedReload(mark1, feed1, null, false, true, new NullProgressMonitor());
assertEquals(lastUpdatedDate, mark1.getMostRecentNewsDate().getTime());
}
@@ -182,7 +182,7 @@ public void testHandleFeedReloadWithRetentionStrategy() throws Exception {
news.setState(INews.State.READ);
Owl.getPreferenceService().getEntityScope(mark).putBoolean(DefaultPreferences.DEL_READ_NEWS_STATE, true);
- fAppService.handleFeedReload(mark, emptyFeed, null, false, new NullProgressMonitor());
+ fAppService.handleFeedReload(mark, emptyFeed, null, false, true, new NullProgressMonitor());
feed = null;
System.gc();
@@ -193,6 +193,31 @@ public void testHandleFeedReloadWithRetentionStrategy() throws Exception {
assertEquals(INews.State.DELETED, DynamicDAO.load(INews.class, news.getId()).getState());
}
+ @Test
+ public void testHandleFeedReloadWithoutRetentionStrategy() throws Exception {
+ IFeed feed = fFactory.createFeed(null, new URI("http://www.rssowl.org"));
+ IFolder folder = fFactory.createFolder(null, null, "Folder");
+ IBookMark mark = fFactory.createBookMark(null, folder, new FeedLinkReference(feed.getLink()), "Mark");
+ DynamicDAO.save(feed);
+ FeedReference feedRef = new FeedReference(feed.getId());
+ DynamicDAO.save(folder);
+
+ IFeed emptyFeed = fFactory.createFeed(null, feed.getLink());
+ INews news = fFactory.createNews(null, emptyFeed, new Date());
+ news.setState(INews.State.READ);
+
+ Owl.getPreferenceService().getEntityScope(mark).putBoolean(DefaultPreferences.DEL_READ_NEWS_STATE, true);
+ fAppService.handleFeedReload(mark, emptyFeed, null, false, false, new NullProgressMonitor());
+
+ feed = null;
+ System.gc();
+
+ feed = feedRef.resolve();
+ assertEquals(1, feed.getNews().size());
+ assertEquals(1, feed.getVisibleNews().size());
+ assertEquals(INews.State.READ, DynamicDAO.load(INews.class, news.getId()).getState());
+ }
+
/**
* Tests that Feed#mergeNews(List, boolean) works properly during
* handleFeedReload in the fast path when there are many news to be removed.
@@ -225,7 +250,7 @@ public void testHandleFeedReloadWithNewsToCleanUpBiggerThanTwenty() throws Excep
IFeed emptyFeed = fFactory.createFeed(null, feed.getLink());
- fAppService.handleFeedReload(mark, emptyFeed, null, false, new NullProgressMonitor());
+ fAppService.handleFeedReload(mark, emptyFeed, null, false, true, new NullProgressMonitor());
feed = null;
System.gc();
@@ -267,7 +292,7 @@ public void entitiesUpdated(Set<NewsEvent> events) {
}
};
DynamicDAO.addEntityListener(INews.class, newsListener);
- fAppService.handleFeedReload(mark, emptyFeed, null, false, new NullProgressMonitor());
+ fAppService.handleFeedReload(mark, emptyFeed, null, false, true, new NullProgressMonitor());
} finally {
if (newsListener != null)
DynamicDAO.removeEntityListener(INews.class, newsListener);
Oops, something went wrong.

0 comments on commit 90d38e1

Please sign in to comment.