more portal changes:
- support for rss
- better browser support
- add some rss feeds
Binary file core/com.nokia.carbide.discovery.ui/icons/banner-discovery.png has changed
--- a/core/com.nokia.carbide.discovery.ui/plugin.properties Thu Jul 29 09:51:07 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/plugin.properties Thu Jul 29 13:28:20 2010 -0500
@@ -1,3 +1,9 @@
view.name=Install Extensions
menu.title=Carbide Portal
-portal.desc=Install extensions, get support, install SDKs, find latest news
\ No newline at end of file
+portal.desc=Install extensions, get support, install SDKs, find latest news
+customize.title = Customize
+home.title = Home
+support.title = Support
+install.layer.title = Install Extensions
+wrenchscience.title = Wrench Science
+creatingcarbide.title = Creating Carbide
\ No newline at end of file
--- a/core/com.nokia.carbide.discovery.ui/plugin.xml Thu Jul 29 09:51:07 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/plugin.xml Thu Jul 29 13:28:20 2010 -0500
@@ -52,38 +52,47 @@
id="com.nokia.carbide.discovery.ui.customizePage"
image="icons/icon-discovery.png"
order="50"
- title="Customize">
+ title="%customize.title">
</portalPage>
<portalPage
id="com.nokia.carbide.discovery.ui.homePage"
image="icons/Carbide_c_icon_16x16.png"
order="1"
- title="Home">
+ title="%home.title">
</portalPage>
<portalPage
id="com.nokia.carbide.discovery.ui.supportPage"
image="icons/debug.png"
order="100"
- title="Support">
+ title="%support.title">
</portalPage>
</extension>
<extension
point="com.nokia.carbide.discovery.ui.portalPageLayer">
<portalPageLayer
class="com.nokia.carbide.internal.discovery.ui.view.HomePage"
- pageId="com.nokia.carbide.discovery.ui.homePage">
+ pageId="com.nokia.carbide.discovery.ui.homePage"
+ title="Forum Nokia">
</portalPageLayer>
<portalPageLayer
class="com.nokia.carbide.internal.discovery.ui.view.SupportPage"
- pageId="com.nokia.carbide.discovery.ui.homePage">
- </portalPageLayer>
- <portalPageLayer
- class="com.nokia.carbide.internal.discovery.ui.view.SupportPage"
- pageId="com.nokia.carbide.discovery.ui.supportPage">
+ pageId="com.nokia.carbide.discovery.ui.supportPage"
+ title="Carbide Support">
</portalPageLayer>
<portalPageLayer
class="com.nokia.carbide.internal.discovery.ui.view.InstallExtensionsPortalExtension"
- pageId="com.nokia.carbide.discovery.ui.customizePage">
+ pageId="com.nokia.carbide.discovery.ui.customizePage"
+ title="%install.layer.title">
+ </portalPageLayer>
+ <portalPageLayer
+ class="com.nokia.carbide.internal.discovery.ui.view.WrenchSciencePage"
+ pageId="com.nokia.carbide.discovery.ui.homePage"
+ title="%wrenchscience.title">
+ </portalPageLayer>
+ <portalPageLayer
+ class="com.nokia.carbide.internal.discovery.ui.view.CreatingCarbidePage"
+ pageId="com.nokia.carbide.discovery.ui.homePage"
+ title="%creatingcarbide.title">
</portalPageLayer>
</extension>
--- a/core/com.nokia.carbide.discovery.ui/schema/portalPageLayer.exsd Thu Jul 29 09:51:07 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/schema/portalPageLayer.exsd Thu Jul 29 13:28:20 2010 -0500
@@ -49,6 +49,16 @@
<element name="portalPageLayer">
<complexType>
+ <attribute name="title" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
<attribute name="class" type="string" use="required">
<annotation>
<documentation>
--- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/discovery/ui/Activator.java Thu Jul 29 09:51:07 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/discovery/ui/Activator.java Thu Jul 29 13:28:20 2010 -0500
@@ -62,10 +62,13 @@
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext context) throws Exception {
+ plugin = this;
super.start(context);
IProxyData proxyData = ProxyUtils.getProxyData(new URI("http://www.yahoo.com")); //$NON-NLS-1$
- System.setProperty(PROPERTY_PROXYHOST, proxyData.getHost());
- System.setProperty(PROPERTY_PROXYPORT, String.valueOf(proxyData.getPort()));
+ if (proxyData != null) {
+ System.setProperty(PROPERTY_PROXYHOST, proxyData.getHost());
+ System.setProperty(PROPERTY_PROXYPORT, String.valueOf(proxyData.getPort()));
+ }
}
/*
--- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/discovery/ui/Messages.java Thu Jul 29 09:51:07 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/discovery/ui/Messages.java Thu Jul 29 13:28:20 2010 -0500
@@ -5,14 +5,19 @@
public class Messages extends NLS {
private static final String BUNDLE_NAME = "com.nokia.carbide.discovery.ui.messages"; //$NON-NLS-1$
public static String AbstractBrowserPortalPage_BackLabel;
- public static String AbstractBrowserPortalPage_BadURLError;
- public static String AbstractBrowserPortalPage_ForwardLabel;
public static String AbstractBrowserPortalPage_NavigationTitle;
public static String AbstractBrowserPortalPage_RefreshLabel;
public static String AbstractBrowserPortalPage_StopLabel;
+ public static String AbstractBrowserPortalPageLayer_BadURLError;
+ public static String AbstractBrowserPortalPageLayer_ForwardLabel;
+ public static String AbstractBrowserPortalPageLayer_InvalidURLError;
+ public static String AbstractBrowserPortalPageLayer_OpenLocationLabel;
+ public static String AbstractBrowserPortalPageLayer_OpenLocationTitle;
+ public static String AbstractBrowserPortalPageLayer_ShowInBrowserLabel;
+ public static String AbstractBrowserPortalPageLayer_URLLabel;
+ public static String AbstractRSSPortalPageLayer_ReturnToFeedLabel;
+ public static String AbstractRSSPortalPageLayer_RSSReadError;
public static String Activator_MissingConfigURLError;
- public static String HomePage_Title;
- public static String InstallExtensionsPage_ActionBarTitle;
public static String InstallExtensionsPage_AdvancedInstallLabel;
public static String InstallExtensionsPage_BuzillaActionName;
public static String InstallExtensionsPage_CheckAllLabel;
@@ -21,16 +26,15 @@
public static String InstallExtensionsPage_InstallLabel;
public static String InstallExtensionsPage_InstallTip;
public static String InstallExtensionsPage_LinkBarTitle;
- public static String InstallExtensionsPage_MissingDirectoryURLError;
public static String InstallExtensionsPage_RefreshLabel;
public static String InstallExtensionsPage_StatusLineFmt;
- public static String InstallExtensionsPage_Title;
public static String InstallExtensionsPage_UncheckAllLabel;
+ public static String InstallExtensionsPortalExtension_InstallExtensionsTitle;
public static String PortalEditor_Name;
+ public static String PortalEditor_NoLayersError;
public static String PortalEditor_PageLoadError;
public static String PortalEditor_PageOpenError;
public static String PortalEditor_PageRankError;
- public static String SupportPage_Title;
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
--- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/discovery/ui/messages.properties Thu Jul 29 09:51:07 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/discovery/ui/messages.properties Thu Jul 29 13:28:20 2010 -0500
@@ -1,15 +1,20 @@
AbstractBrowserPortalPage_BackLabel=Back
-AbstractBrowserPortalPage_BadURLError=Could not load page due to bad URL
-AbstractBrowserPortalPage_ForwardLabel=Forward
AbstractBrowserPortalPage_NavigationTitle=Navigation
-AbstractBrowserPortalPage_RefreshLabel=Refresh Page
-AbstractBrowserPortalPage_StopLabel=Stop Loading
+AbstractBrowserPortalPage_RefreshLabel=Refresh page
+AbstractBrowserPortalPage_StopLabel=Stop loading
+AbstractBrowserPortalPageLayer_BadURLError=Could not load page due to bad URL
+AbstractBrowserPortalPageLayer_ForwardLabel=Forward
+AbstractBrowserPortalPageLayer_InvalidURLError=Invalid URL
+AbstractBrowserPortalPageLayer_OpenLocationLabel=Open location
+AbstractBrowserPortalPageLayer_OpenLocationTitle=Open Location
+AbstractBrowserPortalPageLayer_ShowInBrowserLabel=Show in browser
+AbstractBrowserPortalPageLayer_URLLabel=URL:
+AbstractRSSPortalPageLayer_ReturnToFeedLabel=Return to RSS
+AbstractRSSPortalPageLayer_RSSReadError=Could not read RSS from: {0}
Activator_MissingConfigURLError=Could not find URL in configuration/server.properties file for key={0}
-HomePage_Title=Home
-InstallExtensionsPage_ActionBarTitle=Install Actions
-InstallExtensionsPage_AdvancedInstallLabel=Advanced Install...
+InstallExtensionsPage_AdvancedInstallLabel=Advanced install...
InstallExtensionsPage_BuzillaActionName=Carbide Bugzilla
-InstallExtensionsPage_CheckAllLabel=Check All
+InstallExtensionsPage_CheckAllLabel=Check all
InstallExtensionsPage_GatherExtensionsTitle=Gathering Extensions
InstallExtensionsPage_GatheringInstallInfoTitle=Gathering Install Information
InstallExtensionsPage_InstallLabel=Install...
@@ -17,10 +22,10 @@
InstallExtensionsPage_LinkBarTitle=Links
InstallExtensionsPage_RefreshLabel=Refresh
InstallExtensionsPage_StatusLineFmt={0} item(s) checked
-InstallExtensionsPage_Title=Install Extensions
-InstallExtensionsPage_UncheckAllLabel=Check None
+InstallExtensionsPage_UncheckAllLabel=Check none
+InstallExtensionsPortalExtension_InstallExtensionsTitle=Install Extensions
PortalEditor_Name=Carbide Portal
+PortalEditor_NoLayersError=Could not load portal page because no layers were found for id: {0}
PortalEditor_PageLoadError=Could not load portal page
PortalEditor_PageOpenError=Could not open portal
PortalEditor_PageRankError=Could not get rank for portal page {0}
-SupportPage_Title=Carbide Support
--- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/PortalEditor.java Thu Jul 29 09:51:07 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/PortalEditor.java Thu Jul 29 13:28:20 2010 -0500
@@ -76,17 +76,19 @@
loadPortalPages();
}
- private Map<String, List<IPortalPageLayer>> loadPortalLayers() {
- Map<String, List<IPortalPageLayer>> pageIdToExtensionsMap = new HashMap<String, List<IPortalPageLayer>>();
+ private Map<String, List<Pair<IPortalPageLayer, String>>> loadPortalLayers() {
+ Map<String, List<Pair<IPortalPageLayer, String>>> pageIdToExtensionsMap =
+ new HashMap<String, List<Pair<IPortalPageLayer, String>>>();
IConfigurationElement[] elements =
Platform.getExtensionRegistry().getConfigurationElementsFor(Activator.PLUGIN_ID + ".portalPageLayer"); //$NON-NLS-1$
for (IConfigurationElement element : elements) {
String pageId = element.getAttribute("pageId"); //$NON-NLS-1$
+ String title = element.getAttribute("title"); //$NON-NLS-1$
try {
IPortalPageLayer extension = (IPortalPageLayer) element.createExecutableExtension("class"); //$NON-NLS-1$
if (!pageIdToExtensionsMap.containsKey(pageId))
- pageIdToExtensionsMap.put(pageId, new ArrayList<IPortalPageLayer>());
- pageIdToExtensionsMap.get(pageId).add(extension);
+ pageIdToExtensionsMap.put(pageId, new ArrayList<Pair<IPortalPageLayer, String>>());
+ pageIdToExtensionsMap.get(pageId).add(new Pair<IPortalPageLayer, String>(extension, title));
} catch (CoreException e) {
Activator.logError(MessageFormat.format(Messages.PortalEditor_PageLoadError, pageId), e);
}
@@ -95,7 +97,7 @@
}
private void loadPortalPages() {
- Map<String, List<IPortalPageLayer>> portalLayersMap = loadPortalLayers();
+ Map<String, List<Pair<IPortalPageLayer, String>>> portalLayersMap = loadPortalLayers();
List<Pair<PortalPage, Integer>> pageList = new ArrayList<Pair<PortalPage, Integer>>();
IConfigurationElement[] elements =
Platform.getExtensionRegistry().getConfigurationElementsFor(Activator.PLUGIN_ID + ".portalPage"); //$NON-NLS-1$
@@ -115,9 +117,9 @@
String imageFilePath = element.getAttribute("image"); //$NON-NLS-1$
String pluginId = element.getContributor().getName();
ImageDescriptor imageDesc = AbstractUIPlugin.imageDescriptorFromPlugin(pluginId, imageFilePath);
- List<IPortalPageLayer> portalLayers = portalLayersMap.get(id);
+ List<Pair<IPortalPageLayer, String>> portalLayers = portalLayersMap.get(id);
if (portalLayers == null || portalLayers.isEmpty()) {
- Activator.logError(MessageFormat.format("Could not load portal page because no layers were found for id: {0}", id), null);
+ Activator.logError(MessageFormat.format(Messages.PortalEditor_NoLayersError, id), null);
}
PortalPage portalPage = new PortalPage(title, imageDesc, id, portalLayers);
pageList.add(new Pair<PortalPage, Integer>(portalPage, order));
--- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/PortalPage.java Thu Jul 29 09:51:07 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/PortalPage.java Thu Jul 29 13:28:20 2010 -0500
@@ -31,6 +31,7 @@
import com.nokia.carbide.internal.discovery.ui.extension.IPortalPageLayer;
import com.nokia.carbide.internal.discovery.ui.extension.IPortalPageLayer.IActionBar;
+import com.nokia.cpp.internal.api.utils.core.Pair;
public class PortalPage implements IActionBar {
@@ -39,7 +40,7 @@
private Layer layer;
private ChangeLayerAction(Layer layer) {
- super(layer.getLayer().getTitle());
+ super(layer.getTitle());
this.layer = layer;
}
@@ -56,9 +57,11 @@
private IPortalPageLayer layer;
private boolean initialized;
private Control control;
+ private String title;
- public Layer(IPortalPageLayer layer) {
+ public Layer(IPortalPageLayer layer, String title) {
this.layer = layer;
+ this.title = title;
}
public IPortalPageLayer getLayer() {
@@ -81,6 +84,10 @@
public Control getControl() {
return control;
}
+
+ public String getTitle() {
+ return title;
+ }
}
private String id;
@@ -93,15 +100,16 @@
private IAction[] actions;
private List<TaskBar> navigationTaskBars;
- public PortalPage(String title, ImageDescriptor imageDescriptor, String id, List<IPortalPageLayer> layerExtensions) {
+ public PortalPage(String title, ImageDescriptor imageDescriptor, String id,
+ List<Pair<IPortalPageLayer, String>> layerExtensionPairs) {
this.title = title;
this.imageDescriptor = imageDescriptor;
this.id = id;
- layers = new ArrayList<Layer>(layerExtensions.size());
- for (IPortalPageLayer layerExtension : layerExtensions) {
- layers.add(new Layer(layerExtension));
+ layers = new ArrayList<Layer>(layerExtensionPairs.size());
+ for (Pair<IPortalPageLayer, String> layerExtensionTitlePair : layerExtensionPairs) {
+ layers.add(new Layer(layerExtensionTitlePair.first, layerExtensionTitlePair.second));
}
- navigationTaskBars = new ArrayList<TaskBar>(layerExtensions.size());
+ navigationTaskBars = new ArrayList<TaskBar>(layerExtensionPairs.size());
}
public String getId() {
@@ -152,10 +160,12 @@
navigationTaskBars.add(taskBar);
ActionUIUpdater updater = new ActionUIUpdater();
IActionBar[] commandBars = layerExtension.createCommandBars(portalEditor, updater);
- for (IActionBar actionBar : commandBars) {
- taskBar = new TaskBar(taskComposite, backgroundParent, actionBar);
- updater.addTaskBar(taskBar);
- GridDataFactory.fillDefaults().minSize(150, SWT.DEFAULT).grab(true, false).indent(0, 0).applyTo(taskBar);
+ if (commandBars != null) {
+ for (IActionBar actionBar : commandBars) {
+ taskBar = new TaskBar(taskComposite, backgroundParent, actionBar);
+ updater.addTaskBar(taskBar);
+ GridDataFactory.fillDefaults().minSize(150, SWT.DEFAULT).grab(true, false).indent(0, 0).applyTo(taskBar);
+ }
}
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/SimpleRSSReader.java Thu Jul 29 13:28:20 2010 -0500
@@ -0,0 +1,227 @@
+/*
+* Copyright (c) 2010 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.internal.discovery.ui.editor;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+
+/**
+ * A simple RSS reader
+ * @see http://www.rssboard.org/rss-specification
+ */
+public class SimpleRSSReader {
+
+ public static class Rss {
+ private List<Channel> channels = new ArrayList<Channel>();
+
+ public List<Channel> getChannels() {
+ return channels;
+ }
+
+ protected void addChannel(Channel channel) {
+ channels.add(channel);
+ }
+ }
+
+ public static class Container {
+ private String title;
+ private URL link;
+ private String description;
+ private Date pubDate;
+ private List<String> categories = new ArrayList<String>();
+
+ public String getTitle() {
+ return title;
+ }
+
+ public URL getLink() {
+ return link;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public Date getPubDate() {
+ return pubDate;
+ }
+
+ public String[] getCategories() {
+ return (String[]) categories.toArray(new String[categories.size()]);
+ }
+
+ public boolean isValid() {
+ return title != null && link != null && description != null;
+ }
+
+ protected void setField(String element, String value) {
+ if (RSSHandler.TITLE.equals(element))
+ title = value;
+ else if (RSSHandler.LINK.equals(element)) {
+ try {
+ link = new URL(value);
+ } catch (MalformedURLException e) {
+ // don't store malformed URLs
+ e.printStackTrace();
+ }
+ }
+ else if (RSSHandler.DESCRIPTION.equals(element) || RSSHandler.SUMMARY.equals(element))
+ description = value;
+ else if (RSSHandler.PUBDATE.equals(element)) {
+ try {
+ // FIXME parser needs writing!!
+ pubDate = DateFormat.getInstance().parse(value);
+ } catch (ParseException e) {
+ // don't store malformed dates
+// e.printStackTrace();
+ }
+ }
+ else if (RSSHandler.CATEGORY.equals(element))
+ categories.add(value);
+ }
+ }
+
+ public static class Channel extends Container {
+ List<Item> items = new ArrayList<Item>();
+
+ public List<Item> getItems() {
+ return items;
+ }
+
+ protected void addItem(Item item) {
+ items.add(item);
+ }
+
+ public boolean hasItems() {
+ return !items.isEmpty();
+ }
+ }
+
+ public static class Item extends Container {
+ private Channel channel;
+
+ public Item(Channel channel) {
+ this.channel = channel;
+ }
+
+ public Channel getChannel() {
+ return channel;
+ }
+ }
+
+ private static class RSSHandler extends DefaultHandler {
+
+ private static final String CHANNEL = "channel"; //$NON-NLS-1$
+ private static final String TITLE = "title"; //$NON-NLS-1$
+ private static final String LINK = "link"; //$NON-NLS-1$
+ private static final String DESCRIPTION = "description"; //$NON-NLS-1$
+ private static final String SUMMARY = "atom:summary"; //$NON-NLS-1$
+ private static final String ITEM = "item"; //$NON-NLS-1$
+ private static final String PUBDATE = "pubDate"; //$NON-NLS-1$
+ private static final String CATEGORY = "category"; //$NON-NLS-1$
+ private static final Set<String> charsElements = new HashSet<String>();
+ static {
+ charsElements.add(TITLE);
+ charsElements.add(LINK);
+ charsElements.add(DESCRIPTION);
+ charsElements.add(SUMMARY);
+ charsElements.add(PUBDATE);
+ charsElements.add(CATEGORY);
+ }
+
+ private Channel curChannel;
+ private Item curItem;
+ private StringBuffer charsBuf;
+ private Rss rss;
+
+ public RSSHandler(Rss rss) {
+ this.rss = rss;
+ }
+
+ @Override
+ public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
+ if (charsElements.contains(qName)) {
+ charsBuf = new StringBuffer();
+ }
+ if (CHANNEL.equals(qName)) {
+ curChannel = new Channel();
+ }
+ else if (ITEM.equals(qName) && curChannel != null) {
+ curItem = new Item(curChannel);
+ }
+ }
+
+ @Override
+ public void endElement(String uri, String localName, String qName) throws SAXException {
+ if (CHANNEL.equals(qName)) {
+ if (curChannel != null && curChannel.isValid() && curChannel.hasItems())
+ rss.addChannel(curChannel);
+ curChannel = null;
+ curItem = null;
+ }
+ else if (ITEM.equals(qName)) {
+ if (curChannel != null && curItem != null && curItem.isValid())
+ curChannel.addItem(curItem);
+ curItem = null;
+ }
+ else if (charsBuf != null && curChannel != null) {
+ if (curItem != null)
+ curItem.setField(qName, charsBuf.toString().trim());
+ else
+ curChannel.setField(qName, charsBuf.toString().trim());
+ charsBuf = null;
+ }
+ }
+
+ @Override
+ public void characters(char[] ch, int start, int length) throws SAXException {
+ if (charsBuf != null) {
+ charsBuf.append(new String(ch, start, length));
+ }
+ }
+
+ }
+
+
+ public static Rss readRSS(URL url) throws SAXException, IOException, ParserConfigurationException {
+ Rss rss = new Rss();
+ URLConnection connection = url.openConnection();
+ connection.connect();
+ InputStream inputStream = url.openStream();
+ SAXParser parser = SAXParserFactory.newInstance().newSAXParser();
+ parser.parse(inputStream, new RSSHandler(rss));
+ return rss;
+ }
+}
--- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/extension/AbstractBrowserPortalPage.java Thu Jul 29 09:51:07 2010 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,216 +0,0 @@
-/*
-* Copyright (c) 2010 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.internal.discovery.ui.extension;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.SWTError;
-import org.eclipse.swt.browser.Browser;
-import org.eclipse.swt.browser.LocationAdapter;
-import org.eclipse.swt.browser.LocationEvent;
-import org.eclipse.swt.browser.ProgressAdapter;
-import org.eclipse.swt.browser.ProgressEvent;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.ui.IEditorPart;
-
-import com.nokia.carbide.internal.discovery.ui.extension.IPortalPageLayer;
-import com.nokia.carbide.discovery.ui.Activator;
-import com.nokia.carbide.discovery.ui.Messages;
-
-public abstract class AbstractBrowserPortalPage implements IPortalPageLayer {
-
- private final class NavigationActionBar implements IActionBar {
- private List<IAction> actions;
- private IActionUIUpdater updater;
- private boolean loading;
-
- private NavigationActionBar(IActionUIUpdater updater) {
- this.updater = updater;
- makeActions();
- }
-
- public void hookBrowser() {
- browser.addLocationListener(new LocationAdapter() {
- @Override
- public void changed(LocationEvent event) {
- NavigationActionBar.this.updater.updateAll();
- }
- });
- browser.addProgressListener(new ProgressAdapter() {
- @Override
- public void changed(ProgressEvent event) {
- if (event.total == 0)
- return;
- setLoading(event.current != event.total);
- NavigationActionBar.this.updater.updateAll();
- }
- @Override
- public void completed(ProgressEvent event) {
- setLoading(false);
- NavigationActionBar.this.updater.updateAll();
- }
- });
- }
-
- @Override
- public String getTitle() {
- return Messages.AbstractBrowserPortalPage_NavigationTitle;
- }
-
- @Override
- public IAction[] getActions() {
- return (IAction[]) actions.toArray(new IAction[actions.size()]);
- }
-
- private void makeActions() {
- actions = new ArrayList<IAction>();
- IAction a = new Action(Messages.AbstractBrowserPortalPage_BackLabel) {
- @Override
- public void run() {
- if (browser != null) {
- browser.back();
- }
- }
-
- @Override
- public boolean isEnabled() {
- return browser != null ? browser.isBackEnabled() : false;
- }
- };
- actions.add(a);
-
- a = new Action(Messages.AbstractBrowserPortalPage_ForwardLabel) {
- @Override
- public void run() {
- if (browser != null) {
- browser.forward();
- }
- }
-
- @Override
- public boolean isEnabled() {
- return browser != null ? browser.isForwardEnabled() : false;
- }
- };
- actions.add(a);
-
- a = new Action(Messages.AbstractBrowserPortalPage_RefreshLabel) {
- @Override
- public void run() {
- if (browser != null) {
- browser.refresh();
- update();
- }
- }
-
- @Override
- public boolean isEnabled() {
- return browser != null ? !loading : false;
- }
- };
- actions.add(a);
-
- a = new Action(Messages.AbstractBrowserPortalPage_StopLabel) {
- @Override
- public void run() {
- if (browser != null) {
- browser.stop();
- update();
- }
- }
-
- @Override
- public boolean isEnabled() {
- return browser != null ? loading : false;
- }
- };
- actions.add(a);
- }
-
- public void update() {
- updater.updateAll();
- }
-
- private void setLoading(boolean loading) {
- browser.setCursor(loading ? browser.getDisplay().getSystemCursor(SWT.CURSOR_WAIT) : null);
- this.loading = loading;
- }
-
- @Override
- public String[] getHighlightedActionIds() {
- return null;
- }
- }
-
- private Browser browser;
- private NavigationActionBar actionBar;
-
- @Override
- public Control createControl(Composite parent, IEditorPart part) {
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
- composite.setLayout(new FillLayout());
- try {
- browser = new Browser(composite, SWT.MOZILLA);
- } catch (SWTError e) {
- e.printStackTrace();
- }
-
- return composite;
- }
-
- protected String getURL() {
- try {
- URL url = new URL(Activator.getFromServerProperties(getClass().getName()));
- return url.toString();
- } catch (MalformedURLException e) {
- Activator.logError(Messages.AbstractBrowserPortalPage_BadURLError, e);
- }
-
- return null;
- }
-
- @Override
- public void init() {
- if (browser != null) {
- browser.setUrl(getURL());
- actionBar.hookBrowser();
- }
- actionBar.update();
- }
-
- @Override
- public IActionBar[] createCommandBars(IEditorPart part, IActionUIUpdater updater) {
- actionBar = new NavigationActionBar(updater);
- return new IActionBar[] {
- actionBar
- };
- }
-
- @Override
- public void dispose() {
- }
-
-}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/extension/AbstractBrowserPortalPageLayer.java Thu Jul 29 13:28:20 2010 -0500
@@ -0,0 +1,284 @@
+/*
+* Copyright (c) 2010 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.internal.discovery.ui.extension;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.LinkedHashSet;
+import java.util.Set;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IInputValidator;
+import org.eclipse.jface.dialogs.InputDialog;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.SWTError;
+import org.eclipse.swt.browser.Browser;
+import org.eclipse.swt.browser.LocationAdapter;
+import org.eclipse.swt.browser.LocationEvent;
+import org.eclipse.swt.browser.OpenWindowListener;
+import org.eclipse.swt.browser.ProgressAdapter;
+import org.eclipse.swt.browser.ProgressEvent;
+import org.eclipse.swt.browser.WindowEvent;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IEditorPart;
+
+import com.nokia.carbide.discovery.ui.Activator;
+import com.nokia.carbide.discovery.ui.Messages;
+import com.nokia.cpp.internal.api.utils.ui.WorkbenchUtils;
+
+public abstract class AbstractBrowserPortalPageLayer implements IPortalPageLayer {
+
+ protected class BrowserAction extends Action {
+
+ public BrowserAction(String text) {
+ super(text);
+ }
+
+ @Override
+ public boolean isEnabled() {
+ return browser != null && !actionBar.isLoading();
+ }
+ }
+
+ protected class NavigationActionBar implements IActionBar {
+ private Set<IAction> actions;
+ private IActionUIUpdater updater;
+ private boolean loading;
+
+ private NavigationActionBar(IActionUIUpdater updater) {
+ this.updater = updater;
+ actions = makeActions();
+ }
+
+ public void hookBrowser() {
+ browser.addLocationListener(new LocationAdapter() {
+ @Override
+ public void changed(LocationEvent event) {
+ NavigationActionBar.this.updater.updateAll();
+ }
+ });
+ browser.addProgressListener(new ProgressAdapter() {
+ @Override
+ public void changed(ProgressEvent event) {
+ if (event.total == 0)
+ return;
+ setLoading(event.current != event.total);
+ NavigationActionBar.this.updater.updateAll();
+ }
+ @Override
+ public void completed(ProgressEvent event) {
+ setLoading(false);
+ NavigationActionBar.this.updater.updateAll();
+ }
+ });
+ browser.addOpenWindowListener(new OpenWindowListener() {
+ @Override
+ public void open(WindowEvent event) {
+ event.browser = browser;
+ }
+ });
+ }
+
+ @Override
+ public String getTitle() {
+ return Messages.AbstractBrowserPortalPage_NavigationTitle;
+ }
+
+ @Override
+ public IAction[] getActions() {
+ return (IAction[]) actions.toArray(new IAction[actions.size()]);
+ }
+
+ public void update() {
+ updater.updateAll();
+ }
+
+ private void setLoading(boolean loading) {
+ browser.setCursor(loading ? browser.getDisplay().getSystemCursor(SWT.CURSOR_WAIT) : null);
+ this.loading = loading;
+ }
+
+ @Override
+ public String[] getHighlightedActionIds() {
+ return null;
+ }
+
+ public boolean isLoading() {
+ return loading;
+ }
+ }
+
+ protected Browser browser;
+ protected NavigationActionBar actionBar;
+
+ @Override
+ public Control createControl(Composite parent, IEditorPart part) {
+ Composite composite = new Composite(parent, SWT.NONE);
+ composite.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
+ composite.setLayout(new FillLayout());
+ try {
+ browser = new Browser(composite, SWT.MOZILLA);
+ } catch (SWTError e) {
+ e.printStackTrace();
+ }
+
+ return composite;
+ }
+
+ protected URL getURL() {
+ try {
+ return new URL(Activator.getFromServerProperties(getClass().getName()));
+ } catch (MalformedURLException e) {
+ Activator.logError(Messages.AbstractBrowserPortalPageLayer_BadURLError, e);
+ }
+
+ return null;
+ }
+
+ @Override
+ public void init() {
+ if (browser != null) {
+ URL url = getURL();
+ if (url != null) {
+ browser.setUrl(url.toString());
+ }
+ actionBar.hookBrowser();
+ }
+ actionBar.update();
+ }
+
+ @Override
+ public IActionBar[] createCommandBars(IEditorPart part, IActionUIUpdater updater) {
+ actionBar = new NavigationActionBar(updater);
+ return new IActionBar[] {
+ actionBar
+ };
+ }
+
+ @Override
+ public void dispose() {
+ }
+
+ protected Set<IAction> makeActions() {
+ Set<IAction> actions = new LinkedHashSet<IAction>();
+ IAction a = new BrowserAction(Messages.AbstractBrowserPortalPage_BackLabel) {
+ @Override
+ public void run() {
+ if (browser != null) {
+ browser.back();
+ }
+ }
+
+ @Override
+ public boolean isEnabled() {
+ return super.isEnabled() && browser.isBackEnabled();
+ }
+ };
+ actions.add(a);
+
+ a = new BrowserAction(Messages.AbstractBrowserPortalPageLayer_ForwardLabel) {
+ @Override
+ public void run() {
+ if (browser != null) {
+ browser.forward();
+ }
+ }
+
+ @Override
+ public boolean isEnabled() {
+ return super.isEnabled() && browser.isForwardEnabled();
+ }
+ };
+ actions.add(a);
+
+ a = new BrowserAction(Messages.AbstractBrowserPortalPage_RefreshLabel) {
+ @Override
+ public void run() {
+ if (browser != null) {
+ browser.refresh();
+ actionBar.update();
+ }
+ }
+ };
+ actions.add(a);
+
+ a = new Action(Messages.AbstractBrowserPortalPage_StopLabel) {
+ @Override
+ public void run() {
+ if (browser != null) {
+ browser.stop();
+ actionBar.update();
+ }
+ }
+
+ @Override
+ public boolean isEnabled() {
+ return browser != null && actionBar.isLoading();
+ }
+ };
+ actions.add(a);
+
+ a = new BrowserAction(Messages.AbstractBrowserPortalPageLayer_ShowInBrowserLabel) {
+ public void run() {
+ WorkbenchUtils.showWebPageInExternalBrowser(browser.getUrl());
+ };
+
+ public boolean isEnabled() {
+ return super.isEnabled() && browserHasURL();
+ };
+ };
+ actions.add(a);
+
+ a = new Action(Messages.AbstractBrowserPortalPageLayer_OpenLocationLabel) {
+ public void run() {
+ InputDialog dlg = new InputDialog(browser.getShell(),
+ Messages.AbstractBrowserPortalPageLayer_OpenLocationTitle, Messages.AbstractBrowserPortalPageLayer_URLLabel, null, new IInputValidator() {
+ @Override
+ public String isValid(String newText) {
+ try {
+ new URL(newText);
+ } catch (MalformedURLException e) {
+ return Messages.AbstractBrowserPortalPageLayer_InvalidURLError;
+ }
+ return null;
+ }
+ });
+ int result = dlg.open();
+ if (result == Dialog.OK) {
+ browser.setUrl(dlg.getValue());
+ actionBar.update();
+ }
+ };
+
+ public boolean isEnabled() {
+ return browser != null;
+ };
+ };
+ actions.add(a);
+
+ return actions;
+ }
+
+ protected boolean browserHasURL() {
+ String url = browser.getUrl();
+ return url.matches("^.*://.*"); //$NON-NLS-1$
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/extension/AbstractRSSPortalPageLayer.java Thu Jul 29 13:28:20 2010 -0500
@@ -0,0 +1,159 @@
+package com.nokia.carbide.internal.discovery.ui.extension;
+
+import java.net.URL;
+import java.text.MessageFormat;
+import java.util.LinkedHashSet;
+import java.util.Set;
+import java.util.regex.Pattern;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+
+import com.nokia.carbide.discovery.ui.Activator;
+import com.nokia.carbide.discovery.ui.Messages;
+import com.nokia.carbide.internal.discovery.ui.editor.SimpleRSSReader;
+import com.nokia.carbide.internal.discovery.ui.editor.SimpleRSSReader.Channel;
+import com.nokia.carbide.internal.discovery.ui.editor.SimpleRSSReader.Item;
+import com.nokia.carbide.internal.discovery.ui.editor.SimpleRSSReader.Rss;
+
+public abstract class AbstractRSSPortalPageLayer extends AbstractBrowserPortalPageLayer {
+
+ private static final String[] EXCLUDE_TAGS = {
+ "object", //$NON-NLS-1$
+ "param", //$NON-NLS-1$
+ "embed", //$NON-NLS-1$
+ "script", //$NON-NLS-1$
+ "img" //$NON-NLS-1$
+ };
+
+ private static final Pattern[] EXCLUDE_TAG_PATTERNS = new Pattern[EXCLUDE_TAGS.length * 2];
+
+ static {
+ int i = 0;
+ for (String tagString : EXCLUDE_TAGS) {
+ StringBuilder sb = new StringBuilder();
+ sb.append('<');
+ sb.append(tagString);
+ sb.append(" .*</"); //$NON-NLS-1$
+ sb.append(tagString);
+ sb.append('>');
+ EXCLUDE_TAG_PATTERNS[i++] =
+ Pattern.compile(sb.toString(),
+ Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);
+ }
+ for (String tagString : EXCLUDE_TAGS) {
+ StringBuilder sb = new StringBuilder();
+ sb.append('<');
+ sb.append(tagString);
+ sb.append(" .*/>"); //$NON-NLS-1$
+ EXCLUDE_TAG_PATTERNS[i++] =
+ Pattern.compile(sb.toString(),
+ Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);
+ }
+ }
+
+ private static final String HTML_BODY_HEADER = "<html><head><title></title><style type=\"text/css\">div.item {font-family : sans-serif; font-size : 12px; margin-bottom : 16px;} div.itemBody {padding-top : 3px; padding-bottom : 3px;} div.itemInfo {background-color : #EEEEEE; color : #333333;} div.feedflare {display: none;} a.itemTitle {font-size : 12px; font-weight : bold;} a.markItemRead {font-size : 10px; color : #333333;}</style></head><body>"; //$NON-NLS-1$
+ private static final String HTML_BODY_FOOTER = "</body></html>"; //$NON-NLS-1$
+ private static final int MAX_ELEM_LEN = 256;
+
+ private Rss rss;
+
+ @Override
+ public void init() {
+ URL url = getURL();
+ if (url != null) {
+ try {
+ rss = SimpleRSSReader.readRSS(url);
+ displayRSS();
+ actionBar.hookBrowser();
+ } catch (Exception e) {
+ Activator.logError(MessageFormat.format(Messages.AbstractRSSPortalPageLayer_RSSReadError, url), e);
+ }
+ actionBar.update();
+ }
+ }
+
+ private void displayRSS() {
+ StringBuffer buf = new StringBuffer();
+ buf.append(HTML_BODY_HEADER);
+ for (Channel channel : rss.getChannels()) {
+ buf.append("<div class=\"channel\"><a class=\"channelName\" href=\""); //$NON-NLS-1$
+ buf.append(channel.getLink().toString());
+ buf.append("\">"); //$NON-NLS-1$
+ buf.append(clean(channel.getTitle()));
+ buf.append("</a>"); //$NON-NLS-1$
+ buf.append("<div class=\"channelBody\">"); //$NON-NLS-1$
+ buf.append(clean(channel.getDescription()));
+ buf.append("</div><br>"); //$NON-NLS-1$
+ for (Item item : channel.getItems()) {
+ buf.append("<div class=\"item\"><a class=\"itemTitle\" href=\""); //$NON-NLS-1$
+ buf.append(item.getLink().toString());
+ buf.append("\">"); //$NON-NLS-1$
+ buf.append(clean(item.getTitle()));
+ buf.append("</a>"); //$NON-NLS-1$
+ buf.append("<div class=\"itemBody\">"); //$NON-NLS-1$
+ buf.append(clean(item.getDescription()));
+ buf.append("</div>"); //$NON-NLS-1$
+ }
+ }
+ buf.append(HTML_BODY_FOOTER);
+ System.out.println(buf.toString());
+ browser.setText(buf.toString());
+ }
+
+ private String clean(String s) {
+ for (Pattern pattern : EXCLUDE_TAG_PATTERNS) {
+ s = pattern.matcher(s).replaceAll(""); //$NON-NLS-1$
+ }
+ return s.length() > MAX_ELEM_LEN ? s.substring(0, MAX_ELEM_LEN) : s;
+ }
+
+ @Override
+ public void dispose() {
+ }
+
+ @Override
+ protected Set<IAction> makeActions() {
+ Set<IAction> actions = new LinkedHashSet<IAction>();
+ for (IAction action : super.makeActions()) {
+ if (action.getText().equals(Messages.AbstractBrowserPortalPage_RefreshLabel)) {
+ IAction a = new Action(Messages.AbstractBrowserPortalPage_RefreshLabel) {
+ @Override
+ public void run() {
+ if (browser != null) {
+ if (browserHasURL())
+ browser.refresh();
+ else
+ displayRSS();
+ actionBar.update();
+ }
+ }
+
+ @Override
+ public boolean isEnabled() {
+ return browser != null ? !actionBar.isLoading() : false;
+ }
+ };
+ actions.add(a);
+ }
+ else
+ actions.add(action);
+ }
+
+ actions.add(new Action(Messages.AbstractRSSPortalPageLayer_ReturnToFeedLabel) {
+ @Override
+ public void run() {
+ displayRSS();
+ actionBar.update();
+ }
+
+ @Override
+ public boolean isEnabled() {
+ return browserHasURL();
+ }
+ });
+
+ return actions;
+ }
+
+}
--- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/extension/IPortalPageLayer.java Thu Jul 29 09:51:07 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/extension/IPortalPageLayer.java Thu Jul 29 13:28:20 2010 -0500
@@ -27,12 +27,6 @@
public interface IPortalPageLayer {
/**
- * The title of this portal page layer
- * @return String
- */
- String getTitle();
-
- /**
* Interface to an action/navigation bar for the portal portal page layer
*/
public interface IActionBar {
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/view/CreatingCarbidePage.java Thu Jul 29 13:28:20 2010 -0500
@@ -0,0 +1,18 @@
+package com.nokia.carbide.internal.discovery.ui.view;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import com.nokia.carbide.internal.discovery.ui.extension.AbstractRSSPortalPageLayer;
+
+public class CreatingCarbidePage extends AbstractRSSPortalPageLayer {
+
+ @Override
+ protected URL getURL() {
+ try {
+ return new URL("http://creatingcarbide.blogspot.com/feeds/posts/default?alt=rss"); //$NON-NLS-1$
+ } catch (MalformedURLException e) {
+ }
+ return null;
+ }
+}
--- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/view/HomePage.java Thu Jul 29 09:51:07 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/view/HomePage.java Thu Jul 29 13:28:20 2010 -0500
@@ -1,13 +1,6 @@
package com.nokia.carbide.internal.discovery.ui.view;
-import com.nokia.carbide.discovery.ui.Messages;
-import com.nokia.carbide.internal.discovery.ui.extension.AbstractBrowserPortalPage;
-
-public class HomePage extends AbstractBrowserPortalPage {
+import com.nokia.carbide.internal.discovery.ui.extension.AbstractBrowserPortalPageLayer;
- @Override
- public String getTitle() {
- return Messages.HomePage_Title;
- }
-
+public class HomePage extends AbstractBrowserPortalPageLayer {
}
--- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/view/InstallExtensionsPortalExtension.java Thu Jul 29 09:51:07 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/view/InstallExtensionsPortalExtension.java Thu Jul 29 13:28:20 2010 -0500
@@ -80,7 +80,7 @@
@Override
public String getTitle() {
- return Messages.InstallExtensionsPage_ActionBarTitle;
+ return Messages.InstallExtensionsPortalExtension_InstallExtensionsTitle;
}
@Override
@@ -133,11 +133,6 @@
}
@Override
- public String getTitle() {
- return Messages.InstallExtensionsPage_Title;
- }
-
- @Override
public Control createControl(Composite parent, IEditorPart part) {
Composite c = new Composite(parent, SWT.NONE);
GridLayoutFactory.swtDefaults().applyTo(c);
--- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/view/SupportPage.java Thu Jul 29 09:51:07 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/view/SupportPage.java Thu Jul 29 13:28:20 2010 -0500
@@ -1,16 +1,6 @@
package com.nokia.carbide.internal.discovery.ui.view;
-import com.nokia.carbide.discovery.ui.Messages;
-import com.nokia.carbide.internal.discovery.ui.extension.AbstractBrowserPortalPage;
-
-public class SupportPage extends AbstractBrowserPortalPage {
+import com.nokia.carbide.internal.discovery.ui.extension.AbstractBrowserPortalPageLayer;
- public SupportPage() {
- }
-
- @Override
- public String getTitle() {
- return Messages.SupportPage_Title;
- }
-
+public class SupportPage extends AbstractBrowserPortalPageLayer {
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/view/WrenchSciencePage.java Thu Jul 29 13:28:20 2010 -0500
@@ -0,0 +1,18 @@
+package com.nokia.carbide.internal.discovery.ui.view;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import com.nokia.carbide.internal.discovery.ui.extension.AbstractRSSPortalPageLayer;
+
+public class WrenchSciencePage extends AbstractRSSPortalPageLayer {
+
+ @Override
+ protected URL getURL() {
+ try {
+ return new URL("http://blogs.in.nokia.com/wrenchscience/rss.xml"); //$NON-NLS-1$
+ } catch (MalformedURLException e) {
+ }
+ return null;
+ }
+}