Merge from default.
--- a/core/carbide_releases/configuration/server.properties Mon Aug 02 16:50:54 2010 -0500
+++ b/core/carbide_releases/configuration/server.properties Mon Aug 02 17:22:42 2010 -0500
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2008 Nokia.
+# Copyright (c) 2010 Nokia.
#
# This file contains server URLs by the ID of the service that requires it
# One server may be specified per line
@@ -9,8 +9,9 @@
###############################################################################
com.nokia.carbide.cpp.news.reader.feed.listing.file=http://tools.ext.nokia.com/carbide_news_reader/feedListing.xml
com.nokia.carbide.trk.support.service.TRKService=http://tools.ext.nokia.com/trk/TRKPackages.xml
-com.nokia.carbide.discovery.directory=http://cdn.symbian.org/carbide/updates/3.0/discovery/directory.xml
-com.nokia.carbide.internal.discovery.ui.view.SupportPage=https://xdabug001.ext.nokia.com/bugzilla
+com.nokia.carbide.internal.discovery.ui.view.InstallExtensionsPortalExtension=http://cdn.symbian.org/carbide/updates/3.0/discovery/directory.xml
+com.nokia.carbide.internal.discovery.ui.view.BugzillaPage=https://xdabug001.ext.nokia.com/bugzilla
com.nokia.carbide.internal.discovery.ui.view.HomePage=http://www.forum.nokia.com/Library/Tools_and_downloads/Other/Carbide.c++/
com.nokia.carbide.internal.discovery.ui.view.WrenchSciencePage=http://blogs.in.nokia.com/wrenchscience/rss.xml
com.nokia.carbide.internal.discovery.ui.view.CreatingCarbidePage=http://creatingcarbide.blogspot.com/feeds/posts/default?alt=rss
+com.nokia.carbide.internal.discovery.ui.view.PulsarPageLayer=http://tools.ext.nokia.com/pulsar/directory.xml
--- a/core/com.nokia.carbide.cpp.doc.user/html/concepts/CarbidePerspective.html Mon Aug 02 16:50:54 2010 -0500
+++ b/core/com.nokia.carbide.cpp.doc.user/html/concepts/CarbidePerspective.html Mon Aug 02 17:22:42 2010 -0500
@@ -13,15 +13,15 @@
<li><a href="../reference/view_sym_proj_nav.htm">Symbian Project Navigator</a> view - shows all files that belong to the
current build configuration </li>
<li><a href="../hints_tips.htm">Editor</a> view - one or more source code editor windows </li>
- <li><a href="PLUGINS_ROOT/org.eclipse.cdt.doc.user/reference/cdt_u_outline_view.htm">Outline</a> view - displays an outline of a structured C/C++ file that is currently open in the editor view </li>
- <li><a href="../reference/view_install_extensions.htm">Install Extensions</a> view - displays a list of installable plug-ins</li>
+ <li><a href="../reference/view_carbide_portal.htm">Carbide Portals</a> editor - provides Carbide news, release information, additional extensions, and support options</li>
+ <li><a href="PLUGINS_ROOT/org.eclipse.cdt.doc.user/reference/cdt_u_outline_view.htm">Outline</a> view - displays an outline of a structured C/C++ file that is currently open in the editor view </li>
<li><a href="PLUGINS_ROOT/org.eclipse.cdt.doc.user/reference/cdt_u_problems_view.htm">Problems</a> view - displays build errors </li>
<li><a href="../reference/view_console.htm">Console</a> view - shows the output of a process and allows you to provide keyboard input to a
process</li>
<li><a href="../reference/view_executables.htm">Executables</a> view - provides a dynamic list of executables and their related source files</li>
<li><a href="../reference/trk/view_remote_connection.htm">Remote Connections</a> view – use to monitor, create, edit, or remove common connection settings</li>
</ul>
- <p align="center"><img src="images/workbench.png" width="1028" height="789" /></p>
+ <p align="center"><img src="images/workbench.png" width="1028" height="789" /></p>
<p class="figure">Figure 1 - Carbide C/C++ perspective </p>
<p class="note"><b>NOTE</b> Click the <img src="../images/icons/double_arrow_icon.png" width="12" height="9" align="absmiddle" /> icon to show additional options that may not be visible in the perspective view.</p>
<p>For more information on perspectives see <b>Workbench User Guide > Concepts > <a href="PLUGINS_ROOT/org.eclipse.platform.doc.user/concepts/concepts-4.htm">Perspectives</a></b>, and for views see <b>C/C++ Development User Guide > Reference
--- a/core/com.nokia.carbide.cpp.doc.user/html/reference/view_disassembly.htm Mon Aug 02 16:50:54 2010 -0500
+++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/view_disassembly.htm Mon Aug 02 17:22:42 2010 -0500
@@ -99,7 +99,7 @@
<td>Select this option to open the <b>Breakpoint Properties</b> dialog. </td>
</tr>
</table>
-<p class="figure"><img src="images/view_disassm_breakpoint.png" width="785" height="202" alt="" /></p>
+<p class="figure"><img src="images/view_disassm_breakpoint.png" width="506" height="172" alt="" /></p>
<p class="figure">Figure 3 - Setting Breakpoints in the Disassembly view </p>
<div class="step">
<h4>Opening the Disassembly view </h4>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/views_overview.htm Mon Aug 02 17:22:42 2010 -0500
@@ -0,0 +1,38 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<meta http-equiv="Content-Style-Type" content="text/css" />
+<meta name="LASTUPDATED" content="06/17/05 11:09:43" />
+<title>Carbide Views</title>
+<link rel="StyleSheet" href="../../book.css" type="text/css"/>
+</head>
+<body bgcolor="#FFFFFF">
+<h2>Carbide Views</h2>
+<p> Here are all the views available within the Carbide IDE and debugging environments.</p>
+<h4>Carbide C/++ perspective views:</h4>
+<ul>
+ <li><a href="view_carbide_portal.htm">Carbide Portal</a> view</li>
+ <li><a href="view_executables.htm">Executables</a> view</li>
+ <li><a href="view_proj_explorer.htm">Project Explorer </a>view</li>
+ <li><a href="trk/view_remote_connection.htm">Remote Connections</a> view</li>
+ <li><a href="view_sym_proj_nav.htm">Symbian Project Navigator</a> view</li>
+</ul>
+<h4>Debug perspective views:</h4>
+<ul>
+ <li><a href="view_breakpoints.htm">Breakpoints</a> view</li>
+ <li><a href="view_console.htm">Console</a> view</li>
+ <li><a href="../debugger/debug/viewing_debug.htm">Debug</a> view</li>
+ <li><a href="view_disassembly.htm">Disassembly</a> view</li>
+ <li><a href="view_expressions.htm">Expressions</a> view</li>
+ <li><a href="view_memory.htm">Memory</a> view</li>
+ <li><a href="view_module.htm">Modules</a> view</li>
+ <li><a href="view_registers.htm">Registers</a> view</li>
+ <li><a href="view_symbian_kernel.htm">Symbian OS Data</a> view</li>
+ <li><a href="view_signals.htm">Signels</a> view</li>
+ <li><a href="view_variables.htm">Variables</a> view</li>
+</ul>
+<div id="footer">Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. <br>License: <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a></div>
+
+</body>
+</html>
--- a/core/com.nokia.carbide.cpp.doc.user/tocCarbide.xml Mon Aug 02 16:50:54 2010 -0500
+++ b/core/com.nokia.carbide.cpp.doc.user/tocCarbide.xml Mon Aug 02 17:22:42 2010 -0500
@@ -57,7 +57,7 @@
<topic label="Toggle HW Breakpoint" href="html/reference/menus/hardware_breakpoints.htm" />
<topic label="Update Projects" href="html/reference/olderproject_updater.html" />
</topic>
- <topic label="Carbide views" >
+ <topic label="Carbide views" href="html/reference/views_overview.htm" >
<topic label="BreakPoints view" href="html/reference/view_breakpoints.htm" />
<topic label="Carbide Portal" href="html/reference/view_carbide_portal.htm" >
<topic label="Installing Extensions" href="html/tasks/installing_extensions.htm" />
--- a/core/com.nokia.carbide.cpp.sdk.ui/META-INF/MANIFEST.MF Mon Aug 02 16:50:54 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.ui/META-INF/MANIFEST.MF Mon Aug 02 17:22:42 2010 -0500
@@ -13,7 +13,8 @@
com.nokia.carbide.cpp.ui,
com.nokia.carbide.templatewizard,
com.nokia.cpp.utils.core,
- com.nokia.cpp.utils.ui
+ com.nokia.cpp.utils.ui,
+ com.nokia.carbide.discovery.ui;bundle-version="1.0.0"
Bundle-ActivationPolicy: lazy
Export-Package: com.nokia.carbide.cpp.internal.api.sdk.ui,
com.nokia.carbide.cpp.sdk.ui.shared
--- a/core/com.nokia.carbide.cpp.sdk.ui/plugin.xml Mon Aug 02 16:50:54 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.ui/plugin.xml Mon Aug 02 17:22:42 2010 -0500
@@ -53,6 +53,15 @@
label="%carbcPreference.platformfiltering">
</keyword>
</extension>
+ <extension
+ point="com.nokia.carbide.discovery.ui.portalPageLayer">
+ <portalPageLayer
+ class="com.nokia.carbide.cpp.sdk.ui.SDKPreferencesPortalPageLayer"
+ order="1"
+ pageId="com.nokia.carbide.discovery.ui.kitsPage"
+ title="SDKs">
+ </portalPageLayer>
+ </extension>
</plugin>
--- a/core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/internal/sdk/ui/SDKPreferencePage.java Mon Aug 02 16:50:54 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/internal/sdk/ui/SDKPreferencePage.java Mon Aug 02 17:22:42 2010 -0500
@@ -252,11 +252,9 @@
* @see org.eclipse.jface.preference.PreferencePage#createControl(org.eclipse.swt.widgets.Composite)
*/
public void createControl(Composite parent){
- sdkMgr = SDKCorePlugin.getSDKManager();
if (sdkMgr == null){
return;
}
- sdkList = sdkMgr.getSDKList();
super.createControl(parent);
@@ -270,7 +268,11 @@
* (non-Javadoc)
* @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
*/
- public void init(IWorkbench arg0) {
+ public void init(IWorkbench workbench) {
+ sdkMgr = SDKCorePlugin.getSDKManager();
+ if (sdkMgr != null){
+ sdkList = sdkMgr.getSDKList();
+ }
}
/*
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/sdk/ui/SDKPreferencesPortalPageLayer.java Mon Aug 02 17:22:42 2010 -0500
@@ -0,0 +1,52 @@
+/*
+* 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.cpp.sdk.ui;
+
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PlatformUI;
+
+import com.nokia.carbide.cpp.internal.sdk.ui.SDKPreferencePage;
+import com.nokia.carbide.internal.discovery.ui.extension.IActionBar;
+import com.nokia.carbide.internal.discovery.ui.extension.IActionUIUpdater;
+import com.nokia.carbide.internal.discovery.ui.extension.IPortalPageLayer;
+
+@SuppressWarnings("restriction")
+public class SDKPreferencesPortalPageLayer implements IPortalPageLayer {
+
+ private SDKPreferencePage preferencePage;
+
+ public Control createControl(Composite parent, IEditorPart part) {
+ preferencePage = new SDKPreferencePage();
+ preferencePage.createControl(parent);
+ return preferencePage.getControl();
+ }
+
+ public void init() {
+ preferencePage.init(PlatformUI.getWorkbench());
+ }
+
+ public IActionBar[] createCommandBars(IEditorPart part, IActionUIUpdater updater) {
+ return null;
+ }
+
+ public void dispose() {
+ preferencePage.dispose();
+ }
+
+}
--- a/core/com.nokia.carbide.cpp/build.properties Mon Aug 02 16:50:54 2010 -0500
+++ b/core/com.nokia.carbide.cpp/build.properties Mon Aug 02 17:22:42 2010 -0500
@@ -1,43 +1,41 @@
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- icons/,\
- plugin.properties,\
- plugin_customization.ini,\
- plugin_customization.properties,\
- splash.bmp,\
- intro/,\
- about.ini,\
- about.html,\
- about.mappings,\
- about.properties,\
- carbide.css,\
- src/,\
- html/,\
- nokiaTOC.xml,\
- introDATA.xml,\
- themes/,\
- book.css,\
- component.xml
-src.includes = META-INF/,\
- about.html,\
- about.ini,\
- about.mappings,\
- about.properties,\
- carbide.css,\
- html/,\
- icons/,\
- nokiaTOC.xml,\
- plugin.properties,\
- plugin.xml,\
- plugin_customization.ini,\
- plugin_customization.properties,\
- splash.bmp,\
- src/com/nokia/carbide/cpp/ProductPlugin.java,\
- intro/,\
- introDATA.xml,\
- themes/,\
- book.css
-source.. = src/
-bin.excludes = src/com/nokia/carbide/cpp/cs/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ icons/,\
+ plugin.properties,\
+ plugin_customization.ini,\
+ plugin_customization.properties,\
+ splash.bmp,\
+ intro/,\
+ about.ini,\
+ about.html,\
+ about.mappings,\
+ about.properties,\
+ carbide.css,\
+ src/,\
+ html/,\
+ nokiaTOC.xml,\
+ introDATA.xml,\
+ book.css,\
+ component.xml
+src.includes = META-INF/,\
+ about.html,\
+ about.ini,\
+ about.mappings,\
+ about.properties,\
+ carbide.css,\
+ html/,\
+ icons/,\
+ nokiaTOC.xml,\
+ plugin.properties,\
+ plugin.xml,\
+ plugin_customization.ini,\
+ plugin_customization.properties,\
+ splash.bmp,\
+ src/com/nokia/carbide/cpp/ProductPlugin.java,\
+ intro/,\
+ introDATA.xml,\
+ book.css
+source.. = src/
+bin.excludes = src/com/nokia/carbide/cpp/cs/
--- a/core/com.nokia.carbide.cpp/carbide.css Mon Aug 02 16:50:54 2010 -0500
+++ b/core/com.nokia.carbide.cpp/carbide.css Mon Aug 02 17:22:42 2010 -0500
@@ -6,14 +6,14 @@
body {
font-family: Verdana, Helvetica, sans-serif;
- color: #000000;
+ color: #5B6B74;
margin:20px;
}
.intro-header h1 {
font-family: Verdana, Helvetica, sans-serif;
font-size: 20px;
- color: #00A1D0;
+ color: #5B6B74;
}
.bgbox { background-image: url(images/whitebg.gif); background-repeat: repeat}
--- a/core/com.nokia.carbide.cpp/intro/css/root.css Mon Aug 02 16:50:54 2010 -0500
+++ b/core/com.nokia.carbide.cpp/intro/css/root.css Mon Aug 02 17:22:42 2010 -0500
@@ -1,187 +1,249 @@
-/*
- * Set up general font colours, sizes, etc. Some of these will override
- * settings from the shared CSS
- */
-.intro-header H1 {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 20px;
- color: #00A1D0;
-/* font-size : 18pt; */
-}
-#page-links a .link-label, #action-links a .link-label {
- font-size : 13pt;
font-weight : 600;
color : #1B1B1B;
-}
-#page-links a p .text, #action-links a p .text {
- font-size : 13pt;
font-weight : 500;
color : #1B1B1B;
-}
-/*
- * Set up the content for the root page.
- */
-body {
- min-width : 770px;
/* since IE doesn't support min-width, use expression */
- width:expression(document.body.clientWidth < 770? "770px": "auto" );
/* swapped Eclipse background image for Carbide version */
- background-image : url(graphics/rootpage/background_carbide.jpg);
background-repeat : no-repeat;
background-position : top left;
background-color : #CCC;
-}
-#root {
- /* Carbide branding mod */
- /* swapped Eclipse background image for Carbide version */
- /* background-image : url(graphics/rootpage/brandmark.gif); */
/* background-image : url(graphics/rootpage/brandmark.png); */
- background-repeat : no-repeat;
background-position : bottom left;
min-height : 450px;
height : 100%;
height : expression(document.body.clientHeight < 450? "450px": "100%" );
-}
-/*
- * Set up the navigation bar. It should be centered in the middle
- * of the page
- */
-#links-background {
- /* removed dot graphic that ran across page! */
- width : 100%;
height : 177px;
margin-top : 18%;
margin-bottom : auto;
text-align : center;
-}
-/* specify a width for Moz so we can center.
- * **Important** If additional links are added, we will have to increase this width
- * to accomodate them, otherwise they will wrap to a new line
- */
-#links-background > #page-links {
- width : 33em;
margin : 0 auto;
-}
-#page-links {
- position : relative;
top : 50px;
-}
-#page-links a {
- position : relative;
width : 86px;
margin-left : 1em;
margin-right : 1em;
text-align : center;
vertical-align : top;
-}
-/* float left for Moz so the items all appear inline */
-#page-links > a {
- float : left;
position : relative;
-}
-#page-links a img {
- height : 72px; /* was 82 */
width : 72px; /* was 82 */
vertical-align : middle;
-}
-/* remove the hover image from the flow of the document,
- so it doesn't take up space and change the position
- of the link label and descriptions */
-#page-links a .background-image {
- position : absolute;
-}
-/* properly align the link label and text based on class (left vs. right) */
-#page-links a:hover {
- /* This is needed for IE to force the hover pseudo selectors below to work.*/
padding : 0 em;
-}
-/* Hide both the label and the description of the link and remove them from static HTML flow, until user hovers over link */
-/* First, set the width of both the label and the description to a max of 15 em. */
-/* This can be changed when translated to different country locals. */
-#page-links a span {
- width : 16em;
}
-/* Set up left links orientation first. */
-#page-links a.left:link .link-label,
-#page-links a.left:visited .link-label {
- display: none;
-}
-#page-links a.left:hover .link-label,
-#page-links a.left:focus .link-label,
-#page-links a.left:active .link-label {
- text-align: left;
display: block;
position: absolute;
top : 120 %;
left : 0;
-}
-/* hide description and remove it from static HTML flow, until user hovers over link */
-#page-links a.left:link .text,
-#page-links a.left:visited .text {
- display: none;
-}
-#page-links a.left:hover .text,
-#page-links a.left:focus .text,
-#page-links a.left:active .text {
- text-align: left;
display: block;
position: absolute;
left : 0;
top: 145%;
-}
-/* Set up right links orientation now. */
-#page-links a.right:link .link-label,
-#page-links a.right:visited .link-label {
- display: none;
-}
-#page-links a.right:hover .link-label,
-#page-links a.right:focus .link-label,
-#page-links a.right:active .link-label {
- text-align: right;
display: block;
position: absolute;
top : 120 %;
right : 0;
-}
-/* hide description and remove it from static HTML flow, until user hovers over link */
-#page-links a.right:link .text,
-#page-links a.right:visited .text {
- display: none;
-}
-#page-links a.right:hover .text,
-#page-links a.right:focus .text,
-#page-links a.right:active .text {
- text-align: right;
display: block;
position: absolute;
right : 0;
top: 145%;
-}
-/* properties for each of the page-links */
-a#overview .background-image {
- background-image : url(graphics/icons/ctool/overview72.gif);
visibility : hidden;
-}
-a#tutorials .background-image {
- background-image : url(graphics/icons/ctool/tutorials72.gif);
visibility : hidden;
-}
-a#samples .background-image {
- background-image : url(graphics/icons/ctool/samples72.gif);
visibility : hidden;
-}
-a#news .background-image {
- background-image : url(graphics/icons/ctool/whatsnew72.gif);
visibility : hidden;
-}
-/* show the hover image on hover, focus, and active */
-#page-links a:hover .background-image,
-#page-links a:focus .background-image,
-#page-links a:active .background-image {
- visibility : visible;
-}
-/*
- * Set up the action links
- */
-#action-links {
- width : 98%;
position : absolute;
left : 0px;
top : 20px;
-}
-#action-links a#workbench {
- position : absolute;
top : -16px;
right : -8px;
text-align : right;
-}
-#action-links a .background-image,
-#action-links a #workbench_img {
- height : 53px;
width : 53px;
text-align : center;
vertical-align : top;
-}
-/* special case for mozilla */
-#action-links a > .background-image,
-#action-links a > #workbench_img {
- vertical-align : middle;
-}
-/* remove the hover image from the flow of the document,
- so it doesn't take up space and change the position
- of the main image */
-#action-links a .background-image {
- position : absolute;
-}
-#action-links a#workbench .background-image {
- background-image : url(graphics/icons/ctool/wb48.gif);
visibility : hidden;
-}
-#action-links a#workbench:hover .background-image,
-#action-links a#workbench:focus .background-image,
-#action-links a#workbench:active .background-image {
- visibility : visible;
- position: absolute;
- top: 0px;
- right: 0px;
-}
-/* hide the link and description until users hover over the link */
-#action-links a p .text, #action-links a .link-label {
- display : none;
-}
-#action-links a:hover .link-label,
-#action-links a:focus .link-label,
-#action-links a:active .link-label {
- display : block;
width : 16em;
- margin-left : 10px;
-}
-#action-links a:hover p .text,
-#action-links a:focus p .text,
-#action-links a:active p .text {
- display : block;
width : 16em;
-}
-#action-links a:hover,
-#action-links a:focus,
-#action-links a:active {
- border : 0px;
-}
+/*
+ * Set up general font colours, sizes, etc. Some of these will override
+ * settings from the shared CSS
+ */
+.intro-header H1 {
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 20px;
+ color: #5B6B74;
+/* font-size : 18pt; */
+}
+#page-links a .link-label, #action-links a .link-label {
+ font-size : 13pt;
+ font-weight : 600;
+ color : #5B6B74;
+}
+#page-links a p .text, #action-links a p .text {
+ font-size : 13pt;
+ font-weight : 500;
+ color : #5B6B74;
+}
+/*
+ * Set up the content for the root page.
+ */
+body {
+ min-width : 770px;
+ /* since IE doesn't support min-width, use expression */
+ width:expression(document.body.clientWidth < 770? "770px": "auto" );
+ /* swapped Eclipse background image for Carbide version */
+ background-image : url(graphics/rootpage/background_carbide.jpg);
+ background-repeat : no-repeat;
+ background-position : top left;
+ background-color : #CCC;
+}
+#root {
+ /* Carbide branding mod */
+ /* swapped Eclipse background image for Carbide version */
+ /* background-image : url(graphics/rootpage/brandmark.gif); */
+ /* background-image : url(graphics/rootpage/brandmark.png); */
+ background-repeat : no-repeat;
+ background-position : bottom left;
+ min-height : 450px;
+ height : 100%;
+ height : expression(document.body.clientHeight < 450? "450px": "100%" );
+}
+/*
+ * Set up the navigation bar. It should be centered in the middle
+ * of the page
+ */
+#links-background {
+ /* removed dot graphic that ran across page! */
+ width : 100%;
+ height : 177px;
+ margin-top : 18%;
+ margin-bottom : auto;
+ text-align : center;
+}
+/* specify a width for Moz so we can center.
+ * **Important** If additional links are added, we will have to increase this width
+ * to accomodate them, otherwise they will wrap to a new line
+ */
+#links-background > #page-links {
+ width : 33em;
+ margin : 0 auto;
+}
+#page-links {
+ position : relative;
+ top : 50px;
+}
+#page-links a {
+ position : relative;
+ width : 86px;
+ margin-left : 1em;
+ margin-right : 1em;
+ text-align : center;
+ vertical-align : top;
+}
+/* float left for Moz so the items all appear inline */
+#page-links > a {
+ float : left;
+ position : relative;
+}
+#page-links a img {
+ height : 72px; /* was 82 */
+ width : 72px; /* was 82 */
+ vertical-align : middle;
+}
+/* remove the hover image from the flow of the document,
+ so it doesn't take up space and change the position
+ of the link label and descriptions */
+#page-links a .background-image {
+ position : absolute;
+}
+/* properly align the link label and text based on class (left vs. right) */
+#page-links a:hover {
+ /* This is needed for IE to force the hover pseudo selectors below to work.*/
+ padding : 0 em;
+}
+/* Hide both the label and the description of the link and remove them from static HTML flow, until user hovers over link */
+/* First, set the width of both the label and the description to a max of 15 em. */
+/* This can be changed when translated to different country locals. */
+#page-links a span {
+ width : 16em;
+}
+/* Set up left links orientation first. */
+#page-links a.left:link .link-label,
+#page-links a.left:visited .link-label {
+ display: none;
+}
+#page-links a.left:hover .link-label,
+#page-links a.left:focus .link-label,
+#page-links a.left:active .link-label {
+ text-align: left;
+ display: block;
+ position: absolute;
+ top : 120 %;
+ left : 0;
+}
+/* hide description and remove it from static HTML flow, until user hovers over link */
+#page-links a.left:link .text,
+#page-links a.left:visited .text {
+ display: none;
+}
+#page-links a.left:hover .text,
+#page-links a.left:focus .text,
+#page-links a.left:active .text {
+ text-align: left;
+ display: block;
+ position: absolute;
+ left : 0;
+ top: 145%;
+}
+/* Set up right links orientation now. */
+#page-links a.right:link .link-label,
+#page-links a.right:visited .link-label {
+ display: none;
+}
+#page-links a.right:hover .link-label,
+#page-links a.right:focus .link-label,
+#page-links a.right:active .link-label {
+ text-align: right;
+ display: block;
+ position: absolute;
+ top : 120 %;
+ right : 0;
+}
+/* hide description and remove it from static HTML flow, until user hovers over link */
+#page-links a.right:link .text,
+#page-links a.right:visited .text {
+ display: none;
+}
+#page-links a.right:hover .text,
+#page-links a.right:focus .text,
+#page-links a.right:active .text {
+ text-align: right;
+ display: block;
+ position: absolute;
+ right : 0;
+ top: 145%;
+}
+/* properties for each of the page-links */
+a#overview .background-image {
+ background-image : url(graphics/icons/ctool/overview72.gif);
+ visibility : hidden;
+}
+a#tutorials .background-image {
+ background-image : url(graphics/icons/ctool/tutorials72.gif);
+ visibility : hidden;
+}
+a#samples .background-image {
+ background-image : url(graphics/icons/ctool/samples72.gif);
+ visibility : hidden;
+}
+a#news .background-image {
+ background-image : url(graphics/icons/ctool/whatsnew72.gif);
+ visibility : hidden;
+}
+/* show the hover image on hover, focus, and active */
+#page-links a:hover .background-image,
+#page-links a:focus .background-image,
+#page-links a:active .background-image {
+ visibility : visible;
+}
+/*
+ * Set up the action links
+ */
+#action-links {
+ width : 98%;
+ position : absolute;
+ left : 0px;
+ top : 20px;
+}
+#action-links a#workbench {
+ position : absolute;
+ top : -16px;
+ right : -8px;
+ text-align : right;
+}
+#action-links a .background-image,
+#action-links a #workbench_img {
+ height : 53px;
+ width : 53px;
+ text-align : center;
+ vertical-align : top;
+}
+/* special case for mozilla */
+#action-links a > .background-image,
+#action-links a > #workbench_img {
+ vertical-align : middle;
+}
+/* remove the hover image from the flow of the document,
+ so it doesn't take up space and change the position
+ of the main image */
+#action-links a .background-image {
+ position : absolute;
+}
+#action-links a#workbench .background-image {
+ background-image : url(graphics/icons/ctool/wb48.gif);
+ visibility : hidden;
+}
+#action-links a#workbench:hover .background-image,
+#action-links a#workbench:focus .background-image,
+#action-links a#workbench:active .background-image {
+ visibility : visible;
+ position: absolute;
+ top: 0px;
+ right: 0px;
+}
+/* hide the link and description until users hover over the link */
+#action-links a p .text, #action-links a .link-label {
+ display : none;
+}
+#action-links a:hover .link-label,
+#action-links a:focus .link-label,
+#action-links a:active .link-label {
+ display : block;
+ width : 16em;
+ margin-left : 10px;
+}
+#action-links a:hover p .text,
+#action-links a:focus p .text,
+#action-links a:active p .text {
+ display : block;
+ width : 16em;
+}
+#action-links a:hover,
+#action-links a:focus,
+#action-links a:active {
+ border : 0px;
+}
--- a/core/com.nokia.carbide.cpp/intro/css/root_swt.properties Mon Aug 02 16:50:54 2010 -0500
+++ b/core/com.nokia.carbide.cpp/intro/css/root_swt.properties Mon Aug 02 17:22:42 2010 -0500
@@ -1,35 +1,35 @@
-#
-# intro/css/root_swt.properties
-#
-root.links-background.page-links.overview.link-icon = intro/css/graphics/icons/etool/overview72.gif
-root.links-background.page-links.tutorials.link-icon = intro/css/graphics/icons/etool/tutorials72.gif
-root.links-background.page-links.samples.link-icon= intro/css/graphics/icons/etool/samples72.gif
-root.links-background.page-links.news.link-icon = intro/css/graphics/icons/etool/whatsnew72.gif
-root.action-links.workbench.link-icon = intro/css/graphics/icons/etool/wb48.gif
-
-root.links-background.page-links.overview.hover-icon = intro/css/graphics/icons/ctool/overview72.gif
-root.links-background.page-links.tutorials.hover-icon = intro/css/graphics/icons/ctool/tutorials72.gif
-root.links-background.page-links.samples.hover-icon = intro/css/graphics/icons/ctool/samples72.gif
-root.links-background.page-links.news.hover-icon = intro/css/graphics/icons/ctool/whatsnew72.gif
-root.action-links.workbench.hover-icon = intro/css/graphics/icons/ctool/wb48.gif
-
-
-root.links-background.page-links.overview.small-link-icon = intro/css/graphics/icons/etool/overview48.gif
-root.links-background.page-links.tutorials.small-link-icon = intro/css/graphics/icons/etool/tutorials48.gif
-root.links-background.page-links.samples.small-link-icon = intro/css/graphics/icons/etool/samples48.gif
-root.links-background.page-links.news.small-link-icon = intro/css/graphics/icons/etool/whatsnew48.gif
-root.action-links.workbench.small-link-icon = intro/css/graphics/icons/etool/wb48.gif
-
-root.links-background.page-links.overview.small-hover-icon = intro/css/graphics/icons/ctool/overview48.gif
-root.links-background.page-links.tutorials.small-hover-icon = intro/css/graphics/icons/ctool/tutorials48.gif
-root.links-background.page-links.samples.small-hover-icon = intro/css/graphics/icons/ctool/samples48.gif
-root.links-background.page-links.news.small-hover-icon = intro/css/graphics/icons/ctool/whatsnew48.gif
-root.action-links.workbench.small-hover-icon = intro/css/graphics/icons/ctool/wb48.gif
-
-# added generic carbide icon to set
-root.links-background.page-links.carbide.link-icon = icons/brandmark_cpp.gif
-root.links-background.page-links.carbide.hover-icon = icons/brandmark_cpp.gif
-
-root.layout.ncolumns = 1
-root.links-background.page-links.layout.hspacing = 40
-root.layout.vspacing = 35
+#
+# intro/css/root_swt.properties
+#
+root.links-background.page-links.overview.link-icon = intro/css/graphics/icons/etool/overview72.gif
+root.links-background.page-links.tutorials.link-icon = intro/css/graphics/icons/etool/tutorials72.gif
+root.links-background.page-links.samples.link-icon= intro/css/graphics/icons/etool/samples72.gif
+root.links-background.page-links.news.link-icon = intro/css/graphics/icons/etool/whatsnew72.gif
+root.action-links.workbench.link-icon = intro/css/graphics/icons/etool/wb48.gif
+
+root.links-background.page-links.overview.hover-icon = intro/css/graphics/icons/ctool/overview72.gif
+root.links-background.page-links.tutorials.hover-icon = intro/css/graphics/icons/ctool/tutorials72.gif
+root.links-background.page-links.samples.hover-icon = intro/css/graphics/icons/ctool/samples72.gif
+root.links-background.page-links.news.hover-icon = intro/css/graphics/icons/ctool/whatsnew72.gif
+root.action-links.workbench.hover-icon = intro/css/graphics/icons/ctool/wb48.gif
+
+
+root.links-background.page-links.overview.small-link-icon = intro/css/graphics/icons/etool/overview48.gif
+root.links-background.page-links.tutorials.small-link-icon = intro/css/graphics/icons/etool/tutorials48.gif
+root.links-background.page-links.samples.small-link-icon = intro/css/graphics/icons/etool/samples48.gif
+root.links-background.page-links.news.small-link-icon = intro/css/graphics/icons/etool/whatsnew48.gif
+root.action-links.workbench.small-link-icon = intro/css/graphics/icons/etool/wb48.gif
+
+root.links-background.page-links.overview.small-hover-icon = intro/css/graphics/icons/ctool/overview48.gif
+root.links-background.page-links.tutorials.small-hover-icon = intro/css/graphics/icons/ctool/tutorials48.gif
+root.links-background.page-links.samples.small-hover-icon = intro/css/graphics/icons/ctool/samples48.gif
+root.links-background.page-links.news.small-hover-icon = intro/css/graphics/icons/ctool/whatsnew48.gif
+root.action-links.workbench.small-hover-icon = intro/css/graphics/icons/ctool/wb48.gif
+
+# added generic carbide icon to set
+root.links-background.page-links.carbide.link-icon = icons/Carbide_c_icon_32x32.png
+root.links-background.page-links.carbide.hover-icon = icons/Carbide_c_icon_32x32.png
+
+root.layout.ncolumns = 1
+root.links-background.page-links.layout.hspacing = 40
+root.layout.vspacing = 35
--- a/core/com.nokia.carbide.cpp/intro/css/shared.css Mon Aug 02 16:50:54 2010 -0500
+++ b/core/com.nokia.carbide.cpp/intro/css/shared.css Mon Aug 02 17:22:42 2010 -0500
@@ -1,280 +1,280 @@
-/*
- * Set up general fonts, sizes and colors
- */
-body { font-family : Arial, sans-serif; }
-
-H1, H2, H3, H4, p, a { color : #4D4D4D; }
-
-.intro-header H1 {
- font-size : 16pt;
- font-weight : normal;
- /* color : #E5E5E5; */
- /* added turquose to titles */
- color : #00A1D0;
-}
-
-h2 {
- font-size : 13pt;
- font-weight : normal;
- /* color : #7B8694; */
- /* changed color to dark gray */
- color : #333333;
-}
-/* For regular div labels */
-H4 .div-label {
- font-size : 10pt;
- font-weight : bold;
-}
-
-/* For the main page content's title */
-#content-header H4 .div-label {
- font-size : 14pt;
- font-weight : normal;
- /* color : #8C96A2; */
- /* changed color to dark gray */
- color : #333333;
- float : none;
- clear : both;
-}
-
-/* Carbide branding mod */
-#copyright-footer{
- width:225px;
- position:absolute;
- bottom:5px;
- left:5px;
- font-family: Arial, Helvetica, sans-serif;
- font-size: xx-small;
- color: #666666;
- font-weight: 500;
- margin:0px;
- padding: 5px;
- /* BUGZ#1287 TEST TEST TEST */
- /* height : expression(document.body.clientHeight < 450? "450px": "100%" ); */
- /* top : expression(document.body.clientHeight < 500? "500px" : "100%" ); */
-}
-
-.page-description {
- font-size : 10pt;
- float : none;
- clear : both;
-}
-
-a {
- font-weight : bold;
- text-decoration : none;
- color : #4D4D4D;
-}
-
-a .link-label {
- font-size : 10pt;
- font-weight : normal;
-}
-
-#navigation-links a .link-label {
- font-size : 9pt;
- font-weight : normal;
- /* color : #E5E5E5; */
- /* added turquose to links */
- color : #00A1D0;
-}
-
-a .text {
- font-size : 8pt;
- font-weight : normal;
-}
-
-p .group-description {
- font-size : 10pt;
- font-weight : normal;
-}
-
-
-/*
- * Set up other general properties like padding/margins
- */
-html, body { width : 100%; height : 100%; }
-
-html, body, div, h1, h4, p, a { margin : 0px; padding : 0px; }
-
-.intro-header H1 { padding-top : 10px; margin-left : 10px; }
-
-/* For regular div labels */
-#page-content div H4 {
- padding : 10px;
- padding-bottom : 0px;
-}
-
-/* For the main page content's div label */
-#page-content #content-header H4 {
- padding-bottom : 10px;
- padding-top : 0px;
-}
-
-/* special case for Mozilla's main content-header label.
- Mozilla 1.4 needs more room at the top */
-#page-content > #content-header H4 { padding-top : 10px; }
-
-/* Needed in IE to get shift+tab to show the active image properly */
-a:active {
- border : solid 0px;
-}
-
-a img {
- border-width : 0;
- background-repeat : no-repeat;
-}
-
-/*
- * to get scrollbars working in both IE and Mozilla
- */
-html,body { overflow: auto; }
-html>body { overflow: visible; }
-
-/*
- * Set up the body, decorative background, and navigation for the content
- * pages.
- * Note: the root page handles its own background and navigation; these
- * settings primarily apply to the content pages
- */
-body {
- background-color : #FFFFFF;
- background-repeat : no-repeat;
- background-position : bottom right;
-}
-
-#curve-image {
-/* width : 100%;
- height : 164px;
- position : absolute;
- top : 0px;
- background-image : url(graphics/contentpage/backgroundcurve.gif);
- background-repeat : no-repeat;
- background-position : top center;
- margin : 0;
- padding : 0;
-*/
-}
-
-.intro-header { background-color : transparent; z-index : 100;}
-
-body, .page{
- min-width : 770px;
- /* since IE doesn't support min-width, try expression */
- width:expression(document.body.clientWidth < 770? "770px": "auto" );
- min-height : 425px;
- height : 100%;
- height : expression(document.body.clientHeight < 425? "425px": "100%" );
-}
-
-.page {
- min-height : 475px;
- /* Carbide branding mod */
- /* background-image : url(graphics/contentpage/background.jpg); */
- background-image : url(graphics/rootpage/background_carbide.jpg);
- background-repeat : repeat-x;
- background-position : top left;
-}
-
-#page-content {
- background-repeat : no-repeat;
- background-position : bottom right;
- height : 70%;
-}
-
-/*
- * Lay out the navigation links
- * (Root page does something similar for its navigation)
- */
-#navigation-links {
- position : relative;
- left : 10px;
- top : 5px;
- height : 60px;
- width : 98%;
-}
-
-#navigation-links a {
- padding-left : 5px;
- padding-right : 5px;
- float : left;
- text-align : center;
-}
-
-#navigation-links a img {
- height : 52px;
- width : 52px;
- vertical-align : middle;
-}
-
-#navigation-links a .link-label { display : block; margin-top : 5px;}
-
-#navigation-links a .text { display : none; }
-
-#navigation-links a:hover,
-#navigation-links a:focus
-#navigation-links a:active { border-right : 0px;}
-
-/* properties for each of the navigation-links */
-#navigation-links a#overview img { background-image : url(graphics/icons/etool/overview48.gif); }
-#navigation-links a#overview:hover img,
-#navigation-links a#overview:focus img,
-#navigation-links a#overview:active img { background-image : url(graphics/icons/ctool/overview48.gif); }
-/*#navigation-links a#overview:active img { background-image : url(graphics/icons/ctool/overview48sel.gif); }*/
-
-#navigation-links a#tutorials img { background-image : url(graphics/icons/etool/tutorials48.gif); }
-#navigation-links a#tutorials:hover img,
-#navigation-links a#tutorials:active img,
-#navigation-links a#tutorials:focus img { background-image : url(graphics/icons/ctool/tutorials48.gif); }
-/*#navigation-links a#tutorials:active img { background-image : url(graphics/icons/ctool/tutorials48sel.gif); }*/
-
-#navigation-links a#samples img { background-image : url(graphics/icons/etool/samples48.gif); }
-#navigation-links a#samples:hover img,
-#navigation-links a#samples:active img,
-#navigation-links a#samples:focus img { background-image : url(graphics/icons/ctool/samples48.gif); }
-/*#navigation-links a#samples:active img { background-image : url(graphics/icons/ctool/samples48sel.gif); }*/
-
-#navigation-links a#news img { background-image : url(graphics/icons/etool/whatsnew48.gif); }
-#navigation-links a#news:hover img,
-#navigation-links a#news:focus img,
-#navigation-links a#news:active img { background-image : url(graphics/icons/ctool/whatsnew48.gif); }
-/*#navigation-links a#news:active img { background-image : url(graphics/icons/ctool/whatsnew48sel.gif); }*/
-
-#navigation-links a#workbench { position : absolute; right : 0px; top : -35px; text-align : right;}
-#navigation-links a#workbench .text { display : none; }
-#navigation-links a#workbench img { background-image : url(graphics/icons/etool/wb48.gif); width : 53px; height : 53px;}
-#navigation-links a#workbench:hover img,
-#navigation-links a#workbench:focus img,
-#navigation-links a#workbench:active img { background-image : url(graphics/icons/ctool/wb48.gif); }
-
-/*
- * Lay out the page title and description
- */
-h1, p { margin-left : 10px; } /* required in mozilla so the page description is properly indented */
-
-/* position the page content so that the page title overlays the bottom
- * of the background image, but make sure the content is always on top
- * (using z-index) */
-#page-content {
- float : none;
- clear : both;
- text-align : center;
- margin-top : 35px;
-}
-
-.page > #page-content { margin-top : 50px; }
-
-#page-content p {
- padding-bottom : 15px;
- text-align : left;
- float : none;
- clear : both;
-}
-
-#page-content #content-header H4, .page-description {
- text-align : left;
- margin-right : 10px;
- float : none;
- clear : both;
-}
-
+/*
+ * Set up general fonts, sizes and colors
+ */
+body { font-family : Arial, sans-serif; }
+
+H1, H2, H3, H4, p, a { color : #5B6B74; }
+
+.intro-header H1 {
+ font-size : 16pt;
+ font-weight : normal;
+ /* color : #E5E5E5; */
+ /* added turquose to titles */
+ color : #5B6B74;
+}
+
+h2 {
+ font-size : 13pt;
+ font-weight : normal;
+ /* color : #7B8694; */
+ /* changed color to dark gray */
+ color : #5B6B74;
+}
+/* For regular div labels */
+H4 .div-label {
+ font-size : 10pt;
+ font-weight : bold;
+}
+
+/* For the main page content's title */
+#content-header H4 .div-label {
+ font-size : 14pt;
+ font-weight : normal;
+ /* color : #8C96A2; */
+ /* changed color to dark gray */
+ color : #5B6B74;
+ float : none;
+ clear : both;
+}
+
+/* Carbide branding mod */
+#copyright-footer{
+ width:225px;
+ position:absolute;
+ bottom:5px;
+ left:5px;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: xx-small;
+ color: #666666;
+ font-weight: 500;
+ margin:0px;
+ padding: 5px;
+ /* BUGZ#1287 TEST TEST TEST */
+ /* height : expression(document.body.clientHeight < 450? "450px": "100%" ); */
+ /* top : expression(document.body.clientHeight < 500? "500px" : "100%" ); */
+}
+
+.page-description {
+ font-size : 10pt;
+ float : none;
+ clear : both;
+}
+
+a {
+ font-weight : bold;
+ text-decoration : none;
+ color : #5B6B74;
+}
+
+a .link-label {
+ font-size : 10pt;
+ font-weight : normal;
+}
+
+#navigation-links a .link-label {
+ font-size : 9pt;
+ font-weight : normal;
+ /* color : #E5E5E5; */
+ /* added turquose to links */
+ color : #5B6B74;
+}
+
+a .text {
+ font-size : 8pt;
+ font-weight : normal;
+}
+
+p .group-description {
+ font-size : 10pt;
+ font-weight : normal;
+}
+
+
+/*
+ * Set up other general properties like padding/margins
+ */
+html, body { width : 100%; height : 100%; }
+
+html, body, div, h1, h4, p, a { margin : 0px; padding : 0px; }
+
+.intro-header H1 { padding-top : 10px; margin-left : 10px; }
+
+/* For regular div labels */
+#page-content div H4 {
+ padding : 10px;
+ padding-bottom : 0px;
+}
+
+/* For the main page content's div label */
+#page-content #content-header H4 {
+ padding-bottom : 10px;
+ padding-top : 0px;
+}
+
+/* special case for Mozilla's main content-header label.
+ Mozilla 1.4 needs more room at the top */
+#page-content > #content-header H4 { padding-top : 10px; }
+
+/* Needed in IE to get shift+tab to show the active image properly */
+a:active {
+ border : solid 0px;
+}
+
+a img {
+ border-width : 0;
+ background-repeat : no-repeat;
+}
+
+/*
+ * to get scrollbars working in both IE and Mozilla
+ */
+html,body { overflow: auto; }
+html>body { overflow: visible; }
+
+/*
+ * Set up the body, decorative background, and navigation for the content
+ * pages.
+ * Note: the root page handles its own background and navigation; these
+ * settings primarily apply to the content pages
+ */
+body {
+ background-color : #FFFFFF;
+ background-repeat : no-repeat;
+ background-position : bottom right;
+}
+
+#curve-image {
+/* width : 100%;
+ height : 164px;
+ position : absolute;
+ top : 0px;
+ background-image : url(graphics/contentpage/backgroundcurve.gif);
+ background-repeat : no-repeat;
+ background-position : top center;
+ margin : 0;
+ padding : 0;
+*/
+}
+
+.intro-header { background-color : transparent; z-index : 100;}
+
+body, .page{
+ min-width : 770px;
+ /* since IE doesn't support min-width, try expression */
+ width:expression(document.body.clientWidth < 770? "770px": "auto" );
+ min-height : 425px;
+ height : 100%;
+ height : expression(document.body.clientHeight < 425? "425px": "100%" );
+}
+
+.page {
+ min-height : 475px;
+ /* Carbide branding mod */
+ /* background-image : url(graphics/contentpage/background.jpg); */
+ background-image : url(graphics/rootpage/background_carbide.jpg);
+ background-repeat : repeat-x;
+ background-position : top left;
+}
+
+#page-content {
+ background-repeat : no-repeat;
+ background-position : bottom right;
+ height : 70%;
+}
+
+/*
+ * Lay out the navigation links
+ * (Root page does something similar for its navigation)
+ */
+#navigation-links {
+ position : relative;
+ left : 10px;
+ top : 5px;
+ height : 60px;
+ width : 98%;
+}
+
+#navigation-links a {
+ padding-left : 5px;
+ padding-right : 5px;
+ float : left;
+ text-align : center;
+}
+
+#navigation-links a img {
+ height : 52px;
+ width : 52px;
+ vertical-align : middle;
+}
+
+#navigation-links a .link-label { display : block; margin-top : 5px;}
+
+#navigation-links a .text { display : none; }
+
+#navigation-links a:hover,
+#navigation-links a:focus
+#navigation-links a:active { border-right : 0px;}
+
+/* properties for each of the navigation-links */
+#navigation-links a#overview img { background-image : url(graphics/icons/etool/overview48.gif); }
+#navigation-links a#overview:hover img,
+#navigation-links a#overview:focus img,
+#navigation-links a#overview:active img { background-image : url(graphics/icons/ctool/overview48.gif); }
+/*#navigation-links a#overview:active img { background-image : url(graphics/icons/ctool/overview48sel.gif); }*/
+
+#navigation-links a#tutorials img { background-image : url(graphics/icons/etool/tutorials48.gif); }
+#navigation-links a#tutorials:hover img,
+#navigation-links a#tutorials:active img,
+#navigation-links a#tutorials:focus img { background-image : url(graphics/icons/ctool/tutorials48.gif); }
+/*#navigation-links a#tutorials:active img { background-image : url(graphics/icons/ctool/tutorials48sel.gif); }*/
+
+#navigation-links a#samples img { background-image : url(graphics/icons/etool/samples48.gif); }
+#navigation-links a#samples:hover img,
+#navigation-links a#samples:active img,
+#navigation-links a#samples:focus img { background-image : url(graphics/icons/ctool/samples48.gif); }
+/*#navigation-links a#samples:active img { background-image : url(graphics/icons/ctool/samples48sel.gif); }*/
+
+#navigation-links a#news img { background-image : url(graphics/icons/etool/whatsnew48.gif); }
+#navigation-links a#news:hover img,
+#navigation-links a#news:focus img,
+#navigation-links a#news:active img { background-image : url(graphics/icons/ctool/whatsnew48.gif); }
+/*#navigation-links a#news:active img { background-image : url(graphics/icons/ctool/whatsnew48sel.gif); }*/
+
+#navigation-links a#workbench { position : absolute; right : 0px; top : -35px; text-align : right;}
+#navigation-links a#workbench .text { display : none; }
+#navigation-links a#workbench img { background-image : url(graphics/icons/etool/wb48.gif); width : 53px; height : 53px;}
+#navigation-links a#workbench:hover img,
+#navigation-links a#workbench:focus img,
+#navigation-links a#workbench:active img { background-image : url(graphics/icons/ctool/wb48.gif); }
+
+/*
+ * Lay out the page title and description
+ */
+h1, p { margin-left : 10px; } /* required in mozilla so the page description is properly indented */
+
+/* position the page content so that the page title overlays the bottom
+ * of the background image, but make sure the content is always on top
+ * (using z-index) */
+#page-content {
+ float : none;
+ clear : both;
+ text-align : center;
+ margin-top : 35px;
+}
+
+.page > #page-content { margin-top : 50px; }
+
+#page-content p {
+ padding-bottom : 15px;
+ text-align : left;
+ float : none;
+ clear : both;
+}
+
+#page-content #content-header H4, .page-description {
+ text-align : left;
+ margin-right : 10px;
+ float : none;
+ clear : both;
+}
+
--- a/core/com.nokia.carbide.cpp/plugin.xml Mon Aug 02 16:50:54 2010 -0500
+++ b/core/com.nokia.carbide.cpp/plugin.xml Mon Aug 02 17:22:42 2010 -0500
@@ -37,7 +37,7 @@
value="Carbide.c++ v3.0.0 for Symbian"/>
<property
name="introBrandingImage"
- value="product:themes/carbide/graphics/root/brandmark.png"/>
+ value="intro/css/graphics/rootpage/brandmark.png"/>
<property
name="introBrandingImageText"
value="Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved."/>
Binary file core/com.nokia.carbide.discovery.ui/icons/icon_home.png has changed
--- a/core/com.nokia.carbide.discovery.ui/plugin.xml Mon Aug 02 16:50:54 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/plugin.xml Mon Aug 02 17:22:42 2010 -0500
@@ -49,6 +49,7 @@
<extension
point="com.nokia.carbide.discovery.ui.portalPage">
<portalPage
+ class="com.nokia.carbide.internal.discovery.ui.view.SettingsBarCreator"
id="com.nokia.carbide.discovery.ui.customizePage"
image="icons/icon-discovery.png"
order="50"
@@ -56,7 +57,7 @@
</portalPage>
<portalPage
id="com.nokia.carbide.discovery.ui.homePage"
- image="icons/Carbide_c_icon_16x16.png"
+ image="icons/icon_home.png"
order="1"
title="%home.title">
</portalPage>
@@ -66,11 +67,18 @@
order="100"
title="%support.title">
</portalPage>
+ <portalPage
+ id="com.nokia.carbide.discovery.ui.kitsPage"
+ image="icons/Carbide_c_icon_16x16.png"
+ order="75"
+ title="Kits">
+ </portalPage>
</extension>
<extension
point="com.nokia.carbide.discovery.ui.portalPageLayer">
<portalPageLayer
class="com.nokia.carbide.internal.discovery.ui.view.HomePage"
+ order="1"
pageId="com.nokia.carbide.discovery.ui.homePage"
title="Forum Nokia">
</portalPageLayer>
@@ -81,19 +89,34 @@
</portalPageLayer>
<portalPageLayer
class="com.nokia.carbide.internal.discovery.ui.view.InstallExtensionsPortalExtension"
+ order="50"
pageId="com.nokia.carbide.discovery.ui.customizePage"
title="%install.layer.title">
</portalPageLayer>
<portalPageLayer
class="com.nokia.carbide.internal.discovery.ui.view.WrenchSciencePage"
+ order="30"
pageId="com.nokia.carbide.discovery.ui.homePage"
title="%wrenchscience.title">
</portalPageLayer>
<portalPageLayer
class="com.nokia.carbide.internal.discovery.ui.view.CreatingCarbidePage"
+ order="25"
pageId="com.nokia.carbide.discovery.ui.homePage"
title="%creatingcarbide.title">
</portalPageLayer>
+ <portalPageLayer
+ class="com.nokia.carbide.internal.discovery.ui.view.BugzillaPage"
+ order="100"
+ pageId="com.nokia.carbide.discovery.ui.homePage"
+ title="Report Bugs">
+ </portalPageLayer>
+ <portalPageLayer
+ class="com.nokia.carbide.internal.discovery.ui.view.PulsarPageLayer"
+ order="25"
+ pageId="com.nokia.carbide.discovery.ui.kitsPage"
+ title="Install SDKs">
+ </portalPageLayer>
</extension>
</plugin>
--- a/core/com.nokia.carbide.discovery.ui/schema/portalPage.exsd Mon Aug 02 16:50:54 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/schema/portalPage.exsd Mon Aug 02 17:22:42 2010 -0500
@@ -83,6 +83,16 @@
</documentation>
</annotation>
</attribute>
+ <attribute name="class" type="string">
+ <annotation>
+ <documentation>
+ optionally provide command bars visible in all layers
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":com.nokia.carbide.internal.discovery.ui.extension.ICommandBarFactory"/>
+ </appinfo>
+ </annotation>
+ </attribute>
</complexType>
</element>
--- a/core/com.nokia.carbide.discovery.ui/schema/portalPageLayer.exsd Mon Aug 02 16:50:54 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/schema/portalPageLayer.exsd Mon Aug 02 17:22:42 2010 -0500
@@ -76,6 +76,13 @@
</documentation>
</annotation>
</attribute>
+ <attribute name="order" type="string">
+ <annotation>
+ <documentation>
+ relative ordering of layers on a page (integer used to sort layers)
+ </documentation>
+ </annotation>
+ </attribute>
</complexType>
</element>
--- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/discovery/ui/Activator.java Mon Aug 02 16:50:54 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/discovery/ui/Activator.java Mon Aug 02 17:22:42 2010 -0500
@@ -21,18 +21,24 @@
import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
+import java.net.URISyntaxException;
import java.net.URL;
import java.text.MessageFormat;
import java.util.Properties;
import org.eclipse.core.net.proxy.IProxyData;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.osgi.service.datalocation.Location;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -50,6 +56,8 @@
private static final String PROPERTY_PROXYPORT = "network.proxy_port"; //$NON-NLS-1$
private static final String PROPERTY_PROXYHOST = "network.proxy_host"; //$NON-NLS-1$
+
+ private boolean proxyDataAvailable;
/**
* The constructor
@@ -64,13 +72,66 @@
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$
- if (proxyData != null) {
- System.setProperty(PROPERTY_PROXYHOST, proxyData.getHost());
- System.setProperty(PROPERTY_PROXYPORT, String.valueOf(proxyData.getPort()));
- }
+ Job j = new Job("Getting proxy info") {
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ IProxyData proxyData = ProxyUtils.getProxyData(new URI("http://www.yahoo.com"));
+ if (proxyData != null) {
+ System.setProperty(PROPERTY_PROXYHOST, proxyData.getHost());
+ System.setProperty(PROPERTY_PROXYPORT, String.valueOf(proxyData.getPort()));
+ }
+ } catch (URISyntaxException e) {
+ } //$NON-NLS-1$
+ setProxyDataAvailable();
+ return Status.OK_STATUS;
+ }
+ };
+ j.setSystem(true);
+ j.setUser(false);
+ j.schedule();
+ }
+
+ private synchronized void setProxyDataAvailable() {
+ proxyDataAvailable = true;
+ }
+
+ public synchronized boolean isProxyDataAvailable() {
+ return proxyDataAvailable;
}
+ public static void runInUIThreadWhenProxyDataSet(final Control control, final Runnable r) {
+ Job j = new Job("") {
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ setBusyCursor(control, true);
+ Activator activator = getDefault();
+ while (!activator.isProxyDataAvailable()) {
+ try {
+ Thread.sleep(200);
+ } catch (InterruptedException e) {
+ }
+ }
+ setBusyCursor(control, false);
+ Display.getDefault().asyncExec(r);
+ return Status.OK_STATUS;
+ }
+ };
+ j.setSystem(true);
+ j.setUser(false);
+ j.schedule();
+ }
+
+ public static void setBusyCursor(final Control control, final boolean isBusy) {
+ final Display display = control.getDisplay();
+ display.syncExec(new Runnable() {
+ @Override
+ public void run() {
+ control.setCursor(isBusy ? display.getSystemCursor(SWT.CURSOR_WAIT) : null);
+ }
+ });
+ }
+
/*
* (non-Javadoc)
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
--- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/discovery/ui/Messages.java Mon Aug 02 16:50:54 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/discovery/ui/Messages.java Mon Aug 02 17:22:42 2010 -0500
@@ -1,3 +1,19 @@
+/*
+* 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.discovery.ui;
import org.eclipse.osgi.util.NLS;
@@ -15,26 +31,30 @@
public static String AbstractBrowserPortalPageLayer_OpenLocationTitle;
public static String AbstractBrowserPortalPageLayer_ShowInBrowserLabel;
public static String AbstractBrowserPortalPageLayer_URLLabel;
+ public static String AbstractDiscoveryPortalPageLayer_AdvancedInstallActionLabel;
+ public static String AbstractDiscoveryPortalPageLayer_CheckAllActionLabel;
+ public static String AbstractDiscoveryPortalPageLayer_CheckedItemsStatusMessage;
+ public static String AbstractDiscoveryPortalPageLayer_GatheringExtensionsDesc;
+ public static String AbstractDiscoveryPortalPageLayer_GatheringInstallInfoDesc;
+ public static String AbstractDiscoveryPortalPageLayer_InstallActionLabel;
+ public static String AbstractDiscoveryPortalPageLayer_InstallActionTooltip;
+ public static String AbstractDiscoveryPortalPageLayer_RefreshActionLabel;
+ public static String AbstractDiscoveryPortalPageLayer_Title;
+ public static String AbstractDiscoveryPortalPageLayer_UncheckAllActionLabel;
public static String AbstractRSSPortalPageLayer_ReturnToFeedLabel;
public static String AbstractRSSPortalPageLayer_RSSReadError;
public static String Activator_MissingConfigURLError;
- public static String InstallExtensionsPage_AdvancedInstallLabel;
- public static String InstallExtensionsPage_BuzillaActionName;
- public static String InstallExtensionsPage_CheckAllLabel;
- public static String InstallExtensionsPage_GatherExtensionsTitle;
- public static String InstallExtensionsPage_GatheringInstallInfoTitle;
- public static String InstallExtensionsPage_InstallLabel;
- public static String InstallExtensionsPage_InstallTip;
- public static String InstallExtensionsPage_LinkBarTitle;
- public static String InstallExtensionsPage_RefreshLabel;
- public static String InstallExtensionsPage_StatusLineFmt;
- public static String InstallExtensionsPage_UncheckAllLabel;
- public static String InstallExtensionsPortalExtension_InstallExtensionsTitle;
+ public static String PortalEditor_BadCommandBarFactoryError;
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 SettingsBarCreator_CapabilitiesActionLabel;
+ public static String SettingsBarCreator_CodeStyleActionLabel;
+ public static String SettingsBarCreator_KeyBindingsActionLabel;
+ public static String SettingsBarCreator_ProxiesActionLabel;
+ public static String SettingsBarCreator_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 Mon Aug 02 16:50:54 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/discovery/ui/messages.properties Mon Aug 02 17:22:42 2010 -0500
@@ -9,23 +9,27 @@
AbstractBrowserPortalPageLayer_OpenLocationTitle=Open Location
AbstractBrowserPortalPageLayer_ShowInBrowserLabel=Show in browser
AbstractBrowserPortalPageLayer_URLLabel=URL:
+AbstractDiscoveryPortalPageLayer_AdvancedInstallActionLabel=Advanced install...
+AbstractDiscoveryPortalPageLayer_CheckAllActionLabel=Check all
+AbstractDiscoveryPortalPageLayer_CheckedItemsStatusMessage={0} item(s) checked
+AbstractDiscoveryPortalPageLayer_GatheringExtensionsDesc=Gathering Extensions
+AbstractDiscoveryPortalPageLayer_GatheringInstallInfoDesc=Gathering Install Information
+AbstractDiscoveryPortalPageLayer_InstallActionLabel=Install...
+AbstractDiscoveryPortalPageLayer_InstallActionTooltip=Install checked items
+AbstractDiscoveryPortalPageLayer_RefreshActionLabel=Refresh
+AbstractDiscoveryPortalPageLayer_Title=Install Extensions
+AbstractDiscoveryPortalPageLayer_UncheckAllActionLabel=Check none
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}
-InstallExtensionsPage_AdvancedInstallLabel=Advanced install...
-InstallExtensionsPage_BuzillaActionName=Carbide Bugzilla
-InstallExtensionsPage_CheckAllLabel=Check all
-InstallExtensionsPage_GatherExtensionsTitle=Gathering Extensions
-InstallExtensionsPage_GatheringInstallInfoTitle=Gathering Install Information
-InstallExtensionsPage_InstallLabel=Install...
-InstallExtensionsPage_InstallTip=Install checked items
-InstallExtensionsPage_LinkBarTitle=Links
-InstallExtensionsPage_RefreshLabel=Refresh
-InstallExtensionsPage_StatusLineFmt={0} item(s) checked
-InstallExtensionsPage_UncheckAllLabel=Check none
-InstallExtensionsPortalExtension_InstallExtensionsTitle=Install Extensions
+PortalEditor_BadCommandBarFactoryError=Command bar factory class could not be created for id: {0
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}
+PortalEditor_PageRankError=Could not get order value for portal page or layer: {0}
+SettingsBarCreator_CapabilitiesActionLabel=Capabilities
+SettingsBarCreator_CodeStyleActionLabel=Code Style
+SettingsBarCreator_KeyBindingsActionLabel=Key bindings
+SettingsBarCreator_ProxiesActionLabel=Proxies
+SettingsBarCreator_Title=Settings
--- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/ActionUIUpdater.java Mon Aug 02 16:50:54 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/ActionUIUpdater.java Mon Aug 02 17:22:42 2010 -0500
@@ -19,7 +19,7 @@
import java.util.ArrayList;
import java.util.List;
-import com.nokia.carbide.internal.discovery.ui.extension.IPortalPageLayer.IActionUIUpdater;
+import com.nokia.carbide.internal.discovery.ui.extension.IActionUIUpdater;
class ActionUIUpdater implements IActionUIUpdater {
--- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/PortalEditor.java Mon Aug 02 16:50:54 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/PortalEditor.java Mon Aug 02 17:22:42 2010 -0500
@@ -54,12 +54,24 @@
import com.nokia.carbide.discovery.ui.Activator;
import com.nokia.carbide.discovery.ui.Messages;
+import com.nokia.carbide.internal.discovery.ui.extension.ICommandBarFactory;
import com.nokia.carbide.internal.discovery.ui.extension.IPortalEditor;
import com.nokia.carbide.internal.discovery.ui.extension.IPortalPageLayer;
import com.nokia.cpp.internal.api.utils.core.Pair;
import com.nokia.cpp.internal.api.utils.ui.WorkbenchUtils;
public class PortalEditor extends EditorPart implements IPortalEditor {
+
+ class LayerExtension {
+ public LayerExtension(IPortalPageLayer layer, String title, int order) {
+ this.layer = layer;
+ this.title = title;
+ this.order = order;
+ }
+ public IPortalPageLayer layer;
+ public String title;
+ public int order;
+ }
private static final String ID = "com.nokia.carbide.discovery.ui.portalEditor"; //$NON-NLS-1$
private static final String CONTEXT_ID = ID + ".context"; //$NON-NLS-1$
@@ -76,19 +88,20 @@
loadPortalPages();
}
- private Map<String, List<Pair<IPortalPageLayer, String>>> loadPortalLayers() {
- Map<String, List<Pair<IPortalPageLayer, String>>> pageIdToExtensionsMap =
- new HashMap<String, List<Pair<IPortalPageLayer, String>>>();
+ private Map<String, List<LayerExtension>> loadPortalLayers() {
+ Map<String, List<LayerExtension>> pageIdToExtensionsMap =
+ new HashMap<String, List<LayerExtension>>();
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$
+ int order = getOrderStringFromElement(element, title);
try {
IPortalPageLayer extension = (IPortalPageLayer) element.createExecutableExtension("class"); //$NON-NLS-1$
if (!pageIdToExtensionsMap.containsKey(pageId))
- pageIdToExtensionsMap.put(pageId, new ArrayList<Pair<IPortalPageLayer, String>>());
- pageIdToExtensionsMap.get(pageId).add(new Pair<IPortalPageLayer, String>(extension, title));
+ pageIdToExtensionsMap.put(pageId, new ArrayList<LayerExtension>());
+ pageIdToExtensionsMap.get(pageId).add(new LayerExtension(extension, title, order));
} catch (CoreException e) {
Activator.logError(MessageFormat.format(Messages.PortalEditor_PageLoadError, pageId), e);
}
@@ -97,31 +110,30 @@
}
private void loadPortalPages() {
- Map<String, List<Pair<IPortalPageLayer, String>>> portalLayersMap = loadPortalLayers();
+ Map<String, List<LayerExtension>> portalLayersMap = loadPortalLayers();
List<Pair<PortalPage, Integer>> pageList = new ArrayList<Pair<PortalPage, Integer>>();
IConfigurationElement[] elements =
Platform.getExtensionRegistry().getConfigurationElementsFor(Activator.PLUGIN_ID + ".portalPage"); //$NON-NLS-1$
for (IConfigurationElement element : elements) {
String id = element.getAttribute("id"); //$NON-NLS-1$
- int order = Integer.MAX_VALUE;
- String orderString = element.getAttribute("order"); //$NON-NLS-1$
- if (orderString != null) {
- try {
- order = Integer.parseInt(orderString);
- }
- catch (NumberFormatException e) {
- Activator.logError(MessageFormat.format(Messages.PortalEditor_PageRankError, id), e);
- }
- }
+ int order = getOrderStringFromElement(element, id);
String title = element.getAttribute("title"); //$NON-NLS-1$
String imageFilePath = element.getAttribute("image"); //$NON-NLS-1$
String pluginId = element.getContributor().getName();
ImageDescriptor imageDesc = AbstractUIPlugin.imageDescriptorFromPlugin(pluginId, imageFilePath);
- List<Pair<IPortalPageLayer, String>> portalLayers = portalLayersMap.get(id);
+ List<LayerExtension> portalLayers = portalLayersMap.get(id);
if (portalLayers == null || portalLayers.isEmpty()) {
Activator.logError(MessageFormat.format(Messages.PortalEditor_NoLayersError, id), null);
}
- PortalPage portalPage = new PortalPage(title, imageDesc, id, portalLayers);
+ ICommandBarFactory commandBarFactory = null;
+ if (element.getAttribute("class") != null) { //$NON-NLS-1$
+ try {
+ commandBarFactory = (ICommandBarFactory) element.createExecutableExtension("class"); //$NON-NLS-1$
+ } catch (CoreException e) {
+ Activator.logError(MessageFormat.format(Messages.PortalEditor_BadCommandBarFactoryError, id), e);
+ }
+ }
+ PortalPage portalPage = new PortalPage(title, imageDesc, id, portalLayers, commandBarFactory);
pageList.add(new Pair<PortalPage, Integer>(portalPage, order));
}
Collections.sort(pageList, new Comparator<Pair<PortalPage, Integer>>() {
@@ -136,6 +148,20 @@
}
}
+ private int getOrderStringFromElement(IConfigurationElement element, String id) {
+ int order = Integer.MAX_VALUE;
+ String orderString = element.getAttribute("order"); //$NON-NLS-1$
+ if (orderString != null) {
+ try {
+ order = Integer.parseInt(orderString);
+ }
+ catch (NumberFormatException e) {
+ Activator.logError(MessageFormat.format(Messages.PortalEditor_PageRankError, id), e);
+ }
+ }
+ return order;
+ }
+
@Override
public void doSave(IProgressMonitor monitor) {
}
--- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/PortalPage.java Mon Aug 02 16:50:54 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/PortalPage.java Mon Aug 02 17:22:42 2010 -0500
@@ -17,6 +17,8 @@
package com.nokia.carbide.internal.discovery.ui.editor;
import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
import java.util.List;
import org.eclipse.jface.action.Action;
@@ -29,9 +31,10 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
+import com.nokia.carbide.internal.discovery.ui.editor.PortalEditor.LayerExtension;
+import com.nokia.carbide.internal.discovery.ui.extension.IActionBar;
+import com.nokia.carbide.internal.discovery.ui.extension.ICommandBarFactory;
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 {
@@ -90,26 +93,34 @@
}
}
- private String id;
private String title;
private ImageDescriptor imageDescriptor;
+ private String id;
+ private final ICommandBarFactory commandBarFactory;
private StackComposite pageComposite;
private boolean initialized;
private List<Layer> layers;
private Layer currentLayer;
private IAction[] actions;
- private List<TaskBar> navigationTaskBars;
+ private List<TaskBar> pageTaskBars;
public PortalPage(String title, ImageDescriptor imageDescriptor, String id,
- List<Pair<IPortalPageLayer, String>> layerExtensionPairs) {
+ List<LayerExtension> layerExtensions, ICommandBarFactory commandBarFactory) {
this.title = title;
this.imageDescriptor = imageDescriptor;
this.id = id;
- layers = new ArrayList<Layer>(layerExtensionPairs.size());
- for (Pair<IPortalPageLayer, String> layerExtensionTitlePair : layerExtensionPairs) {
- layers.add(new Layer(layerExtensionTitlePair.first, layerExtensionTitlePair.second));
+ this.commandBarFactory = commandBarFactory;
+ layers = new ArrayList<Layer>(layerExtensions.size());
+ Collections.sort(layerExtensions, new Comparator<LayerExtension>() {
+ @Override
+ public int compare(LayerExtension o1, LayerExtension o2) {
+ return o1.order - o2.order;
+ }
+ });
+ for (LayerExtension layerExtension : layerExtensions) {
+ layers.add(new Layer(layerExtension.layer, layerExtension.title));
}
- navigationTaskBars = new ArrayList<TaskBar>(layerExtensionPairs.size());
+ pageTaskBars = new ArrayList<TaskBar>(layerExtensions.size());
}
public String getId() {
@@ -157,12 +168,22 @@
GridDataFactory.fillDefaults().grab(false, true).applyTo(taskComposite);
TaskBar taskBar = new TaskBar(taskComposite, backgroundParent, this);
GridDataFactory.fillDefaults().minSize(150, SWT.DEFAULT).grab(true, false).indent(0, 0).applyTo(taskBar);
- navigationTaskBars.add(taskBar);
+ pageTaskBars.add(taskBar);
ActionUIUpdater updater = new ActionUIUpdater();
- IActionBar[] commandBars = layerExtension.createCommandBars(portalEditor, updater);
+ createCommandBars(backgroundParent, taskComposite, updater,
+ layerExtension.createCommandBars(portalEditor, updater));
+ if (commandBarFactory != null) {
+ createCommandBars(backgroundParent, taskComposite, updater,
+ commandBarFactory.createCommandBars(portalEditor, updater));
+
+ }
+ }
+
+ private void createCommandBars(Composite backgroundParent, Composite taskComposite,
+ ActionUIUpdater updater, IActionBar[] commandBars) {
if (commandBars != null) {
for (IActionBar actionBar : commandBars) {
- taskBar = new TaskBar(taskComposite, backgroundParent, actionBar);
+ TaskBar taskBar = new TaskBar(taskComposite, backgroundParent, actionBar);
updater.addTaskBar(taskBar);
GridDataFactory.fillDefaults().minSize(150, SWT.DEFAULT).grab(true, false).indent(0, 0).applyTo(taskBar);
}
@@ -201,7 +222,7 @@
pageComposite.showControl(currentLayer.getControl());
if (!currentLayer.isInitialized())
currentLayer.initialize();
- for (TaskBar taskBar : navigationTaskBars) {
+ for (TaskBar taskBar : pageTaskBars) {
taskBar.updateAllActionsUI();
}
}
--- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/StackComposite.java Mon Aug 02 16:50:54 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/StackComposite.java Mon Aug 02 17:22:42 2010 -0500
@@ -1,3 +1,19 @@
+/*
+* 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 org.eclipse.swt.custom.StackLayout;
--- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/TaskBar.java Mon Aug 02 16:50:54 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/TaskBar.java Mon Aug 02 17:22:42 2010 -0500
@@ -31,7 +31,7 @@
import org.eclipse.ui.forms.events.IHyperlinkListener;
import org.eclipse.ui.forms.widgets.Hyperlink;
-import com.nokia.carbide.internal.discovery.ui.extension.IPortalPageLayer.IActionBar;
+import com.nokia.carbide.internal.discovery.ui.extension.IActionBar;
class TaskBar extends RoundedCornerComposite {
@@ -112,14 +112,18 @@
for (Entry<Hyperlink, IAction> entry : linkToActionMap.entrySet()) {
IAction action = entry.getValue();
if (actionId.equals(action.getId())) {
- entry.getKey().setEnabled(action.isEnabled());
+ Hyperlink link = entry.getKey();
+ if (link != null && !link.isDisposed())
+ link.setEnabled(entry.getValue().isEnabled());
}
}
}
public void updateAllActionsUI() {
for (Entry<Hyperlink, IAction> entry : linkToActionMap.entrySet()) {
- entry.getKey().setEnabled(entry.getValue().isEnabled());
+ Hyperlink link = entry.getKey();
+ if (link != null && !link.isDisposed())
+ link.setEnabled(entry.getValue().isEnabled());
}
}
--- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/extension/AbstractBrowserPortalPageLayer.java Mon Aug 02 16:50:54 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/extension/AbstractBrowserPortalPageLayer.java Mon Aug 02 17:22:42 2010 -0500
@@ -111,8 +111,8 @@
updater.updateAll();
}
- private void setLoading(boolean loading) {
- browser.setCursor(loading ? browser.getDisplay().getSystemCursor(SWT.CURSOR_WAIT) : null);
+ public void setLoading(boolean loading) {
+ Activator.setBusyCursor(browser, loading);
this.loading = loading;
}
@@ -156,13 +156,19 @@
@Override
public void init() {
if (browser != null) {
- URL url = getURL();
- if (url != null) {
- browser.setUrl(url.toString());
- }
- actionBar.hookBrowser();
+ Activator.runInUIThreadWhenProxyDataSet(browser, new Runnable() {
+ @Override
+ public void run() {
+ URL url = getURL();
+ if (url != null) {
+ browser.setUrl(url.toString());
+ actionBar.setLoading(true);
+ }
+ actionBar.hookBrowser();
+ actionBar.update();
+ }
+ });
}
- actionBar.update();
}
@Override
--- /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/AbstractDiscoveryPortalPageLayer.java Mon Aug 02 17:22:42 2010 -0500
@@ -0,0 +1,324 @@
+/*
+* 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.URI;
+import java.net.URISyntaxException;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.equinox.internal.p2.discovery.Catalog;
+import org.eclipse.equinox.internal.p2.discovery.DiscoveryCore;
+import org.eclipse.equinox.internal.p2.discovery.compatibility.BundleDiscoveryStrategy;
+import org.eclipse.equinox.internal.p2.discovery.compatibility.RemoteBundleDiscoveryStrategy;
+import org.eclipse.equinox.internal.p2.discovery.model.CatalogItem;
+import org.eclipse.equinox.internal.p2.ui.discovery.DiscoveryUi;
+import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogConfiguration;
+import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogViewer;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.operations.ProvisioningSession;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+import org.eclipse.equinox.p2.ui.ProvisioningUI;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.layout.GridLayoutFactory;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.actions.BaseSelectionListenerAction;
+
+import com.nokia.carbide.discovery.ui.Activator;
+import com.nokia.carbide.discovery.ui.Messages;
+import com.nokia.cpp.internal.api.utils.ui.WorkbenchUtils;
+
+@SuppressWarnings("restriction")
+public abstract class AbstractDiscoveryPortalPageLayer implements IPortalPageLayer {
+
+ private class RunnableContextDialog extends ProgressMonitorDialog {
+ private final String title;
+
+ private RunnableContextDialog(Shell parent, String title) {
+ super(parent);
+ this.title = title;
+ }
+
+ @Override
+ protected void configureShell(Shell shell) {
+ super.configureShell(shell);
+ shell.setText(title);
+ }
+
+ }
+
+ protected class ActionBar implements IActionBar {
+ private IAction[] actions;
+
+ public ActionBar(IEditorPart part) {
+ actions = makeActions(part);
+ }
+
+ @Override
+ public String getTitle() {
+ return Messages.AbstractDiscoveryPortalPageLayer_Title;
+ }
+
+ @Override
+ public IAction[] getActions() {
+ return actions;
+ }
+
+ @Override
+ public String[] getHighlightedActionIds() {
+ return new String[] {INSTALL_ACTION_ID};
+ }
+ }
+
+ protected static final String INSTALL_ACTION_ID =
+ AbstractDiscoveryPortalPageLayer.class.getName() + ".install"; //$NON-NLS-1$
+ protected static final String UNCHECK_ALL_ACTION_ID =
+ AbstractDiscoveryPortalPageLayer.class.getName() + ".uncheckAll"; //$NON-NLS-1$
+ protected static final String CHECK_ALL_ACTION_ID =
+ AbstractDiscoveryPortalPageLayer.class.getName() + ".checkAll"; //$NON-NLS-1$
+ protected static final String ADV_INSTALL_ACTION_ID =
+ AbstractDiscoveryPortalPageLayer.class.getName() + ".advancedInstall"; //$NON-NLS-1$
+ protected static final String REFRESH_ACTION_ID =
+ AbstractDiscoveryPortalPageLayer.class.getName() + ".refresh"; //$NON-NLS-1$
+
+ private CatalogViewer viewer;
+ private List<ISelectionChangedListener> selectionListeners;
+ private IActionUIUpdater updater;
+
+ @Override
+ public Control createControl(Composite parent, IEditorPart part) {
+ Composite c = new Composite(parent, SWT.NONE);
+ GridLayoutFactory.swtDefaults().applyTo(c);
+ viewer = new CatalogViewer(getCatalog(), part.getEditorSite(),
+ new RunnableContextDialog(part.getEditorSite().getShell(),
+ Messages.AbstractDiscoveryPortalPageLayer_GatheringExtensionsDesc),
+ getConfiguration());
+ viewer.createControl(c);
+ GridDataFactory.fillDefaults().grab(true, true).applyTo(viewer.getControl());
+
+ return c;
+ }
+
+ @Override
+ public void init() {
+ if (!WorkbenchUtils.isJUnitRunning()) { // do not initialize the catalog if JUnit is running
+ Display.getDefault().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ for (ISelectionChangedListener listener : selectionListeners) {
+ viewer.addSelectionChangedListener(listener);
+ }
+ viewer.updateCatalog();
+ }
+ });
+ }
+ }
+
+ @Override
+ public IActionBar[] createCommandBars(IEditorPart part, IActionUIUpdater updater) {
+ this.updater = updater;
+ return new IActionBar[] { new ActionBar(part) };
+ }
+
+ protected CatalogConfiguration getConfiguration() {
+ CatalogConfiguration configuration = new CatalogConfiguration();
+ configuration.setShowTagFilter(false);
+ return configuration;
+ }
+
+ protected Catalog getCatalog() {
+ Catalog catalog = new Catalog();
+ catalog.setEnvironment(DiscoveryCore.createEnvironment());
+ catalog.setVerifyUpdateSiteAvailability(false);
+
+ // look for remote descriptor
+ RemoteBundleDiscoveryStrategy remoteDiscoveryStrategy = new RemoteBundleDiscoveryStrategy();
+ String url = getDirectoryURL();
+ if (url != null) {
+ remoteDiscoveryStrategy.setDirectoryUrl(url);
+ catalog.getDiscoveryStrategies().add(remoteDiscoveryStrategy);
+ }
+ else // look for descriptors from installed bundles
+ catalog.getDiscoveryStrategies().add(new BundleDiscoveryStrategy());
+
+ return catalog;
+ }
+
+ protected String getDirectoryURL() {
+ return Activator.getFromServerProperties(getClass().getName());
+ }
+
+ protected IAction[] makeActions(final IEditorPart part) {
+ selectionListeners = new ArrayList<ISelectionChangedListener>();
+ List<IAction> actions = new ArrayList<IAction>();
+ IAction action;
+
+ // install
+ action = new BaseSelectionListenerAction(Messages.AbstractDiscoveryPortalPageLayer_InstallActionLabel) {
+ public void run() {
+ DiscoveryUi.install(viewer.getCheckedItems(),
+ new RunnableContextDialog(part.getEditorSite().getShell(),
+ Messages.AbstractDiscoveryPortalPageLayer_GatheringInstallInfoDesc));
+ };
+
+ protected boolean updateSelection(IStructuredSelection selection) {
+ scheduleUpdateAllActionUIs();
+ return !selection.isEmpty();
+ };
+ };
+ action.setToolTipText(Messages.AbstractDiscoveryPortalPageLayer_InstallActionTooltip);
+ action.setId(INSTALL_ACTION_ID);
+ selectionListeners.add((ISelectionChangedListener) action);
+ actions.add(action);
+
+ // refresh
+ action = new Action(Messages.AbstractDiscoveryPortalPageLayer_RefreshActionLabel) {
+ public void run() {
+ viewer.setSelection(StructuredSelection.EMPTY);
+ viewer.updateCatalog();
+ viewer.refresh();
+ }
+ };
+ action.setId(REFRESH_ACTION_ID);
+ actions.add(action);
+
+ // check all
+ action = new BaseSelectionListenerAction(Messages.AbstractDiscoveryPortalPageLayer_CheckAllActionLabel) {
+ public void run() {
+ viewer.setSelection(StructuredSelection.EMPTY);
+ viewer.setSelection(getAllItemsSelection());
+ viewer.refresh();
+ }
+
+ private IStructuredSelection getAllItemsSelection() {
+ List<CatalogItem> catalogItems = new ArrayList<CatalogItem>();
+ for (CatalogItem catalogItem : viewer.getCatalog().getItems()) {
+ if (!catalogItem.isInstalled())
+ catalogItems.add(catalogItem);
+ }
+ return new StructuredSelection(catalogItems);
+ }
+
+ protected boolean updateSelection(IStructuredSelection selection) {
+ scheduleUpdateAllActionUIs();
+ return !getAllItemsSelection().equals(selection);
+ }
+ };
+ action.setId(CHECK_ALL_ACTION_ID);
+ selectionListeners.add((ISelectionChangedListener) action);
+ actions.add(action);
+
+ // uncheck all
+ action = new BaseSelectionListenerAction(Messages.AbstractDiscoveryPortalPageLayer_UncheckAllActionLabel) {
+ public void run() {
+ viewer.setSelection(StructuredSelection.EMPTY);
+ viewer.refresh();
+ };
+
+ protected boolean updateSelection(IStructuredSelection selection) {
+ scheduleUpdateAllActionUIs();
+ return !selection.isEmpty();
+ };
+ };
+ action.setId(UNCHECK_ALL_ACTION_ID);
+ selectionListeners.add((ISelectionChangedListener) action);
+ actions.add(action);
+
+ // advanced install
+ action = new Action(Messages.AbstractDiscoveryPortalPageLayer_AdvancedInstallActionLabel) {
+ public void run() {
+ showInstallWizard();
+ }
+ };
+ action.setId(ADV_INSTALL_ACTION_ID);
+ actions.add(action);
+
+ ISelectionChangedListener selectionListener = new ISelectionChangedListener() {
+ @Override
+ public void selectionChanged(SelectionChangedEvent event) {
+ IStructuredSelection selection = (IStructuredSelection) event.getSelection();
+ IActionBars bars = part.getEditorSite().getActionBars();
+ bars.getStatusLineManager().setMessage(
+ selection.isEmpty() ? null : MessageFormat.format(
+ Messages.AbstractDiscoveryPortalPageLayer_CheckedItemsStatusMessage, selection.size()));
+ }
+ };
+ selectionListeners.add(selectionListener);
+
+ return (IAction[]) actions.toArray(new IAction[actions.size()]);
+ }
+
+ @Override
+ public void dispose() {
+ for (ISelectionChangedListener listener : selectionListeners) {
+ viewer.removeSelectionChangedListener(listener);
+ }
+ }
+
+ protected void showInstallWizard() {
+ ProvisioningUI defaultUI = ProvisioningUI.getDefaultUI();
+ ProvisioningSession session = defaultUI.getSession();
+ IProvisioningAgent agent = session.getProvisioningAgent();
+ IMetadataRepositoryManager metadataManager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
+ IArtifactRepositoryManager artifactManager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
+ for (URI uri : getCatalogURIs()) {
+ metadataManager.addRepository(uri);
+ artifactManager.addRepository(uri);
+ }
+ defaultUI.openInstallWizard(null, null, null);
+ }
+
+ protected Collection<URI> getCatalogURIs() {
+ Set<URI> uris = new HashSet<URI>();
+ for (CatalogItem catalogItem : viewer.getCatalog().getItems()) {
+ try {
+ uris.add(new URI(catalogItem.getSiteUrl()));
+ } catch (URISyntaxException e) {
+ // ignore bad URIs
+ }
+ }
+ return uris;
+ }
+
+ protected void scheduleUpdateAllActionUIs() {
+ Display.getDefault().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ updater.updateAll();
+ }
+ });
+ }
+
+}
\ No newline at end of file
--- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/extension/AbstractRSSPortalPageLayer.java Mon Aug 02 16:50:54 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/extension/AbstractRSSPortalPageLayer.java Mon Aug 02 17:22:42 2010 -0500
@@ -1,3 +1,19 @@
+/*
+* 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.URL;
@@ -60,17 +76,22 @@
@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);
+ Activator.runInUIThreadWhenProxyDataSet(browser, new Runnable() {
+ @Override
+ public void run() {
+ 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();
+ }
}
- actionBar.update();
- }
+ });
}
private void displayRSS() {
@@ -85,16 +106,18 @@
buf.append("<div class=\"channelBody\">"); //$NON-NLS-1$
buf.append(clean(channel.getDescription()));
buf.append("</div><br>"); //$NON-NLS-1$
+ buf.append("<ul>"); //$NON-NLS-1$
for (Item item : channel.getItems()) {
- buf.append("<div class=\"item\"><a class=\"itemTitle\" href=\""); //$NON-NLS-1$
+ buf.append("<li><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("</div></li>"); //$NON-NLS-1$
}
+ buf.append("</ul>"); //$NON-NLS-1$
}
buf.append(HTML_BODY_FOOTER);
System.out.println(buf.toString());
--- /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/IActionBar.java Mon Aug 02 17:22:42 2010 -0500
@@ -0,0 +1,47 @@
+/*
+* 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 org.eclipse.jface.action.IAction;
+
+/**
+ * Interface to an action/navigation bar for the portal portal page layer
+ */
+public interface IActionBar {
+
+ /**
+ * Required title for the action bar
+ * @return String
+ */
+ String getTitle();
+
+ /**
+ * Actions shown in the action bar:
+ * Required: text and run() methods
+ * Optional: tool tip text
+ * Unused: image/check
+ * @return IAction
+ */
+ IAction[] getActions();
+
+ /**
+ * Action ids for actions that should be emphasized in the action bar (e.g., bold font)
+ * @return String[] or null
+ */
+ String[] getHighlightedActionIds();
+
+}
\ No newline at end of file
--- /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/IActionUIUpdater.java Mon Aug 02 17:22:42 2010 -0500
@@ -0,0 +1,35 @@
+/*
+* 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;
+
+/**
+ * Interface allowing the UI for provided actions of an IActionBar to be updated (e.g., enabled state)
+ */
+public interface IActionUIUpdater {
+
+ /**
+ * Update the UI for a specific action by id
+ * @param actionId
+ */
+ void update(String actionId);
+
+ /**
+ * Update the UI for all actions in the IActionBar
+ */
+ void updateAll();
+
+}
\ No newline at end of file
--- /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/ICommandBarFactory.java Mon Aug 02 17:22:42 2010 -0500
@@ -0,0 +1,34 @@
+/*
+* 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 org.eclipse.ui.IEditorPart;
+
+/**
+ * Interface to a factory for command bars for a portal page/layer
+ */
+public interface ICommandBarFactory {
+
+ /**
+ * Return action bars for the portal page layer
+ * @param part IEditorPart
+ * @param updater IActionUIUpdater
+ * @return IActionBar[]
+ */
+ IActionBar[] createCommandBars(IEditorPart part, IActionUIUpdater updater);
+
+}
--- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/extension/IPortalPageLayer.java Mon Aug 02 16:50:54 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/extension/IPortalPageLayer.java Mon Aug 02 17:22:42 2010 -0500
@@ -16,7 +16,6 @@
*/
package com.nokia.carbide.internal.discovery.ui.extension;
-import org.eclipse.jface.action.IAction;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.ui.IEditorPart;
@@ -24,53 +23,7 @@
/**
* Interface to a portal page layer extension
*/
-public interface IPortalPageLayer {
-
- /**
- * Interface to an action/navigation bar for the portal portal page layer
- */
- public interface IActionBar {
-
- /**
- * Required title for the action bar
- * @return String
- */
- String getTitle();
-
- /**
- * Actions shown in the action bar:
- * Required: text and run() methods
- * Optional: tool tip text
- * Unused: image/check
- * @return IAction
- */
- IAction[] getActions();
-
- /**
- * Action ids for actions that should be emphasized in the action bar (e.g., bold font)
- * @return String[] or null
- */
- String[] getHighlightedActionIds();
-
- }
-
- /**
- * Interface allowing the UI for provided actions of an IActionBar to be updated (e.g., enabled state)
- */
- public interface IActionUIUpdater {
-
- /**
- * Update the UI for a specific action by id
- * @param actionId
- */
- void update(String actionId);
-
- /**
- * Update the UI for all actions in the IActionBar
- */
- void updateAll();
-
- }
+public interface IPortalPageLayer extends ICommandBarFactory {
/**
* Called to create the control for the portal page layer
@@ -86,14 +39,6 @@
void init();
/**
- * Return action bars for the portal page layer
- * @param part IEditorPart
- * @param updater IActionUIUpdater
- * @return IActionBar[]
- */
- IActionBar[] createCommandBars(IEditorPart part, IActionUIUpdater updater);
-
- /**
* Called to dispose internal resources of the portal page layer
*/
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/OpenPreferencePageAction.java Mon Aug 02 17:22:42 2010 -0500
@@ -0,0 +1,47 @@
+/*
+* 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 org.eclipse.jface.action.Action;
+import org.eclipse.jface.preference.PreferenceDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.dialogs.PreferencesUtil;
+
+import com.nokia.cpp.internal.api.utils.ui.WorkbenchUtils;
+
+/**
+ * An action to show a preference page
+ */
+public class OpenPreferencePageAction extends Action {
+
+ private String preferencePageId;
+
+ public OpenPreferencePageAction(String text, String preferencePageId) {
+ super(text);
+ this.preferencePageId = preferencePageId;
+ }
+
+ @Override
+ public void run() {
+ Shell shell = WorkbenchUtils.getSafeShell();
+
+ PreferenceDialog dialog =
+ PreferencesUtil.createPreferenceDialogOn(shell, preferencePageId, null, null);
+
+ dialog.open();
+ }
+}
--- /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/BugzillaPage.java Mon Aug 02 17:22:42 2010 -0500
@@ -0,0 +1,22 @@
+/*
+* 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.view;
+
+import com.nokia.carbide.internal.discovery.ui.extension.AbstractBrowserPortalPageLayer;
+
+public class BugzillaPage extends AbstractBrowserPortalPageLayer {
+}
--- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/view/CreatingCarbidePage.java Mon Aug 02 16:50:54 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/view/CreatingCarbidePage.java Mon Aug 02 17:22:42 2010 -0500
@@ -1,3 +1,19 @@
+/*
+* 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.view;
import com.nokia.carbide.internal.discovery.ui.extension.AbstractRSSPortalPageLayer;
--- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/view/HomePage.java Mon Aug 02 16:50:54 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/view/HomePage.java Mon Aug 02 17:22:42 2010 -0500
@@ -1,3 +1,19 @@
+/*
+* 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.view;
import com.nokia.carbide.internal.discovery.ui.extension.AbstractBrowserPortalPageLayer;
--- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/view/InstallExtensionsPortalExtension.java Mon Aug 02 16:50:54 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/view/InstallExtensionsPortalExtension.java Mon Aug 02 17:22:42 2010 -0500
@@ -1,335 +1,39 @@
+/*
+* 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.view;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import org.eclipse.equinox.internal.p2.discovery.Catalog;
-import org.eclipse.equinox.internal.p2.discovery.DiscoveryCore;
-import org.eclipse.equinox.internal.p2.discovery.compatibility.BundleDiscoveryStrategy;
-import org.eclipse.equinox.internal.p2.discovery.compatibility.RemoteBundleDiscoveryStrategy;
-import org.eclipse.equinox.internal.p2.discovery.model.CatalogItem;
-import org.eclipse.equinox.internal.p2.ui.discovery.DiscoveryUi;
-import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogConfiguration;
-import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogViewer;
-import org.eclipse.equinox.p2.core.IProvisioningAgent;
-import org.eclipse.equinox.p2.operations.ProvisioningSession;
-import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
-import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
-import org.eclipse.equinox.p2.ui.ProvisioningUI;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.layout.GridLayoutFactory;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.BaseSelectionListenerAction;
-import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
-
-import com.nokia.carbide.discovery.ui.Activator;
-import com.nokia.carbide.discovery.ui.Messages;
-import com.nokia.carbide.internal.discovery.ui.extension.IPortalPageLayer;
-import com.nokia.cpp.internal.api.utils.ui.WorkbenchUtils;
-
-@SuppressWarnings("restriction")
-public class InstallExtensionsPortalExtension implements IPortalPageLayer {
-
- private static final String INSTALL_ACTION_ID = InstallExtensionsPortalExtension.class.getName() + ".install"; //$NON-NLS-1$
-
- private final class RunnableContextDialog extends ProgressMonitorDialog {
- private final String title;
-
- private RunnableContextDialog(Shell parent, String title) {
- super(parent);
- this.title = title;
- }
-
- @Override
- protected void configureShell(Shell shell) {
- super.configureShell(shell);
- shell.setText(title);
- }
-
- }
-
- private final class ActionBar implements IActionBar {
- private IAction[] actions;
-
- public ActionBar(IEditorPart part) {
- actions = makeActions(part);
- }
-
- @Override
- public String getTitle() {
- return Messages.InstallExtensionsPortalExtension_InstallExtensionsTitle;
- }
- @Override
- public IAction[] getActions() {
- return actions;
- }
-
- @Override
- public String[] getHighlightedActionIds() {
- return new String[] {INSTALL_ACTION_ID};
- }
- }
-
- private final class LinkBar implements IActionBar {
- @Override
- public String getTitle() {
- return Messages.InstallExtensionsPage_LinkBarTitle;
- }
+import com.nokia.carbide.internal.discovery.ui.extension.AbstractDiscoveryPortalPageLayer;
- @Override
- public IAction[] getActions() {
- IAction action = new Action(Messages.InstallExtensionsPage_BuzillaActionName) {
- @Override
- public void run() {
- try {
- URL url = new URL("https://xdabug001.ext.nokia.com/bugzilla"); //$NON-NLS-1$
- IWorkbenchBrowserSupport browserSupport = PlatformUI.getWorkbench().getBrowserSupport();
- browserSupport.createBrowser(null).openURL(url);
- } catch (MalformedURLException e) {
- } catch (PartInitException e) {
- }
- }
- };
- return new IAction[] { action };
- }
-
- @Override
- public String[] getHighlightedActionIds() {
- return null;
- }
- }
-
- private static final String DIRECTORY_KEY = "com.nokia.carbide.discovery.directory"; //$NON-NLS-1$
-
- private CatalogViewer viewer;
- private List<ISelectionChangedListener> selectionListeners;
- private IActionUIUpdater updater;
-
- public InstallExtensionsPortalExtension() {
- }
+public class InstallExtensionsPortalExtension extends AbstractDiscoveryPortalPageLayer {
@Override
public Control createControl(Composite parent, IEditorPart part) {
- Composite c = new Composite(parent, SWT.NONE);
- GridLayoutFactory.swtDefaults().applyTo(c);
- viewer = new CatalogViewer(getCatalog(), part.getEditorSite(),
- new RunnableContextDialog(part.getEditorSite().getShell(),
- Messages.InstallExtensionsPage_GatherExtensionsTitle),
- getConfiguration());
- viewer.createControl(c);
- GridDataFactory.fillDefaults().grab(true, true).applyTo(viewer.getControl());
-
- // Create the help context id for the viewer's control
- PlatformUI.getWorkbench().getHelpSystem().setHelp(viewer.getControl(),
- "com.nokia.carbide.discovery.ui.view.DiscoveryView.catalogviewer"); //$NON-NLS-1$
- return c;
- }
-
- @Override
- public void init() {
- if (!WorkbenchUtils.isJUnitRunning()) { // do not initialize the catalog if JUnit is running
- Display.getDefault().asyncExec(new Runnable() {
- @Override
- public void run() {
- for (ISelectionChangedListener listener : selectionListeners) {
- viewer.addSelectionChangedListener(listener);
- }
- viewer.updateCatalog();
- }
- });
- }
- }
-
- @Override
- public IActionBar[] createCommandBars(IEditorPart part, IActionUIUpdater updater) {
- this.updater = updater;
- return new IActionBar[] { new ActionBar(part), new LinkBar() };
- }
-
- private CatalogConfiguration getConfiguration() {
- CatalogConfiguration configuration = new CatalogConfiguration();
- configuration.setShowTagFilter(false);
- return configuration;
- }
-
- private Catalog getCatalog() {
- Catalog catalog = new Catalog();
- catalog.setEnvironment(DiscoveryCore.createEnvironment());
- catalog.setVerifyUpdateSiteAvailability(false);
-
- // look for remote descriptor
- RemoteBundleDiscoveryStrategy remoteDiscoveryStrategy = new RemoteBundleDiscoveryStrategy();
- String url = Activator.getFromServerProperties(DIRECTORY_KEY);
- if (url != null) {
- remoteDiscoveryStrategy.setDirectoryUrl(url);
- catalog.getDiscoveryStrategies().add(remoteDiscoveryStrategy);
- }
- else // look for descriptors from installed bundles
- catalog.getDiscoveryStrategies().add(new BundleDiscoveryStrategy());
-
- return catalog;
- }
+ Control control = super.createControl(parent, part);
- private IAction[] makeActions(final IEditorPart part) {
- selectionListeners = new ArrayList<ISelectionChangedListener>();
- List<IAction> actions = new ArrayList<IAction>();
- IAction action;
-
- // install
- action = new BaseSelectionListenerAction(Messages.InstallExtensionsPage_InstallLabel) {
- public void run() {
- DiscoveryUi.install(viewer.getCheckedItems(),
- new RunnableContextDialog(part.getEditorSite().getShell(),
- Messages.InstallExtensionsPage_GatheringInstallInfoTitle));
- };
-
- protected boolean updateSelection(IStructuredSelection selection) {
- scheduleUpdateAllActionUIs();
- return !selection.isEmpty();
- };
- };
- action.setToolTipText(Messages.InstallExtensionsPage_InstallTip);
- action.setId(INSTALL_ACTION_ID);
- selectionListeners.add((ISelectionChangedListener) action);
- actions.add(action);
-
- // refresh
- action = new Action(Messages.InstallExtensionsPage_RefreshLabel) {
- public void run() {
- viewer.setSelection(StructuredSelection.EMPTY);
- viewer.updateCatalog();
- viewer.refresh();
- }
- };
- actions.add(action);
-
- // check all
- action = new BaseSelectionListenerAction(Messages.InstallExtensionsPage_CheckAllLabel) {
- public void run() {
- viewer.setSelection(StructuredSelection.EMPTY);
- viewer.setSelection(getAllItemsSelection());
- viewer.refresh();
- }
-
- private IStructuredSelection getAllItemsSelection() {
- List<CatalogItem> catalogItems = new ArrayList<CatalogItem>();
- for (CatalogItem catalogItem : viewer.getCatalog().getItems()) {
- if (!catalogItem.isInstalled())
- catalogItems.add(catalogItem);
- }
- return new StructuredSelection(catalogItems);
- }
+ // Create the help context id for the viewer's control
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(control,
+ "com.nokia.carbide.discovery.ui.view.DiscoveryView.catalogviewer"); //$NON-NLS-1$
- protected boolean updateSelection(IStructuredSelection selection) {
- scheduleUpdateAllActionUIs();
- return !getAllItemsSelection().equals(selection);
- }
- };
- action.setId(InstallExtensionsPortalExtension.class.getName() + ".checkAll"); //$NON-NLS-1$
- selectionListeners.add((ISelectionChangedListener) action);
- actions.add(action);
-
- // uncheck all
- action = new BaseSelectionListenerAction(Messages.InstallExtensionsPage_UncheckAllLabel) {
- public void run() {
- viewer.setSelection(StructuredSelection.EMPTY);
- viewer.refresh();
- };
-
- protected boolean updateSelection(IStructuredSelection selection) {
- scheduleUpdateAllActionUIs();
- return !selection.isEmpty();
- };
- };
- action.setId(InstallExtensionsPortalExtension.class.getName() + ".uncheckAll"); //$NON-NLS-1$
- selectionListeners.add((ISelectionChangedListener) action);
- actions.add(action);
-
- // advanced install
- action = new Action(Messages.InstallExtensionsPage_AdvancedInstallLabel) {
- public void run() {
- showInstallWizard();
- }
- };
- actions.add(action);
-
- ISelectionChangedListener selectionListener = new ISelectionChangedListener() {
- @Override
- public void selectionChanged(SelectionChangedEvent event) {
- IStructuredSelection selection = (IStructuredSelection) event.getSelection();
- IActionBars bars = part.getEditorSite().getActionBars();
- bars.getStatusLineManager().setMessage(
- selection.isEmpty() ? null : MessageFormat.format(
- Messages.InstallExtensionsPage_StatusLineFmt, selection.size()));
- }
- };
- selectionListeners.add(selectionListener);
-
- return (IAction[]) actions.toArray(new IAction[actions.size()]);
+ return control;
}
-
- @Override
- public void dispose() {
- for (ISelectionChangedListener listener : selectionListeners) {
- viewer.removeSelectionChangedListener(listener);
- }
- }
-
- private void showInstallWizard() {
- ProvisioningUI defaultUI = ProvisioningUI.getDefaultUI();
- ProvisioningSession session = defaultUI.getSession();
- IProvisioningAgent agent = session.getProvisioningAgent();
- IMetadataRepositoryManager metadataManager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
- IArtifactRepositoryManager artifactManager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME);
- for (URI uri : getCatalogURIs()) {
- metadataManager.addRepository(uri);
- artifactManager.addRepository(uri);
- }
- defaultUI.openInstallWizard(null, null, null);
- }
-
- private Collection<URI> getCatalogURIs() {
- Set<URI> uris = new HashSet<URI>();
- for (CatalogItem catalogItem : viewer.getCatalog().getItems()) {
- try {
- uris.add(new URI(catalogItem.getSiteUrl()));
- } catch (URISyntaxException e) {
- // ignore bad URIs
- }
- }
- return uris;
- };
-
- private void scheduleUpdateAllActionUIs() {
- Display.getDefault().asyncExec(new Runnable() {
- @Override
- public void run() {
- updater.updateAll();
- }
- });
- };
}
--- /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/PulsarPageLayer.java Mon Aug 02 17:22:42 2010 -0500
@@ -0,0 +1,29 @@
+/*
+* 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.view;
+
+import com.nokia.carbide.internal.discovery.ui.extension.AbstractDiscoveryPortalPageLayer;
+
+
+public class PulsarPageLayer extends AbstractDiscoveryPortalPageLayer {
+
+ @Override
+ protected String getDirectoryURL() {
+ return "http://tools.ext.nokia.com/pulsar/directory.xml"; //$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/view/SettingsBarCreator.java Mon Aug 02 17:22:42 2010 -0500
@@ -0,0 +1,68 @@
+/*
+* 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.view;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.ui.IEditorPart;
+
+import com.nokia.carbide.discovery.ui.Messages;
+import com.nokia.carbide.internal.discovery.ui.extension.IActionBar;
+import com.nokia.carbide.internal.discovery.ui.extension.IActionUIUpdater;
+import com.nokia.carbide.internal.discovery.ui.extension.ICommandBarFactory;
+import com.nokia.carbide.internal.discovery.ui.extension.OpenPreferencePageAction;
+
+public class SettingsBarCreator implements ICommandBarFactory {
+
+ private class SettingsBar implements IActionBar {
+ @Override
+ public String getTitle() {
+ return Messages.SettingsBarCreator_Title;
+ }
+
+ @Override
+ public IAction[] getActions() {
+ List<IAction> actions = new ArrayList<IAction>();
+ actions.add(new OpenPreferencePageAction(
+ Messages.SettingsBarCreator_CapabilitiesActionLabel,
+ "org.eclipse.sdk.capabilities")); //$NON-NLS-1$
+ actions.add(new OpenPreferencePageAction(
+ Messages.SettingsBarCreator_CodeStyleActionLabel,
+ "org.eclipse.cdt.ui.preferences.CodeFormatterPreferencePage")); //$NON-NLS-1$
+ actions.add(new OpenPreferencePageAction(
+ Messages.SettingsBarCreator_KeyBindingsActionLabel,
+ "org.eclipse.ui.preferencePages.Keys")); //$NON-NLS-1$
+ actions.add(new OpenPreferencePageAction(
+ Messages.SettingsBarCreator_ProxiesActionLabel,
+ "org.eclipse.ui.net.NetPreferences")); //$NON-NLS-1$
+ return (IAction[]) actions.toArray(new IAction[actions.size()]);
+ }
+
+ @Override
+ public String[] getHighlightedActionIds() {
+ return null;
+ }
+ }
+
+ @Override
+ public IActionBar[] createCommandBars(IEditorPart part, IActionUIUpdater updater) {
+ return new IActionBar[] { new SettingsBar() };
+ }
+
+}
\ No newline at end of file
--- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/view/SupportPage.java Mon Aug 02 16:50:54 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/view/SupportPage.java Mon Aug 02 17:22:42 2010 -0500
@@ -1,6 +1,52 @@
+/*
+* 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.view;
-import com.nokia.carbide.internal.discovery.ui.extension.AbstractBrowserPortalPageLayer;
+import org.eclipse.swt.SWT;
+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.IActionBar;
+import com.nokia.carbide.internal.discovery.ui.extension.IActionUIUpdater;
+import com.nokia.carbide.internal.discovery.ui.extension.IPortalPageLayer;
+
+public class SupportPage implements IPortalPageLayer {
-public class SupportPage extends AbstractBrowserPortalPageLayer {
+ @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());
+
+ return composite;
+ }
+
+ @Override
+ public void init() {
+ }
+
+ @Override
+ public IActionBar[] createCommandBars(IEditorPart part, IActionUIUpdater updater) {
+ return null;
+ }
+
+ @Override
+ public void dispose() {
+ }
}
--- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/view/WrenchSciencePage.java Mon Aug 02 16:50:54 2010 -0500
+++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/view/WrenchSciencePage.java Mon Aug 02 17:22:42 2010 -0500
@@ -1,3 +1,19 @@
+/*
+* 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.view;
import com.nokia.carbide.internal.discovery.ui.extension.AbstractRSSPortalPageLayer;