# HG changeset patch # User wpaul # Date 1245092895 18000 # Node ID 87e439e53c322fd96d66e0cea98506189b035fc2 # Parent 83c1dc10c0473dd974e42d2c675334d903a14b43# Parent ecdc976d1827fef0a3b2952e3d5b2c53715ae64c merged diff -r 83c1dc10c047 -r 87e439e53c32 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/EpocEngineHelper.java --- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/EpocEngineHelper.java Mon Jun 15 14:07:22 2009 -0500 +++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/builder/EpocEngineHelper.java Mon Jun 15 14:08:15 2009 -0500 @@ -16,63 +16,30 @@ */ package com.nokia.carbide.cdt.builder; -import java.io.*; -import java.sql.Time; -import java.util.*; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import org.eclipse.cdt.core.CCorePlugin; -import org.eclipse.core.resources.IProject; -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 com.nokia.carbide.cdt.builder.builder.CarbideCPPBuilder; -import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration; -import com.nokia.carbide.cdt.builder.project.ICarbideProjectInfo; -import com.nokia.carbide.cdt.builder.project.ISISBuilderInfo; -import com.nokia.carbide.cpp.epoc.engine.BldInfDataRunnableAdapter; -import com.nokia.carbide.cpp.epoc.engine.BldInfViewRunnableAdapter; -import com.nokia.carbide.cpp.epoc.engine.EpocEnginePlugin; -import com.nokia.carbide.cpp.epoc.engine.ImageMakefileDataRunnableAdapter; -import com.nokia.carbide.cpp.epoc.engine.MMPDataRunnableAdapter; -import com.nokia.carbide.cpp.epoc.engine.MMPViewRunnableAdapter; -import com.nokia.carbide.cpp.epoc.engine.PKGViewRunnableAdapter; -import com.nokia.carbide.cpp.epoc.engine.image.IBitmapSource; -import com.nokia.carbide.cpp.epoc.engine.image.IImageSource; -import com.nokia.carbide.cpp.epoc.engine.image.IMultiImageSource; -import com.nokia.carbide.cpp.epoc.engine.model.bldinf.IBldInfData; -import com.nokia.carbide.cpp.epoc.engine.model.bldinf.IBldInfView; -import com.nokia.carbide.cpp.epoc.engine.model.bldinf.IExport; +import com.nokia.carbide.cdt.builder.project.*; +import com.nokia.carbide.cpp.epoc.engine.*; +import com.nokia.carbide.cpp.epoc.engine.image.*; +import com.nokia.carbide.cpp.epoc.engine.model.bldinf.*; import com.nokia.carbide.cpp.epoc.engine.model.bldinf.IExtension; -import com.nokia.carbide.cpp.epoc.engine.model.bldinf.IMMPReference; -import com.nokia.carbide.cpp.epoc.engine.model.bldinf.IMakMakeReference; -import com.nokia.carbide.cpp.epoc.engine.model.bldinf.IMakefileReference; import com.nokia.carbide.cpp.epoc.engine.model.makefile.image.IImageMakefileData; -import com.nokia.carbide.cpp.epoc.engine.model.mmp.EMMPLanguage; -import com.nokia.carbide.cpp.epoc.engine.model.mmp.EMMPStatement; -import com.nokia.carbide.cpp.epoc.engine.model.mmp.IMMPAIFInfo; -import com.nokia.carbide.cpp.epoc.engine.model.mmp.IMMPBitmap; -import com.nokia.carbide.cpp.epoc.engine.model.mmp.IMMPData; -import com.nokia.carbide.cpp.epoc.engine.model.mmp.IMMPResource; -import com.nokia.carbide.cpp.epoc.engine.model.mmp.IMMPView; -import com.nokia.carbide.cpp.epoc.engine.model.mmp.IMMPViewConfiguration; +import com.nokia.carbide.cpp.epoc.engine.model.mmp.*; import com.nokia.carbide.cpp.epoc.engine.preprocessor.AcceptedNodesViewFilter; import com.nokia.carbide.cpp.epoc.engine.preprocessor.AllNodesViewFilter; import com.nokia.carbide.cpp.internal.api.sdk.SymbianBuildContext; import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext; import com.nokia.carbide.cpp.sdk.core.ISymbianSDK; -import com.nokia.carbide.internal.api.cpp.epoc.engine.model.pkg.EPKGLanguage; -import com.nokia.carbide.internal.api.cpp.epoc.engine.model.pkg.IPKGEmbeddedSISFile; -import com.nokia.carbide.internal.api.cpp.epoc.engine.model.pkg.IPKGInstallFile; -import com.nokia.carbide.internal.api.cpp.epoc.engine.model.pkg.IPKGView; -import com.nokia.carbide.internal.api.cpp.epoc.engine.model.pkg.PKGModelHelper; -import com.nokia.cpp.internal.api.utils.core.CommonPathFinder; -import com.nokia.cpp.internal.api.utils.core.FileUtils; -import com.nokia.cpp.internal.api.utils.core.Logging; +import com.nokia.carbide.internal.api.cpp.epoc.engine.model.pkg.*; +import com.nokia.cpp.internal.api.utils.core.*; + +import org.eclipse.cdt.core.CCorePlugin; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.*; + +import java.io.*; +import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; public class EpocEngineHelper { @@ -1370,7 +1337,14 @@ }); + boolean indexAll = getIndexAllPreference(); + List buildComponents = null; + if (!indexAll) // if indexAll, leave buildComponents as null because that will cause the same behavior + buildComponents = info.isBuildingFromInf() ? null : info.getInfBuildComponents(); for (IMMPReference mmp : mmps) { + if (buildComponents != null && !containsIgnoreCase(buildComponents, mmp.getPath().lastSegment())) + continue; + EpocEnginePathHelper helper = new EpocEnginePathHelper(info.getProject()); final IPath workspaceRelativeMMPPath = helper.convertToWorkspace(mmp.getPath()); EpocEnginePlugin.runWithMMPData(workspaceRelativeMMPPath, @@ -1469,6 +1443,25 @@ return sourceRoots; } + + private static boolean getIndexAllPreference() { + // Can't access this pref from the project ui plugin because it would cause a circular dependency + Plugin plugin = Platform.getPlugin("com.nokia.carbide.cpp.project.ui"); //$NON-NLS-1$ + if (plugin == null) { + CarbideBuilderPlugin.log(Logging.newStatus(CarbideBuilderPlugin.getDefault(), + IStatus.WARNING, "Could not find project UI plugin!")); + return true; + } + return plugin.getPluginPreferences().getBoolean("indexAll"); //$NON-NLS-1$ + } + + private static boolean containsIgnoreCase(List list, String s) { + for (String string : list) { + if (string.equalsIgnoreCase(s)) + return true; + } + return false; + } /** * Get the list of all mmp file paths for any and all build configurations of a project. diff -r 83c1dc10c047 -r 87e439e53c32 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/BuildConfigurationData.java --- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/BuildConfigurationData.java Mon Jun 15 14:07:22 2009 -0500 +++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/BuildConfigurationData.java Mon Jun 15 14:08:15 2009 -0500 @@ -63,6 +63,7 @@ private List extraSourceEntries; private List cacheFileSource; private long cacheTimestamp; + private boolean forceRebuildCache; private final String CONFIG_DATA_CACHE = "configDataCache"; //$NON-NLS-1$ private final String SOURCES_CACHE = "sourcesCache"; //$NON-NLS-1$ @@ -164,6 +165,10 @@ buildCache(); cacheBuilt = true; } + } else if (forceRebuildCache) { + buildCache(); + forceRebuildCache = false; + cacheBuilt = true; } else { // rebuild if any of the files have changed since we built the cache last for (File file : cacheFileSource) { @@ -343,4 +348,8 @@ return null; } + public void forceRebuildCache() { + forceRebuildCache = true; + } + } diff -r 83c1dc10c047 -r 87e439e53c32 builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideProjectModifier.java --- a/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideProjectModifier.java Mon Jun 15 14:07:22 2009 -0500 +++ b/builder/com.nokia.carbide.cdt.builder/src/com/nokia/carbide/cdt/internal/builder/CarbideProjectModifier.java Mon Jun 15 14:08:15 2009 -0500 @@ -16,27 +16,25 @@ */ package com.nokia.carbide.cdt.internal.builder; -import java.util.ArrayList; - -import org.eclipse.cdt.core.CCorePlugin; -import org.eclipse.cdt.core.settings.model.ICConfigurationDescription; -import org.eclipse.cdt.core.settings.model.ICProjectDescription; -import org.eclipse.cdt.core.settings.model.ICStorageElement; -import org.eclipse.cdt.core.settings.model.WriteAccessException; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.core.runtime.Path; - import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin; import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration; import com.nokia.carbide.cdt.builder.project.ICarbideProjectModifier; import com.nokia.carbide.cdt.internal.api.builder.CarbideConfigurationDataProvider; import com.nokia.carbide.cpp.sdk.core.ISymbianBuildContext; +import org.eclipse.cdt.core.CCorePlugin; +import org.eclipse.cdt.core.model.CoreModel; +import org.eclipse.cdt.core.model.ICProject; +import org.eclipse.cdt.core.settings.model.*; +import org.eclipse.core.runtime.*; + +import java.util.ArrayList; + public class CarbideProjectModifier extends CarbideProjectInfo implements ICarbideProjectModifier { // need to make all changes to the same description and save it protected ICProjectDescription projDes; + private boolean shouldForceRebuildCache; /* @@ -138,12 +136,14 @@ if (settingName.equals(PROJECT_RELATIVE_INFFILE_PROPS_KEY)) { projectRelativeBldInfPath = new Path(settingValue); } else if (settingName.equals(BLD_FROM_INF_PROPS_KEY)) { + shouldForceRebuildCache = true; if (settingValue.equalsIgnoreCase("false")) { buildFromInf = false; } else { buildFromInf = true; } } else if (settingName.equals(INF_COMPONENTS_PROPS_KEY)) { + shouldForceRebuildCache = true; setInfBuildComponentList(settingValue); } else if (settingName.equals(OVERRIDE_WORKSPACE_SETTINGS_KEY)) { if (settingValue.equalsIgnoreCase("false")) { @@ -232,18 +232,31 @@ public boolean saveChanges() { - checkInteralSettings(); + checkInternalSettings(); // make sure this flag is set before saving the ICProjectDescription projDes.setCdtProjectCreated(); + if (shouldForceRebuildCache) { + for (ICConfigurationDescription configuration : projDes.getConfigurations()) { + BuildConfigurationData data = (BuildConfigurationData) configuration.getConfigurationData(); + data.forceRebuildCache(); + } + } + try { + // replace the old info in the map with the new + CarbideBuilderPlugin.getBuildManager().setProjectInfo(this); + // save the CDT project description CCorePlugin.getDefault().setProjectDescription(projectTracker.getProject(), projDes, true, new NullProgressMonitor()); - // replace the old info in the map with the new - CarbideBuilderPlugin.getBuildManager().setProjectInfo(this); - + if (shouldForceRebuildCache) { + ICProject cproject = CoreModel.getDefault().create(projectTracker.getProject()); + if (cproject != null) + CCorePlugin.getIndexManager().reindex(cproject); + } + return true; } catch (CoreException e) { e.printStackTrace(); @@ -252,7 +265,7 @@ return false; } - public void checkInteralSettings() { + public void checkInternalSettings() { // make sure our internal settings are written to disk try { diff -r 83c1dc10c047 -r 87e439e53c32 builder/com.nokia.carbide.cpp.builder.utils/plugin.properties --- a/builder/com.nokia.carbide.cpp.builder.utils/plugin.properties Mon Jun 15 14:07:22 2009 -0500 +++ b/builder/com.nokia.carbide.cpp.builder.utils/plugin.properties Mon Jun 15 14:08:15 2009 -0500 @@ -32,3 +32,9 @@ BuilderUtils.TestCleanExport=test cleanexport BuilderUtils.TestExport=test export BuilderUtils.TestTarget=test target + +#Keywords for Carbide preferences +carbcPreference.common=carbide symbian c cpp cplusplus +carbcPreference.preprocess=build console editor arguments cpp + + diff -r 83c1dc10c047 -r 87e439e53c32 builder/com.nokia.carbide.cpp.builder.utils/plugin.xml --- a/builder/com.nokia.carbide.cpp.builder.utils/plugin.xml Mon Jun 15 14:07:22 2009 -0500 +++ b/builder/com.nokia.carbide.cpp.builder.utils/plugin.xml Mon Jun 15 14:08:15 2009 -0500 @@ -9,6 +9,12 @@ category="com.nokia.carbide.cpp.project.ui.preferences.CarbidePreferencePage" class="com.nokia.carbide.cpp.internal.builder.utils.ui.PreprocessPreferencePage" id="com.nokia.carbide.cpp.builder.utils.ui.PreprocessPreferencePage"> + + + + @@ -748,4 +754,15 @@ + + + + + + diff -r 83c1dc10c047 -r 87e439e53c32 carbidesdk/com.nokia.carbide.cpp.sdk.doc.user/html/reference/api_Change_Notes.htm --- a/carbidesdk/com.nokia.carbide.cpp.sdk.doc.user/html/reference/api_Change_Notes.htm Mon Jun 15 14:07:22 2009 -0500 +++ b/carbidesdk/com.nokia.carbide.cpp.sdk.doc.user/html/reference/api_Change_Notes.htm Mon Jun 15 14:08:15 2009 -0500 @@ -83,6 +83,11 @@ + +
  • Added com.nokia.carbide.cpp.sdk.core.ISymbianSDK#setPreviouslyScanned( boolean ).
  • +
  • Added com.nokia.carbide.cpp.sdk.core.ISymbianSDK#isPreviouslyScanned( ).
  • + +

    Deprecated APIs

    diff -r 83c1dc10c047 -r 87e439e53c32 core/com.nokia.carbide.cpp.doc.user/html/context_help/carbide_debug_dialogs_help.xml --- a/core/com.nokia.carbide.cpp.doc.user/html/context_help/carbide_debug_dialogs_help.xml Mon Jun 15 14:07:22 2009 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/context_help/carbide_debug_dialogs_help.xml Mon Jun 15 14:08:15 2009 -0500 @@ -93,9 +93,9 @@ Control which executables are included in the debug process. - + - + @@ -104,28 +104,28 @@ Define the project's launch configuration. - + Define the project's launch configuration. - + Control symbolics loading and other debugger options. - + Control the exceptions the debugger should catch. - + @@ -157,55 +157,55 @@ Control symbolics loading and other debugger options. - + - + S Control entry points, message handling, and instruction set default settings. - + - + Specify the method used to transfer files to the target device. - + - + Specify the .sis file to install on the target device. - + - + Manage the files transfered to the target device at the start of each launch. - + - + Select additional files for addition to the file transfer list. - + - + @@ -216,7 +216,7 @@ Control symbolics loading and other debugger options. - + @@ -224,7 +224,7 @@ Control entry points, message handling, and instruction set default settings. - + @@ -243,7 +243,7 @@ - + @@ -266,24 +266,31 @@ + + + Select the target device category. + + + + Control which executables are included in the debug process. - - + + Select a launch type to create a launch configuration. - - - - + + + + Review launch configuration information. - + @@ -312,23 +319,23 @@ Specify ROM image information. + - - + Define startup options and ROM image download information. + - - + Specify the SIS file to install. - + diff -r 83c1dc10c047 -r 87e439e53c32 core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SDKManager.java --- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SDKManager.java Mon Jun 15 14:07:22 2009 -0500 +++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SDKManager.java Mon Jun 15 14:08:15 2009 -0500 @@ -62,6 +62,7 @@ private static final String SDK_CACHE_OS_VERSION_ATTRIB = "osVersion"; private static final String SDK_CACHE_OS_BRANCH_ATTRIB = "osBranch"; private static final String SDK_CACHE_SDK_VERSION_ATTRIB = "sdkVersion"; + private static final String SDK_SCANNED_FOR_PLUGINS = "sdkScanned"; private static final String EMPTY_STRING = ""; private static boolean enableBSFScanner; @@ -420,9 +421,21 @@ if (sdkVersionItem != null) sdkVersion = sdkVersionItem.getNodeValue(); + // get whether or not this SDK has been scanned + String wasScanned = "false"; + Node sdkScannedItem = attribs.getNamedItem(SDK_SCANNED_FOR_PLUGINS); + if (sdkScannedItem != null) + wasScanned = sdkScannedItem.getNodeValue(); + ISymbianSDK sdk = getSDK(id, false); if (sdk != null){ + if (wasScanned.equalsIgnoreCase("true")){ + sdk.setPreviouslyScanned(true); + } else { + sdk.setPreviouslyScanned(false); + } + if (sdkEnabled.equalsIgnoreCase("true")){ sdk.setEnabled(true); } else { @@ -506,6 +519,14 @@ } attribs.setNamedItem(enabledNode); + Node wasScannedNode = d.createAttribute(SDK_SCANNED_FOR_PLUGINS); + if (true == currSDK.isPreviouslyScanned()) { + wasScannedNode.setNodeValue("true"); + } else { + wasScannedNode.setNodeValue("false"); + } + attribs.setNamedItem(wasScannedNode); + Node osVerNode = d.createAttribute(SDK_CACHE_OS_VERSION_ATTRIB); osVerNode.setNodeValue(currSDK.getOSVersion().toString()); attribs.setNamedItem(osVerNode); diff -r 83c1dc10c047 -r 87e439e53c32 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 15 14:07:22 2009 -0500 +++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/sdk/core/model/SymbianSDK.java Mon Jun 15 14:08:15 2009 -0500 @@ -72,6 +72,7 @@ protected DeviceType deviceEntry = null; private boolean enabled = true; + private boolean wasScanned = false; private Version osVersion; private Version sdkVersion; private String sdkOSBranch; @@ -1223,5 +1224,13 @@ } return sbvCatalog; } + + public void setPreviouslyScanned(boolean wasScanned) { + this.wasScanned = wasScanned; + } + + public boolean isPreviouslyScanned() { + return wasScanned; + } } diff -r 83c1dc10c047 -r 87e439e53c32 core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/sdk/core/ISymbianSDK.java --- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/sdk/core/ISymbianSDK.java Mon Jun 15 14:07:22 2009 -0500 +++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/sdk/core/ISymbianSDK.java Mon Jun 15 14:08:15 2009 -0500 @@ -366,4 +366,17 @@ * Get the Symbian Binary Variation (SBV) catalog for the SDK. */ ISBVCatalog getSBVCatalog(); + + /** + * Tells whether or not the plug-in installer has sniffed this SDK for eclipse plug-ins to install. + * @return true if the SDK was scanned. + */ + boolean isPreviouslyScanned(); + + /** + * Set flag to tell whether or not the SDK was scanned for eclipse plugins to install. + * @param wasScanned was the SDK scanned for plugins? + */ + void setPreviouslyScanned(boolean wasScanned); + } diff -r 83c1dc10c047 -r 87e439e53c32 core/com.nokia.carbide.cpp.sdk.ui/plugin.properties --- a/core/com.nokia.carbide.cpp.sdk.ui/plugin.properties Mon Jun 15 14:07:22 2009 -0500 +++ b/core/com.nokia.carbide.cpp.sdk.ui/plugin.properties Mon Jun 15 14:08:15 2009 -0500 @@ -1,4 +1,9 @@ // Copyright 2007 Nokia, Inc. SDKUIPlugin.SDK_Preferences=SDK Preferences -SDKUIPlugin.Platform_Filtering_Preferences=Platform Filtering Preferences \ No newline at end of file +SDKUIPlugin.Platform_Filtering_Preferences=Platform Filtering Preferences + +#Keywords for Carbide preferences +carbcPreference.common=carbide symbian c cpp cplusplus +carbcPreference.sdkpreferences=sdk epocroot devices xml properties +carbcPreference.platformfiltering=platforms sbsv1 sbsv2 emulation winscw gcce armv5 armv5_abi2 armv5_abiv1 armi arm4 thumb bsf var diff -r 83c1dc10c047 -r 87e439e53c32 core/com.nokia.carbide.cpp.sdk.ui/plugin.xml --- a/core/com.nokia.carbide.cpp.sdk.ui/plugin.xml Mon Jun 15 14:07:22 2009 -0500 +++ b/core/com.nokia.carbide.cpp.sdk.ui/plugin.xml Mon Jun 15 14:08:15 2009 -0500 @@ -9,12 +9,24 @@ class="com.nokia.carbide.cpp.internal.sdk.ui.SDKPreferencePage" category="com.nokia.carbide.cpp.project.ui.preferences.CarbidePreferencePage" id="com.nokia.carbide.cpp.sdk.ui.preferences.SDKPreferencePage"> + + + + + + + + + + + + + + + + diff -r 83c1dc10c047 -r 87e439e53c32 core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/internal/sdk/ui/NewPluginChecker.java --- a/core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/internal/sdk/ui/NewPluginChecker.java Mon Jun 15 14:07:22 2009 -0500 +++ b/core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/internal/sdk/ui/NewPluginChecker.java Mon Jun 15 14:08:15 2009 -0500 @@ -46,28 +46,41 @@ @Override protected IStatus run(IProgressMonitor monitor) { boolean installed = false; + boolean oneSDKWasScanned = false; for (ISymbianSDK sdk : sdkList) { - // XML was parsed, now try to run the feature installer - try { - String eclipsePluginsPath = sdk.getEPOCROOT() + SDK_FEATURE_SUBDIR; - DynamicFeatureInstaller installer = new DynamicFeatureInstaller(new File(eclipsePluginsPath), null); - if (installer.install()) { - installed = true; + + if (sdk.isPreviouslyScanned() == false){ + oneSDKWasScanned = true; + // XML was parsed, now try to run the feature installer + try { + sdk.setPreviouslyScanned(true); + String eclipsePluginsPath = sdk.getEPOCROOT() + SDK_FEATURE_SUBDIR; + DynamicFeatureInstaller installer = new DynamicFeatureInstaller(new File(eclipsePluginsPath), null); + if (installer.install()) { + installed = true; + } + // Boog 8383: We should fail silently, since this will not break anything and may SDKs will not have any documentation + // Otherwise, these errors will be logged every time this check is done (workspace is opened) + // Originally, this was used to install MBS build support, but now is only used for SDK documentation + } catch (MalformedURLException e) { + // ResourcesPlugin.getPlugin().getLog().log(new Status(IStatus.ERROR, SDKCorePlugin.PLUGIN_ID, IStatus.ERROR, "Unable to install plug-ins dynamically.", e)); + } catch (FileNotFoundException e) { + // ResourcesPlugin.getPlugin().getLog().log(new Status(IStatus.ERROR, SDKCorePlugin.PLUGIN_ID, IStatus.ERROR, "Unable to install plug-ins dynamically.", e)); + } catch (InstallationFailureException e) { + // ResourcesPlugin.getPlugin().getLog().log(new Status(IStatus.ERROR, SDKCorePlugin.PLUGIN_ID, IStatus.ERROR, "Unable to install plug-ins dynamically.", e)); } -// Boog 8383: We should fail silently, since this will not break anything and may SDKs will not have any documentation -// Otherwise, these errors will be logged every time this check is done (workspace is opened) -// Originally, this was used to install MBS build support, but now is only used for SDK documentation - } catch (MalformedURLException e) { -// ResourcesPlugin.getPlugin().getLog().log(new Status(IStatus.ERROR, SDKCorePlugin.PLUGIN_ID, IStatus.ERROR, "Unable to install plug-ins dynamically.", e)); - } catch (FileNotFoundException e) { -// ResourcesPlugin.getPlugin().getLog().log(new Status(IStatus.ERROR, SDKCorePlugin.PLUGIN_ID, IStatus.ERROR, "Unable to install plug-ins dynamically.", e)); - } catch (InstallationFailureException e) { -// ResourcesPlugin.getPlugin().getLog().log(new Status(IStatus.ERROR, SDKCorePlugin.PLUGIN_ID, IStatus.ERROR, "Unable to install plug-ins dynamically.", e)); } + + } + + if (oneSDKWasScanned) { + SDKCorePlugin.getSDKManager().updateCarbideSDKCache(); } if (installed) { + // plugins from some SDK were installed doEclipseRestartDialog(workbench); } + return Status.OK_STATUS; } }; diff -r 83c1dc10c047 -r 87e439e53c32 core/com.nokia.carbide.templatewizard.symbian.tests/src/com/nokia/carbide/templatewizard/symbian/tests/TestSymbianSDK.java --- a/core/com.nokia.carbide.templatewizard.symbian.tests/src/com/nokia/carbide/templatewizard/symbian/tests/TestSymbianSDK.java Mon Jun 15 14:07:22 2009 -0500 +++ b/core/com.nokia.carbide.templatewizard.symbian.tests/src/com/nokia/carbide/templatewizard/symbian/tests/TestSymbianSDK.java Mon Jun 15 14:08:15 2009 -0500 @@ -228,6 +228,14 @@ public ISBVCatalog getSBVCatalog() { return null; } + public boolean isPreviouslyScanned() { + // TODO Auto-generated method stub + return false; + } + public void setPreviouslyScanned(boolean wasScanned) { + // TODO Auto-generated method stub + + } } \ No newline at end of file diff -r 83c1dc10c047 -r 87e439e53c32 debuggercdi/com.nokia.carbide.cpp.debug.kernelaware/src/com/nokia/carbide/cpp/debug/kernelaware/ui/messages.properties --- a/debuggercdi/com.nokia.carbide.cpp.debug.kernelaware/src/com/nokia/carbide/cpp/debug/kernelaware/ui/messages.properties Mon Jun 15 14:07:22 2009 -0500 +++ b/debuggercdi/com.nokia.carbide.cpp.debug.kernelaware/src/com/nokia/carbide/cpp/debug/kernelaware/ui/messages.properties Mon Jun 15 14:08:15 2009 -0500 @@ -1,12 +1,12 @@ -SymbianOSView.OverViewToolTip=Provide overview of kernel objects by their hierarchical owning relationship. +SymbianOSView.OverViewToolTip=Hierarchical Overview of Kernel Objects SymbianOSView.OverViewLabel=Overview -SymbianOSView.ProcessesToolTip=list of processes in target Symbian OS +SymbianOSView.ProcessesToolTip=Symbian OS Target Processes SymbianOSView.ProcessesLabel=Processes -SymbianOSView.ThreadsToolTip=list of threads in target Symbian OS +SymbianOSView.ThreadsToolTip=Symbian OS Target Threads SymbianOSView.ThreadsLabel=Threads -SymbianOSView.ChunksToolTip=list of chunks in target Symbian OS +SymbianOSView.ChunksToolTip=Symbian OS Target Thunks SymbianOSView.ChunksLabel=Chunks -SymbianOSView.LibrariesToolTip=list of libraries in target Symbian OS +SymbianOSView.LibrariesToolTip=Symbian OS Target Libraries SymbianOSView.LibrariesLabel=Libraries SymbianOSView.RefreshDataTitle=Refresh Symbian OS Data SymbianOSView.RefreshActionLabel=Refresh diff -r 83c1dc10c047 -r 87e439e53c32 project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/ProjectUIPlugin.java --- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/ProjectUIPlugin.java Mon Jun 15 14:07:22 2009 -0500 +++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/ProjectUIPlugin.java Mon Jun 15 14:08:15 2009 -0500 @@ -224,6 +224,16 @@ store.setValue(PreferenceConstants.PREF_CHANGED_FILES_OPTION, option); } + public static boolean getIndexAllOption() { + IPreferenceStore store = ProjectUIPlugin.getDefault().getPreferenceStore(); + return store.getBoolean(PreferenceConstants.PREF_INDEX_ALL); + } + + public static void setIndexAllOption(boolean option) { + IPreferenceStore store = ProjectUIPlugin.getDefault().getPreferenceStore(); + store.setValue(PreferenceConstants.PREF_INDEX_ALL, option); + } + static public void log(IStatus status) { Logging.log(plugin, status); } diff -r 83c1dc10c047 -r 87e439e53c32 project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/messages.properties --- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/messages.properties Mon Jun 15 14:07:22 2009 -0500 +++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/messages.properties Mon Jun 15 14:08:15 2009 -0500 @@ -79,6 +79,12 @@ CarbidePreferencePage.NeverText=Never change bld.inf/mmp CarbidePreferencePage.NeverToolTip=No changes will be made CarbidePreferencePage.ChangedFilesText=When files in the project are moved/renamed/deleted +CarbidePreferencePage.IndexAllLabel=Index sources from all mmp files +CarbidePreferencePage.IndexAllToolTip=Index all sources in the project +CarbidePreferencePage.IndexingTitle=Indexing Options +CarbidePreferencePage.IndexOnlyBuildLabel=Index only source files from mmp files being built +CarbidePreferencePage.IndexOnlyBuildTooltip=Index only sources from components marked for building +CarbidePreferencePage.ProjectSyncTitle=Project Synchronization Options UpdateProjectFilesQueryDialog.DialogTitle=Project Changes Detected UpdateProjectFilesQueryDialog.ChangesDetectedLabelText=The following changes have been detected for project diff -r 83c1dc10c047 -r 87e439e53c32 project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/preferences/CarbidePreferencePage.java --- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/preferences/CarbidePreferencePage.java Mon Jun 15 14:07:22 2009 -0500 +++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/preferences/CarbidePreferencePage.java Mon Jun 15 14:08:15 2009 -0500 @@ -16,125 +16,143 @@ */ package com.nokia.carbide.cpp.internal.project.ui.preferences; -import org.eclipse.jface.preference.PreferencePage; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -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.Group; -import org.eclipse.ui.IWorkbench; -import org.eclipse.ui.IWorkbenchPreferencePage; -import org.eclipse.ui.PlatformUI; - -import com.freescale.swt.widgets.CheckboxGroup; import com.nokia.carbide.cpp.internal.api.project.core.ResourceChangeListener; import com.nokia.carbide.cpp.internal.project.ui.Messages; import com.nokia.carbide.cpp.internal.project.ui.ProjectUIHelpIds; import com.nokia.carbide.cpp.project.ui.utils.ProjectUIUtils; +import org.eclipse.jface.layout.GridDataFactory; +import org.eclipse.jface.layout.GridLayoutFactory; +import org.eclipse.jface.preference.PreferencePage; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.*; +import org.eclipse.ui.*; + public class CarbidePreferencePage extends PreferencePage implements IWorkbenchPreferencePage { - private CheckboxGroup keepProjectFilesInSync; + private Button keepProjectFilesInSync; - private Group addGroup; + private Composite addGroup; private Button addAskFirst; private Button addAlways; private Button addNever; - private Group deleteGroup; + private Composite deleteGroup; private Button deleteAskFirst; private Button deleteAlways; private Button deleteNever; + private Button indexBuildOnly; + + private Button indexAll; + public CarbidePreferencePage() { super(); } - /* (non-Javadoc) - * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite) - */ - public void createControl(Composite parent) { + protected Control createContents(Composite parent) { Composite content = new Composite(parent, SWT.NONE); - setControl(content); - final GridLayout gridLayout = new GridLayout(); - content.setLayout(gridLayout); + content.setLayout(new GridLayout()); - keepProjectFilesInSync = new CheckboxGroup(content, SWT.CHECK); - GridData data = new GridData(GridData.FILL_HORIZONTAL); - keepProjectFilesInSync.setLayoutData(data); + Group inSyncGroup = new Group(content, SWT.NONE); + inSyncGroup.setLayout(new GridLayout()); + inSyncGroup.setText(Messages.getString("CarbidePreferencePage.ProjectSyncTitle")); //$NON-NLS-1$ + GridDataFactory.fillDefaults().grab(true, false).applyTo(inSyncGroup); + + keepProjectFilesInSync = new Button(inSyncGroup, SWT.CHECK); + GridDataFactory.defaultsFor(keepProjectFilesInSync).indent(0, 10).applyTo(keepProjectFilesInSync); keepProjectFilesInSync.setText(Messages.getString("CarbidePreferencePage.EnableResourceListenerText")); //$NON-NLS-1$ keepProjectFilesInSync.setToolTipText(Messages.getString("CarbidePreferencePage.EnableResourceListenerTooltip")); //$NON-NLS-1$ - keepProjectFilesInSync.getGroup().setLayout(gridLayout); keepProjectFilesInSync.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { - updateProjectSyncOptions(); + updateProjectSyncEnabledState(); } }); - keepProjectFilesInSync.setSelection(ProjectUIUtils.keepProjectsInSync()); - - addGroup = new Group(keepProjectFilesInSync.getGroup(), SWT.NONE); - GridLayout layout = new GridLayout(); - addGroup.setLayout(layout); - addGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - addGroup.setText(Messages.getString("CarbidePreferencePage.AddedFilesText")); //$NON-NLS-1$ + addGroup = new Composite(inSyncGroup, SWT.NONE); addGroup.setFont(parent.getFont()); + addGroup.setLayout(new GridLayout()); + GridDataFactory.fillDefaults().grab(true, false).applyTo(addGroup); addGroup.setToolTipText(Messages.getString("CarbidePreferencePage.AddedFilesToolTip")); //$NON-NLS-1$ - int addOption = ProjectUIUtils.getAddFilesToProjectOption(); - + Label addLabel = new Label(addGroup, SWT.NONE); + addLabel.setText(Messages.getString("CarbidePreferencePage.AddedFilesText")); //$NON-NLS-1$ + addAskFirst = new Button(addGroup, SWT.RADIO); addAskFirst.setText(Messages.getString("CarbidePreferencePage.AskFirstText")); //$NON-NLS-1$ addAskFirst.setToolTipText(Messages.getString("CarbidePreferencePage.AskFirstToolTip")); //$NON-NLS-1$ - addAskFirst.setSelection(addOption == ResourceChangeListener.UPDATE_FILES_OPTION_ASK); + GridDataFactory.defaultsFor(addAskFirst).indent(10, 0).applyTo(addAskFirst); addAlways = new Button(addGroup, SWT.RADIO); addAlways.setText(Messages.getString("CarbidePreferencePage.AlwaysText")); //$NON-NLS-1$ addAlways.setToolTipText(Messages.getString("CarbidePreferencePage.AlwaysToolTip")); //$NON-NLS-1$ - addAlways.setSelection(addOption == ResourceChangeListener.UPDATE_FILES_OPTION_ALWAYS); + GridDataFactory.defaultsFor(addAlways).indent(10, 0).applyTo(addAlways); addNever = new Button(addGroup, SWT.RADIO); addNever.setText(Messages.getString("CarbidePreferencePage.NeverText")); //$NON-NLS-1$ addNever.setToolTipText(Messages.getString("CarbidePreferencePage.NeverToolTip")); //$NON-NLS-1$ - addNever.setSelection(addOption == ResourceChangeListener.UPDATE_FILES_OPTION_NEVER); + GridDataFactory.defaultsFor(addNever).indent(10, 0).applyTo(addNever); - int deleteOption = ProjectUIUtils.getChangedFilesInProjectOption(); - deleteGroup = new Group(keepProjectFilesInSync.getGroup(), SWT.NONE); - GridLayout layout2 = new GridLayout(); - deleteGroup.setLayout(layout2); - GridData gd2 = new GridData(GridData.FILL_HORIZONTAL); - deleteGroup.setLayoutData(gd2); - deleteGroup.setText(Messages.getString("CarbidePreferencePage.ChangedFilesText")); //$NON-NLS-1$ + deleteGroup = new Composite(inSyncGroup, SWT.NONE); + deleteGroup.setLayout(new GridLayout()); + GridDataFactory.fillDefaults().grab(true, false).applyTo(deleteGroup); deleteGroup.setFont(parent.getFont()); deleteGroup.setToolTipText(Messages.getString("CarbidePreferencePage.ChangedFilesToolTip")); //$NON-NLS-1$ + Label deleteLabel = new Label(deleteGroup, SWT.NONE); + deleteLabel.setText(Messages.getString("CarbidePreferencePage.ChangedFilesText")); //$NON-NLS-1$ + deleteAskFirst = new Button(deleteGroup, SWT.RADIO); deleteAskFirst.setText(Messages.getString("CarbidePreferencePage.AskFirstText")); //$NON-NLS-1$ deleteAskFirst.setToolTipText(Messages.getString("CarbidePreferencePage.AskFirstToolTip")); //$NON-NLS-1$ - deleteAskFirst.setSelection(deleteOption == ResourceChangeListener.UPDATE_FILES_OPTION_ASK); + GridDataFactory.defaultsFor(deleteAskFirst).indent(10, 0).applyTo(deleteAskFirst); deleteAlways = new Button(deleteGroup, SWT.RADIO); deleteAlways.setText(Messages.getString("CarbidePreferencePage.AlwaysText")); //$NON-NLS-1$ deleteAlways.setToolTipText(Messages.getString("CarbidePreferencePage.AlwaysToolTip")); //$NON-NLS-1$ - deleteAlways.setSelection(deleteOption == ResourceChangeListener.UPDATE_FILES_OPTION_ALWAYS); + GridDataFactory.defaultsFor(deleteAlways).indent(10, 0).applyTo(deleteAlways); deleteNever = new Button(deleteGroup, SWT.RADIO); deleteNever.setText(Messages.getString("CarbidePreferencePage.NeverText")); //$NON-NLS-1$ deleteNever.setToolTipText(Messages.getString("CarbidePreferencePage.NeverToolTip")); //$NON-NLS-1$ - deleteNever.setSelection(deleteOption == ResourceChangeListener.UPDATE_FILES_OPTION_NEVER); + GridDataFactory.defaultsFor(deleteNever).indent(10, 0).applyTo(deleteNever); + + boolean keepInSync = ProjectUIUtils.keepProjectsInSync(); + int addOption = ProjectUIUtils.getAddFilesToProjectOption(); + int deleteOption = ProjectUIUtils.getChangedFilesInProjectOption(); + setUpdateFilesOptions(keepInSync, addOption, deleteOption); + updateProjectSyncEnabledState(); + + Group indexGroup = new Group(content, SWT.NONE); + GridLayoutFactory.swtDefaults().margins(10, 10).applyTo(indexGroup); + indexGroup.setText(Messages.getString("CarbidePreferencePage.IndexingTitle")); //$NON-NLS-1$ + GridDataFactory.fillDefaults().grab(true, false).applyTo(indexGroup); - updateProjectSyncOptions(); + indexBuildOnly = new Button(indexGroup, SWT.RADIO); + indexBuildOnly.setText(Messages.getString("CarbidePreferencePage.IndexOnlyBuildLabel")); //$NON-NLS-1$ + indexBuildOnly.setToolTipText(Messages.getString("CarbidePreferencePage.IndexOnlyBuildTooltip")); //$NON-NLS-1$ + GridDataFactory.defaultsFor(indexBuildOnly).applyTo(indexBuildOnly); - PlatformUI.getWorkbench().getHelpSystem().setHelp(super.getControl(), ProjectUIHelpIds.CARBIDE_PREFS_PAGE); + indexAll = new Button(indexGroup, SWT.RADIO); + indexAll.setText(Messages.getString("CarbidePreferencePage.IndexAllLabel")); //$NON-NLS-1$ + indexAll.setToolTipText(Messages.getString("CarbidePreferencePage.IndexAllToolTip")); //$NON-NLS-1$ + GridDataFactory.defaultsFor(indexAll).applyTo(indexAll); + + boolean indexAllOption = ProjectUIUtils.getIndexAllOption(); + indexBuildOnly.setSelection(!indexAllOption); + indexAll.setSelection(indexAllOption); + + PlatformUI.getWorkbench().getHelpSystem().setHelp(content, ProjectUIHelpIds.CARBIDE_PREFS_PAGE); + + return content; } - private void updateProjectSyncOptions() { + private void updateProjectSyncEnabledState() { boolean enabled = keepProjectFilesInSync.getSelection(); addGroup.setEnabled(enabled); addAskFirst.setEnabled(enabled); @@ -146,14 +164,29 @@ deleteNever.setEnabled(enabled); } - @Override - protected Control createContents(Composite parent) { - return null; - } - public void init(IWorkbench workbench) { } + @Override + protected void performDefaults() { + setUpdateFilesOptions(true, 0, 0); + updateProjectSyncEnabledState(); + indexBuildOnly.setSelection(true); + indexAll.setSelection(false); + super.performDefaults(); + } + + private void setUpdateFilesOptions(boolean keepInSync, int addOptions, int deleteOptions) { + keepProjectFilesInSync.setSelection(keepInSync); + addAskFirst.setSelection(ResourceChangeListener.UPDATE_FILES_OPTION_ASK == addOptions); + addAlways.setSelection(ResourceChangeListener.UPDATE_FILES_OPTION_ALWAYS == addOptions); + addNever.setSelection(ResourceChangeListener.UPDATE_FILES_OPTION_NEVER == addOptions); + deleteAskFirst.setSelection(ResourceChangeListener.UPDATE_FILES_OPTION_ASK == deleteOptions); + deleteAlways.setSelection(ResourceChangeListener.UPDATE_FILES_OPTION_ALWAYS == deleteOptions); + deleteNever.setSelection(ResourceChangeListener.UPDATE_FILES_OPTION_NEVER == deleteOptions); + } + + public boolean performOk() { ProjectUIUtils.setKeepProjectsInSync(keepProjectFilesInSync.getSelection()); @@ -174,6 +207,8 @@ ProjectUIUtils.setChangedFilesInProjectOption(ResourceChangeListener.UPDATE_FILES_OPTION_NEVER); } + ProjectUIUtils.setIndexAllOption(indexAll.getSelection()); + return super.performOk(); } diff -r 83c1dc10c047 -r 87e439e53c32 project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/preferences/PreferenceConstants.java --- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/preferences/PreferenceConstants.java Mon Jun 15 14:07:22 2009 -0500 +++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/preferences/PreferenceConstants.java Mon Jun 15 14:08:15 2009 -0500 @@ -26,4 +26,6 @@ public final static String PREF_ADDED_FILES_OPTION = "addedFilesOption"; //$NON-NLS-1$ public final static String PREF_CHANGED_FILES_OPTION = "changedFilesOption"; //$NON-NLS-1$ + + public static final String PREF_INDEX_ALL = "indexAll"; //$NON-NLS-1$ } diff -r 83c1dc10c047 -r 87e439e53c32 project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/preferences/PreferenceInitializer.java --- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/preferences/PreferenceInitializer.java Mon Jun 15 14:07:22 2009 -0500 +++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/preferences/PreferenceInitializer.java Mon Jun 15 14:08:15 2009 -0500 @@ -34,6 +34,7 @@ public void initializeDefaultPreferences() { IPreferenceStore store = ProjectUIPlugin.getDefault().getPreferenceStore(); store.setDefault(PreferenceConstants.PREF_KEEP_PROJECTS_IN_SYNC, true); + store.setDefault(PreferenceConstants.PREF_INDEX_ALL, false); } } diff -r 83c1dc10c047 -r 87e439e53c32 project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/project/ui/utils/ProjectUIUtils.java --- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/project/ui/utils/ProjectUIUtils.java Mon Jun 15 14:07:22 2009 -0500 +++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/project/ui/utils/ProjectUIUtils.java Mon Jun 15 14:08:15 2009 -0500 @@ -84,4 +84,22 @@ public static void setChangedFilesInProjectOption(int option) { ProjectUIPlugin.setChangedFilesInProjectOption(option); } + + /** + * Returns the preference option for whether or not to index all source files + * or just those of the build components + * @return the option + */ + public static boolean getIndexAllOption() { + return ProjectUIPlugin.getIndexAllOption(); + } + + /** + * Sets the preference option for whether or not to index all source files + * or just those of the build components + * @param option true to enable the feature, false to disable + */ + public static void setIndexAllOption(boolean option) { + ProjectUIPlugin.setIndexAllOption(option); + } }