Use the
-Leavescan Preferences page in the Preferences window to define the location where the leavescan.exe program exists on the file system. Symbian OS has a standard convention for functions that may Leave. Therefore, any function that Leaves, or calls a function that Leaves (other than in a TRAP harness), must have a name ending in "L". Leavescan verifies that your code satisfies this convention.
-
-
Figure 1. Leavescan preference page
-
Table 1. Leavescan Preferences —items
-
-
-
Name
Function
-
-
Leavescan Directory
-
Enter or Browse to the directory where leavescan.exe resides. Leavescan.exe is normally found in the ${EPOCROOT}\epoc32\tools directory.
-
NOTE The path to the Leavescan directory should not contain space characters.
-
-
-
Very noisy output
-
If enabled, the -N option is passed to leavescan.exe and produces verbose output. If unchecked, minimal output is produced.
diff -r d666d0a984db -r e848131666c1 core/com.nokia.carbide.cpp.doc.user/html/reference/menus/on_device_setup.htm
--- a/core/com.nokia.carbide.cpp.doc.user/html/reference/menus/on_device_setup.htm Mon Jun 28 08:58:35 2010 -0500
+++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/menus/on_device_setup.htm Mon Jun 28 08:59:09 2010 -0500
@@ -5,15 +5,17 @@
-On-Device Setup menu
+On-Device Connection menu
-
On-Device Setup
-
Use the On-Device Setup menu option to open the On-Device Setup dialog for the downloading and installation of Carbide software to a device.
+
On-Device Connections
+
Use the On-Device Connections menu option to open the On-Device Connections dialog for the downloading and installation of Carbide software to a device.
Symbian OS has a standard convention for functions that may Leave. Therefore, any function that Leaves, or calls a function that Leaves (other than in a TRAP harness), must have a name ending in L. Leavescan verifies that your code satisfies this convention. LeaveScan ignores calls in trapped functions, commented out code, ( // and /* and */). It also checks for calls to LD, LC and LX functions as well as normal L functions. It also checks for User::Leave(), ELeave, and User::LeaveIfError().
on a source file — right-click a .cpp source file in the C/C++ Projects or Symbian Project Navigator view and select Run Leavescan
-
on all source files in the Active Build Configuration — right-click a .mmp file and select Run Leavescan on Project MMP. The source statements in the .mmp file are scanned to obtain a list of source files to be processed by leavescan.
-
from the command line — scan whole directories and output to a file. For example,
-
-
-
for /R %i in (*.cpp) do leavescan %i >> leavescan.out
-
This will scan all cpp files in or below the current directory, placing the result in leavescan.out.
-
-
-
Figure 1. Invoking Run Leavescan on a single source file
The Carbide.c++ is a comprehensive development tool suite for Symbian OS that is based on the Eclipse framework. The C++ Development Toolkit (CDT), provides the foundation for project and build tools management, as well as the primary interface for the debugger to communicate with the IDE.
This is a collection of important information concerning last-minute
changes and other topics that deserve special attention. Please
@@ -35,9 +36,13 @@
Updating the CDT feature in Carbide.c++/Eclipse will wipe out our
changes making the tools unusable!
See the Tips & tricks page for more helpful information.
-
What's New in 2.6.0
+
What's New in 2.7.0
The following features for Symbian development are provided within Carbide.c++:
+
Nada added
+
+
2.6.0
+
GCCE 4.0 supported — required for future SBSv2 releases.
Symbian^3 supported — new templates and improvements required for the public Symbian^3 SDK.
Known Issues in v2.6.0:
diff -r d666d0a984db -r e848131666c1 core/com.nokia.carbide.cpp.doc.user/tocCarbide.xml
--- a/core/com.nokia.carbide.cpp.doc.user/tocCarbide.xml Mon Jun 28 08:58:35 2010 -0500
+++ b/core/com.nokia.carbide.cpp.doc.user/tocCarbide.xml Mon Jun 28 08:59:09 2010 -0500
@@ -39,8 +39,6 @@
-
-
diff -r d666d0a984db -r e848131666c1 core/com.nokia.carbide.cpp.leavescan/.classpath
--- a/core/com.nokia.carbide.cpp.leavescan/.classpath Mon Jun 28 08:58:35 2010 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff -r d666d0a984db -r e848131666c1 core/com.nokia.carbide.cpp.leavescan/.project
--- a/core/com.nokia.carbide.cpp.leavescan/.project Mon Jun 28 08:58:35 2010 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-
-
- com.nokia.carbide.cpp.internal.leavescan
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- org.eclipse.pde.ManifestBuilder
-
-
-
-
- org.eclipse.pde.SchemaBuilder
-
-
-
-
-
- org.eclipse.pde.PluginNature
- org.eclipse.jdt.core.javanature
-
-
diff -r d666d0a984db -r e848131666c1 core/com.nokia.carbide.cpp.leavescan/META-INF/MANIFEST.MF
--- a/core/com.nokia.carbide.cpp.leavescan/META-INF/MANIFEST.MF Mon Jun 28 08:58:35 2010 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Leavescan Plug-in
-Bundle-SymbolicName: com.nokia.carbide.cpp.leavescan; singleton:=true
-Bundle-Version: 1.4.0.qualifier
-Bundle-Activator: com.nokia.carbide.cpp.internal.leavescan.LeavescanPlugin
-Bundle-Vendor: Nokia
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.cdt.core,
- com.nokia.carbide.cdt.builder,
- com.nokia.carbide.cpp.sdk.core
-Bundle-ActivationPolicy: lazy
diff -r d666d0a984db -r e848131666c1 core/com.nokia.carbide.cpp.leavescan/book.css
--- a/core/com.nokia.carbide.cpp.leavescan/book.css Mon Jun 28 08:58:35 2010 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,187 +0,0 @@
-/*
- Nokia DPT Tools CSS
- Nokia C++ Development Tools Austin
- Date: 2005/11/04
-
-*/
-
-/* Add whitespace around entire display to avoid crowding edges of view */
-/* 20070523-Removed top margin size to close gap between location breadcrumbs and page title */
-html {
- margin: 0px 10px 10px 10px;
- }
-
-/* Set default font to serif style, 12-pt and plain */
-body, p, table {
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 12px;
- font-weight: normal;
-}
-
-/* Use sans-serif fonts for all title styles */
-h1, h2, h3, h4, h5, h6, strong, em {
- font-family: Arial, Helvetica, sans-serif;
- color: #000000;
- }
-
-h1 { font-size:20px }
-h2 { font-size:18px }
-h3 { font-size:16px }
-h4 { font-size:14px }
-h5 { font-size:12px }
-h6 { font-size:10px }
-
-/* For headlines at the top of a view, add space */
-/* 20070522-added gradiant to background to update visual style of docs */
-h1, h2, h3 {
- background-image: url(html/images/green_fade_left_68_165_28.png);
- background-repeat: no-repeat;
- padding:10px 0px 10px 12px;
- }
-
-li {
- margin-bottom:8px;
- margin-top:8px;
- }
-
-/* Footer includes space and a gray line above the company logo */
-#footer {
- padding-top:10px;
- margin-top:20px;
- border-top:1px solid #999;
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 10px;
- color: #03C;
- }
-
-.listing {
- font-family: "Courier New", Courier, mono;
- color: #009;
- background-color: #EEE;
- padding: 10px 0px;
- margin: 10px 0px;
- }
-
-.code, pre {
- font-family: "Courier New", Courier, mono;
- font-size: 11px;
- color: #333;
- }
-
-.step {
- /* background-color: #EEE; */
- /* margin: 10px 0px; */
- color: #333;
- border-bottom:2px solid #EEE;
- }
-
-.substep {
- background-color: #EEE;
- }
-
-
-/* Figure/Listing/Table titles are centered and gray */
-p.table {
- color: #999;
- font-weight: bold;
- padding-top: 5px;
- }
-
-table {
- border: solid #999 1px;
- table-layout: auto;
- font-size: 12px;
- }
-
-td, th {
- border: solid #999 1px;
- padding: 5px;
- vertical-align:top;
- }
-
-/* 20070522-replaced gray with green background to match gradiant color for title */
-th {
- background-color:#ACD79B;
- /* background-color:#999;
- color:#FFF; */
- }
-
-div.ol.p {
- margin-left: 3em;
- }
-
-/* Make all ordered/unordered list items appear in bold gray */
-div ol > li, div ul > li {
- font-weight:bold;
- color: #333;
- }
-
-div ol > p, div ul > p, div li > p {
- font-weight:normal;
- }
-
-/* Make all H4 and H5 items appear in bold gray against a light green background */
-div h5, div h4 {
- padding:5px 0px 5px 12px;
- background-color:#ECFBEA;
- /* background-color: #EEE; */
- font-weight:bold;
- color: #333;
- }
-
-
-/* Notes stand out using a light top & bottom borders with dark gray text */
-p.note {
- /* color: #03C; */
- /* background-color: #FFFF99; */
- color: #333;
- padding: 5px;
- margin-left: 1em;
- margin-right: 1em;
- border-top: solid #BBB thin;
- border-bottom: solid #BBB thin;
- }
-
-
-/* Figure/Listing/Table titles are centered and gray */
-p.figure {
- color: #333;
- text-align: center;
- font-weight: bold;
- }
-
-/* highly visible red background and white text for things that need fixing before release */
-/* SHOULD NOT BE PRESENT IN RELEASED PRODUCTS */
-.fix {
- background-color: red;
- font-weight: bold;
- color: white;
- }
-
-.question {
- font-style:italic;
- font-weight:bold;
- color: #555;
- }
-
-.titleSmall {
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 10px;
- }
-
-
-.plain {
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 12px;
- font-style: normal;
- line-height: normal;
- font-weight: normal;
- font-variant: normal;
- color: #000000;
- text-decoration: none;
- }
-
-a:link { color: #0033CC }
-a:visited { color: #555555 }
-a:hover { color: #0033CC }
-
diff -r d666d0a984db -r e848131666c1 core/com.nokia.carbide.cpp.leavescan/build.properties
--- a/core/com.nokia.carbide.cpp.leavescan/build.properties Mon Jun 28 08:58:35 2010 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = plugin.xml,\
- META-INF/,\
- .,\
- icons/,\
- html/
diff -r d666d0a984db -r e848131666c1 core/com.nokia.carbide.cpp.leavescan/html/cheatsheets/getStarted_tool.xml
--- a/core/com.nokia.carbide.cpp.leavescan/html/cheatsheets/getStarted_tool.xml Mon Jun 28 08:58:35 2010 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-
-
-
-
-
- Add TOOL NAME introduction message here.
-
-
-
-
-
- Add STEP 1 info here and link to more indepth step information.
-
-
-
-
-
- Add additional STEPs as required and link to more indepth step information.
-
-
-
-
-
\ No newline at end of file
diff -r d666d0a984db -r e848131666c1 core/com.nokia.carbide.cpp.leavescan/html/concepts/concepts.htm
--- a/core/com.nokia.carbide.cpp.leavescan/html/concepts/concepts.htm Mon Jun 28 08:58:35 2010 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-
-
-
-
-
-
-Concepts
-
-
-
-
Introduction
-
LeaveScan is a useful tool that can be used regularly against your source code. LeaveScan is a command-line utility developed by Symbian Ltd that verifies that your code respects the naming conventions for leaving functions.
-
LeaveScan checks that all functions which have the potential to leave are named according to the Symbian OS convention, with a trailing L. Any function that Leaves, or calls a function that Leaves (other than in a TRAP harness), must have a name ending in L. LeaveScan can be used on your source to indicate areas of code where you may have forgotten to use the naming convention. By revealing where leaves may occur but are not indicated by the function name, it highlights potential bugs and gives you an opportunity to fix the problem and ensure that your code handles any leaves correctly.
-
-
diff -r d666d0a984db -r e848131666c1 core/com.nokia.carbide.cpp.leavescan/html/images/green_fade_left_68_165_28.png
Binary file core/com.nokia.carbide.cpp.leavescan/html/images/green_fade_left_68_165_28.png has changed
diff -r d666d0a984db -r e848131666c1 core/com.nokia.carbide.cpp.leavescan/html/images/nokia_copyright.png
Binary file core/com.nokia.carbide.cpp.leavescan/html/images/nokia_copyright.png has changed
diff -r d666d0a984db -r e848131666c1 core/com.nokia.carbide.cpp.leavescan/html/index.xml
--- a/core/com.nokia.carbide.cpp.leavescan/html/index.xml Mon Jun 28 08:58:35 2010 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff -r d666d0a984db -r e848131666c1 core/com.nokia.carbide.cpp.leavescan/html/nokia.css
--- a/core/com.nokia.carbide.cpp.leavescan/html/nokia.css Mon Jun 28 08:58:35 2010 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,165 +0,0 @@
-/* Nokia DPT Tools CSS
- Nokia DPT Austin
- Date: 2006/11/02
-*/
-
-/* Add whitespace around entire display to avoid crowding edges of view */
-html {
- margin: 10px;
- /* fixes gray backgrounds when displayed in external browsers */
- background-color:#FFFFFF;
- }
-
-/* Set default font to serif style, 12-pt and plain */
-body {
- font-family: Georgia, "Times New Roman", Times, serif;
- font-size: 12px;
- font-weight: plain;
-}
-
-/* Use sans-serif fonts for all title styles and Nokia blue */
-h1, h2, h3, h4, h5, h6, strong, em {
- font-family: Arial, Helvetica, sans-serif;
- color: #333;
- }
-
-strong{
- color: #333;
- }
-
-/* For headlines at the top of a view, add space and a gray line underneath */
-h2, h3 {
- padding:10px 0px;
- border-bottom:1px solid #BBB;
- }
-
-li {
- margin-bottom:8px;
- margin-top:8px;
- }
-
-
-/* Footer includes space and a gray line above the company logo */
-#footer {
- padding-top:10px;
- margin-top:20px;
- border-top:1px solid #999;
- font-family: Arial, Helvetica, sans-serif;
- font-size: 11px;
- color: #333;
- }
-
-.listing {
- font-family: "Courier New", Courier, mono;
- color: #009;
- background-color: #EEE;
- padding: 10px 0px;
- margin: 10px 0px;
- }
-
-.code, pre {
- font-family: "Courier New", Courier, mono;
- font-size: 12px;
- color: #333;
- }
-
-.step {
- /* background-color: #EEE; */
- /* margin: 10px 0px; */
- color: #333;
- border-bottom:2px solid #EEE;
- }
-
-.substep {
- background-color: #EEE;
- }
-
-
-/* Figure/Listing/Table titles are centered and gray */
-p.table {
- color: #999;
- font-weight: bold;
- padding-top: 5px;
- }
-
-table {
- border: 1px solid #999;
- table-layout: auto;
- }
-
-td, th {
- border: 1px solid #999;
- padding: 5px;
- vertical-align:top;
- }
-
-th {
- background-color:#999;
- color:#FFF;
- }
-
-div.ol.p {
- margin-left: 3em;
- }
-
-/* Make all ordered/unordered list items appear in bold gray */
-div ol > li, div ul > li {
- font-weight:bold;
- color: #333;
- }
-
-/* Make all H4 and H5 items appear in bold gray against a light gray background */
-div h5, div h4 {
- padding: 5px;
- background-color: #EEE;
- font-weight:bold;
- color: #333;
- }
-
-
-/* Notes stand out using a light top & bottom borders with dark gray text */
-p.note {
- /* color: #03C; */
- /* background-color: #FFFF99; */
- color: #333;
- padding: 5px;
- margin-left: 1em;
- margin-right: 1em;
- border-top:1px solid #BBB;
- border-bottom:1px solid #BBB;
-}
-
-
-/* Figure/Listing/Table titles are centered and gray */
-p.figure {
- color: #333;
- text-align: center;
- font-weight: bold;
-}
-
-/* red background and white text for things that need fixing before release */
-.fix {
- background-color: red;
- font-weight: bold;
- color: white;
- }
-
-.question {
- font-style:italic;
- font-weight:bold;
- color: #333;
- }
-
-.titleSmall {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 10px;
- }
-
-.copyrightStatement {
- font-size: 11px;
- color: #006699; /* Symbian blue */
- }
-
-div.Footer table, div.Footer td, div.Footer th {
- border: 0px none #000;
- }
diff -r d666d0a984db -r e848131666c1 core/com.nokia.carbide.cpp.leavescan/html/reference/reference.htm
--- a/core/com.nokia.carbide.cpp.leavescan/html/reference/reference.htm Mon Jun 28 08:58:35 2010 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-
-
-
-
-
-
-References
-
-
-
-
How it Works
-
LeaveScan works by examining each line of source code and checking that functions which do not terminate in L cannot leave. However, there are a few functions (more accurately, operators) in Symbian OS that may leave but cannot have an L suffix (such as operator<< and operator>> for RWriteStream and RReadStream respectively).
-
The naming convention cannot be applied appropriately to operators and, unfortunately, LeaveScan does not have the logic needed to recognize operators that may leave. When you use operators that you know have the potential to leave, you’ll have to remember to check this code by sight yourself.
-
LeaveScan also checks functions which do have a trailing L to see if they really can leave. If functions are encountered which do not leave, LeaveScan raises a warning. However, this scenario can be perfectly valid, for example, when implementing an abstract function such as CActive::RunL(), some implementations may leave but others may not.
-
LeaveScan ignores calls in trapped functions, commented out code, i.e. // and /* and */. It also checks for calls to LD, LC and LX functions as well as normal L functions. It also checks for User::Leave(), ELeave, User::LeaveIfError().
LeaveScan preferences can be defined in Carbide.c++ by selecting Windows > Preferences... and expanding the Carbide Extensions group and selecting Leavescan preferences. Specify the path to the leavescan command to avoid calling the leavescan stub.
-
LeaveScan can also be run from the command line to scan whole directories and output to a file. You can use the for command to scan directories. For example, for /R %i in (*.cpp) do leavescan %i >> leavescan.out. This will scan all cpp files in or below the current directory and places the result in leavescan.out.
-
-
-
-
-
diff -r d666d0a984db -r e848131666c1 core/com.nokia.carbide.cpp.leavescan/html/tocConcepts.xml
--- a/core/com.nokia.carbide.cpp.leavescan/html/tocConcepts.xml Mon Jun 28 08:58:35 2010 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff -r d666d0a984db -r e848131666c1 core/com.nokia.carbide.cpp.leavescan/html/tocReference.xml
--- a/core/com.nokia.carbide.cpp.leavescan/html/tocReference.xml Mon Jun 28 08:58:35 2010 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff -r d666d0a984db -r e848131666c1 core/com.nokia.carbide.cpp.leavescan/html/tocTasks.xml
--- a/core/com.nokia.carbide.cpp.leavescan/html/tocTasks.xml Mon Jun 28 08:58:35 2010 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff -r d666d0a984db -r e848131666c1 core/com.nokia.carbide.cpp.leavescan/html/toolTOC.xml
--- a/core/com.nokia.carbide.cpp.leavescan/html/toolTOC.xml Mon Jun 28 08:58:35 2010 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- href="html/reference/references.htm" >
-
-
-
-
- href="html/tasks/tasks.htm" >
-
-
-
-
-
-
\ No newline at end of file
diff -r d666d0a984db -r e848131666c1 core/com.nokia.carbide.cpp.leavescan/icons/Run_Leavescan.png
Binary file core/com.nokia.carbide.cpp.leavescan/icons/Run_Leavescan.png has changed
diff -r d666d0a984db -r e848131666c1 core/com.nokia.carbide.cpp.leavescan/plugin.xml
--- a/core/com.nokia.carbide.cpp.leavescan/plugin.xml Mon Jun 28 08:58:35 2010 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,137 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff -r d666d0a984db -r e848131666c1 core/com.nokia.carbide.cpp.leavescan/src/com/nokia/carbide/cpp/internal/leavescan/LeavescanPlugin.java
--- a/core/com.nokia.carbide.cpp.leavescan/src/com/nokia/carbide/cpp/internal/leavescan/LeavescanPlugin.java Mon Jun 28 08:58:35 2010 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-*/
-package com.nokia.carbide.cpp.internal.leavescan;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.IStartup;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class LeavescanPlugin extends AbstractUIPlugin implements IStartup {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "com.nokia.carbide.cpp.leavescan";
-
- // The shared instance
- private static LeavescanPlugin plugin;
-
- private static IPreferenceStore prefsStore;
-
- /**
- * The constructor
- */
- public LeavescanPlugin() {
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- getLeaveScanPrefsStore();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static LeavescanPlugin getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-
- public static IPreferenceStore getLeaveScanPrefsStore(){
- if (prefsStore == null){
- prefsStore = getDefault().getPreferenceStore();
- }
-
- return prefsStore;
- }
-
- public void earlyStartup() {
- }
-
-}
diff -r d666d0a984db -r e848131666c1 core/com.nokia.carbide.cpp.leavescan/src/com/nokia/carbide/cpp/internal/leavescan/error/parsers/LeaveScanErrorParser.java
--- a/core/com.nokia.carbide.cpp.leavescan/src/com/nokia/carbide/cpp/internal/leavescan/error/parsers/LeaveScanErrorParser.java Mon Jun 28 08:58:35 2010 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-*/
-package com.nokia.carbide.cpp.internal.leavescan.error.parsers;
-
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.eclipse.cdt.core.ErrorParserManager;
-import org.eclipse.cdt.core.IErrorParser;
-import org.eclipse.cdt.core.IMarkerGenerator;
-import org.eclipse.core.resources.IFile;
-
-public class LeaveScanErrorParser implements IErrorParser {
-
- private Pattern leaveScanErrorPattern = Pattern.compile("(.*)?(\\((\\d+)\\))\\s+:\\s+(.*)"); //$NON-NLS-1$;
- private Pattern leaveScanWarningPattern = Pattern.compile("(.*)?(\\((\\d+)\\))\\s+:\\s+Warning\\s+(.*)"); //$NON-NLS-1$;
-
-
-
- public LeaveScanErrorParser() {
- }
-
- public boolean processLine(String line, ErrorParserManager errorParserManager) {
- // Known patterns.
- //
- // (a) warning
- // () : Warning -
- // e.g.....
- // C:\Symbian\UIQ3SDK\Examples\UIQ\QMyDirectory\Src\MyDirectoryAppUi.cpp(211) : Warning - CMyDirectoryAppUi::DoMergeCategoriesL appears to contain no leavers.
- //
- //
- // (b) error
- // () :
- // e.g....
- // C:\Symbian\9.1\S60_3rd_MR\Examples\Basics\StaticDLL\CreateStaticDLL.cpp(40) : CMessenger::Construct Calls a function that can leave. QUALIFIED WITH-> // copy given string into own descriptor
-
- Matcher warningMatcher = leaveScanWarningPattern.matcher(line);
- if (warningMatcher.matches()) {
- String fileName = warningMatcher.group(1);
- IFile file = errorParserManager.findFileName(fileName);
- String lineNumberStr = warningMatcher.group(3);
- int lineNumber = Integer.parseInt(lineNumberStr);
- String msgDescription = warningMatcher.group(4);
- msgDescription = msgDescription.trim();
- errorParserManager.generateMarker(file, lineNumber, msgDescription, IMarkerGenerator.SEVERITY_WARNING, null);
- return true;
- }
-
- Matcher errorMatcher = leaveScanErrorPattern.matcher(line);
- if (errorMatcher.matches()) {
- String fileName = errorMatcher.group(1);
- IFile file = errorParserManager.findFileName(fileName);
- String lineNumberStr = errorMatcher.group(3);
- int lineNumber = Integer.parseInt(lineNumberStr);
- String msgDescription = errorMatcher.group(4);
- msgDescription = msgDescription.trim();
- errorParserManager.generateMarker(file, lineNumber, msgDescription, IMarkerGenerator.SEVERITY_ERROR_RESOURCE, null);
- return true;
- }
-
- // check for other process errors
- if (line.toLowerCase().contains("the system cannot find the path specified") ||
- line.toLowerCase().contains("is not supported in this release") ||
- line.toLowerCase().contains("is not recognized as an internal or external command")){
- errorParserManager.generateMarker(null, -1, "Cannot run leavescan. Check that leavescan is on your PATH or go to the Carbide.c++ > Leavescan Preferences and set the Leavescan Directory. Leavescan.exe can be found at: http://www3.symbiandevnet.com/faq.nsf/0/f3765f69e4fb9baa80256a570051b952?OpenDocument", IMarkerGenerator.SEVERITY_ERROR_BUILD, null);
-
- }
-
- return false;
- }
-
-}
diff -r d666d0a984db -r e848131666c1 core/com.nokia.carbide.cpp.leavescan/src/com/nokia/carbide/cpp/internal/leavescan/popup/actions/LeavescanAction.java
--- a/core/com.nokia.carbide.cpp.leavescan/src/com/nokia/carbide/cpp/internal/leavescan/popup/actions/LeavescanAction.java Mon Jun 28 08:58:35 2010 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,308 +0,0 @@
-/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-*/
-package com.nokia.carbide.cpp.internal.leavescan.popup.actions;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-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.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.ui.IActionDelegate;
-import org.eclipse.ui.IObjectActionDelegate;
-import org.eclipse.ui.IWorkbenchPart;
-
-import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin;
-import com.nokia.carbide.cdt.builder.EpocEngineHelper;
-import com.nokia.carbide.cdt.builder.builder.CarbideCPPBuilder;
-import com.nokia.carbide.cdt.builder.builder.CarbideCommandLauncher;
-import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration;
-import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo;
-import com.nokia.carbide.cpp.internal.leavescan.LeavescanPlugin;
-import com.nokia.carbide.cpp.internal.leavescan.ui.LeavescanPreferenceConstants;
-
-public class LeavescanAction implements IObjectActionDelegate {
-
- private ISelection selection;
-
- // id definied from plugin.xml
- public static final String LEAVE_SCAN_ACTION_POP_UP_ID = "com.nokia.carbide.cpp.leavescan.leaveScanAction";
- public static final String LEAVE_SCAN_ACTION_MMP_POP_UP_ID = "com.nokia.carbide.cpp.leavescan.leaveScanActionOnMMP";
-
-
- /**
- * Constructor for Action1.
- */
- public LeavescanAction() {
- super();
- }
-
- /**
- * @see IObjectActionDelegate#setActivePart(IAction, IWorkbenchPart)
- */
- public void setActivePart(IAction action, IWorkbenchPart targetPart) {
- }
-
- /**
- * @see IActionDelegate#run(IAction)
- */
- public void run(IAction action) {
- if (action.getId().equals(LEAVE_SCAN_ACTION_POP_UP_ID)){
- // scan the selected source file(s)
- handleLeaveScanAction(action);
- } else if (action.getId().equals(LEAVE_SCAN_ACTION_MMP_POP_UP_ID)){
- // scan the selected source file(s)
- handleLeaveScanActionOnMMP(action);
- }
- }
-
- /**
- * @see IActionDelegate#selectionChanged(IAction, ISelection)
- */
- public void selectionChanged(IAction action, ISelection selection) {
- this.selection = selection;
- }
-
- /**
- * Run leavescan on source file selection(s)
- * @param action
- */
- private void handleLeaveScanAction(IAction action){
- // get the project each file belongs to...
- HashMap> projectSourceMap = new HashMap>();
- if (selection != null && selection instanceof IStructuredSelection) {
- Iterator iter = ((IStructuredSelection)selection).iterator();
- while (iter.hasNext()) {
- Object selItem = iter.next();
- if (selItem instanceof IFile) {
- IProject currProject = ((IResource)selItem).getProject();
- if (projectSourceMap.get(currProject) == null){
- // project is not a key, create a new key/value entry
- List pathList = new ArrayList();
- pathList.add(((IResource)selItem).getLocation());
- projectSourceMap.put(currProject, pathList);
-
- } else {
- // this key already exists, update the source list
- List pathList = projectSourceMap.get(currProject);
- pathList.add(((IResource)selItem).getLocation());
- projectSourceMap.put(currProject, pathList); // 2+ paths exist for this project
- }
- }
- }
- }
-
- // Get the leavescan preferences...
- IPreferenceStore store = LeavescanPlugin.getLeaveScanPrefsStore();
- final boolean noisyOutput = store.getBoolean(LeavescanPreferenceConstants.LEAVESCAN_NOISY_OUTPUT);
- final String leaveScanFolder = store.getString(LeavescanPreferenceConstants.LEAVESCAN_FOLDER);
-
- for (final IProject project : projectSourceMap.keySet()){
- final List finalPathList = projectSourceMap.get(project);
- // Run a job on each project. The arguments for leavescan is:
- // leavescan [-h|-n|-v|-N] [ ...]
- //
- // -h: This help.
- // -n: Noisy output - provides diagnostics (if available).
- // -N: Very noisy output - provides diagnostics (if available).
- // -v: Displays version (for build & automation systems).
- Job buildJob = new Job("Running Leave Scan on Project: " + project.getName()) { //$NON-NLS-1$
- protected IStatus run(IProgressMonitor monitor){
-
- final String[] leaveScanParserIds = new String[] {
- "com.nokia.carbide.cpp.leavescan.LeaveScanErrorParser"
- };
-
- ICarbideProjectInfo cpi = CarbideBuilderPlugin.getBuildManager().getProjectInfo(project);
- try {
- CarbideCPPBuilder.removeAllMarkers(project);
- } catch (CoreException e){
- e.printStackTrace();
- }
- IPath workingDir = cpi.getINFWorkingDirectory();
- CarbideCommandLauncher cmdLauncher = new CarbideCommandLauncher(project, monitor, leaveScanParserIds, workingDir);
- cmdLauncher.startTimingStats();
- int fileCount = 1;
- int listSize = finalPathList.size();
- for (IPath currPath : finalPathList){
-
- //System.out.print("\nProject: " + project.getName() + " | Source File: " + currPath.toOSString()); // Debug
-
- ICarbideBuildConfiguration defaultConfig = cpi.getDefaultConfiguration();
- monitor.beginTask("Running leavescan.", 100);
-
- double dWorked = ((double)fileCount / (double)listSize) * 100;
- monitor.worked((int)dWorked);
- String taskName = "Running leavescan on file \"" + currPath.toOSString() + "\" for project \"" + project.getName() + ".";
- monitor.setTaskName(taskName);
- cmdLauncher.writeToConsole("\n***" + taskName + "\n");
- // Construct the leavescan arguments
- List leaveScanArgList = new ArrayList();
- leaveScanArgList.add("/c");
-
- if (leaveScanFolder.length() > 0){
- leaveScanArgList.add(leaveScanFolder + "leavescan.exe");
- } else {
- leaveScanArgList.add("leavescan.exe");
- }
-
- if (noisyOutput) {
- leaveScanArgList.add("-N");
- } else {
- leaveScanArgList.add("-n");
- }
-
- leaveScanArgList.add(currPath.toOSString());
- String[] args = new String[leaveScanArgList.size()];
- leaveScanArgList.toArray(args);
- cmdLauncher.showCommand(true);
-
- // executeCommand, a special extension to the regular execute which will handle
- // writing the console output, error parsing, and creating error markers.
- cmdLauncher.executeCommand(CarbideCommandLauncher.getCmdExeLocation(), args, CarbideCPPBuilder.getResolvedEnvVars(defaultConfig), workingDir);
-
- fileCount++;
- }
- cmdLauncher.writeToConsole(cmdLauncher.getTimingStats());
- return new Status(IStatus.OK, LeavescanPlugin.PLUGIN_ID, IStatus.OK, "LeaveScan Complete", null);
- }
- };
-
- buildJob.setPriority(Job.BUILD);
- buildJob.schedule();
- }
- }
-
- /**
- * Run leavescan on all the sources in the current project MMP file.
- * The sources files will be build configuration specifc (i.e. MMP is preprocessed) to return
- * platform specific source list.
- * @param action - The IAction interface from the eclipse core
- */
- private void handleLeaveScanActionOnMMP(IAction action){
- // get the project each file belongs to...
- IProject project = null;
- IPath mmpFile = null;
- if (selection != null && selection instanceof IStructuredSelection) {
- Iterator iter = ((IStructuredSelection)selection).iterator();
- while (iter.hasNext()) {
- Object selItem = iter.next();
- if (selItem instanceof IFile) {
- project = ((IResource)selItem).getProject();
- mmpFile = ((IResource)selItem).getLocation();
- //System.out.print("\nMMP File Selected: " + ((IResource)selItem).getLocation());
- }
- }
- }
-
- if (project == null){
- return;
- }
-
- // Get the leavescan preferences...
- IPreferenceStore store = LeavescanPlugin.getLeaveScanPrefsStore();
- final boolean noisyOutput = store.getBoolean(LeavescanPreferenceConstants.LEAVESCAN_NOISY_OUTPUT);
- final String leaveScanFolder = store.getString(LeavescanPreferenceConstants.LEAVESCAN_FOLDER);
-
- ICarbideProjectInfo cpi = CarbideBuilderPlugin.getBuildManager().getProjectInfo(project);
- if (cpi.getDefaultConfiguration() == null)
- return;
-
- List sourceFileList = new ArrayList();
- // Get the list of source files for the default configuration this MMP is associated with.
- sourceFileList = EpocEngineHelper.getSourceFilesForConfiguration(cpi.getDefaultConfiguration(), mmpFile);
-
- final List finalPathList = new ArrayList(sourceFileList);
- final IProject finalProject = project;
- final Path finalMMPPath = new Path(mmpFile.toOSString());
- Job buildJob = new Job("Running Leave Scan on MMP: " + mmpFile.toOSString()) { //$NON-NLS-1$
- protected IStatus run(IProgressMonitor monitor){
-
- final String[] leaveScanParserIds = new String[] {
- "com.nokia.carbide.cpp.leavescan.LeaveScanErrorParser"
- };
-
- ICarbideProjectInfo cpi = CarbideBuilderPlugin.getBuildManager().getProjectInfo(finalProject);
- try {
- CarbideCPPBuilder.removeAllMarkers(finalProject);
- } catch (CoreException e){
- e.printStackTrace();
- }
- IPath workingDir = cpi.getINFWorkingDirectory();
- CarbideCommandLauncher cmdLauncher = new CarbideCommandLauncher(finalProject, monitor, leaveScanParserIds, workingDir);
- cmdLauncher.startTimingStats();
- int fileCount = 1;
- int listSize = finalPathList.size();
- for (IPath currPath : finalPathList){
-
- //System.out.print("\nMMP Project: " + finalMMPPath.lastSegment() + " | Source File: " + currPath.toOSString()); // Debug
-
- ICarbideBuildConfiguration defaultConfig = cpi.getDefaultConfiguration();
- monitor.beginTask("Running leavescan.", 100);
-
- double dWorked = ((double)fileCount / (double)listSize) * 100;
- monitor.worked((int)dWorked);
- String taskName = "Running leavescan on file \"" + currPath.toOSString() + "\" for MMP \"" + finalMMPPath.lastSegment() + ".";
- monitor.setTaskName(taskName);
- cmdLauncher.writeToConsole("\n***" + taskName + "\n");
- // Construct the leavescan arguments
- List leaveScanArgList = new ArrayList();
- leaveScanArgList.add("/c");
-
- if (leaveScanFolder.length() > 0){
- leaveScanArgList.add(leaveScanFolder + "leavescan.exe");
- } else {
- leaveScanArgList.add("leavescan.exe");
- }
-
- if (noisyOutput) {
- leaveScanArgList.add("-N");
- } else {
- leaveScanArgList.add("-n");
- }
-
- leaveScanArgList.add(currPath.toOSString());
- String[] args = new String[leaveScanArgList.size()];
- leaveScanArgList.toArray(args);
- cmdLauncher.showCommand(true);
-
- // executeCommand, a special extension to the regular execute which will handle
- // writing the console output, error parsing, and creating error markers.
- cmdLauncher.executeCommand(CarbideCommandLauncher.getCmdExeLocation(), args, CarbideCPPBuilder.getResolvedEnvVars(defaultConfig), workingDir);
-
- fileCount++;
- }
- cmdLauncher.writeToConsole(cmdLauncher.getTimingStats());
- return new Status(IStatus.OK, LeavescanPlugin.PLUGIN_ID, IStatus.OK, "LeaveScan Complete", null);
- }
- };
-
- buildJob.setPriority(Job.BUILD);
- buildJob.schedule();
-
- }
-
-}
diff -r d666d0a984db -r e848131666c1 core/com.nokia.carbide.cpp.leavescan/src/com/nokia/carbide/cpp/internal/leavescan/ui/LeavescanPreferenceConstants.java
--- a/core/com.nokia.carbide.cpp.leavescan/src/com/nokia/carbide/cpp/internal/leavescan/ui/LeavescanPreferenceConstants.java Mon Jun 28 08:58:35 2010 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-*/
-package com.nokia.carbide.cpp.internal.leavescan.ui;
-
-public class LeavescanPreferenceConstants {
-
- public final static String LEAVESCAN_NOISY_OUTPUT = "leavescanEnableNoisyOutput"; //$NON-NLS-1$
- public final static String LEAVESCAN_FOLDER = "leavescanFolder"; //$NON-NLS-1$
-}
diff -r d666d0a984db -r e848131666c1 core/com.nokia.carbide.cpp.leavescan/src/com/nokia/carbide/cpp/internal/leavescan/ui/LeavescanPreferenceInitializer.java
--- a/core/com.nokia.carbide.cpp.leavescan/src/com/nokia/carbide/cpp/internal/leavescan/ui/LeavescanPreferenceInitializer.java Mon Jun 28 08:58:35 2010 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-*/
-package com.nokia.carbide.cpp.internal.leavescan.ui;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.jface.preference.IPreferenceStore;
-
-import com.nokia.carbide.cpp.internal.leavescan.LeavescanPlugin;
-
-/**
- * Class used to initialize default preference values.
- */
-public class LeavescanPreferenceInitializer extends AbstractPreferenceInitializer {
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
- */
- public void initializeDefaultPreferences() {
- IPreferenceStore store = LeavescanPlugin.getLeaveScanPrefsStore();
- store.setDefault(LeavescanPreferenceConstants.LEAVESCAN_NOISY_OUTPUT, false);
- store.setDefault(LeavescanPreferenceConstants.LEAVESCAN_FOLDER, "");
- }
-
-}
diff -r d666d0a984db -r e848131666c1 core/com.nokia.carbide.cpp.leavescan/src/com/nokia/carbide/cpp/internal/leavescan/ui/LeavescanPreferences.java
--- a/core/com.nokia.carbide.cpp.leavescan/src/com/nokia/carbide/cpp/internal/leavescan/ui/LeavescanPreferences.java Mon Jun 28 08:58:35 2010 -0500
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,160 +0,0 @@
-/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of the License "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-*/
-package com.nokia.carbide.cpp.internal.leavescan.ui;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.PreferencePage;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.DirectoryDialog;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.eclipse.ui.PlatformUI;
-
-import com.nokia.carbide.cpp.internal.leavescan.LeavescanPlugin;
-
-public class LeavescanPreferences extends PreferencePage implements
- IWorkbenchPreferencePage,Listener {
-
- private Text leaveScanDirEditText;
- private Button browseButton;
- private Button veryNoisyOuputButton;
- public static final String LEAVESCAN_PREF_HELP_ID = LeavescanPlugin.PLUGIN_ID + ".leavescan_prefs_page"; //$NON-NLS-1$
-
- /**
- * Create the preference page
- */
- public LeavescanPreferences() {
- super();
- }
-
- /**
- * Create contents of the preference page
- * @param parent
- */
- @Override
- public Control createContents(Composite parent) {
- Composite container = new Composite(parent, SWT.NULL);
- final GridLayout gridLayout = new GridLayout();
- gridLayout.numColumns = 3;
- container.setLayout(gridLayout);
-
- final Label leavescanDirectoryLabel = new Label(container, SWT.NONE);
- leavescanDirectoryLabel.setToolTipText("Choose the directory where leavescan.exe lives.");
- leavescanDirectoryLabel.setText("Leavescan Directory:");
-
- leaveScanDirEditText = new Text(container, SWT.BORDER);
- leaveScanDirEditText.setLayoutData(new GridData(250, SWT.DEFAULT));
-
- browseButton = new Button(container, SWT.NONE);
- browseButton.setToolTipText("Choose the directory where leavescan.exe lives.");
- browseButton.setText("Browse...");
- browseButton.addListener(SWT.Selection, this);
-
- veryNoisyOuputButton = new Button(container, SWT.CHECK);
- veryNoisyOuputButton.setToolTipText("When enabled, -N is passed to leavescan for very verbose output. Otherwise -n is passed for minimal output.");
- veryNoisyOuputButton.setText("Very noisy ouput");
-
- getPrefsStoreValues();
-
- PlatformUI.getWorkbench().getHelpSystem().setHelp(super.getControl(), LEAVESCAN_PREF_HELP_ID);
-
- return container;
- }
-
- /**
- * Initialize the preference page
- */
- public void init(IWorkbench workbench) {
- // Initialize the preference page
- }
-
- public void handleEvent(Event event) {
- if (event.widget == browseButton) {
- handleBrowse();
- }
-
- }
-
- private void getPrefsStoreValues(){
- IPreferenceStore store = LeavescanPlugin.getLeaveScanPrefsStore();
- boolean noisyOutput = store.getBoolean(LeavescanPreferenceConstants.LEAVESCAN_NOISY_OUTPUT);
- veryNoisyOuputButton.setSelection(noisyOutput);
-
- String leaveScanFolder = store.getString(LeavescanPreferenceConstants.LEAVESCAN_FOLDER);
- leaveScanDirEditText.setText(leaveScanFolder);
- }
-
- @Override
- protected void performDefaults() {
- veryNoisyOuputButton.setSelection(false);
- leaveScanDirEditText.setText("");
- super.performDefaults();
- }
-
- @Override
- public boolean performOk() {
-
- IPreferenceStore store = LeavescanPlugin.getLeaveScanPrefsStore();
-
- String leaveScanDir = leaveScanDirEditText.getText();
- if (leaveScanDir.length() > 0){
- if (!leaveScanDir.endsWith("\\")){
- leaveScanDir += "\\";
- leaveScanDirEditText.setText(leaveScanDir);
- }
- }
-
- if (leaveScanDir.length() > 0){
- IPath leaveScanPath = new Path(leaveScanDir);
- if (!leaveScanPath.toFile().exists()){
- if (!MessageDialog.openQuestion(getShell(), "Directory does not exist.", "The directory " + leaveScanPath + " does not exist.\n\nDo you want to continue?")){
- return false;
- }
- }
- }
-
- store.setValue(LeavescanPreferenceConstants.LEAVESCAN_FOLDER, leaveScanDir);
- store.setValue(LeavescanPreferenceConstants.LEAVESCAN_NOISY_OUTPUT, veryNoisyOuputButton.getSelection());
-
- return super.performOk();
- }
-
- private void handleBrowse() {
- String selectedDir = showBrowseDialog();
- if (selectedDir != null) {
- if (!selectedDir.equals(leaveScanDirEditText.getText())) {
- leaveScanDirEditText.setText(selectedDir);
- }
- }
- }
-
- private String showBrowseDialog() {
- DirectoryDialog dialog = new DirectoryDialog(leaveScanDirEditText.getShell(), SWT.OPEN);
- dialog.setText("Choose a folder...");
- dialog.setFilterPath(leaveScanDirEditText.getText());
- return dialog.open();
- }
-
-}
diff -r d666d0a984db -r e848131666c1 core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SymbianSDK.java
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SymbianSDK.java Mon Jun 28 08:58:35 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SymbianSDK.java Mon Jun 28 08:59:09 2010 -0500
@@ -1000,7 +1000,7 @@
/**
* Scans the SDK's epoc32\data\buildinfo.txt file and tries to build the Version
- * and branch identifiers. This should not be called when a manifest.xml file exits
+ * and branch identifiers. This should not be called when a manifest.xml file exits.
*
*/
private void scanSDKForVersionInfo(){
@@ -1009,6 +1009,9 @@
if (!bldInfoFile.exists())
return;
+ if (getOSVersion().getMajor() == 0)
+ setOSVersion(new Version("9.5.0")); // Set a default version that will work with all EKA2
+
try {
char[] cbuf = new char[(int) bldInfoFile.length()];
Reader reader = new FileReader(bldInfoFile);
@@ -1026,11 +1029,15 @@
String[] versionTokens = line.split(" ");
if (versionTokens.length == 3){
- if (versionTokens[2].toUpperCase().startsWith("TB92SF") || versionTokens[2].toUpperCase().endsWith("TB92SF")){
+ if (versionTokens[2].toUpperCase().contains("TB92SF")){
setOSVersion(new Version("9.5.0"));
setSDKVersion(new Version("5.2.0"));
break;
- } else if (versionTokens[2].toUpperCase().startsWith("TB101SF") || versionTokens[2].toUpperCase().endsWith("TB101SF")){
+ } else if (versionTokens[2].toUpperCase().contains("TB101SF")){
+ setOSVersion(new Version("9.6.0"));
+ setSDKVersion(new Version("6.0.0"));
+ break;
+ } else if (versionTokens[2].toUpperCase().contains("TB102SF")){
setOSVersion(new Version("9.6.0"));
setSDKVersion(new Version("6.0.0"));
break;
@@ -1039,24 +1046,6 @@
int index = versionTokens[2].lastIndexOf("v");
String osVersionString = versionTokens[2].substring(index+1, versionTokens[2].length());
- if (osVersionString.compareToIgnoreCase("tb91sf") == 0){
- setOSVersion(new Version("9.4.0"));
- setSDKVersion(new Version("5.1.0"));
- break;
- }
-
- if (osVersionString.compareToIgnoreCase("tb92sf") == 0){
- setOSVersion(new Version("9.5.0"));
- setSDKVersion(new Version("5.2.0"));
- break;
- }
-
- if (osVersionString.compareToIgnoreCase("tb101sf") == 0){
- setOSVersion(new Version("9.6.0"));
- setSDKVersion(new Version("6.0.0"));
- break;
- }
-
if (osVersionString.endsWith(EKA1_A_BRANCH_IDENTIFIER) ||
osVersionString.endsWith(EKA2_B_BRANCH_IDENTIFIER) ||
osVersionString.endsWith(EKA1_S_BRANCH_IDENTIFIER)){
@@ -1068,9 +1057,14 @@
}
// Set the version, split on alphanumeric to get rid of any junk at the end
- String[] tempStr = osVersionString.split("[a-zA-Z]");
+ String[] tempStr = osVersionString.split("[a-zA-Z_]");
if (tempStr.length != 0){
- setOSVersion(Version.parseVersion(tempStr[0]));
+ try {
+ setOSVersion(Version.parseVersion(tempStr[0]));
+ } catch (Exception e) {
+ // ignore, default version already set
+ // just catch exception so we move along to the next SDK
+ }
}
}
}
diff -r d666d0a984db -r e848131666c1 core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/sdk/ui/shared/BuildTargetsPage.java
--- a/core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/sdk/ui/shared/BuildTargetsPage.java Mon Jun 28 08:58:35 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/sdk/ui/shared/BuildTargetsPage.java Mon Jun 28 08:59:09 2010 -0500
@@ -239,7 +239,6 @@
if (Window.OK == PreferencesUtil.createPreferenceDialogOn(getShell(), "com.nokia.carbide.cpp.sdk.ui.preferences.BuildPlatformFilterPage", null, null, 0).open()){ //$NON-NLS-1$
inited = false;
setVisible(true);
- drawSDKConfigView(getControl().getParent());
TemplateSDKFilter filter = filterCheckbox.getSelection() ? templateFilter
: null;
filteringContentProviderWrapper.setFilter(filter);
@@ -256,11 +255,10 @@
private void drawSDKConfigView(Composite parent) {
- if (viewer == null){
- viewer = new ContainerCheckedTreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
- viewer.getTree().setLayoutData(new GridData(GridData.FILL_BOTH));
- viewer.setLabelProvider(new LabelProvider());
- }
+ viewer = new ContainerCheckedTreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
+ viewer.getTree().setLayoutData(new GridData(GridData.FILL_BOTH));
+ viewer.setLabelProvider(new LabelProvider());
+
TreeNodeContentProvider treeNodeContentProvider = new TreeNodeContentProvider();
filteringContentProviderWrapper =
new FilteringContentProviderWrapper(treeNodeContentProvider);
diff -r d666d0a984db -r e848131666c1 core/com.nokia.carbide.cpp.sysdoc.hover/src/com/nokia/carbide/cpp/sysdoc/internal/hover/core/HoverManager.java
--- a/core/com.nokia.carbide.cpp.sysdoc.hover/src/com/nokia/carbide/cpp/sysdoc/internal/hover/core/HoverManager.java Mon Jun 28 08:58:35 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sysdoc.hover/src/com/nokia/carbide/cpp/sysdoc/internal/hover/core/HoverManager.java Mon Jun 28 08:59:09 2010 -0500
@@ -23,7 +23,6 @@
import com.nokia.carbide.cpp.sysdoc.internal.hover.dal.interX.InterXIndexController;
import com.nokia.carbide.cpp.sysdoc.internal.hover.dal.sdk.SDKController;
import com.nokia.carbide.cpp.sysdoc.internal.hover.preferences.PreferencesPageController;
-import com.nokia.carbide.cpp.sysdoc.internal.hover.uitlis.DialogHelper;
import com.nokia.carbide.cpp.sysdoc.internal.hover.uitlis.Logger;
import com.nokia.carbide.cpp.sysdoc.internal.hover.webserver.IEmbeddedWebServer;
import com.nokia.carbide.cpp.sysdoc.internal.hover.webserver.JettyWebServer;
@@ -101,7 +100,9 @@
public void haltHoveringService(final String msg) {
HoverManager.getInstance().setEnabled(false);
PreferencesPageController.setDeActivateHoverPlugin(true);
- DialogHelper.displayErrorDialog(MessagesConstants.DEACTIVATED + msg);
+
+ // don't show error dialog here - fixes bug #10130
+ // DialogHelper.displayErrorDialog(MessagesConstants.DEACTIVATED + msg);
}
/**
diff -r d666d0a984db -r e848131666c1 core/com.nokia.carbide.cpp.sysdoc.hover/src/com/nokia/carbide/cpp/sysdoc/internal/hover/dal/sdk/SDKController.java
--- a/core/com.nokia.carbide.cpp.sysdoc.hover/src/com/nokia/carbide/cpp/sysdoc/internal/hover/dal/sdk/SDKController.java Mon Jun 28 08:58:35 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sysdoc.hover/src/com/nokia/carbide/cpp/sysdoc/internal/hover/dal/sdk/SDKController.java Mon Jun 28 08:59:09 2010 -0500
@@ -148,11 +148,13 @@
List sdkList = sdkMgr.getSDKList();
for (ISymbianSDK currSDK : sdkList) {
- String epocRootStr = currSDK.getEPOCROOT();
- try {
- addDirToSDKDirectoryList(epocRootStr);
- } catch (Exception e){
- continue;
+ if (currSDK.isEnabled()) {
+ String epocRootStr = currSDK.getEPOCROOT();
+ try {
+ addDirToSDKDirectoryList(epocRootStr);
+ } catch (Exception e){
+ continue;
+ }
}
}
diff -r d666d0a984db -r e848131666c1 core/com.nokia.carbide.cpp.sysdoc.hover/src/com/nokia/carbide/cpp/sysdoc/internal/hover/uitlis/DialogHelper.java
--- a/core/com.nokia.carbide.cpp.sysdoc.hover/src/com/nokia/carbide/cpp/sysdoc/internal/hover/uitlis/DialogHelper.java Mon Jun 28 08:58:35 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sysdoc.hover/src/com/nokia/carbide/cpp/sysdoc/internal/hover/uitlis/DialogHelper.java Mon Jun 28 08:59:09 2010 -0500
@@ -27,7 +27,7 @@
public class DialogHelper {
public static void displayErrorDialog(final String msg) {
- displayErrorDialog(msg, "Developer Libary Hover Help Error",
+ displayErrorDialog(msg, "Developer Library Hover Help Error",
MessageDialog.ERROR);
}
diff -r d666d0a984db -r e848131666c1 core/com.nokia.carbide.cpp.ui/src/com/nokia/carbide/cpp/ui/ICarbideSharedImages.java
--- a/core/com.nokia.carbide.cpp.ui/src/com/nokia/carbide/cpp/ui/ICarbideSharedImages.java Mon Jun 28 08:58:35 2010 -0500
+++ b/core/com.nokia.carbide.cpp.ui/src/com/nokia/carbide/cpp/ui/ICarbideSharedImages.java Mon Jun 28 08:59:09 2010 -0500
@@ -251,10 +251,6 @@
*/
public static final String IMG_ROM_LOG_16_16 = "ROM_Log.png"; //$NON-NLS-1$
/**
- * File path: icons/Run_Leavescan.png
- */
- public static final String IMG_LEAVESCAN_16_16 = "Run_Leavescan.png"; //$NON-NLS-1$
- /**
* File path: icons/Start_Resource_Block.png
*/
public static final String IMG_START_RESOURCE_BLOCK_16_16 = "Start_Resource_Block.png"; //$NON-NLS-1$
diff -r d666d0a984db -r e848131666c1 core/com.nokia.carbide.cpp/html/online_banner.html
--- a/core/com.nokia.carbide.cpp/html/online_banner.html Mon Jun 28 08:58:35 2010 -0500
+++ b/core/com.nokia.carbide.cpp/html/online_banner.html Mon Jun 28 08:59:09 2010 -0500
@@ -38,7 +38,7 @@
Thank you for installing Carbide.c++2.6! It's an improvement over 2.5 with many improvements including support for Eclipse 3.5 and CDT 6.0, as well as numerous bug fixes.
+
Welcome to Carbide.c++ 2.7.0
+
Thank you for installing Carbide.c++2.7! It's an improvement over 2.6 with many improvements including support for Eclipse 3.5 and CDT 6.0, as well as numerous bug fixes.
However, perhaps the best part about Carbide.c++ is the Carbide.c++ Development Kit (CDK) that you can use to build custom extensions for Carbide.c++. Update your installation of Carbide through the Carbide.c++ Update Site to get a copy of the Carbide.c++ Development Kit > Carbide.c++ Plug-in SDK. Take a look, and let us know what you build!
Finally, if you find bugs, please let us know by submitting it at the new Carbide Bugzilla bug tracking site located at https://xdabug001.ext.nokia.com/bugzilla
For any other questions, please don't hesitate to contact us.