--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/core/com.nokia.carbide.cpp.news.reader/src/com/nokia/carbide/cpp/internal/news/reader/feed/CarbideFeedFetcher.java Mon Apr 13 14:05:22 2009 -0500
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+package com.nokia.carbide.cpp.internal.news.reader.feed;
+
+import java.net.URLConnection;
+
+import com.sun.syndication.fetcher.impl.FeedFetcherCache;
+import com.sun.syndication.fetcher.impl.HttpURLFeedFetcher;
+import com.sun.syndication.fetcher.impl.SyndFeedInfo;
+
+/**
+ * A class to retrieve feed via HTTP connection.
+ *
+ */
+public class CarbideFeedFetcher extends HttpURLFeedFetcher {
+
+ /**
+ * Constructor to enable CarbideFeedFetcher without caching feeds.
+ */
+ public CarbideFeedFetcher() {
+ super();
+ }
+
+ /**
+ * Constructor to enable CarbideFeedFetcher to cache feeds
+ * @param feedCache - an instance of the FeedFetcherCache interface
+ */
+ public CarbideFeedFetcher(FeedFetcherCache feedInfoCache) {
+ super(feedInfoCache);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see com.sun.syndication.fetcher.impl.HttpURLFeedFetcher#setRequestHeaders(java.net.URLConnection, com.sun.syndication.fetcher.impl.SyndFeedInfo)
+ */
+ protected void setRequestHeaders(URLConnection connection, SyndFeedInfo syndFeedInfo) {
+ super.setRequestHeaders(connection, syndFeedInfo);
+ // specify acceptable content types
+ connection.setRequestProperty("Accept", "*/xml");
+ }
+
+}
--- a/core/com.nokia.carbide.cpp.news.reader/src/com/nokia/carbide/cpp/internal/news/reader/feed/FeedManager.java Fri Apr 10 10:48:56 2009 -0500
+++ b/core/com.nokia.carbide.cpp.news.reader/src/com/nokia/carbide/cpp/internal/news/reader/feed/FeedManager.java Mon Apr 13 14:05:22 2009 -0500
@@ -333,7 +333,7 @@
}
FeedFetcherCache feedInfoCache = HashMapFeedInfoCache.getInstance();
- FeedFetcher fetcher = new HttpURLFeedFetcher(feedInfoCache);
+ FeedFetcher fetcher = new CarbideFeedFetcher(feedInfoCache);
SyndFeed sFeed = fetcher.retrieveFeed(feedUrl);
CarbideSyndFeed feed = new CarbideSyndFeed(sFeed);
if (feed != null) {
@@ -458,7 +458,7 @@
* Reload feeds from cache if necessary.
*/
private void validateFeeds() {
- if (newsFeeds == null || newsFeeds.size() == 0 || resourceFeed == null) {
+ if ((newsFeeds == null || newsFeeds.size() == 0) && resourceFeed == null) {
try {
if (!loadFeedListing()) {
return;
--- a/debuggercdi/com.nokia.carbide.cpp.debug.kernelaware/src/com/nokia/carbide/cpp/debug/kernelaware/testapi/SymbianOSViewTester.java Fri Apr 10 10:48:56 2009 -0500
+++ b/debuggercdi/com.nokia.carbide.cpp.debug.kernelaware/src/com/nokia/carbide/cpp/debug/kernelaware/testapi/SymbianOSViewTester.java Mon Apr 13 14:05:22 2009 -0500
@@ -19,8 +19,7 @@
import com.freescale.cdt.debug.cw.core.CWPlugin;
import com.nokia.carbide.cpp.debug.kernelaware.*;
-import com.nokia.carbide.cpp.debug.kernelaware.ui.GenericTableTab;
-import com.nokia.carbide.cpp.debug.kernelaware.ui.SymbianOSView;
+import com.nokia.carbide.cpp.debug.kernelaware.ui.*;
import org.eclipse.jface.viewers.*;
import org.eclipse.swt.widgets.TabFolder;
@@ -123,7 +122,13 @@
*/
public static Text getFilterText(IViewPart viewPart) {
Viewer viewer = getCurrentViewer(viewPart);
- GenericTableTab tableTab = (GenericTableTab) viewer.getData("controller");
- return tableTab.getFilterText();
+ Object data = viewer.getData("controller");
+ if (data instanceof GenericTableTab) {
+ return ((GenericTableTab) data).getFilterText();
+ }
+ else if (data instanceof OverviewTab) {
+ return ((OverviewTab) data).getFilterText();
+ }
+ return null;
}
}
--- a/debuggercdi/com.nokia.carbide.cpp.debug.kernelaware/src/com/nokia/carbide/cpp/debug/kernelaware/ui/OverviewTab.java Fri Apr 10 10:48:56 2009 -0500
+++ b/debuggercdi/com.nokia.carbide.cpp.debug.kernelaware/src/com/nokia/carbide/cpp/debug/kernelaware/ui/OverviewTab.java Mon Apr 13 14:05:22 2009 -0500
@@ -261,6 +261,7 @@
Tree tree = viewer.getTree();
tree.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 1));
+ viewer.setData("controller", this); //$NON-NLS-1$
return viewer;
}
@@ -277,4 +278,9 @@
viewer.refresh();
}
}
+
+
+ public Text getFilterText() {
+ return filterText;
+ }
}