# HG changeset patch # User timkelly # Date 1282315164 18000 # Node ID 0142fe025ce616e801dd59988febffaf78b6966f # Parent e3bac873e5c885dcce850564ff8ce401a76e6b9f# Parent 63d0f74e878ecd036b69d2f9782baecb1f3b2e56 merge from default diff -r e3bac873e5c8 -r 0142fe025ce6 carbidesdk/com.nokia.carbide.cpp.sdk-feature/feature.xml --- a/carbidesdk/com.nokia.carbide.cpp.sdk-feature/feature.xml Thu Aug 19 16:56:56 2010 -0500 +++ b/carbidesdk/com.nokia.carbide.cpp.sdk-feature/feature.xml Fri Aug 20 09:39:24 2010 -0500 @@ -312,12 +312,6 @@ - - - - - - discoveryAgents; private ListenerList listeners; + private ListenerList toggleServicesListeners; private static final String IGNORE_AGENT_LOAD_ERRORS_KEY = "ignoreAgentLoadErrors"; //$NON-NLS-1$ private static final String AGENT_STATE_KEY_PREFIX = "agentState."; //$NON-NLS-1$ + private static final String SHOULD_TEST_SERVICES_PREF_ID = "shouldTestServices"; //$NON-NLS-1$ /** * The constructor */ public RemoteConnectionsActivator() { listeners = new ListenerList(); + toggleServicesListeners = new ListenerList(); } public void start(BundleContext context) throws Exception { @@ -120,7 +125,8 @@ Registry instance = Registry.instance(); instance.loadExtensions(); instance.loadConnections(); - + fireToggleServicesTestingListener(getShouldTestServices()); + new WhenWorkbenchIsVisibleThread(new Runnable() { public void run() { if (!ignoreAgentLoadErrors()) @@ -343,4 +349,38 @@ listener.agentsAreLoaded(); } } + + public boolean getShouldTestServices() { + IEclipsePreferences eclipsePreferences = new InstanceScope().getNode(PLUGIN_ID); + return eclipsePreferences.getBoolean(SHOULD_TEST_SERVICES_PREF_ID, true); + } + + public void setShouldTestServices(boolean shouldTest) { + boolean currentState = getShouldTestServices(); + if (shouldTest == currentState) + return; + fireToggleServicesTestingListener(shouldTest); + try { + IEclipsePreferences eclipsePreferences = new InstanceScope().getNode(PLUGIN_ID); + eclipsePreferences.putBoolean(SHOULD_TEST_SERVICES_PREF_ID, shouldTest); + eclipsePreferences.flush(); + } catch (BackingStoreException e) { + logError(e); + } + } + + public void addToggleServicesTestingListener(IToggleServicesTestingListener listener) { + toggleServicesListeners.add(listener); + } + + public void removeToggleServicesTestingListener(IToggleServicesTestingListener listener) { + toggleServicesListeners.remove(listener); + } + + private void fireToggleServicesTestingListener(boolean enabled) { + for (IToggleServicesTestingListener listener : toggleServicesListeners) { + listener.servicesTestingToggled(enabled); + } + } + } diff -r e3bac873e5c8 -r 0142fe025ce6 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/AbstractConnectedService2.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/AbstractConnectedService2.java Thu Aug 19 16:56:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/interfaces/AbstractConnectedService2.java Fri Aug 20 09:39:24 2010 -0500 @@ -197,14 +197,14 @@ return ServiceTester.getInstance().isRegistered(this); } - public void setEnabled(boolean enabled) { + public void setEnabled(boolean enable) { if (!service.isTestable()) return; - if (enabled && !isEnabled()) { + if (enable && !isEnabled()) { Check.checkState(connection.getSettings() != null); ServiceTester.getInstance().register(this); } - else if (!enabled && isEnabled()) { + else if (!enable) { ServiceTester.getInstance().unregister(this); currentStatus.setEStatus(EStatus.UNKNOWN, Messages.getString("AbstractConnectedService.NoTestingLabel"), //$NON-NLS-1$ diff -r e3bac873e5c8 -r 0142fe025ce6 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/api/IToggleServicesTestingListener.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/api/IToggleServicesTestingListener.java Fri Aug 20 09:39:24 2010 -0500 @@ -0,0 +1,23 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +package com.nokia.carbide.remoteconnections.internal.api; + +public interface IToggleServicesTestingListener { + + void servicesTestingToggled(boolean enabled); + +} diff -r e3bac873e5c8 -r 0142fe025ce6 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/registry/Registry.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/registry/Registry.java Thu Aug 19 16:56:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/registry/Registry.java Fri Aug 20 09:39:24 2010 -0500 @@ -31,6 +31,7 @@ import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Map.Entry; import java.util.Set; import java.util.TreeSet; import java.util.UUID; @@ -59,6 +60,7 @@ import com.nokia.carbide.remoteconnections.interfaces.IService; import com.nokia.carbide.remoteconnections.interfaces.AbstractConnection.ConnectionStatus; import com.nokia.carbide.remoteconnections.internal.api.IConnection2; +import com.nokia.carbide.remoteconnections.internal.api.IToggleServicesTestingListener; import com.nokia.carbide.remoteconnections.internal.api.IConnection2.IConnectionStatus; import com.nokia.carbide.remoteconnections.internal.api.IConnection2.IConnectionStatusChangedListener; import com.nokia.carbide.remoteconnections.internal.api.IConnection2.IConnectionStatus.EConnectionStatus; @@ -119,6 +121,11 @@ loadServiceExtensions(); loadConnectedServiceFactoryExtensions(); mapConnectionTypeToServices(); + RemoteConnectionsActivator.getDefault().addToggleServicesTestingListener(new IToggleServicesTestingListener() { + public void servicesTestingToggled(boolean enabled) { + setShouldTestServices(enabled); + } + }); } private void loadConnectedServiceFactoryExtensions() { @@ -338,6 +345,9 @@ fireConnectionAdded(connection); setLastConnectionId(connection.getIdentifier()); + for (IConnectedService connectedService : connectedServices) { + connectedService.setEnabled(RemoteConnectionsActivator.getDefault().getShouldTestServices()); + } } private void ensureUniqueId(IConnection connection) { @@ -690,4 +700,12 @@ return; RemoteConnectionsActivator.getDefault().getPreferenceStore().setValue(LAST_CONNECTION_ID, id); } + + private void setShouldTestServices(boolean shouldTest) { + for (Entry> entry : connectionToConnectedServices.entrySet()) { + for (IConnectedService connectedService : entry.getValue()) { + connectedService.setEnabled(shouldTest); + } + } + } } \ No newline at end of file diff -r e3bac873e5c8 -r 0142fe025ce6 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/ui/ConnectionStatusSelectorContribution.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/ui/ConnectionStatusSelectorContribution.java Thu Aug 19 16:56:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/internal/ui/ConnectionStatusSelectorContribution.java Fri Aug 20 09:39:24 2010 -0500 @@ -330,6 +330,20 @@ openConnectionsView(); } }); + + new MenuItem(menu, SWT.SEPARATOR); + + final MenuItem toggleServicesTestingItem = new MenuItem(menu, SWT.CHECK); + toggleServicesTestingItem.setText(Messages.getString("ConnectionStatusSelectorContribution.TestServicesMenuLabel")); //$NON-NLS-1$ + toggleServicesTestingItem.setSelection(RemoteConnectionsActivator.getDefault().getShouldTestServices()); + toggleServicesTestingItem.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + boolean state = !RemoteConnectionsActivator.getDefault().getShouldTestServices(); + RemoteConnectionsActivator.getDefault().setShouldTestServices(state); + toggleServicesTestingItem.setSelection(state); + } + }); } /** diff -r e3bac873e5c8 -r 0142fe025ce6 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/messages.properties --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/messages.properties Thu Aug 19 16:56:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/messages.properties Fri Aug 20 09:39:24 2010 -0500 @@ -1,5 +1,5 @@ -AbstractConnectedService.UserDisabledMessage=User disabled active status testing -AbstractConnectedService.NoTestingLabel=Not testing service +AbstractConnectedService.UserDisabledMessage=Not testing service +AbstractConnectedService.NoTestingLabel=Unknown AbstractImportExportPage.BrowseButtonLabel=Browse... AbstractImportExportPage.ConnectionColumnLabel=Connection AbstractImportExportPage.TypeColumnLabel=Type @@ -64,6 +64,7 @@ ConnectionsView.StatusColumnHeader=Status ConnectionsView.EnableTestActionLabel=Enable Service Testing ConnectionsView.DisableTestActionLabel=Disable Service Testing +ConnectionsView.ToggleServicesLabel=Toggle periodic service testing ConnectionsView.TypeColumnHeader=Type ConnectionsView.InUseLabel=In use ConnectionsView.InUseDesc=At least one service is using this connection @@ -85,6 +86,7 @@ ConnectionStatusSelectorContribution.NoDynamicOrManualConnectionsTooltip=No current connection selected. ConnectionStatusSelectorContribution.NotInUse=Not in use ConnectionStatusSelectorContribution.StatusFormat=Connection is {0}: {1} +ConnectionStatusSelectorContribution.TestServicesMenuLabel=Test services DeviceDiscoveryPrequisiteErrorDialog_Description=At least one device discovery agent had load errors that prevent it from discovering connections to devices. Select one to get more information about its error. DeviceDiscoveryPrequisiteErrorDialog_DontAskAgainLabel=Don't ask again DeviceDiscoveryPrequisiteErrorDialog_DontAskAgainToolTipText=Check this to ignore further discovery agent load errors diff -r e3bac873e5c8 -r 0142fe025ce6 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/settings/ui/ConnectionSettingsPage.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/settings/ui/ConnectionSettingsPage.java Thu Aug 19 16:56:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/settings/ui/ConnectionSettingsPage.java Fri Aug 20 09:39:24 2010 -0500 @@ -1071,7 +1071,7 @@ private String getInitialNameText() { IConnection connectionToEdit = settingsWizard.getConnectionToEdit(); if (connectionToEdit != null) { - generatedName = ""; + generatedName = ""; //$NON-NLS-1$ return connectionToEdit.getDisplayName(); } diff -r e3bac873e5c8 -r 0142fe025ce6 connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/view/ConnectionsView.java --- a/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/view/ConnectionsView.java Thu Aug 19 16:56:56 2010 -0500 +++ b/connectivity/com.nokia.carbide.remoteConnections/src/com/nokia/carbide/remoteconnections/view/ConnectionsView.java Fri Aug 20 09:39:24 2010 -0500 @@ -89,6 +89,7 @@ import com.nokia.carbide.remoteconnections.interfaces.IConnectionsManager.IConnectionsManagerListener; import com.nokia.carbide.remoteconnections.internal.ToggleDiscoveryAgentAction; import com.nokia.carbide.remoteconnections.internal.api.IConnection2; +import com.nokia.carbide.remoteconnections.internal.api.IToggleServicesTestingListener; import com.nokia.carbide.remoteconnections.internal.api.IConnection2.IConnectionStatus; import com.nokia.carbide.remoteconnections.internal.api.IConnection2.IConnectionStatus.EConnectionStatus; import com.nokia.carbide.remoteconnections.internal.api.IConnection2.IConnectionStatusChangedListener; @@ -110,6 +111,7 @@ private TreeViewer viewer; private IConnectionsManagerListener connectionStoreChangedListener; private IConnectionListener connectionListener; + private IToggleServicesTestingListener toggleServicesTestingListener; private Map serviceToListenerMap; private Map connectionToListenerMap; private List actions; @@ -121,6 +123,7 @@ private static final ImageDescriptor CONNECTION_NEW_IMGDESC = RemoteConnectionsActivator.getImageDescriptor("icons/connectionNew.png"); //$NON-NLS-1$ private static final ImageDescriptor CONNECTION_EDIT_IMGDESC = RemoteConnectionsActivator.getImageDescriptor("icons/connectionEdit.png"); //$NON-NLS-1$ private static final ImageDescriptor SERVICE_TEST_IMGDESC = RemoteConnectionsActivator.getImageDescriptor("icons/serviceTest.png"); //$NON-NLS-1$ + private static final ImageDescriptor SERVICE_TEST_DISABLED_IMGDESC = RemoteConnectionsActivator.getImageDescriptor("icons/serviceTest_No.png"); //$NON-NLS-1$ private static final ImageDescriptor CONNECTION_REFRESH_IMGDESC = RemoteConnectionsActivator.getImageDescriptor("icons/connectionRefresh.png"); //$NON-NLS-1$ private static final String NEW_ACTION = "ConnectionsView.new"; //$NON-NLS-1$ @@ -131,6 +134,7 @@ private static final String DELETE_ACTION = "ConnectionsView.delete"; //$NON-NLS-1$ private static final String HELP_ACTION = "ConnectionsView.help"; //$NON-NLS-1$ private static final String SET_CURRENT_ACTION = "ConnectionsView.makeCurrent"; //$NON-NLS-1$ + private static final String TOGGLE_SERVICES_ACTION = "ConnectionsView.toggleServices"; //$NON-NLS-1$ private KeyAdapter keyListener; private boolean isDisposed; @@ -175,7 +179,6 @@ }; connectedService.addStatusChangedListener(statusChangedListener); serviceToListenerMap.put(connectedService, statusChangedListener); - connectedService.setEnabled(true); serviceNodes.add(treeNode); } for (TreeNode serviceNode : serviceNodes) { @@ -456,7 +459,8 @@ @Override public boolean isEnabled() { IConnectedService connectedService = getSelectedConnectedService(); - return connectedService != null && connectedService.getService().isTestable(); + return connectedService != null && connectedService.getService().isTestable() && + RemoteConnectionsActivator.getDefault().getShouldTestServices(); } } @@ -533,10 +537,12 @@ wizard.open(getViewSite().getShell()); } else if (value instanceof IConnectedService) { - IConnectedService connectedService = (IConnectedService) value; - connectedService.setEnabled(true); - connectedService.testStatus(); - ((EnableConnectedServiceAction) getAction(ENABLE_SERVICE_ACTION)).updateLabel(); + if (RemoteConnectionsActivator.getDefault().getShouldTestServices()) { + IConnectedService connectedService = (IConnectedService) value; + connectedService.setEnabled(true); + connectedService.testStatus(); + ((EnableConnectedServiceAction) getAction(ENABLE_SERVICE_ACTION)).updateLabel(); + } } } } @@ -690,6 +696,7 @@ } private void fillLocalToolBar(IToolBarManager manager) { + manager.add(getAction(TOGGLE_SERVICES_ACTION)); manager.add(getAction(REFRESH_ACTION)); manager.add(getAction(NEW_ACTION)); manager.add(getAction(EDIT_ACTION)); @@ -778,6 +785,7 @@ }; action.setAccelerator(SWT.F5); action.setId(REFRESH_ACTION); + action.setEnabled(RemoteConnectionsActivator.getDefault().getShouldTestServices()); actions.add(action); action = new Action(Messages.getString("ConnectionsView.DeleteActionLabel"), //$NON-NLS-1$ @@ -861,10 +869,32 @@ actions.add(action); connectionSelectedActions.add(action); + action = new Action(Messages.getString("ConnectionsView.ToggleServicesLabel"), IAction.AS_CHECK_BOX) { //$NON-NLS-1$ + public void setChecked(boolean checked) { + if (isChecked() != checked) { + super.setChecked(checked); + RemoteConnectionsActivator.getDefault().setShouldTestServices(checked); + setImageDescriptor(checked ? SERVICE_TEST_IMGDESC : SERVICE_TEST_DISABLED_IMGDESC); + } + }; + }; + action.setId(TOGGLE_SERVICES_ACTION); + action.setChecked(RemoteConnectionsActivator.getDefault().getShouldTestServices()); + action.setImageDescriptor(action.isChecked() ? SERVICE_TEST_IMGDESC : SERVICE_TEST_DISABLED_IMGDESC); + actions.add(action); + enableConnectionSelectedActions(false); enableServiceSelectedActions(false); makeToggleDiscoveryAgentActions(); + + toggleServicesTestingListener = new IToggleServicesTestingListener() { + public void servicesTestingToggled(boolean enabled) { + getAction(TOGGLE_SERVICES_ACTION).setChecked(enabled); + getAction(REFRESH_ACTION).setEnabled(enabled); + } + }; + RemoteConnectionsActivator.getDefault().addToggleServicesTestingListener(toggleServicesTestingListener); } private void makeToggleDiscoveryAgentActions() { @@ -931,24 +961,12 @@ connectionToListenerMap.clear(); } - private void disableAllConnectedServices() { - Collection connections = - Registry.instance().getConnections(); - for (IConnection connection : connections) { - Collection connectedServicesForConnection = - Registry.instance().getConnectedServices(connection); - for (IConnectedService connectedService : connectedServicesForConnection) { - connectedService.setEnabled(false); - } - } - } - @Override public void dispose() { removeStatusListeners(); Registry.instance().removeConnectionStoreChangedListener(connectionStoreChangedListener); Registry.instance().removeConnectionListener(connectionListener); - disableAllConnectedServices(); + RemoteConnectionsActivator.getDefault().removeToggleServicesTestingListener(toggleServicesTestingListener); isDisposed = true; super.dispose(); } diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp-feature/feature.xml --- a/core/com.nokia.carbide.cpp-feature/feature.xml Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp-feature/feature.xml Fri Aug 20 09:39:24 2010 -0500 @@ -12,7 +12,7 @@ - Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. + Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/html/cheatsheets/how_to_customize_cmd_group.xml --- a/core/com.nokia.carbide.cpp.doc.user/html/cheatsheets/how_to_customize_cmd_group.xml Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/cheatsheets/how_to_customize_cmd_group.xml Fri Aug 20 09:39:24 2010 -0500 @@ -1,17 +1,45 @@ -` - Intro text + title="Customize Command Groups"> +` + + To control which commands appear on toolbars and menus, use the Customize Perspective dialog. + + title="Open the Customize Perspective dialog"> + - one - + The Customize Perspective provides management of the command groups and the items that appear on the toolbar and menus within each group. - - + + + + Body + + + + + Body + + + + + Body + + + + + Body + + diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/html/cheatsheets/how_to_customize_code_styles.xml --- a/core/com.nokia.carbide.cpp.doc.user/html/cheatsheets/how_to_customize_code_styles.xml Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/cheatsheets/how_to_customize_code_styles.xml Fri Aug 20 09:39:24 2010 -0500 @@ -3,14 +3,17 @@ ` - Intro text + + To control the automatic formatting of your source code, use the Code Style preference panel. + + title="Customize code styles"> - one + Use the Preferences > C/C++ > Code Style preference panel to select a code style profile to format source files. - - + diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/html/cheatsheets/how_to_customize_editors.xml --- a/core/com.nokia.carbide.cpp.doc.user/html/cheatsheets/how_to_customize_editors.xml Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/cheatsheets/how_to_customize_editors.xml Fri Aug 20 09:39:24 2010 -0500 @@ -3,14 +3,100 @@ ` - Intro text + + To control the appearance of your source code, use the Editor related preference panels. + - - - one - - - - + + + Under the Editor preference panel to control the appearance of text highlighting in C/C++ editors. + + + + + + Use the Content Assist preference panel to customize the Content Assist feature in C/C++ editors. + + + + + + Use the Folding preference panel to customize the C/C++ editor folding behavior. + + + + + + Use the Hovers preference panel to customize the C/C++ editor hover behavior. + + + + + + Use the Mark Occurrences preference panel to set annotations for the C/C++ Editor view. + + + + + + Use the Save Actions preference panel to configure actions performed by the C/C++ editor while saving a file. + + + + + + Use the Scalability preference panel to configure options for dealing with large source files. + + + + + + Use the Syntax Coloring preference panel to specify how C/C++ source code is rendered. + + + + + + Use the Templates preference panel to manipulate any of the common templates predefined within CDT or create your own. + + + + + + Use the Typing preference panel to assist in formatting input as you type. + + + diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/html/cheatsheets/how_to_customize_export_settings.xml --- a/core/com.nokia.carbide.cpp.doc.user/html/cheatsheets/how_to_customize_export_settings.xml Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/cheatsheets/how_to_customize_export_settings.xml Fri Aug 20 09:39:24 2010 -0500 @@ -2,16 +2,33 @@ -` - Intro text +` + + Use the Export menu option to export your customized settings. Once exported you can then import them to other workspaces or share with your team members so everyone uses the same settings. + + title="Share your Custom Settings"> - one + Under the File > Export menu option to open the Export wizard and save your customized settings. + - - + + + + Select the General > Installed Feature Configuration option and click Next. + + + + + In the Export Installed Features Confguration choose one or more installed features, then click Finish. + + diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/html/cheatsheets/how_to_customize_key_commands.xml --- a/core/com.nokia.carbide.cpp.doc.user/html/cheatsheets/how_to_customize_key_commands.xml Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/cheatsheets/how_to_customize_key_commands.xml Fri Aug 20 09:39:24 2010 -0500 @@ -3,14 +3,17 @@ ` - Intro text + + To manage the key bindings available while developing, use the Keys preference panel. + + title="Customize key bindings"> - one + Open the Preferences > General > Keys preference panel to change the key commands used in Carbide. Choose from a preset theme or modify the current one to better suit your requirements. - - + diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/html/cheatsheets/stop_mode_cs.xml --- a/core/com.nokia.carbide.cpp.doc.user/html/cheatsheets/stop_mode_cs.xml Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/cheatsheets/stop_mode_cs.xml Fri Aug 20 09:39:24 2010 -0500 @@ -13,7 +13,7 @@ - + Define debug launch configurations for the selected project. diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/html/concepts/arm_registers.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/concepts/arm_registers.htm Thu Aug 19 16:56:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ - - - - - - -ARM Registers - - - -

ARM Registers

-

Registers are the register contents of the central processing unit (CPU) of the targeted device. When debugging projects on a device, only the target device registers are visible, for example the ARM registers. The ARM microprocessor has 16 general-purpose registers. THUMB has eight general-purpose registers, R0-R7, and access to the high registers, R8-R15. Note that registers R0 through R3 hold the first four words of incoming arguments. The microprocessor constructs remaining arguments in the calling function's argument build area, which does not provide space into which R0 through R3 can be spilled.

-

Three registers are best left for special uses. These are:

-
    -
  • R13 for stack operations
  • -
  • R14 is the link register (it is used for storing return addresses in the construction of sub routines)
  • -
  • R15 is the program counter (PC)
  • -
-

In most cases, the contents of all the registers can be modified. However, when debugging applications on a target device with Application TRK, you cannot change the LR, SP, and CPSR registers.

-

NOTE When opening the Registers view, the list of available registers will vary depending upon the target devices being debugged.

-

-

Figure 1 - ARM Registers

-
Related concepts
- -
Related tasks
- -
Related references
- - - - - diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/html/concepts/concepts.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/concepts/concepts.htm Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/concepts/concepts.htm Fri Aug 20 09:39:24 2010 -0500 @@ -41,6 +41,7 @@
  • SDK Support
  • Software Configuration Management
  • Symbols, .pkg
  • +
  • Target Communication Framework (TCF)
  • Workspace Information
  • diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/html/concepts/fpu_registers.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/concepts/fpu_registers.htm Thu Aug 19 16:56:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ - - - - - - -FPU Registers - - - -

    FPU Registers

    -

    The FPU Registers are the register contents of the floating-point unit (FPU) of the host computer. The exact listing of these registers depends on the host FPU and current build target.

    -
    Related concepts
    - -
    Related tasks
    - -
    Related references
    - - - - - diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/html/concepts/general_registers.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/concepts/general_registers.htm Thu Aug 19 16:56:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ - - - - - - -General Registers - - - -

    General Registers

    -

    The General Registers are the register contents of the central processing unit (CPU) of the host computer. The exact listing of these registers depends on the host CPU and current build target.

    -
    Related concepts
    - -
    Related tasks
    - -
    Related references
    - - - - - diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/html/concepts/host_registers.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/concepts/host_registers.htm Thu Aug 19 16:56:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ - - - - - - -Host Registers - - - -

    Host-specific Registers

    -

    The Registers view also lists additional register contents for registers specific to the host. The exact listing of these registers depends on the host computer and current build target.

    -
    Related concepts
    - -
    Related tasks
    - -
    Related references
    - - - - - diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/html/concepts/registers.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/concepts/registers.htm Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/concepts/registers.htm Fri Aug 20 09:39:24 2010 -0500 @@ -9,7 +9,13 @@

    Registers

    -

    Registers are the register contents of the central processing unit (CPU) of the host computer or the targeted device. When debugging projects using the emulator, only the host computer x86 registers are visible in the Registers view. When debugging projects on a device, only the target device registers are visible.

    +

    Use the Registers view to view the general and specific registers central processing unit (CPU) of the host computer. The exact listing of these registers depends on the host CPU and current build target.

    + +

    General registers

    +

    Registers are the register contents of the central processing unit (CPU) of the host computer or the targeted device. When debugging projects using the emulator, only the host computer x86 registers are visible in the Registers view. When debugging projects on a device, only the target device registers are visible.

    In most cases, the contents of all the registers can be modified. However, when debugging applications on a target device with Application TRK, you cannot change the LR and SP registers.

    Figure 1. Registers view with possible register types

    @@ -22,6 +28,17 @@
  • host-specific—additional register contents for registers specific to the host (for example ARM registers)
  • NOTE When opening the Registers view, the list of available registers will vary depending upon the target devices being debugged.

    +

    ARM registers

    +

    The ARM microprocessor has 16 general-purpose registers. THUMB has eight general-purpose registers, R0-R7, and access to the high registers, R8-R15. Note that registers R0 through R3 hold the first four words of incoming arguments. The microprocessor constructs remaining arguments in the calling function's argument build area, which does not provide space into which R0 through R3 can be spilled.

    +

    Three registers are best left for special uses. These are:

    +
      +
    • R13 for stack operations
    • +
    • R14 is the link register (it is used for storing return addresses in the construction of sub routines)
    • +
    • R15 is the program counter (PC)
    • +
    +

    In most cases, the contents of all the registers can be modified. However, when debugging applications on a target device with Application TRK, you cannot change the LR, SP, and CPSR registers.

    +

    +

    Figure 2 - ARM Registers

    Other references
    • Registers view
    • diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/html/concepts/tcf.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.cpp.doc.user/html/concepts/tcf.htm Fri Aug 20 09:39:24 2010 -0500 @@ -0,0 +1,24 @@ + + + + + + +Target Communication Framework (TCF) + + + +

      Target Communication Framework (TCF)

      +

      TCF (Target Communication Framework) is a vendor-neutral, lightweight, extensible network protocol used mainly for communicating with embedded systems (targets). Its most distinguishing feature is that TCF is designed to transparently plug in value-adding servers between the tool and the target. TCF is protocol agnostic in that it does not depend on a specific transport like TCP/IP, serial, SSH tunnel, or other. It also supports auto-discovery of targets and services, so any tool can determine which services are available from the target.

      +

      Carbide.c++ uses TCF to communicate with TRK, Trace, and other services on a target device. For example, the Carbide debugger uses TCF to communicate with the TRK remote agent to control debuggable programs running on the target. Other Carbide plug-ins can also use TCF to communicate with their specific services.

      +
      Related tasks
      + +
      + + +
      + + diff -r e3bac873e5c8 -r 0142fe025ce6 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 Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/context_help/carbide_debug_dialogs_help.xml Fri Aug 20 09:39:24 2010 -0500 @@ -258,14 +258,6 @@ - - - Specify the settings for Trace32 debugging. - - - - - Specify the ROM image details. @@ -307,12 +299,6 @@ - - Specify Trace32 configuration information. - - - - Specify TRK connection information. @@ -327,14 +313,12 @@ Specify ROM image information. - Define startup options and ROM image download information. - diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/html/projects/launch/customizing_launch_configs.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/projects/launch/customizing_launch_configs.htm Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/projects/launch/customizing_launch_configs.htm Fri Aug 20 09:39:24 2010 -0500 @@ -58,7 +58,7 @@
    • Environment (Eclipse)
    • Debugger
    • Executables
    • -
    • x86 Exceptions
    • +
    • x86 Exceptions
    • Arguments (Eclipse)
    • Source (Eclipse)
    • Common (Eclipse)
    • diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/html/projects/launch/emulation.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/projects/launch/emulation.htm Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/projects/launch/emulation.htm Fri Aug 20 09:39:24 2010 -0500 @@ -20,7 +20,7 @@
    • The Environment tab (standard CDT page) defines the environment variable values to use when running or debugging a program. By default, the environment is inherited from the Eclipse runtime. You may override or append to the inherited environment.
    • The Debugger tab provides common debugger options for the project.
    • The Executables tab allows you to specify which executables are debugged by your project.
    • -
    • The x86 Exceptions tab lists all the x86 exceptions that the debugger can catch.
    • +
    • The x86 Exceptions tab lists all the x86 exceptions that the debugger can catch.
    • The Source tab (standard CDT page) defines the location of source files used to display source when debugging an application. By default, these settings are derived from the associated project's build path. You may override these settings here.
    • The Common tab (standard CDT page) defines general information about the launch configuration. You may choose to store the launch configuration in a specific file and specify which perspectives become active when the launch configuration is launched.
    diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/html/projects/launch/images/page_exceptions.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/launch/images/page_exceptions.png has changed diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/html/projects/launch/images/page_x86_exceptions.png Binary file core/com.nokia.carbide.cpp.doc.user/html/projects/launch/images/page_x86_exceptions.png has changed diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/html/projects/launch/page_exceptions.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/projects/launch/page_exceptions.htm Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/projects/launch/page_exceptions.htm Fri Aug 20 09:39:24 2010 -0500 @@ -4,31 +4,43 @@ -Carbide x86 Exceptions page +Carbide Exceptions page -

    x86 Exceptions page

    -

    Use the x86 Exceptions page in the Emulation launch configuration to set the x86 exceptions the debugger should catch. If you want the debugger to catch all the exceptions, enable all of the options in this page. However, if you prefer to handle only certain exceptions, enable only those options that reflect the exceptions you want to handle.

    -

    -

    Figure 1 - x86 Exceptions page

    -
    Table 1. x86 Exceptions page —items
    - +

    Exceptions page (stop mode)

    +

    Use the Exceptions page in stop mode launch configurations enables you to control how stop threads are handled.

    +

    Exceptions page

    +

    Figure 1 - Exceptions page (stop-mode)

    +
    Table 1. Exceptions page —items
    +
    - - + + - - + + - - + + - - + +
    ItemExplanationItemExplanation
    Exceptions to catch Click to enable by exception which x86 exceptions the debugger should catch. Stop thread on panic

    Choose one of the options below to handle panic exceptions:

    +
      +
    • Only threads being debugged
    • +
    • Any threads
    • +
    Check All Enables catching all exceptions.Stop thread on software exception

    Choose one of the options below to handle software exceptions:

    +
      +
    • Only threads being debugged
    • +
    • Any threads
    • +
    Clear All Disables catching all exceptions.Stop thread on hardware exception

    Choose one of the options below to handle hardware exceptions:

    +
      +
    • Only threads being debugged
    • +
    • Any threads
    • +

    Other references

    diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/html/projects/launch/page_x86_exceptions.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.cpp.doc.user/html/projects/launch/page_x86_exceptions.htm Fri Aug 20 09:39:24 2010 -0500 @@ -0,0 +1,41 @@ + + + + + + +Carbide x86 Exceptions page + + + +

    x86 Exceptions page

    +

    Use the x86 Exceptions page in the Emulation launch configuration to set the x86 exceptions the debugger should catch. If you want the debugger to catch all the exceptions, enable all of the options in this page. However, if you prefer to handle only certain exceptions, enable only those options that reflect the exceptions you want to handle.

    +

    +

    Figure 1 - x86 Exceptions page

    +
    Table 1. x86 Exceptions page —items
    + + + + + + + + + + + + + + + + + +
    ItemExplanation
    Exceptions to catch Click to enable by exception which x86 exceptions the debugger should catch.
    Check All Enables catching all exceptions.
    Clear All Disables catching all exceptions.
    +

    Other references

    + + +
     
    + + diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/html/projects/launch/pages_overview.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/projects/launch/pages_overview.htm Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/projects/launch/pages_overview.htm Fri Aug 20 09:39:24 2010 -0500 @@ -19,7 +19,7 @@
  • Main
  • ROM Image
  • ROM Log
  • -
  • x86 Exceptions
  • +
  • x86 Exceptions
  • Source (standard CDT page)
  • Common (standard CDT page)
  • diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/html/reference/images/icon_periodic_testing.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/icon_periodic_testing.png has changed diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/html/reference/images/view_remote_connections.png Binary file core/com.nokia.carbide.cpp.doc.user/html/reference/images/view_remote_connections.png has changed diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/html/reference/trk/view_remote_connection.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/trk/view_remote_connection.htm Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/trk/view_remote_connection.htm Fri Aug 20 09:39:24 2010 -0500 @@ -39,13 +39,18 @@

    Figure 2. Available remote connection trim indicator

    Remote Connections view toolbar icons

    The following commands appear on the toolbar within the Remote Connections view:

    - +
    + + + + +
    Item Icon Explanation
    Toggle periodic service testing
    Periodic testing icon
    Toggles service testing on or off.
    Refresh Connections
    @@ -69,7 +74,7 @@

    Remote Connections view Status icons

    The following status indicators appear in the Remote Connections view:

    - +
    @@ -100,8 +105,7 @@ +
    Item IconNot Accessible
    -
    -
    Cannot access the connection type within the connection setup.
    @@ -109,7 +113,7 @@

    Based on the current selection, one or more of the following commands appear on the context menu when you right-click within the Remote Connections view. For example, if no connections are defined, only the New Connection command is available on the context menu.

    Figure 3 - Remote Connections context menu

    - +
    diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/html/reference/view_carbide_portal.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/reference/view_carbide_portal.htm Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/view_carbide_portal.htm Fri Aug 20 09:39:24 2010 -0500 @@ -4,12 +4,12 @@ -Carbide Portal view +Carbide.c++ Portal view -

    Carbide Portal view

    -

    The Carbide Portal view provides a single point of information on Carbide news, new releases, additional extensions, and support. The Carbide Portal view is shown by clicking Help > Carbide Portal.

    +

    Carbide.c++ Portal view

    +

    The Carbide.c++ Portal view provides a single point of information on Carbide news, new releases, additional extensions, and support. The Carbide.c++ Portal view is shown by clicking Help > Carbide.c++ Portal.

    Figure 1. Install Extensions page in the Carbide Portal view

    Click on the Show Overview icon (Show Overview) icon to show an information popup with additional information on the selected plug-in.

    diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/html/reference/view_sym_os_data_chunks.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/view_sym_os_data_chunks.htm Fri Aug 20 09:39:24 2010 -0500 @@ -0,0 +1,44 @@ + + + + + + +Symbian OS Data: Chunks + + + + +

    Symbian OS Data view: Chunks

    +

    The Symbian OS Data view displays the processes and threads for the suspended debug session based on the selection in the Debug view. Read-only data is displayed for ARM build configurations. Data to be viewed includes:

    + +

    NOTE Information for the Chunks and Libraries tabs is not available when debugging with the TRK debug agent.

    +
    +

    Chunks

    +

    Chunks are an area of contiguous linear memory. It is the unit of memory allocation where a region of RAM is mapped into contiguous logical addresses. Chunks are allocated during boot for such things as the Kernel's data and stack.

    +

    The Chunks tab (Figure 4) provides a flat list of corresponding kernel objects. The list will display “sortable” attributes of that type of object in columns. The “sortable attribute” means you can sort the list by that attribute. For example, you may want to sort the list by the owning process name. Sort the list of any column by clicking on the column header.

    +

    NOTE Chunks data is not available during TRK debugging.

    +

    +

    Figure 4. Chunks Pane of Symbian OS View

    +

    Attaching to a Process

    +

    If you double click on a thread item in the Thread tab, or right-click and choose Debug, the owning process of the thread will be attached. The thread with an attached process will appear in bold. You can also select a thread and click the bug icon in the Symbian OS Data toolbar. You can also view properties for the attached process by clicking the "Show properties of the selected item" icon () in the Symbian OS Data toolbar or right-click the thread and choose Properties.

    +

    NOTE If an executable is not part of a project in the workspace use the Executables view to import an executable to make it visible to the debugger. Once included in the Executables list, the symbolics for that executable can be loaded and breakpoints resolved and hit. Open a source file in an editor view or use the Breakpoints view to verify that the executable breakpoints have been resolved.

    +

    IMPORTANT In stop mode debugging when debugging multiple processes at the same time, selecting a process in the Debug pane and clicking Terminate disconnects the attached process on the board, leaving all other processes running. It does not terminate the debug session. However, if there is only one debug process when you click Terminate the CPU is suspended until the next debug session.

    +

    WARNING Detaching from a system process or any process not initiated by the program you are attempting to debug may cause the device to stop working, forcing a restart of the device.

    +

    +
    Other references
    + + + + + diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/html/reference/view_sym_os_data_libs.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/view_sym_os_data_libs.htm Fri Aug 20 09:39:24 2010 -0500 @@ -0,0 +1,44 @@ + + + + + + +Symbian OS Data: Libraries + + + + +

    Symbian OS Data view: Libraries

    +

    The Symbian OS Data view displays the processes and threads for the suspended debug session based on the selection in the Debug view. Read-only data is displayed for ARM build configurations.

    +

    Data to be viewed includes:

    + +

    NOTE Information for the Chunks and Libraries tabs is not available when debugging with the TRK debug agent.

    +
    +

    Libraries Tab

    +

    The Libraries pane (Figure 5) in the Symbian OS view provides information on libraries in the Symbian OS residing on the target.

    +

    NOTE Library data is not available during TRK debugging.

    +

    +

    Figure 5. Libraries Pane of Symbian OS view

    +

    Attaching to a Process

    +

    If you double click on a thread item in the Thread tab, or right-click and choose Debug, the owning process of the thread will be attached. The thread with an attached process will appear in bold. You can also select a thread and click the bug icon in the Symbian OS Data toolbar. You can also view properties for the attached process by clicking the "Show properties of the selected item" icon () in the Symbian OS Data toolbar or right-click the thread and choose Properties.

    +

    NOTE If an executable is not part of a project in the workspace use the Executables view to import an executable to make it visible to the debugger. Once included in the Executables list, the symbolics for that executable can be loaded and breakpoints resolved and hit. Open a source file in an editor view or use the Breakpoints view to verify that the executable breakpoints have been resolved.

    +

    IMPORTANT In stop mode debugging when debugging multiple processes at the same time, selecting a process in the Debug pane and clicking Terminate disconnects the attached process on the board, leaving all other processes running. It does not terminate the debug session. However, if there is only one debug process when you click Terminate the CPU is suspended until the next debug session.

    +

    WARNING Detaching from a system process or any process not initiated by the program you are attempting to debug may cause the device to stop working, forcing a restart of the device.

    +

    +
    Other references
    + + + + + diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/html/reference/view_sym_os_data_overview.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/view_sym_os_data_overview.htm Fri Aug 20 09:39:24 2010 -0500 @@ -0,0 +1,114 @@ + + + + + + +Symbian OS Data: Overview + + + + +

    Symbian OS Data view: Overview

    +

    The Symbian OS Data view displays the processes and threads for the suspended debug session based on the selection in the Debug view. Read-only data is displayed for ARM build configurations. To open the Symbian OS Data view select Window > Show View > Symbian OS Data when the Debug perspective is visible or select Window > Show View > Other..., then expand the Carbide.c++ folder and select Symbian OS Data when the Carbide C/C++ perspective is visible. Click Ok to display the Symbian OS Data window (Figure 1).

    +

    NOTE The Symbian OS Data view works with the debugger and will only display data during a live debug session. The Symbian OS Data view is not supported for emulator debugging, and will not show anything during emulator debug.

    +

    The Symbian OS Data view reveals kernel data in the Symbian OS running on the device being debugged. The kernel data displayed is always that of the device with the currently selected thread or process in Debug view. If you are debugging two devices at the same time, the content of the view will change when focus is switched from a thread on one device to a thread on another device. The kernel data includes more than just processes and threads.

    +

    For the stop mode debugger and the crash debugger, all the data listed above is supported. For the Application and System TRK debuggers, the chunks and libraries views are not supported. The Symbian OS Data view is not supported for the emulator debugger and will show nothing during an emulator debug session. During a stop mode debug session or a TRK debug session, you are able to select a process or a thread in the Symbian OS Data view and attach the debugger to it for source level debugging if the binary is listed in the Executables view. Binaries listed in the Executable view can be source level debugged. Binaries not listed in the Executables view can only be assembly code debugged in the Disassembly view.

    +

    NOTE Any executable must be included in the Executables view before it can be debugged.

    +

    When the Time interval for auto-refreshing OS View option is enabled (which is on by default except for crash debugger), the data in the Symbian OS Data view will be auto-refreshed. Note that "auto-refresh" has a different meaning in different debuggers. During a stop mode debug session, the view will refresh data whenever the debugged program on the device is stopped and shows data as stale (greyed out) when the program is running. During a TRK debug session, the View will refresh data at a time interval regardless of whether the debugged program is stopped or not. The time interval is specified by an option in the Carbide.c++ global preference panel, which is five seconds by default.

    +

    When auto-refresh is turned off, the debugger will not automatically refresh data in the View and will show the data as stale (greyed out). However you can manually refresh the data by clicking on the "Refresh" button in the View. Usually you may want to turn off the auto-refresh if you think it is slowing down your debug operations such as stepping.

    +

    Symbian OS Data pages +

    +

    The Symbian OS Data view consists of five tabs. Each tabbed pane is described below. In all panes, the Name Filter field is a standard Eclipse UI control that allows you to find an item by filtering out items by name using wildcards (*, ?) and camel case naming conventions. Camel case refers to using mixed case multiple names merged together in coding like SecInvInit and DosServer. In all panes, you can select an item and view its properties (attributes). In panes with columns you can click a column title to toggle between ascending and descending sorting.

    +

    Data to be viewed includes:

    + +

    NOTE Information for the Chunks and Libraries tabs is not available when debugging with the TRK debug agent.

    +

    Overview Tab

    +

    This tab (shown in Figure 1) provides a tree view of ownership of all processes, threads, and chunks in the OS. + In contrast, the other tabs provide a flat list of corresponding kernel objects such as process, thread, chunk, library, etc.

    +

    +

    Figure 1. Symbian OS Data view

    +
    Table 1 - Symbian OS Data view toolbar buttons
    +
    Item Icon
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ButtonIconFunction

    Refresh data

    Click this button to force a refresh of data in the view. Use the Carbide.c++ Debugger preference panel Time interval for auto-refreshing OS View option to control the automatic refreshing of data.

    Enable/disable auto-refresh

    Click this button to turn on/off auto refresh of data.

    Debug process or thread

    Click the Debug button to attach to the process and debug the selected process or thread. Or right-click an item and choose Debug. This applies to both TRK (run mode) and TCF (stop mode).

    +

    Properties

    Click this button to show properties of currently selected item in the Properties view. Or right-click an item and choose Properties.

    Timer

    Click this button to define the time interval for auto-refreshing data. This applies to run mode debugging only.

    Collapse All
    Click the Collaps All command to collapse all of the currently elements in the view.
    +

    Processes

    +

    The Processes tab (Figure 2) provides a flat list of corresponding kernel objects. +Click a column title to sort the list by the title attribute in alternating ascending and descending order. For example, you may choose to sort the process list by Name, ID, or by Priority.

    +

    +

    Figure 2. Processes Pane of Symbian OS View

    +

    The process(es) being debugged will be shown in bold font. You can debug (attach debugger to) any process in the Processes tab by selecting it and clicking the "Debug" button or just by double clicking on it. In that case a new process item will show up in the Debug View if the process is not being debugged. Otherwise, you will get a message saying it's already under debug.

    +

    Threads

    +

    The Threads tab (Figure 3) provides a flat list of corresponding kernel objects. The list will display “sortable” attributes of that type of object in columns. The “sortable attribute” means you can sort the list by that attribute. For example, you may want to sort the list by the owning process name. Sort the list of any column by clicking on the column header. The thread(s) being debugged will be shown in bold font.

    +

    NOTE You can debug (attach debugger to) any thread in the Thread tab by double clicking on it or selecting it and clicking the Debug button. In that case, a new thread item will show up in Debug view if the thread is not being debugged.

    +

    +

    Figure 3. Threads Pane of Symbian OS View

    +

    Chunks

    +

    Chunks are an area of contiguous linear memory. It is the unit of memory allocation where a region of RAM is mapped into contiguous logical addresses. Chunks are allocated during boot for such things as the Kernel's data and stack.

    +

    The Chunks tab (Figure 4) provides a flat list of corresponding kernel objects. The list will display “sortable” attributes of that type of object in columns. The “sortable attribute” means you can sort the list by that attribute. For example, you may want to sort the list by the owning process name. Sort the list of any column by clicking on the column header.

    +

    NOTE Chunks data is not available during TRK debugging.

    +

    +

    Figure 4. Chunks Pane of Symbian OS View

    +

    Libraries Tab

    +

    The Libraries pane (Figure 5) in the Symbian OS view provides information on libraries in the Symbian OS residing on the target.

    +

    NOTE Library data is not available during TRK debugging.

    +

    +

    Figure 5. Libraries Pane of Symbian OS View

    +

    Attaching to a Process

    +

    If you double click on a thread item in the Thread tab, or right-click and choose Debug, the owning process of the thread will be attached. The thread with an attached process will appear in bold. You can also select a thread and click the bug icon in the Symbian OS Data toolbar. You can also view properties for the attached process by clicking the "Show properties of the selected item" icon () in the Symbian OS Data toolbar or right-click the thread and choose Properties.

    +

    NOTE If an executable is not part of a project in the workspace use the Executables view to import an executable to make it visible to the debugger. Once included in the Executables list, the symbolics for that executable can be loaded and breakpoints resolved and hit. Open a source file in an editor view or use the Breakpoints view to verify that the executable breakpoints have been resolved.

    +

    IMPORTANT In stop mode debugging when debugging multiple processes at the same time, selecting a process in the Debug pane and clicking Terminate disconnects the attached process on the board, leaving all other processes running. It does not terminate the debug session. However, if there is only one debug process when you click Terminate the CPU is suspended until the next debug session.

    +

    WARNING Detaching from a system process or any process not initiated by the program you are attempting to debug may cause the device to stop working, forcing a restart of the device.

    +

    +
    Other references
    + + + + + diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/html/reference/view_sym_os_data_process.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/view_sym_os_data_process.htm Fri Aug 20 09:39:24 2010 -0500 @@ -0,0 +1,37 @@ + + + + + + +Symbian OS Data: Process + + + + +

    Symbian OS Data view: Process

    +

    The Symbian OS Data view displays the processes and threads for the suspended debug session based on the selection in the Debug view. Read-only data is displayed for ARM build configurations. Data to be viewed includes:

    + +
    +

    Processes

    +

    The Processes tab (Figure 2) provides a flat list of corresponding kernel objects. +Click a column title to sort the list by the title attribute in alternating ascending and descending order. For example, you may choose to sort the process list by Name, ID, or by Priority.

    +

    +

    Figure 2. Processes Pane of Symbian OS view

    +

    The process(es) being debugged will be shown in bold font. You can debug (attach debugger to) any process in the Processes tab by selecting it and clicking the "Debug" button or just by double clicking on it. In that case a new process item will show up in the Debug View if the process is not being debugged. Otherwise, you will get a message saying it's already under debug.

    +

    Other references

    + + + + + diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/html/reference/view_sym_os_data_threads.htm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.cpp.doc.user/html/reference/view_sym_os_data_threads.htm Fri Aug 20 09:39:24 2010 -0500 @@ -0,0 +1,36 @@ + + + + + + +Symbian OS Data: Threads + + + + +

    Symbian OS Data view: Threads

    +

    The Symbian OS Data view displays the processes and threads for the suspended debug session based on the selection in the Debug view. Read-only data is displayed for ARM build configurations. Data to be viewed includes:

    + +
    +

    Threads

    +

    The Threads tab (Figure 3) provides a flat list of corresponding kernel objects. The list will display “sortable” attributes of that type of object in columns. The “sortable attribute” means you can sort the list by that attribute. For example, you may want to sort the list by the owning process name. Sort the list of any column by clicking on the column header. The thread(s) being debugged will be shown in bold font.

    +

    NOTE You can debug (attach debugger to) any thread in the Thread tab by double clicking on it or selecting it and clicking the Debug button. In that case, a new thread item will show up in Debug view if the thread is not being debugged.

    +

    +

    Figure 3. Threads Pane of Symbian OS view

    +

    Other references

    + + + + + diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/soft_attach_debug.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/soft_attach_debug.htm Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/soft_attach_debug.htm Fri Aug 20 09:39:24 2010 -0500 @@ -74,18 +74,9 @@
  • In the New Launch Configuration page
    1. Enable the "Open launch configuration for additional customization of launch settings" option
    2. -
    3. Click Finish
    4. +
    5. Click Finish
  • -
  • In the Debug > Symbian OS Trace 32 > New_Configuration > Connection tab -
      -
    1. Enable the "View messages between Carbide and Trace32"
    2. -
    3. Click Debug
    4. -
    -
  • -

    If the View messages between Carbide and Trace32 option is enabled, the Console view will show the communications between the debugger and the hardware (Figure 1). If you do not see the messages, verify that the Trace32 Communications Log is the active log view.

    -

    -

    Figure 1. Debugger log showing .cmm file being used to initialize hardware

  • Once the debugger connects to the hardware it will halt the hardware at a random memory address (Figure 2). Press Resume in the Debug view to begin debugging.
  • Figure 2. Debugger stopping at a random address using soft attach

    diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/stop_mode_debug.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/stop_mode_debug.htm Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/stop_mode_debug.htm Fri Aug 20 09:39:24 2010 -0500 @@ -15,7 +15,7 @@
  • Create project or Import the project's bld.inf file into Carbide.c++
  • Specify your ROM build settings for the selected project
  • Build your Project with the ARMV5 Debug Build Configuration
  • -
  • Create a launch configuration for Trace32
  • +
  • Create a launch configuration
  • Launch the debugger
  • With stop mode debugging you can use the Carbide.c++ IDE and a JTAG interface to communicate between the debugger and a board to debug any target type within the Symbian OS.

    @@ -28,7 +28,6 @@
    Related Tasks
    diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/stop_mode_debug_jtag.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/stop_mode_debug_jtag.htm Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/stop_mode_debug_jtag.htm Fri Aug 20 09:39:24 2010 -0500 @@ -1,49 +1,49 @@ - - - - - -Stop Mode On-Device Debugging - - - -

    Installing JTAG

    -
    -

    Install the JTAG Software

    -
    Using Lauterbach Hardware
    -
      -
    1. Program Lauterbach with Proper License
    2. -

      You will need a Trace32 (Lauterbach), a USB cable, and a Lauterbach power supply. You will need to program the Lauterbach with licenses for the particular processors you will be targeting.

      -

      Older Lauterbachs have Xscale for Lubbock and ARM9 for H2/Renesas licenses installed on them already. Newer Lauterbachs should have ARM9 for H2/Renesas and ARM11 for H4 licenses installed on them already. If you don’t have the proper license installed on the Lauterbach for the processor you want to work with, you will receive an error when launching a debug session.

      -
    3. Run the Trace32 Installer -
        -
      • Run the Setup.bat file. During installation select the following options:

        - Product Type: In-Circuit Debugger
        - ICD interface Type: USB Interface
        - Selection of license for new software: License key not necessary
        - CPU selection: ICD ARM7 ARM9 ARM10 ARM11 ICD XSCALE
      • -
      -
    4. -
    5. Install the USB Drivers
    6. -
        -
      1. Place a Trace32 CD into the host machine.
      2. -
      3. Plug in the USB connector from the Lauterbach into the host machine.
      4. -
      5. Once the host machine detects the connection, install the drivers from the CD.
      6. -
      -
    7. Copy Trace32 License File to T32 Folder
    8. -

      The newer Lauterbachs require a license file in the T32 folder. Copy the trace32 license file called license.t32 to your C:\T32 folder.

      - -
    9. Copy Trace32 Configuration File
    10. -

      For H4 board: Copy the trace32 configuration file for the non-ARM11 processor, called config_arm11.t32, to your C:\T32 folder. You can also modify the default config_arm11.t32 file. This file needs to be modified to specify the port number and also enable T32 to support debugger commands outside T32. Carbide.c++ provides specific T32 config files in the support folder. The default config file will be called carbideconfig.t32.

      -
    11. Set up the Board
    12. -

      Power up the board. You should now be able to download the image.

      -
    -
    -
    Related Tasks
    - - - - + + + + + +Stop Mode On-Device Debugging + + + +

    Installing JTAG

    +
    +

    Install the JTAG Software

    +
    Using Lauterbach Hardware
    +
      +
    1. Program Lauterbach with Proper License
    2. +

      You will need a Lauterbach, a USB cable, and a Lauterbach power supply. You will need to program the Lauterbach with licenses for the particular processors you will be targeting.

      +

      Older Lauterbachs have Xscale for Lubbock and ARM9 for H2/Renesas licenses installed on them already. Newer Lauterbachs should have ARM9 for H2/Renesas and ARM11 for H4 licenses installed on them already. If you don’t have the proper license installed on the Lauterbach for the processor you want to work with, you will receive an error when launching a debug session.

      +
    3. Run the Trace32 Installer +
        +
      • Run the Setup.bat file. During installation select the following options:

        + Product Type: In-Circuit Debugger
        + ICD interface Type: USB Interface
        + Selection of license for new software: License key not necessary
        + CPU selection: ICD ARM7 ARM9 ARM10 ARM11 ICD XSCALE
      • +
      +
    4. +
    5. Install the USB Drivers
    6. +
        +
      1. Place a Trace32 CD into the host machine.
      2. +
      3. Plug in the USB connector from the Lauterbach into the host machine.
      4. +
      5. Once the host machine detects the connection, install the drivers from the CD.
      6. +
      +
    7. Copy Trace32 License File to T32 Folder
    8. +

      The newer Lauterbachs require a license file in the T32 folder. Copy the trace32 license file called license.t32 to your C:\T32 folder.

      + +
    9. Copy Trace32 Configuration File
    10. +

      For H4 board: Copy the trace32 configuration file for the non-ARM11 processor, called config_arm11.t32, to your C:\T32 folder. You can also modify the default config_arm11.t32 file. This file needs to be modified to specify the port number and also enable T32 to support debugger commands outside T32. Carbide.c++ provides specific T32 config files in the support folder. The default config file will be called carbideconfig.t32.

      +
    11. Set up the Board
    12. +

      Power up the board. You should now be able to download the image.

      +
    +
    +
    Related Tasks
    + + + + diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/stop_mode_debug_launchcfg.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/stop_mode_debug_launchcfg.htm Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/stop_mode_debug_launchcfg.htm Fri Aug 20 09:39:24 2010 -0500 @@ -5,17 +5,6 @@ Stop Mode On-Device Debugging -

    Defining a Stop Mode Debug Configuration

    @@ -46,7 +35,7 @@

    Click Debug after all the preference panels have been set. The Debug window closes and the Carbide.c++ debugger begins a debugging session using the new configuration. The next time you click the Debug icon, this debug launch configuration is used to start a debug session.

  • Define Main Tab Settings
  • The Main pane shown in Figure 2 defines the project to be launched on the target device. Table 1 defines the fields.

    -

    +

    Figure 2 - Debug Window - Main Tab

    Table 1. Main pane

    @@ -55,11 +44,11 @@ - + - + @@ -75,16 +64,12 @@ - - - - @@ -124,40 +103,31 @@ - + - + +

    Target Initialization File

    +

    Memory Configuration File

    +

    Reset target at the start of each debug session

    - + - - - - - - - + - + - - diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/stop_mode_debug_precond.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/stop_mode_debug_precond.htm Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/debugger/stop_mode_debug_precond.htm Fri Aug 20 09:39:24 2010 -0500 @@ -16,16 +16,12 @@
  • Install the GCCE or RVCT 2.2 or greater compiler (not included with Carbide.c++).
  • Install the TechView Devkit
  • Install Board Support Package (BSP) for your target board
  • -
  • Install JTAG software and drivers for Trace32 support
  • +
  • Install JTAG software and drivers
  • Connect JTAG interface between PC and hardware
  • Verify that your SDK or customer kit is recognized in the SDK preferences panel.
  • Build your ROM Image
  • -
    Related Tasks
    - diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/prj_debug_config.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/prj_debug_config.htm Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/prj_debug_config.htm Fri Aug 20 09:39:24 2010 -0500 @@ -72,7 +72,7 @@
  • Environment (Eclipse)
  • Debugger
  • Executables
  • -
  • x86 Exceptions
  • +
  • x86 Exceptions
  • Arguments (Eclipse)
  • Source (Eclipse)
  • Common (Eclipse)
  • diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/prj_debug_rom.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/prj_debug_rom.htm Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/projects/prj_debug_rom.htm Fri Aug 20 09:39:24 2010 -0500 @@ -17,9 +17,6 @@

    NOTE You cannot debug ROM DLLs using Application TRK.

    -
    Other references
    - diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/html/tasks/start/carbide_requirements.htm --- a/core/com.nokia.carbide.cpp.doc.user/html/tasks/start/carbide_requirements.htm Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/html/tasks/start/carbide_requirements.htm Fri Aug 20 09:39:24 2010 -0500 @@ -14,44 +14,37 @@ Carbide.c++ you have (see Table 1). Further, if you use an OS devkit, it must use SBSv2.

    Table 1. Support packages used for development with each Carbide.c++ Editions
    -
    Explanation
    ProjectProject

    The project to associate with this debug launch configuration. Click Browse to select a different project.

    ExecutableExecutable This is the name of the executable that is linked to the project. Click Browse to select a different executable.
    Explanation
    - - +

    Trace32 Executable

    Specify the path to the Trace32 executable. The default path assumes that the Trace32 executable is installed in the default location: C:\T32\T32marm.exe.

    - - +

    Trace32 Configuration File

    Specify the path to the config.t32 file or other custom configuration file. The default path assumes that the Trace32 configuration file is installed in the default location: C:\T32\config.t32.

    For arm11 processors copy the trace32 configuration file for non-ARM11 processor (config_arm11.t32) to your C:\T32 folder and specify it in the edit box.

    @@ -95,20 +80,14 @@ PORT=20000

    - - +

    - Trace32 Initialization Script

    Specify the path to the initialization cmm file. This script will be run in T32 after connecting to T32. You can specify your own scripts for the targets used.

    - - +

    - View messages between Carbide and Trace32

    Enable to log communications with Trace32 to the console window.
    Explanation
    Break at entry pointBreak at entry point

    When checked, break at the specified entry point entered in the text field. For .EXE targets, the default entry point is set to E32Main. By default, the Break at entry point option is unchecked for all other target types.

    Target Processor Target Processor A drop down with a list of all supported processors. The process selection should help in determining the memory model. This will in turn help determine the base address and the offsets for the Symbian OS kernel aware information.
    - - - -

    Target Initialization File

    Check this box to have the debugger run an initialization script when the debug session starts. For example, if a target device requires initialization for the debugger to be able to read and write memory or registers, you can specify an initialization script here. Click Browse to select a script file using a standard file selection dialog box.

    When using T32, most of the initialization is done in the CMM script file. With other debug protocols you specify the initialization file, which can be run after connecting to the target.

    - - - -

    Memory Configuration File

    Controls whether the debugger uses a memory configuration file when a debug session starts. The Carbide debugger uses this configuration file to know which memory is accessible, readable, and writable on the target.
    - - - -

    Reset target at the start of each debug session

    Forces the Carbide IDE to reset the target at the start of each debug session. This ensures that the debugging session uses the most up-to-date program code.

    Default Instructon Set

    Default Instructon Set

    Specifies the default instruction set to use if the debugger cannot determine the processor mode in order to set breakpoints and to disassemble code. This can happen at addresses for which we have no symbolic information. The debugger uses the mode when setting breakpoints and disassembling code. The options are:

    • Auto (examine code at current PC location)
    • @@ -178,105 +148,63 @@
    Explanation
    - - +

    - Start Address

    Enter the physical address in memory where the Symbian OS start code begins execution. This address is target-specific. The address should be in hexadecimal format with the 0x prefix. For example, 0x8000000 is a valid entry.

    NOTE The address entered in this field must match the start address specified in the source code used to build the Symbian OS ROM image to be debugged. The Start address must match the Download address.

    - - +

    - Debug from Start address

    Select this option to have the debugger halt the program at the address specified in Start Address once the target initialization is done and the OS is downloaded; if the user has chosen to download the OS. You can then step through start-up code or run the target in bare-board mode.
    - - +

    - - Run from start address

    Select this option to have the debugger start the code at the address specified in Start Address once the target initialization is done. If you have breakpoints set, the debugger stops at the first breakpoint encountered. You can click the Break button to halt the device.
    - - +

    - - - Symbian ROM Log file

    Check the Parse ROM Log File option and specify the information that the debugger needs in order to show detailed stack information, set breakpoints, and show source level debugging information for ROM images. In the first text field, browse to or enter the full path and name of the log file that corresponds to the ROM image on the target device. This log file is generated by default when the ROM image is built.
    - - +

    - - Symbian OS Kit EPOC32 Directory

    Specifies the epoc32 directory in which the ROM image and log files are stored. Since the log file may not contain full paths to the ROM components on the host PC, you need to enter this epoc32 directory.

    NOTE Always include the epoc32 folder in this path.

    - - +

    - - - - Log unresolved modules

    Check this box to have the debugger output a list of components from the specified ROMBUILD log file that do not have debugger symbolic information. The list is displayed in the debugger console window at the beginning of the debug session.

    NOTE You cannot perform source-level debugging on components that do not include symbolic information.

    - - -

    - - - - - Debug non-XIP Executables

    +

    Debug non-XIP Executables

    Check this box to debug a project, or a dynamically loaded module, that is loaded from NAND-Flash or other removable media (MMC, memory stick, etc.) at run time and executed in RAM. Use this option to debug modules that work fine when executed in place as part of the ROM image, but sometimes fail when placed in NAND-Flash or other removable media.

    NOTE Selecting this option will affect debugging performance. When the debugger needs to load a module (DLL, EXE, etc.) it will stop the target, read information from it, then restart it.

    - - -

    - - - - Symbian ROM Image

    +

    Symbian ROM Image

    Controls the logging of communication with Trace32. Enable to log communications with Trace32 to the console window.
    - - +

    Download Address (hex)

    Enter the physical address in memory at which the debugger should place the ROM image. This address is target-specific. The address should be in hexadecimal format with the 0x prefix. For example, 0x000FFF00 is a valid entry.

    NOTE The address entered in this field must match the download address specified in the source code used to build the Symbian OS ROM image to be debugged. If you leave this field blank, the debugger does not download the ROM image to the device at the beginning of the debug session. The Download address must match the Start address.

    - - +

    Ask for download at the start of each debug session

    Check this box to have the debugger display a dialog box at the beginning of every debug session that lets you choose whether or not you want the debugger to download the ROM image to the device.
    +
    - - + - + - - - - +

    Debugger: Emulators, on-device debugging

    Carbide.c++

    Support Packages
    +

    Carbide.c++

    Support Packages
    Used for Software Development
    What You Can Do...What You Can Do...

    An SDK or OS developer kit (DevKit) including:

    +

    An SDK or OS developer kit (DevKit) including:

    • 9.x or higher for Platform Security

    Targets: Symbian ^3, S60 5th Ed., Qt

    -

    Debugger: Emulators, on-device debugging

    -

    UI Designer: create graphical interfaces quickly using standard UI components

    Targets: Symbian ^3, S60 5th Ed., Qt

    -

    Debugger: Emulators, on-device debugging, device debugging in ROM, kernel debugging

    -

    Performance Investigator: application performance data, memory usage, power usage, button event reporting

    Table 2. System Requirements
    - +
    - - + +

    NOTE The larger your project the more RAM may be required to maximize efficiency and operational speed.

    +

    NOTE If you experience any VM issues, see the Tips & Hints page for info on modifying Carbide's default memory setup.

    + @@ -74,17 +67,18 @@ -
  • Symbian Connect software -

    Software that communicates between a PC and a target device. For example, Ovi Suite.

    +
  • Ovi Suite software +

    Software that communicates between a PC and a target device. For example, Ovi Suite.

  • +
  • 1 GB for Carbide.c++
  • +
  • Up to 3.0 GB for each SDK installation
  • + +

    NOTE Avoid the use of encrypted disk software as it can significantly slow down the development process.

    Hardware
      +
    Hardware
    • x86-based personal computer
    • -
    • 2GHz
    • -
    • 1GB of RAM minimum, recommend 2GB or more
    • -
    • CD-ROM drive
    • +
    • 2GHz or faster CPU
    • +
    • 2GB of RAM or more recommended, 1GB minimum
    -
    Operating System

    Microsoft® Windows® XP (Service Pack 2/3) recommended, Microsoft® Windows® 7 supported

    -

    NOTE While Carbide.c++ supports many different OS configurations, only the ones listed here provide for optimal Symbian development.

    -

    NOTE If you experience any VM issues, see the Tips & Hints page for info on modifying Carbide's default memory setup.

    Other Software
    Disk Space
      -
    • 800 MB for Carbide.c++
    • -
    • Up to 2.0 GB for each SDK installation
    • -

    References

    diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/index.xml --- a/core/com.nokia.carbide.cpp.doc.user/index.xml Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/index.xml Fri Aug 20 09:39:24 2010 -0500 @@ -672,10 +672,6 @@ - - - - diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/plugin.xml --- a/core/com.nokia.carbide.cpp.doc.user/plugin.xml Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/plugin.xml Fri Aug 20 09:39:24 2010 -0500 @@ -47,13 +47,6 @@ - - @@ -68,15 +61,22 @@ + + @@ -111,13 +111,13 @@ contentFile="html/cheatsheets/stop_mode_cs.xml" id="com.nokia.carbide.cpp.doc.user.stop_mode" name="Stop Mode On-Device Debugging" /> + - + category="com.nokia.carbide.ide.cheatsheets" + composite="false" + contentFile="$nl$/html/cheatsheets/getStarted_cs.xml" + id="com.nokia.carbide.cpp.doc.user.cheatsheet1176819414" + name="Creating and debugging an application project" /> diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.doc.user/tocCarbide.xml --- a/core/com.nokia.carbide.cpp.doc.user/tocCarbide.xml Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.doc.user/tocCarbide.xml Fri Aug 20 09:39:24 2010 -0500 @@ -60,7 +60,7 @@ - + @@ -83,12 +83,9 @@ - - - - + @@ -217,7 +214,7 @@ - + @@ -282,11 +279,9 @@ --> - - - + @@ -297,8 +292,6 @@ - - diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.featureTracker/src/com/nokia/carbide/cpp/internal/featureTracker/FeatureUseTrackerConsts.java --- a/core/com.nokia.carbide.cpp.featureTracker/src/com/nokia/carbide/cpp/internal/featureTracker/FeatureUseTrackerConsts.java Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.featureTracker/src/com/nokia/carbide/cpp/internal/featureTracker/FeatureUseTrackerConsts.java Fri Aug 20 09:39:24 2010 -0500 @@ -16,12 +16,9 @@ public class FeatureUseTrackerConsts { public static final String CARBIDE_APP_TRK = "Carbide_App_TRK"; - public static final String CARBIDE_CUSTKITS = "Carbide_CustKits"; // deprecated public static final String CARBIDE_UI_DESIGNER = "Carbide_UI_Designer"; - public static final String CARBIDE_KERNELAWARE = "Carbide_KernelAware"; // symbian os data view public static final String CARBIDE_SYS_TRK = "Carbide_Sys_TRK"; public static final String CARBIDE_PROFILER = "Carbide_Profiler"; - public static final String CARBIDE_APPDEP = "Carbide_AppDep"; // dependency explorer public static final String CARBIDE_CODESCANNER = "Carbide_CodeScanner"; public static final String CARBIDE_OST_TRACE = "Carbide_OST_Trace"; public static final String CARBIDE_IDE = "Carbide_IDE"; // did user launch IDE diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.cpp.featureTracker/src/com/nokia/carbide/cpp/internal/featureTracker/FeatureUseTrackerProxy.java --- a/core/com.nokia.carbide.cpp.featureTracker/src/com/nokia/carbide/cpp/internal/featureTracker/FeatureUseTrackerProxy.java Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.cpp.featureTracker/src/com/nokia/carbide/cpp/internal/featureTracker/FeatureUseTrackerProxy.java Fri Aug 20 09:39:24 2010 -0500 @@ -13,6 +13,9 @@ package com.nokia.carbide.cpp.internal.featureTracker; +import java.util.ArrayList; +import java.util.List; + import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.core.runtime.IExtension; @@ -24,7 +27,6 @@ /** * Proxy to a client implementing the 'featureUseTracker' extension point. - * There can only be one client registered as a time to this extension. * */ public class FeatureUseTrackerProxy implements IFeatureUseTracker { @@ -32,40 +34,31 @@ public static final String FEATURE_USE_EXTENSION_ID = FeatureUseTrackerPlugin.PLUGIN_ID + ".featureUseTracker"; //$NON-NLS-1$ - private IFeatureUseTracker featureClient; + private List featureClients = new ArrayList(); private boolean featureClientInited; public void startUsingFeature(String featureName) { - if (featureClient == null && featureClientInited) { - return; // no client plug-in installed, do nothing because we've all ready checked - - } else if (featureClient == null) { - featureClient = checkForFeatureExtension(); + if (!featureClientInited) { + checkForClients(); featureClientInited = true; } - if (featureClient != null) { - featureClient.startUsingFeature(featureName); + for (IFeatureUseTracker client : featureClients) { + client.startUsingFeature(featureName); } - } public void stopUsingFeature(String featureName) { - if (featureClient == null) { - return; // no feature client, nothing to do - } else { - featureClient.stopUsingFeature(featureName); + for (IFeatureUseTracker client : featureClients) { + client.stopUsingFeature(featureName); } - } /** - * Find clients of the 'featureUseTracker' extension point and return the first one - * @return the first client that is found implementing IFeatureUseTracker + * Find clients of the 'featureUseTracker' extension point */ - private IFeatureUseTracker checkForFeatureExtension() { + private void checkForClients() { - IFeatureUseTracker result = null; IExtensionRegistry er = Platform.getExtensionRegistry(); IExtensionPoint ep = er.getExtensionPoint(FEATURE_USE_EXTENSION_ID); IExtension[] extensions = ep.getExtensions(); @@ -80,22 +73,15 @@ if (providerElement.getAttribute("class") != null) { //$NON-NLS-1$ try { - result = (IFeatureUseTracker) providerElement - .createExecutableExtension("class"); //$NON-NLS-1$ + featureClients.add((IFeatureUseTracker) providerElement + .createExecutableExtension("class")); //$NON-NLS-1$ } catch (CoreException e) { // ignore - // e.printStackTrace(); } - return result; - } - } - } } - return result; - } } diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.discovery.ui/icons/icon-discovery_exp.png Binary file core/com.nokia.carbide.discovery.ui/icons/icon-discovery_exp.png has changed diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.discovery.ui/icons/install_wiz.gif Binary file core/com.nokia.carbide.discovery.ui/icons/install_wiz.gif has changed diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.discovery.ui/icons/iu_obj.gif Binary file core/com.nokia.carbide.discovery.ui/icons/iu_obj.gif has changed diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.discovery.ui/plugin.properties --- a/core/com.nokia.carbide.discovery.ui/plugin.properties Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.discovery.ui/plugin.properties Fri Aug 20 09:39:24 2010 -0500 @@ -1,9 +1,11 @@ -view.name=Install Extensions -menu.title=Carbide Portal -portal.desc=Install extensions, get support, install SDKs, find latest news +view.name = Install Extensions +menu.title = Carbide.c++ Portal +portal.desc = Install extensions, get support, install SDKs, find latest news customize.title = Customize home.title = Home support.title = Support install.layer.title = Install Extensions wrenchscience.title = Wrench Science -creatingcarbide.title = Creating Carbide \ No newline at end of file +creatingcarbide.title = Creating Carbide +Export.desc = Export a set of installed features to a file that can be imported from a different installation +Import.desc = Import a set of installed features from an exported file and perform installation of the features \ No newline at end of file diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.discovery.ui/plugin.xml --- a/core/com.nokia.carbide.discovery.ui/plugin.xml Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.discovery.ui/plugin.xml Fri Aug 20 09:39:24 2010 -0500 @@ -138,5 +138,31 @@ version="1.0.0"> + + + + %Export.desc + + + + + + + %Import.desc + + + diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/discovery/ui/Messages.java --- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/discovery/ui/Messages.java Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/discovery/ui/Messages.java Fri Aug 20 09:39:24 2010 -0500 @@ -31,6 +31,7 @@ public static String AbstractBrowserPortalPageLayer_OpenLocationLabel; public static String AbstractBrowserPortalPageLayer_OpenLocationTitle; public static String AbstractBrowserPortalPageLayer_ShowInBrowserLabel; + public static String AbstractBrowserPortalPageLayer_URLDisplayError; public static String AbstractBrowserPortalPageLayer_URLLabel; public static String AbstractDiscoveryPortalPageLayer_AdvancedInstallActionLabel; public static String AbstractDiscoveryPortalPageLayer_CheckAllActionLabel; @@ -39,13 +40,60 @@ public static String AbstractDiscoveryPortalPageLayer_GatheringInstallInfoDesc; public static String AbstractDiscoveryPortalPageLayer_InstallActionLabel; public static String AbstractDiscoveryPortalPageLayer_InstallActionTooltip; + public static String AbstractDiscoveryPortalPageLayer_P2InstallWizardOpenError; public static String AbstractDiscoveryPortalPageLayer_RefreshActionLabel; public static String AbstractDiscoveryPortalPageLayer_Title; public static String AbstractDiscoveryPortalPageLayer_UncheckAllActionLabel; + public static String AbstractImportExportPage_BrowseButtonLabel; + public static String AbstractImportExportPage_CheckAllLabel; + public static String AbstractImportExportPage_CheckNoneLabel; + public static String AbstractImportExportPage_FeatureColTitle; + public static String AbstractImportExportPage_VersionColTitle; + public static String AbstractRSSPortalPageLayer_GettingFeedJobTitle; public static String AbstractRSSPortalPageLayer_ReturnToFeedLabel; public static String AbstractRSSPortalPageLayer_RSSReadError; public static String Activator_GetProxyInfoJobTitle; public static String Activator_MissingConfigURLError; + public static String ExportPage_BrowseGroupLabel; + public static String ExportPage_Description; + public static String ExportPage_FileDialogText; + public static String ExportPage_FileOverwriteWarning; + public static String ExportPage_GetFeaturesJobName; + public static String ExportPage_NoFeaturesError; + public static String ExportPage_NoFeaturesSelectedError; + public static String ExportPage_NoFileError; + public static String ExportPage_Title; + public static String ExportPage_ViewerGroupLabel; + public static String ExportWizard_ErrorTitle; + public static String ExportWizard_Title; + public static String ExportWizard_WriteFileError; + public static String FeatureInstallOperation_ConfiguringTaskName; + public static String FeatureInstallOperation_IdLabel; + public static String FeatureInstallOperation_MissingFeaturesError; + public static String FeatureInstallOperation_VersionLabel; + public static String ImportPage_AllFilesFilterName; + public static String ImportPage_BrowseGroupLabel; + public static String ImportPage_Description; + public static String ImportPage_FileDialogText; + public static String ImportPage_NoFeaturesSelectedError; + public static String ImportPage_NoValidFeaturesInFileError; + public static String ImportPage_NoValidFileError; + public static String ImportPage_NoValidReposInFileError; + public static String ImportPage_OriginalVersionCheckLabel; + public static String ImportPage_ReadFileError; + public static String ImportPage_ReadFileJobName; + public static String ImportPage_Title; + public static String ImportPage_ViewerGroupLabel; + public static String ImportPage_XMLFileFilterName; + public static String ImportWizard_AllInstalledMessage; + public static String ImportWizard_AllInstalledTitle; + public static String ImportWizard_ErrorTitle; + public static String ImportWizard_ImportFailedError; + public static String ImportWizard_InstallErrorSimple; + public static String ImportWizard_Title; + public static String InstallExtensionsPortalExtension_ExportActionLabel; + public static String InstallExtensionsPortalExtension_ImportActionLabel; + public static String InstallExtensionsPortalExtension_MigrateTitle; public static String PortalEditor_BadCommandBarFactoryError; public static String PortalEditor_Name; public static String PortalEditor_NoLayersError; @@ -57,6 +105,10 @@ public static String SettingsBarCreator_KeyBindingsActionLabel; public static String SettingsBarCreator_ProxiesActionLabel; public static String SettingsBarCreator_Title; + public static String SimpleRSSReader_BadURLError; + public static String Streamer_BadURIError; + public static String Streamer_BadVersionError; + public static String Streamer_VersionParseError; static { // initialize resource bundle NLS.initializeMessages(BUNDLE_NAME, Messages.class); diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/discovery/ui/messages.properties --- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/discovery/ui/messages.properties Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/discovery/ui/messages.properties Fri Aug 20 09:39:24 2010 -0500 @@ -9,23 +9,71 @@ AbstractBrowserPortalPageLayer_OpenLocationLabel=Open location AbstractBrowserPortalPageLayer_OpenLocationTitle=Open Location AbstractBrowserPortalPageLayer_ShowInBrowserLabel=Show in browser +AbstractBrowserPortalPageLayer_URLDisplayError=Could not display URL in browser: AbstractBrowserPortalPageLayer_URLLabel=URL: AbstractDiscoveryPortalPageLayer_AdvancedInstallActionLabel=Advanced install... -AbstractDiscoveryPortalPageLayer_CheckAllActionLabel=Check all -AbstractDiscoveryPortalPageLayer_CheckedItemsStatusMessage={0} item(s) checked +AbstractDiscoveryPortalPageLayer_CheckAllActionLabel=Select all +AbstractDiscoveryPortalPageLayer_CheckedItemsStatusMessage={0} item(s) selected AbstractDiscoveryPortalPageLayer_GatheringExtensionsDesc=Gathering Extensions AbstractDiscoveryPortalPageLayer_GatheringInstallInfoDesc=Gathering Install Information AbstractDiscoveryPortalPageLayer_InstallActionLabel=Install... -AbstractDiscoveryPortalPageLayer_InstallActionTooltip=Install checked items +AbstractDiscoveryPortalPageLayer_InstallActionTooltip=Install selected items +AbstractDiscoveryPortalPageLayer_P2InstallWizardOpenError=Could not open install wizard AbstractDiscoveryPortalPageLayer_RefreshActionLabel=Refresh -AbstractDiscoveryPortalPageLayer_Title=Install Extensions -AbstractDiscoveryPortalPageLayer_UncheckAllActionLabel=Check none +AbstractDiscoveryPortalPageLayer_Title=Install +AbstractDiscoveryPortalPageLayer_UncheckAllActionLabel=Deselect all +AbstractImportExportPage_BrowseButtonLabel=Browse... +AbstractImportExportPage_CheckAllLabel=Select All +AbstractImportExportPage_CheckNoneLabel=Deselect All +AbstractImportExportPage_FeatureColTitle=Feature +AbstractImportExportPage_VersionColTitle=Version +AbstractRSSPortalPageLayer_GettingFeedJobTitle=Getting RSS feed AbstractRSSPortalPageLayer_ReturnToFeedLabel=Return to RSS AbstractRSSPortalPageLayer_RSSReadError=Could not read RSS from: {0} Activator_GetProxyInfoJobTitle=Getting proxy info Activator_MissingConfigURLError=Could not find URL in configuration/server.properties file for key={0} +ExportPage_BrowseGroupLabel=Export file: +ExportPage_Description=Create an export file with the selected feature configuration +ExportPage_FileDialogText=Save As +ExportPage_FileOverwriteWarning=File exists at selected location and will be overwritten +ExportPage_GetFeaturesJobName=Getting Installed Features +ExportPage_NoFeaturesError=There are no features to export +ExportPage_NoFeaturesSelectedError=At least one feature must be selected for export +ExportPage_NoFileError=A file must be selected in order to export features +ExportPage_Title=Export Installed Feature Configuration +ExportPage_ViewerGroupLabel=Export features: +ExportWizard_ErrorTitle=Error +ExportWizard_Title=Export +ExportWizard_WriteFileError=Could not write export file due to error: {0} +FeatureInstallOperation_ConfiguringTaskName=Configuring install operation +FeatureInstallOperation_IdLabel=id= +FeatureInstallOperation_MissingFeaturesError=Install failed. Could not find some features: \n +FeatureInstallOperation_VersionLabel=version= +ImportPage_AllFilesFilterName=All Files +ImportPage_BrowseGroupLabel=Import file: +ImportPage_Description=Import a feature configurations from a file and install the features +ImportPage_FileDialogText=Select an Exported Feature Configuration File +ImportPage_NoFeaturesSelectedError=At least one feature must be selected for import +ImportPage_NoValidFeaturesInFileError=No valid features found in configurations file +ImportPage_NoValidFileError=A valid exported feature configuration file must be selected +ImportPage_NoValidReposInFileError=No valid repositories found in configurations file +ImportPage_OriginalVersionCheckLabel=Attempt import original feature versions +ImportPage_ReadFileError=Could not read data from file: {0} +ImportPage_ReadFileJobName=Reading Feature Configuration File +ImportPage_Title=Import Feature Configuration and Install +ImportPage_ViewerGroupLabel=Import Features: +ImportPage_XMLFileFilterName=XML Files +ImportWizard_AllInstalledMessage=Could not complete installation, all features are already installed +ImportWizard_AllInstalledTitle=Warning +ImportWizard_ErrorTitle=Error +ImportWizard_ImportFailedError=Import operation failed +ImportWizard_InstallErrorSimple=Could not install due to error: {0} +ImportWizard_Title=Import Installed Feature Configuration +InstallExtensionsPortalExtension_ExportActionLabel=Export... +InstallExtensionsPortalExtension_ImportActionLabel=Import... +InstallExtensionsPortalExtension_MigrateTitle=Migrate PortalEditor_BadCommandBarFactoryError=Command bar factory class could not be created for id: {0 -PortalEditor_Name=Carbide Portal +PortalEditor_Name=Carbide.c++ Portal PortalEditor_NoLayersError=Could not load portal page because no layers were found for id: {0} PortalEditor_PageLoadError=Could not load portal page PortalEditor_PageOpenError=Could not open portal @@ -35,3 +83,7 @@ SettingsBarCreator_KeyBindingsActionLabel=Key bindings SettingsBarCreator_ProxiesActionLabel=Proxies SettingsBarCreator_Title=Settings +SimpleRSSReader_BadURLError=Bad URL +Streamer_BadURIError=Could not parse URI: {0} +Streamer_BadVersionError=Can only read version {0} of <{1}> +Streamer_VersionParseError=Could not parse version: {0} diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/RoundedCornerComposite.java --- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/RoundedCornerComposite.java Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/RoundedCornerComposite.java Fri Aug 20 09:39:24 2010 -0500 @@ -22,6 +22,7 @@ class RoundedCornerComposite extends SharedBackgroundComposite { + private static final int ARC = 9; private final Color background; private final Color outline; @@ -36,11 +37,11 @@ super.drawBackground(gc, x, y, width, height); if (background != null) { gc.setBackground(background); - gc.fillRoundRectangle(0, 0, width, height, 6, 6); + gc.fillRoundRectangle(0, 0, width, height, ARC, ARC); } if (outline != null) { gc.setForeground(outline); - gc.drawRoundRectangle(2, 2, width - 4, height - 4, 6, 6); + gc.drawRoundRectangle(0, 0, width - 1, height - 1, ARC, ARC); } } } diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/SimpleRSSReader.java --- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/SimpleRSSReader.java Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/SimpleRSSReader.java Fri Aug 20 09:39:24 2010 -0500 @@ -38,6 +38,7 @@ import org.xml.sax.helpers.DefaultHandler; import com.nokia.carbide.discovery.ui.Activator; +import com.nokia.carbide.discovery.ui.Messages; /** * A simple RSS reader @@ -89,22 +90,22 @@ } protected void setField(String element, String value) { - if (RSSHandler.TITLE.equals(element)) + if (RSSHandler.TITLE.equalsIgnoreCase(element)) title = value; - else if (RSSHandler.LINK.equals(element)) { + else if (RSSHandler.LINK.equalsIgnoreCase(element)) { try { link = new URL(value); } catch (MalformedURLException e) { // don't store malformed URLs - Activator.logError("Bad URL", e); + Activator.logError(Messages.SimpleRSSReader_BadURLError, e); } } - else if (RSSHandler.DESCRIPTION.equals(element) || RSSHandler.SUMMARY.equals(element)) + else if (RSSHandler.DESCRIPTION.equalsIgnoreCase(element) || RSSHandler.SUMMARY.equalsIgnoreCase(element)) description = value; - else if (RSSHandler.PUBDATE.equals(element)) { + else if (RSSHandler.PUBDATE.equalsIgnoreCase(element)) { pubDate = parseRFC822Date(value); } - else if (RSSHandler.CATEGORY.equals(element)) + else if (RSSHandler.CATEGORY.equalsIgnoreCase(element)) categories.add(value); } @@ -158,12 +159,12 @@ private static final String CATEGORY = "category"; //$NON-NLS-1$ private static final Set charsElements = new HashSet(); static { - charsElements.add(TITLE); - charsElements.add(LINK); - charsElements.add(DESCRIPTION); - charsElements.add(SUMMARY); - charsElements.add(PUBDATE); - charsElements.add(CATEGORY); + charsElements.add(TITLE.toLowerCase()); + charsElements.add(LINK.toLowerCase()); + charsElements.add(DESCRIPTION.toLowerCase()); + charsElements.add(SUMMARY.toLowerCase()); + charsElements.add(PUBDATE.toLowerCase()); + charsElements.add(CATEGORY.toLowerCase()); } private Channel curChannel; @@ -177,26 +178,26 @@ @Override public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { - if (charsElements.contains(qName)) { + if (charsElements.contains(qName.toLowerCase())) { charsBuf = new StringBuffer(); } - if (CHANNEL.equals(qName)) { + if (CHANNEL.equalsIgnoreCase(qName)) { curChannel = new Channel(); } - else if (ITEM.equals(qName) && curChannel != null) { + else if (ITEM.equalsIgnoreCase(qName) && curChannel != null) { curItem = new Item(curChannel); } } @Override public void endElement(String uri, String localName, String qName) throws SAXException { - if (CHANNEL.equals(qName)) { + if (CHANNEL.equalsIgnoreCase(qName)) { if (curChannel != null && curChannel.isValid() && curChannel.hasItems()) rss.addChannel(curChannel); curChannel = null; curItem = null; } - else if (ITEM.equals(qName)) { + else if (ITEM.equalsIgnoreCase(qName)) { if (curChannel != null && curItem != null && curItem.isValid()) curChannel.addItem(curItem); curItem = null; diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/TaskBar.java --- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/TaskBar.java Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/TaskBar.java Fri Aug 20 09:39:24 2010 -0500 @@ -64,7 +64,7 @@ parent.getDisplay().getSystemColor(SWT.COLOR_WHITE)); createTitle(actionBar); createActions(actionBar); - RowLayoutFactory.swtDefaults().type(SWT.VERTICAL).margins(10, 10).extendedMargins(5, 5, 5, 10).fill(true).wrap(false).applyTo(this); + RowLayoutFactory.swtDefaults().type(SWT.VERTICAL).margins(5, 5).extendedMargins(7, 7, 7, 7).fill(true).wrap(false).applyTo(this); } private void createTitle(IActionBar actionBar) { diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/extension/AbstractBrowserPortalPageLayer.java --- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/extension/AbstractBrowserPortalPageLayer.java Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/extension/AbstractBrowserPortalPageLayer.java Fri Aug 20 09:39:24 2010 -0500 @@ -24,6 +24,7 @@ import org.eclipse.jface.action.Action; import org.eclipse.jface.action.IAction; +import org.eclipse.jface.action.IStatusLineManager; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.dialogs.IInputValidator; import org.eclipse.jface.dialogs.InputDialog; @@ -34,6 +35,8 @@ import org.eclipse.swt.browser.OpenWindowListener; import org.eclipse.swt.browser.ProgressAdapter; import org.eclipse.swt.browser.ProgressEvent; +import org.eclipse.swt.browser.StatusTextEvent; +import org.eclipse.swt.browser.StatusTextListener; import org.eclipse.swt.browser.WindowEvent; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.widgets.Composite; @@ -85,6 +88,12 @@ } @Override public void completed(ProgressEvent event) { + getStatusLineManager().setMessage(null); + if (!failedConnect && !isValidPage()) { + displayCannotFindServerPage(); + Activator.logError(Messages.AbstractBrowserPortalPageLayer_URLDisplayError + getURL().toExternalForm(), null); + failedConnect = true; + } setLoading(false); NavigationActionBar.this.updater.updateAll(); } @@ -95,6 +104,12 @@ event.browser = browser; } }); + browser.addStatusTextListener(new StatusTextListener() { + @Override + public void changed(StatusTextEvent event) { + getStatusLineManager().setMessage(event.text); + } + }); } @Override @@ -126,11 +141,17 @@ } } + protected static final String HTML_BODY_HEADER = ""; //$NON-NLS-1$ + protected static final String HTML_BODY_FOOTER = ""; //$NON-NLS-1$ + protected Browser browser; protected NavigationActionBar actionBar; + private IEditorPart part; + private boolean failedConnect; @Override public Control createControl(Composite parent, IEditorPart part) { + this.part = part; Composite composite = new Composite(parent, SWT.NONE); composite.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND)); composite.setLayout(new FillLayout()); @@ -167,11 +188,11 @@ public void run() { URL url = getURL(); if (url != null) { - browser.setUrl(url.toString()); - actionBar.setLoading(true); + setUrl(url.toString()); } actionBar.hookBrowser(); actionBar.update(); + browser.setFocus(); } }); } @@ -225,7 +246,14 @@ @Override public void run() { if (browser != null) { - browser.refresh(); + if (browserHasURL()) + browser.refresh(); + else { + URL url = getURL(); + if (url != null) { + setUrl(url.toString()); + } + } actionBar.update(); } } @@ -275,7 +303,7 @@ }); int result = dlg.open(); if (result == Dialog.OK) { - browser.setUrl(dlg.getValue()); + setUrl(dlg.getValue()); actionBar.update(); } }; @@ -293,4 +321,25 @@ String url = browser.getUrl(); return url.matches("^.*://.*"); //$NON-NLS-1$ } + + protected boolean isValidPage() { + return browserHasURL(); + } + + protected void setUrl(String url) { + browser.setUrl(url); + failedConnect = false; + } + + protected void displayCannotFindServerPage() { + StringBuilder sb = new StringBuilder(HTML_BODY_HEADER); + // if we want, we can add html here for failed connect case + sb.append(HTML_BODY_FOOTER); + browser.setText(sb.toString()); + browser.redraw(); + } + + private IStatusLineManager getStatusLineManager() { + return part.getEditorSite().getActionBars().getStatusLineManager(); + } } diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/extension/AbstractDiscoveryPortalPageLayer.java --- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/extension/AbstractDiscoveryPortalPageLayer.java Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/extension/AbstractDiscoveryPortalPageLayer.java Fri Aug 20 09:39:24 2010 -0500 @@ -34,7 +34,6 @@ import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogConfiguration; import org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogViewer; import org.eclipse.equinox.p2.core.IProvisioningAgent; -import org.eclipse.equinox.p2.operations.ProvisioningSession; import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager; import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager; import org.eclipse.equinox.p2.ui.ProvisioningUI; @@ -54,7 +53,9 @@ import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IActionBars; import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.PlatformUI; import org.eclipse.ui.actions.BaseSelectionListenerAction; +import org.eclipse.ui.handlers.IHandlerService; import com.nokia.carbide.discovery.ui.Activator; import com.nokia.carbide.discovery.ui.Messages; @@ -113,7 +114,7 @@ protected static final String REFRESH_ACTION_ID = AbstractDiscoveryPortalPageLayer.class.getName() + ".refresh"; //$NON-NLS-1$ - private IEditorPart part; + protected IEditorPart part; private CatalogViewer viewer; private List selectionListeners; private IActionUIUpdater updater; @@ -142,6 +143,7 @@ viewer.addSelectionChangedListener(listener); } viewer.updateCatalog(); + viewer.getControl().setFocus(); } }); } @@ -294,16 +296,20 @@ } protected void showInstallWizard() { - ProvisioningUI defaultUI = ProvisioningUI.getDefaultUI(); - ProvisioningSession session = defaultUI.getSession(); - IProvisioningAgent agent = session.getProvisioningAgent(); + IProvisioningAgent agent = ProvisioningUI.getDefaultUI().getSession().getProvisioningAgent(); IMetadataRepositoryManager metadataManager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME); IArtifactRepositoryManager artifactManager = (IArtifactRepositoryManager) agent.getService(IArtifactRepositoryManager.SERVICE_NAME); for (URI uri : getSiteURIs(viewer.getCatalog().getItems())) { metadataManager.addRepository(uri); artifactManager.addRepository(uri); } - defaultUI.openInstallWizard(null, null, null); + IHandlerService handlerService = + (IHandlerService) PlatformUI.getWorkbench().getService(IHandlerService.class); + try { + handlerService.executeCommand("org.eclipse.equinox.p2.ui.sdk.install", null); //$NON-NLS-1$ + } catch (Exception e) { + Activator.logError(Messages.AbstractDiscoveryPortalPageLayer_P2InstallWizardOpenError, e); + } } protected static Collection getSiteURIs(List catalogItems) { diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/extension/AbstractRSSPortalPageLayer.java --- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/extension/AbstractRSSPortalPageLayer.java Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/extension/AbstractRSSPortalPageLayer.java Fri Aug 20 09:39:24 2010 -0500 @@ -26,8 +26,13 @@ import java.util.Set; import java.util.regex.Pattern; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.jobs.Job; import org.eclipse.jface.action.Action; import org.eclipse.jface.action.IAction; +import org.eclipse.swt.widgets.Display; import com.nokia.carbide.discovery.ui.Activator; import com.nokia.carbide.discovery.ui.Messages; @@ -89,33 +94,48 @@ } } - private static final String HTML_BODY_HEADER = ""; //$NON-NLS-1$ - private static final String HTML_BODY_FOOTER = ""; //$NON-NLS-1$ private static final int MAX_ELEM_LEN = 256; private Rss rss; + private boolean displayingFeed; + @Override public void init() { Activator.runInUIThreadWhenProxyDataSet(browser, new Runnable() { @Override public void run() { - URL url = getURL(); - if (url != null) { - try { - rss = SimpleRSSReader.readRSS(url); - displayRSS(); - actionBar.hookBrowser(); - } catch (Exception e) { - Activator.logError(MessageFormat.format(Messages.AbstractRSSPortalPageLayer_RSSReadError, url), e); - } - actionBar.update(); - } + actionBar.hookBrowser(); + readRSS(); + actionBar.update(); + browser.setFocus(); } }); } - private void displayRSS() { + protected void readRSS() { + final URL url = getURL(); + if (url != null) { + Job j = new Job(Messages.AbstractRSSPortalPageLayer_GettingFeedJobTitle) { + + @Override + protected IStatus run(IProgressMonitor monitor) { + try { + rss = SimpleRSSReader.readRSS(url); + displayRSS(); + } catch (Exception e) { + Activator.logError(MessageFormat.format(Messages.AbstractRSSPortalPageLayer_RSSReadError, url), e); + } + return Status.OK_STATUS; + } + + }; + j.setUser(true); + j.schedule(); + } + } + + protected void displayRSS() { StringBuffer buf = new StringBuffer(); buf.append(HTML_BODY_HEADER); for (Channel channel : rss.getChannels()) { @@ -139,7 +159,7 @@ if (date != null) { String dateString = DateFormat.getDateTimeInstance().format(date); buf.append(dateString); - buf.append("
    "); + buf.append("
    "); //$NON-NLS-1$ } buf.append(clean(item.getDescription())); buf.append("
    "); //$NON-NLS-1$ @@ -147,7 +167,14 @@ buf.append(""); //$NON-NLS-1$ } buf.append(HTML_BODY_FOOTER); - browser.setText(buf.toString()); + final String s = buf.toString(); + Display.getDefault().syncExec(new Runnable() { + @Override + public void run() { + browser.setText(s); + displayingFeed = true; + } + }); } private String clean(String s) { @@ -164,6 +191,17 @@ } @Override + protected boolean isValidPage() { + return super.browserHasURL() || displayingFeed; + } + + @Override + protected void setUrl(String url) { + super.setUrl(url); + displayingFeed = false; + } + + @Override protected Set makeActions() { Set actions = new LinkedHashSet(); for (IAction action : super.makeActions()) { @@ -175,7 +213,7 @@ if (browserHasURL()) browser.refresh(); else - displayRSS(); + readRSS(); actionBar.update(); } } diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/view/InstallExtensionsPortalExtension.java --- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/view/InstallExtensionsPortalExtension.java Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/view/InstallExtensionsPortalExtension.java Fri Aug 20 09:39:24 2010 -0500 @@ -17,15 +17,59 @@ package com.nokia.carbide.internal.discovery.ui.view; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import org.eclipse.jface.action.Action; +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.jface.wizard.WizardDialog; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.IWorkbenchWizard; import org.eclipse.ui.PlatformUI; +import com.nokia.carbide.discovery.ui.Messages; import com.nokia.carbide.internal.discovery.ui.extension.AbstractDiscoveryPortalPageLayer; +import com.nokia.carbide.internal.discovery.ui.extension.IActionBar; +import com.nokia.carbide.internal.discovery.ui.extension.IActionUIUpdater; +import com.nokia.carbide.internal.discovery.ui.wizard.ExportWizard; +import com.nokia.carbide.internal.discovery.ui.wizard.ImportWizard; public class InstallExtensionsPortalExtension extends AbstractDiscoveryPortalPageLayer { + private final class MigrateBar implements IActionBar { + @Override + public String getTitle() { + return Messages.InstallExtensionsPortalExtension_MigrateTitle; + } + + @Override + public String[] getHighlightedActionIds() { + return null; + } + + @Override + public IAction[] getActions() { + List actions = new ArrayList(); + actions.add(new Action(Messages.InstallExtensionsPortalExtension_ExportActionLabel) { + @Override + public void run() { + showWizard(new ExportWizard()); + } + }); + actions.add(new Action(Messages.InstallExtensionsPortalExtension_ImportActionLabel) { + @Override + public void run() { + showWizard(new ImportWizard()); + } + }); + return (IAction[]) actions.toArray(new IAction[actions.size()]); + } + } + @Override public Control createControl(Composite parent, IEditorPart part) { Control control = super.createControl(parent, part); @@ -36,4 +80,21 @@ return control; } + + @Override + public IActionBar[] createCommandBars(IEditorPart part, IActionUIUpdater updater) { + List commandBars = new ArrayList( + Arrays.asList(super.createCommandBars(part, updater))); + commandBars.add(new MigrateBar()); + + return (IActionBar[]) commandBars.toArray(new IActionBar[commandBars.size()]); + } + + private void showWizard(IWorkbenchWizard wizard) { + wizard.init(PlatformUI.getWorkbench(), StructuredSelection.EMPTY); + WizardDialog dialog = new WizardDialog(part.getEditorSite().getShell(), wizard); + dialog.setMinimumPageSize(550, 250); + dialog.create(); + dialog.open(); + } } diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/wizard/AbstractImportExportPage.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/wizard/AbstractImportExportPage.java Fri Aug 20 09:39:24 2010 -0500 @@ -0,0 +1,218 @@ +/* + * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.carbide.internal.discovery.ui.wizard; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import org.eclipse.jface.dialogs.Dialog; +import org.eclipse.jface.layout.GridDataFactory; +import org.eclipse.jface.layout.GridLayoutFactory; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.jface.viewers.ArrayContentProvider; +import org.eclipse.jface.viewers.CheckStateChangedEvent; +import org.eclipse.jface.viewers.CheckboxTableViewer; +import org.eclipse.jface.viewers.ColumnLabelProvider; +import org.eclipse.jface.viewers.ICheckStateListener; +import org.eclipse.jface.viewers.TableViewerColumn; +import org.eclipse.jface.wizard.WizardPage; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.ModifyEvent; +import org.eclipse.swt.events.ModifyListener; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.graphics.Image; +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.Label; +import org.eclipse.swt.widgets.TableColumn; +import org.eclipse.swt.widgets.Text; + +import com.nokia.carbide.discovery.ui.Activator; +import com.nokia.carbide.discovery.ui.Messages; + +/** + * Abstract superclass of import and export page + */ +abstract class AbstractImportExportPage extends WizardPage { + + protected Text pathText; + protected Button browseButton; + protected CheckboxTableViewer viewer; + protected Button checkAllButton; + protected Button checkNoneButton; + protected static final ImageDescriptor FEATURE_IMGDESC = Activator + .getImageDescriptor("icons/iu_obj.gif"); //$NON-NLS-1$ + protected Image featureImg; + + public AbstractImportExportPage(String pageName) { + super(pageName); + } + + public void createControl(Composite parent) { + initializeDialogUnits(parent); + featureImg = FEATURE_IMGDESC.createImage(); + + Composite composite = new Composite(parent, SWT.NONE); + GridLayoutFactory.swtDefaults().numColumns(2).applyTo(composite); + GridDataFactory.fillDefaults().applyTo(composite); + composite.setSize(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT)); + + Dialog.applyDialogFont(composite); + setControl(composite); + } + + protected void createBrowseGroup(Composite parent, String labelText) { + Composite composite = new Composite(parent, SWT.NONE); + GridLayoutFactory.fillDefaults().numColumns(3).applyTo(composite); + GridDataFactory.fillDefaults().align(SWT.FILL, SWT.BEGINNING) + .grab(true, false).applyTo(composite); + + Label label = new Label(composite, SWT.NONE); + label.setText(labelText); + + pathText = new Text(composite, SWT.BORDER); + GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER) + .grab(true, false).hint(250, SWT.DEFAULT).applyTo(pathText); + pathText.addModifyListener(new ModifyListener() { + public void modifyText(ModifyEvent e) { + setPageComplete(validatePage()); + } + }); + browseButton = new Button(composite, SWT.PUSH); + browseButton.setText(Messages.AbstractImportExportPage_BrowseButtonLabel); + browseButton + .setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL)); + setButtonLayoutData(browseButton); + + new Label(parent, SWT.NONE); // spacer + } + + protected void createViewerGroup(Composite parent, String labelText) { + Label label = new Label(parent, SWT.NONE); + label.setText(labelText); + GridDataFactory.defaultsFor(label).span(2, 1).applyTo(label); + + viewer = CheckboxTableViewer.newCheckList(parent, SWT.BORDER); + TableViewerColumn featureColumn = new TableViewerColumn(viewer, + SWT.CENTER); + featureColumn.getColumn().setText(Messages.AbstractImportExportPage_FeatureColTitle); + featureColumn.setLabelProvider(new ColumnLabelProvider() { + @Override + public Image getImage(Object element) { + return featureImg; + } + + @Override + public String getText(Object element) { + if (element instanceof FeatureInfo) + return ((FeatureInfo) element).getId(); + return null; + } + }); + TableViewerColumn versionColumn = new TableViewerColumn(viewer, + SWT.CENTER); + versionColumn.getColumn().setText(Messages.AbstractImportExportPage_VersionColTitle); + versionColumn.setLabelProvider(new ColumnLabelProvider() { + @Override + public String getText(Object element) { + if (element instanceof FeatureInfo) { + return ((FeatureInfo) element).getVersion().toString(); + } + return null; + } + }); + + viewer.getControl().setLayoutData( + new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL + | GridData.GRAB_VERTICAL)); + viewer.setContentProvider(new ArrayContentProvider()); + viewer.getTable().setHeaderVisible(true); + + Composite buttonComposite = new Composite(parent, SWT.NONE); + GridDataFactory.swtDefaults().align(SWT.END, SWT.BEGINNING) + .applyTo(buttonComposite); + buttonComposite.setLayout(new GridLayout()); + checkAllButton = new Button(buttonComposite, SWT.PUSH); + checkAllButton.setText(Messages.AbstractImportExportPage_CheckAllLabel); + setButtonLayoutData(checkAllButton); + checkAllButton.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + viewer.setAllChecked(true); + enableButtons(); + setPageComplete(validatePage()); + } + }); + checkNoneButton = new Button(buttonComposite, SWT.PUSH); + checkNoneButton.setText(Messages.AbstractImportExportPage_CheckNoneLabel); + setButtonLayoutData(checkNoneButton); + checkNoneButton.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + viewer.setAllChecked(false); + enableButtons(); + setPageComplete(validatePage()); + } + }); + viewer.addCheckStateListener(new ICheckStateListener() { + public void checkStateChanged(CheckStateChangedEvent event) { + enableButtons(); + setPageComplete(validatePage()); + } + }); + } + + protected abstract boolean validatePage(); + + public Collection getSelectedFeatures() { + Object[] checkedElements = viewer.getCheckedElements(); + List infos = new ArrayList(); + for (Object o : checkedElements) { + infos.add((FeatureInfo) o); + } + return infos; + } + + protected void packColumns() { + TableColumn[] columns = viewer.getTable().getColumns(); + for (TableColumn column : columns) { + column.pack(); + } + } + + protected void updateViewer() { + packColumns(); + viewer.setAllChecked(true); + enableButtons(); + setPageComplete(validatePage()); + } + + private void enableButtons() { + checkAllButton.setEnabled(viewer.getTable().getItemCount() > viewer.getCheckedElements().length); + checkNoneButton.setEnabled(viewer.getCheckedElements().length > 0); + } + + @Override + public void dispose() { + super.dispose(); + featureImg.dispose(); + } +} \ No newline at end of file diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/wizard/ExportPage.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/wizard/ExportPage.java Fri Aug 20 09:39:24 2010 -0500 @@ -0,0 +1,147 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + +package com.nokia.carbide.internal.discovery.ui.wizard; + +import java.io.File; +import java.util.ArrayList; +import java.util.Collection; + +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.jface.dialogs.DialogPage; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.FileDialog; +import org.eclipse.ui.progress.UIJob; + +import com.nokia.carbide.discovery.ui.Messages; +import com.nokia.cpp.internal.api.utils.ui.BrowseDialogUtils; + +/** + * Page in export wizard + */ +class ExportPage extends AbstractImportExportPage { + + private File file; + private Collection featureInfos; + private static String saveAsParent; + + protected ExportPage() { + super("ExportPage"); //$NON-NLS-1$ + setTitle(Messages.ExportPage_Title); + setDescription(Messages.ExportPage_Description); + } + + public void createControl(Composite parent) { + super.createControl(parent); + Composite composite = (Composite) getControl(); + + createViewerGroup(composite, Messages.ExportPage_ViewerGroupLabel); + createBrowseGroup(composite, Messages.ExportPage_BrowseGroupLabel); + + featureInfos = new ArrayList(); + + setPageComplete(validatePage()); + } + + @Override + protected void createViewerGroup(Composite parent, String labelText) { + super.createViewerGroup(parent, labelText); + startGetInputJob(); + updateViewer(); + } + + @Override + protected void createBrowseGroup(Composite parent, String labelText) { + super.createBrowseGroup(parent, labelText); + + if (saveAsParent == null) + saveAsParent = System.getProperty("user.home"); //$NON-NLS-1$ + pathText.setText(new Path(saveAsParent).append("exportedFeatures.xml").toOSString()); //$NON-NLS-1$ + browseButton.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + FileDialog dialog = new FileDialog(getShell(), SWT.SAVE); + dialog.setText(Messages.ExportPage_FileDialogText); + BrowseDialogUtils.initializeFrom(dialog, pathText.getText()); + dialog.setOverwrite(true); // prompt for overwrite + String path = dialog.open(); + if (path != null) { + IPath saveAsPath = new Path(path); + saveAsParent = saveAsPath.removeLastSegments(1).toString(); + pathText.setText(saveAsPath.toOSString()); + } + } + }); + } + + private void startGetInputJob() { + UIJob j = new UIJob(Messages.ExportPage_GetFeaturesJobName) { + @Override + public IStatus runInUIThread(IProgressMonitor monitor) { + viewer.setInput(P2Utils.getInstalledFeatures(monitor)); + updateViewer(); + return Status.OK_STATUS; + } + }; + j.schedule(); + } + + protected boolean validatePage() { + setErrorMessage(null); + if (viewer.getTable().getItemCount() == 0) { + setErrorMessage(Messages.ExportPage_NoFeaturesError); + return false; + } + if (viewer.getCheckedElements().length == 0) { + setErrorMessage(Messages.ExportPage_NoFeaturesSelectedError); + return false; + } + + IPath path = new Path(pathText.getText()); + file = path.toFile(); + if (!file.isAbsolute()) { + setErrorMessage(Messages.ExportPage_NoFileError); + return false; + } + if (file.exists()) { + setMessage(Messages.ExportPage_FileOverwriteWarning, DialogPage.WARNING); + } + + return true; + } + + public File getFile() { + return file; + } + + public Collection getFeatureInfos() { + featureInfos.clear(); + for (Object o : viewer.getCheckedElements()) { + featureInfos.add((FeatureInfo) o); + } + return featureInfos; + } + +} diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/wizard/ExportWizard.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/wizard/ExportWizard.java Fri Aug 20 09:39:24 2010 -0500 @@ -0,0 +1,68 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + +package com.nokia.carbide.internal.discovery.ui.wizard; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.OutputStream; +import java.text.MessageFormat; +import java.util.Collection; + +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.wizard.Wizard; +import org.eclipse.ui.IExportWizard; +import org.eclipse.ui.IWorkbench; + +import com.nokia.carbide.discovery.ui.Activator; +import com.nokia.carbide.discovery.ui.Messages; + +/** + * Wizard for exporting installed features to a file + */ +public class ExportWizard extends Wizard implements IExportWizard { + + private ExportPage exportPage; + + public ExportWizard() { + } + + public boolean performFinish() { + Collection featureInfos = exportPage.getFeatureInfos(); + File file = exportPage.getFile(); + OutputStream os; + try { + os = new FileOutputStream(file); + ImportExportData data = new ImportExportData(false, P2Utils.getKnownRepositories(), featureInfos); + Streamer.writeToXML(os, data); + } catch (Exception e) { + MessageDialog.openError(getShell(), Messages.ExportWizard_ErrorTitle, + MessageFormat.format(Messages.ExportWizard_WriteFileError, e.getMessage())); + } + return true; + } + + public void init(IWorkbench workbench, IStructuredSelection selection) { + setDefaultPageImageDescriptor(Activator.getImageDescriptor("icons\\install_wiz.gif")); //$NON-NLS-1$ + setWindowTitle(Messages.ExportWizard_Title); + exportPage = new ExportPage(); + addPage(exportPage); + } + +} diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/wizard/FeatureInfo.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/wizard/FeatureInfo.java Fri Aug 20 09:39:24 2010 -0500 @@ -0,0 +1,73 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +package com.nokia.carbide.internal.discovery.ui.wizard; + +import org.eclipse.equinox.p2.metadata.IInstallableUnit; +import org.eclipse.equinox.p2.metadata.Version; + +class FeatureInfo { + private String id; + private Version version; + + public FeatureInfo(IInstallableUnit iu) { + this(iu.getId(), iu.getVersion()); + } + + public FeatureInfo(String id, Version version) { + this.id = id; + this.version = version; + } + + public String getId() { + return id; + } + + public Version getVersion() { + return version; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((id == null) ? 0 : id.hashCode()); + result = prime * result + ((version == null) ? 0 : version.toString().hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + FeatureInfo other = (FeatureInfo) obj; + if (id == null) { + if (other.id != null) + return false; + } else if (!id.equals(other.id)) + return false; + if (version == null) { + if (other.version != null) + return false; + } else if (!version.toString().equals(other.version.toString())) + return false; + return true; + } +} \ No newline at end of file diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/wizard/FeatureInstallOperation.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/wizard/FeatureInstallOperation.java Fri Aug 20 09:39:24 2010 -0500 @@ -0,0 +1,163 @@ +/* + * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of the License "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: + * + */ +package com.nokia.carbide.internal.discovery.ui.wizard; + +import java.lang.reflect.InvocationTargetException; +import java.net.URI; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.core.runtime.OperationCanceledException; +import org.eclipse.core.runtime.SubMonitor; +import org.eclipse.equinox.p2.core.ProvisionException; +import org.eclipse.equinox.p2.metadata.IInstallableUnit; +import org.eclipse.equinox.p2.operations.InstallOperation; +import org.eclipse.equinox.p2.operations.ProvisioningSession; +import org.eclipse.equinox.p2.operations.RepositoryTracker; +import org.eclipse.equinox.p2.query.IQuery; +import org.eclipse.equinox.p2.query.IQueryResult; +import org.eclipse.equinox.p2.query.IQueryable; +import org.eclipse.equinox.p2.query.QueryUtil; +import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository; +import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager; +import org.eclipse.equinox.p2.ui.ProvisioningUI; +import org.eclipse.jface.operation.IRunnableWithProgress; +import org.eclipse.swt.widgets.Display; + +import com.nokia.carbide.discovery.ui.Messages; + +class FeatureInstallOperation implements IRunnableWithProgress { + + private Collection uris; + private Collection featureInfos; + private boolean wantVersions; + private ProvisioningUI provisioningUI; + private Collection repositories; + private Collection ius; + private Collection urisUsed; + + public FeatureInstallOperation(Collection uris, Collection featureInfos, boolean wantVersions) { + this.uris = uris; + this.featureInfos = featureInfos; + this.wantVersions = wantVersions; + provisioningUI = ProvisioningUI.getDefaultUI(); + } + + @Override + public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { + try { + doInstall(monitor); + } catch (OperationCanceledException e) { + throw new InterruptedException(); + } catch (CoreException e) { + throw new InvocationTargetException(e); + } + } + + public void doInstall(IProgressMonitor monitor) throws OperationCanceledException, CoreException { + SubMonitor subMonitor = SubMonitor.convert(monitor, Messages.FeatureInstallOperation_ConfiguringTaskName, 100); + getRepositories(subMonitor.newChild(30)); + findInstallableUnits(subMonitor.newChild(40)); + final InstallOperation operation = resolve(subMonitor.newChild(30)); + Display.getDefault().asyncExec(new Runnable() { + @Override + public void run() { + IQueryable additions = operation.getProvisioningPlan().getAdditions(); + IQueryResult result = additions.query(QueryUtil.createIUGroupQuery(), new NullProgressMonitor()); + provisioningUI.openInstallWizard(result.toSet(), operation, null); + } + }); + } + + private void getRepositories(SubMonitor monitor) throws ProvisionException, OperationCanceledException { + monitor.setWorkRemaining(uris.size()); + repositories = new ArrayList(); + ProvisioningSession session = provisioningUI.getSession(); + RepositoryTracker repositoryTracker = provisioningUI.getRepositoryTracker(); + IMetadataRepositoryManager manager = + (IMetadataRepositoryManager) session.getProvisioningAgent().getService(IMetadataRepositoryManager.SERVICE_NAME); + for (URI uri : uris) { + checkIfCanceled(monitor); + repositoryTracker.addRepository(uri, null, session); + repositories.add(manager.loadRepository(uri, monitor.newChild(1))); + } + } + + private void findInstallableUnits(SubMonitor monitor) throws ProvisionException { + monitor.setWorkRemaining(repositories.size() * featureInfos.size()); + ius = new ArrayList(); + urisUsed = new HashSet(); + Set remainingInfos = new HashSet(featureInfos); + for (IMetadataRepository repository : repositories) { + checkIfCanceled(monitor); + IQueryResult iusInRepository = repository.query(QueryUtil.createIUGroupQuery(), monitor.newChild(1)); + for (FeatureInfo featureInfo : new HashSet(remainingInfos)) { + String id = featureInfo.getId(); + IQuery iuQuery = wantVersions ? + QueryUtil.createIUQuery(id, featureInfo.getVersion()) : + QueryUtil.createLatestQuery(QueryUtil.createIUQuery(id)); + IQueryResult result = iusInRepository.query(iuQuery, monitor.newChild(1)); + if (!result.isEmpty()) { + ius.add(result.iterator().next()); + urisUsed.add(repository.getLocation()); + remainingInfos.remove(featureInfo); + if (remainingInfos.isEmpty()) + break; + } + } + } + + if (!remainingInfos.isEmpty()) { + StringBuilder sb = new StringBuilder(); + sb.append(Messages.FeatureInstallOperation_MissingFeaturesError); + for (FeatureInfo featureInfo : remainingInfos) { + sb.append(Messages.FeatureInstallOperation_IdLabel); + sb.append(featureInfo.getId()); + if (wantVersions) { + sb.append(Messages.FeatureInstallOperation_VersionLabel); + sb.append(featureInfo.getVersion().toString()); + } + sb.append("\n"); //$NON-NLS-1$ + } + throw new ProvisionException(sb.toString()); + } + monitor.done(); + } + + private InstallOperation resolve(SubMonitor monitor) throws CoreException { + checkIfCanceled(monitor); + URI[] uris = (URI[]) urisUsed.toArray(new URI[urisUsed.size()]); + InstallOperation installOperation = provisioningUI.getInstallOperation(ius, uris); + IStatus operationStatus = installOperation.resolveModal(monitor); + if (operationStatus.getSeverity() > IStatus.WARNING) { + throw new CoreException(operationStatus); + } + return installOperation; + } + + private void checkIfCanceled(IProgressMonitor monitor) { + if (monitor.isCanceled()) { + throw new OperationCanceledException(); + } + } +} diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/wizard/ImportExportData.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/wizard/ImportExportData.java Fri Aug 20 09:39:24 2010 -0500 @@ -0,0 +1,46 @@ +package com.nokia.carbide.internal.discovery.ui.wizard; + +import java.net.URI; +import java.util.Collection; +import java.util.HashSet; + +class ImportExportData { + private boolean wantsVersions; + private Collection uris; + private Collection featureInfos; + + public ImportExportData() { + uris = new HashSet(); + featureInfos = new HashSet(); + } + + public ImportExportData(boolean wantsVersions, Collection uris, Collection featureInfos) { + this.wantsVersions = wantsVersions; + this.uris = uris; + this.featureInfos = featureInfos; + } + + public void addURI(URI uri) { + uris.add(uri); + } + + public Collection getURIs() { + return uris; + } + + public void addFeatureInfo(FeatureInfo info) { + featureInfos.add(info); + } + + public Collection getFeatureInfos() { + return featureInfos; + } + + public void setWantsVersions(boolean wantsVersions) { + this.wantsVersions = wantsVersions; + } + + public boolean getWantsVersions() { + return wantsVersions; + } +} \ No newline at end of file diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/wizard/ImportPage.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/wizard/ImportPage.java Fri Aug 20 09:39:24 2010 -0500 @@ -0,0 +1,207 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +package com.nokia.carbide.internal.discovery.ui.wizard; + + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.net.URI; +import java.text.MessageFormat; +import java.util.ArrayList; +import java.util.Collection; + +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.jface.layout.GridDataFactory; +import org.eclipse.jface.layout.GridLayoutFactory; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.ModifyEvent; +import org.eclipse.swt.events.ModifyListener; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.FileDialog; +import org.eclipse.ui.progress.UIJob; + +import com.nokia.carbide.discovery.ui.Activator; +import com.nokia.carbide.discovery.ui.Messages; +import com.nokia.cpp.internal.api.utils.ui.BrowseDialogUtils; + +/** + * Page in import wizard + */ +class ImportPage extends AbstractImportExportPage { + + // the following two arrays need to correspond + static final String[] FILTER_EXTS = { + "*.xml", //$NON-NLS-1$ + "*.*" //$NON-NLS-1$ + }; + static final String[] FILTER_EXT_NAMES = { + Messages.ImportPage_XMLFileFilterName, + Messages.ImportPage_AllFilesFilterName + }; + + private String currentPath; + private ImportExportData readData; + private boolean wantsOriginalVersions; + + protected ImportPage() { + super("ImportPage"); //$NON-NLS-1$ + setTitle(Messages.ImportPage_Title); + setDescription(Messages.ImportPage_Description); + } + + public void createControl(Composite parent) { + super.createControl(parent); + Composite composite = (Composite) getControl(); + + createBrowseGroup(composite, Messages.ImportPage_BrowseGroupLabel); + createViewerGroup(composite, Messages.ImportPage_ViewerGroupLabel); + createVersionPrefGroup(composite); + + setPageComplete(validatePage()); + } + + @Override + protected void createBrowseGroup(Composite parent, String labelText) { + super.createBrowseGroup(parent, labelText); + pathText.addModifyListener(new ModifyListener() { + @Override + public void modifyText(ModifyEvent e) { + handlePathChanged(); + } + }); + + browseButton.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + FileDialog fileDialog = new FileDialog(getShell(), SWT.OPEN); + fileDialog.setText(Messages.ImportPage_FileDialogText); + fileDialog.setFilterExtensions(FILTER_EXTS); + fileDialog.setFilterNames(FILTER_EXT_NAMES); + BrowseDialogUtils.initializeFrom(fileDialog, pathText); + String pathstr = fileDialog.open(); + if (pathstr != null) { + pathText.setText(pathstr); + } + } + }); + } + + @Override + protected void createViewerGroup(Composite parent, String labelText) { + super.createViewerGroup(parent, labelText); + updateViewer(); + } + + private void startGetInputJob(final String path) { + UIJob j = new UIJob(Messages.ImportPage_ReadFileJobName) { + @Override + public IStatus runInUIThread(IProgressMonitor monitor) { + try { + FileInputStream is = new FileInputStream(path); + readData = Streamer.readFromXML(is); + viewer.setInput(readData.getFeatureInfos()); + updateViewer(); + monitor.done(); + } catch (IOException e) { + // may have bad/incomplete path, so don't log this + } catch (Exception e) { + Activator.logError(MessageFormat.format(Messages.ImportPage_ReadFileError, path), e); + } + return Status.OK_STATUS; + } + }; + j.schedule(); + } + + protected void createVersionPrefGroup(Composite parent) { + Composite composite = new Composite(parent, SWT.NONE); + GridLayoutFactory.fillDefaults().applyTo(composite); + GridDataFactory.fillDefaults().align(SWT.FILL, SWT.BEGINNING).grab(true, false).applyTo(composite); + + final Button originalVersionCheck = new Button(composite, SWT.CHECK); + originalVersionCheck.setText(Messages.ImportPage_OriginalVersionCheckLabel); + originalVersionCheck.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + wantsOriginalVersions = originalVersionCheck.getSelection(); + } + }); + } + + protected boolean validatePage() { + setErrorMessage(null); + IPath path = new Path(pathText.getText()); + if (isFilePath(path.toOSString())) { + if (readData == null || readData.getFeatureInfos().isEmpty()) { + setErrorMessage(Messages.ImportPage_NoValidFeaturesInFileError); + return false; + } + if (readData == null || readData.getURIs().isEmpty()) { + setErrorMessage(Messages.ImportPage_NoValidReposInFileError); + return false; + } + } + else { + setErrorMessage(Messages.ImportPage_NoValidFileError); + return false; + } + + if (viewer.getCheckedElements().length == 0) { + setErrorMessage(Messages.ImportPage_NoFeaturesSelectedError); + return false; + } + + return true; + } + + private boolean isFilePath(String path) { + File file = new File(path); + return file.exists() && !file.isDirectory(); + } + + private void handlePathChanged() { + String path = pathText.getText(); + if (!path.equals(currentPath) && isFilePath(path)) { + startGetInputJob(currentPath = path); + } + } + + public Collection getFeatureInfos() { + Collection infos = new ArrayList(); + Object[] objs = viewer.getCheckedElements(); + for (Object o : objs) { + infos.add((FeatureInfo) o); + } + return infos; + } + + public Collection getURIs() { + return readData.getURIs(); + } + + public boolean getWantsOriginalVersions() { + return wantsOriginalVersions; + } +} diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/wizard/ImportWizard.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/wizard/ImportWizard.java Fri Aug 20 09:39:24 2010 -0500 @@ -0,0 +1,91 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +package com.nokia.carbide.internal.discovery.ui.wizard; + +import java.lang.reflect.InvocationTargetException; +import java.text.MessageFormat; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.jface.dialogs.ErrorDialog; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.wizard.Wizard; +import org.eclipse.ui.IImportWizard; +import org.eclipse.ui.IWorkbench; + +import com.nokia.carbide.discovery.ui.Activator; +import com.nokia.carbide.discovery.ui.Messages; + +/** + * Wizard for importing installed features from a file and install them + */ +public class ImportWizard extends Wizard implements IImportWizard { + + private ImportPage importPage; + + public ImportWizard() { + } + + @Override + public boolean performFinish() { + try { + getContainer().run(true, true, new FeatureInstallOperation( + importPage.getURIs(), importPage.getFeatureInfos(), importPage.getWantsOriginalVersions())); + } catch (InvocationTargetException e) { + Throwable cause = e.getCause(); + if (cause instanceof CoreException) { + IStatus status = ((CoreException) cause).getStatus(); + if (allInstalledStatus(status)) { + MessageDialog.openWarning(getShell(), Messages.ImportWizard_AllInstalledTitle, Messages.ImportWizard_AllInstalledMessage); + } + else { + ErrorDialog.openError(getShell(), Messages.ImportWizard_ErrorTitle, null, status); + } + } else { + MessageDialog.openError(getShell(), Messages.ImportWizard_ErrorTitle, + MessageFormat.format(Messages.ImportWizard_InstallErrorSimple, cause.getMessage())); + } + } catch (InterruptedException e) { + } + return true; + } + + private boolean allInstalledStatus(IStatus status) { + boolean isOpFailed = false; + IStatus[] statusChildren = status.getChildren(); + if (statusChildren != null && statusChildren.length > 0) { + isOpFailed = statusChildren[0].getCode() == 10050; + if (isOpFailed) { + for (int i = 1; i < statusChildren.length; i++) { + if (statusChildren[i].getCode() != 10005) + isOpFailed = false; + } + } + } + return isOpFailed; + } + + public void init(IWorkbench workbench, IStructuredSelection selection) { + setDefaultPageImageDescriptor(Activator.getImageDescriptor("icons\\install_wiz.gif")); //$NON-NLS-1$ + setNeedsProgressMonitor(true); + setWindowTitle(Messages.ImportWizard_Title); + importPage = new ImportPage(); + addPage(importPage); + } + +} diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/wizard/P2Utils.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/wizard/P2Utils.java Fri Aug 20 09:39:24 2010 -0500 @@ -0,0 +1,64 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +package com.nokia.carbide.internal.discovery.ui.wizard; + +import java.net.URI; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Set; + +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.equinox.p2.core.IProvisioningAgent; +import org.eclipse.equinox.p2.engine.IProfile; +import org.eclipse.equinox.p2.engine.IProfileRegistry; +import org.eclipse.equinox.p2.metadata.IInstallableUnit; +import org.eclipse.equinox.p2.operations.ProvisioningSession; +import org.eclipse.equinox.p2.query.IQueryResult; +import org.eclipse.equinox.p2.query.QueryUtil; +import org.eclipse.equinox.p2.ui.ProvisioningUI; + +class P2Utils { + + public static Collection getKnownRepositories() { + ProvisioningUI provisioningUI = ProvisioningUI.getDefaultUI(); + ProvisioningSession session = provisioningUI.getSession(); + URI[] uris = provisioningUI.getRepositoryTracker().getKnownRepositories(session); + return Arrays.asList(uris); + } + + public static Collection getInstalledFeatures(IProgressMonitor monitor) { + Set infos = new HashSet(); + ProvisioningUI provisioningUI = ProvisioningUI.getDefaultUI(); + ProvisioningSession session = provisioningUI.getSession(); + IProvisioningAgent agent = session.getProvisioningAgent(); + IProfileRegistry profileRegistry = (IProfileRegistry) agent.getService(IProfileRegistry.SERVICE_NAME); + IProfile profile = null; + if (profileRegistry != null) { + profile = profileRegistry.getProfile(provisioningUI.getProfileId()); + if (profile != null) { + IQueryResult result = + profile.query(QueryUtil.createIUGroupQuery(), monitor); + for (Iterator iterator = result.iterator(); iterator.hasNext();) { + infos.add(new FeatureInfo((IInstallableUnit) iterator.next())); + } + } + } + return infos; + } +} diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/wizard/Streamer.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/wizard/Streamer.java Fri Aug 20 09:39:24 2010 -0500 @@ -0,0 +1,145 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ +package com.nokia.carbide.internal.discovery.ui.wizard; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.URI; +import java.net.URISyntaxException; +import java.text.MessageFormat; + +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.parsers.SAXParser; +import javax.xml.parsers.SAXParserFactory; + +import org.eclipse.equinox.p2.metadata.Version; +import org.xml.sax.Attributes; +import org.xml.sax.SAXException; +import org.xml.sax.helpers.DefaultHandler; + +import com.nokia.carbide.discovery.ui.Activator; +import com.nokia.carbide.discovery.ui.Messages; + +/** + * Serializes feature infos and repository URIs into output stream as XML + * Example serialized single test connection: + * + *
    + *<featuresConfiguration version="1">
    + *	<autoImportOriginalVersions value="false"/>
    + *	<repository uri="http://cdn.symbian.org/carbide/updates/3.0/discovery"/>
    + *	<feature id="com.nokia.example.feature.group" version="1.0.0"/>
    + *</featuresConfiguration>
    + * 
    + */ +class Streamer { + + private static final String CURRENT_VERSION = "1"; //$NON-NLS-1$ + + private static final String ROOT_ELEMENT = "featuresConfiguration"; //$NON-NLS-1$ + private static final String WANTS_VERSIONS_ELEMENT = "wantsOriginalVersions"; //$NON-NLS-1$ + private static final String REPOSITORY_ELEMENT = "repository"; //$NON-NLS-1$ + private static final String FEATURE_ELEMENT = "feature"; //$NON-NLS-1$ + + private static final String VERSION_ATTR = "version"; //$NON-NLS-1$ + private static final String VALUE_ATTR = "value"; //$NON-NLS-1$ + private static final String URI_ATTR = "uri"; //$NON-NLS-1$ + private static final String ID_ATTR = "id"; //$NON-NLS-1$ + + private static final String XML_HEADER = "\n\n"; //$NON-NLS-1$ + + private static final String ROOT_START = "<" + ROOT_ELEMENT + " " + VERSION_ATTR + "=\"" + CURRENT_VERSION + "\">\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + private static final String ROOT_END = "\n"; //$NON-NLS-1$ //$NON-NLS-2$ + + private static final String ORIGINAL_VERSION_FMT = "\t<" + WANTS_VERSIONS_ELEMENT + " " + VALUE_ATTR + "=\"{0}\"/>\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + private static final String REPOSITORY_FMT = "\t<" + REPOSITORY_ELEMENT + " " + URI_ATTR + "=\"{0}\"/>\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + private static final String FEATURE_FMT = "\t<" + FEATURE_ELEMENT + " " + ID_ATTR + "=\"{0}\" " + VERSION_ATTR + "=\"{1}\"/>\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + + public static void writeToXML(OutputStream os, ImportExportData data) throws IOException { + os.write(XML_HEADER.getBytes()); + os.write(ROOT_START.getBytes()); + + // write auto-import original versions + String originalVersionElement = MessageFormat.format(ORIGINAL_VERSION_FMT, data.getWantsVersions()); + os.write(originalVersionElement.getBytes()); + + // write the repositories + for (URI uri : data.getURIs()) { + String repositoryElement = MessageFormat.format(REPOSITORY_FMT, uri); + os.write(repositoryElement.getBytes()); + } + + // write the featureInfos + for (FeatureInfo info : data.getFeatureInfos()) { + String featureElement = MessageFormat.format(FEATURE_FMT, info.getId(), info.getVersion()); + os.write(featureElement.getBytes()); + } + + os.write(ROOT_END.getBytes()); + os.close(); + } + + private static class ReadHandler extends DefaultHandler { + + private final ImportExportData data; + + public ReadHandler(ImportExportData data) { + this.data = data; + } + + @Override + public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { + if (ROOT_ELEMENT.equals(qName)) { + String versionStr = attributes.getValue(VERSION_ATTR); + if (!CURRENT_VERSION.equals(versionStr)) + throw new IllegalArgumentException( + MessageFormat.format(Messages.Streamer_BadVersionError, CURRENT_VERSION, ROOT_ELEMENT)); + } + else if (WANTS_VERSIONS_ELEMENT.equals(qName)) { + String wantsVersions = attributes.getValue(VALUE_ATTR); + data.setWantsVersions(Boolean.parseBoolean(wantsVersions)); + } + else if (REPOSITORY_ELEMENT.equals(qName)) { + String uriStr = attributes.getValue(URI_ATTR); + try { + data.addURI(new URI(uriStr)); + } catch (URISyntaxException e) { + Activator.logError(MessageFormat.format(Messages.Streamer_BadURIError, uriStr), e); + } + } + else if (FEATURE_ELEMENT.equals(qName)) { + String id = attributes.getValue(ID_ATTR); + String versionStr = attributes.getValue(VERSION_ATTR); + try { + Version version = Version.create(versionStr); + data.addFeatureInfo(new FeatureInfo(id, version)); + } catch (IllegalArgumentException e) { + Activator.logError(MessageFormat.format(Messages.Streamer_VersionParseError, versionStr), e); + } + } + } + } + + public static ImportExportData readFromXML(InputStream is) throws SAXException, IOException, ParserConfigurationException { + SAXParser parser = SAXParserFactory.newInstance().newSAXParser(); + ImportExportData data = new ImportExportData(); + parser.parse(is, new ReadHandler(data)); + return data; + } + +} diff -r e3bac873e5c8 -r 0142fe025ce6 core/com.nokia.carbide.search.system-feature/feature.xml --- a/core/com.nokia.carbide.search.system-feature/feature.xml Thu Aug 19 16:56:56 2010 -0500 +++ b/core/com.nokia.carbide.search.system-feature/feature.xml Fri Aug 20 09:39:24 2010 -0500 @@ -312,14 +312,6 @@
    - - - - - - - - diff -r e3bac873e5c8 -r 0142fe025ce6 debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/messages.properties --- a/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/messages.properties Thu Aug 19 16:56:56 2010 -0500 +++ b/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/messages.properties Fri Aug 20 09:39:24 2010 -0500 @@ -5,7 +5,7 @@ ConnectionStatusReconciler_NotReadyLabel=Not Ready ConnectionStatusReconciler_ReadyLabel=Ready ConnectionStatusReconciler_TracingServicePrefix=, Tracing service -ConnectionStatusReconciler_TRKServicePrefix=TRK service +ConnectionStatusReconciler_TRKServicePrefix=debugging services ConnectionStatusReconciler_unavailableLabel=unavailable TRKConnectedService.AppTRKName=Application TRK TRKConnectedService.DownLabel=Not Accessible diff -r e3bac873e5c8 -r 0142fe025ce6 debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/status/ConnectionStatusReconciler.java --- a/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/status/ConnectionStatusReconciler.java Thu Aug 19 16:56:56 2010 -0500 +++ b/debuggercdi/com.nokia.carbide.trk.support/src/com/nokia/carbide/trk/support/status/ConnectionStatusReconciler.java Fri Aug 20 09:39:24 2010 -0500 @@ -25,13 +25,13 @@ import org.eclipse.ui.PartInitException; import com.nokia.carbide.remoteconnections.RemoteConnectionsActivator; +import com.nokia.carbide.remoteconnections.interfaces.AbstractConnection.ConnectionStatus; import com.nokia.carbide.remoteconnections.interfaces.IConnectedService; +import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus; +import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus.EStatus; +import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatusChangedListener; import com.nokia.carbide.remoteconnections.interfaces.IConnection; import com.nokia.carbide.remoteconnections.interfaces.IConnectionsManager; -import com.nokia.carbide.remoteconnections.interfaces.AbstractConnection.ConnectionStatus; -import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus; -import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatusChangedListener; -import com.nokia.carbide.remoteconnections.interfaces.IConnectedService.IStatus.EStatus; import com.nokia.carbide.remoteconnections.interfaces.IConnectionsManager.IConnectionListener; import com.nokia.carbide.remoteconnections.internal.api.IConnection2; import com.nokia.carbide.remoteconnections.internal.api.IConnection2.IConnectionStatus; @@ -39,13 +39,12 @@ import com.nokia.carbide.trk.support.Messages; import com.nokia.carbide.trk.support.connection.USBConnectionType; import com.nokia.carbide.trk.support.service.TRKConnectedService; -import com.nokia.carbide.trk.support.service.TracingConnectedService; import com.nokia.cpp.internal.api.utils.ui.RunRunnableWhenWorkbenchVisibleJob; import com.nokia.cpp.internal.api.utils.ui.WorkbenchUtils; /** * A singleton object that manages the device status of dynamic connections - * based on the status of the TRK and Tracing services. + * based on the status of the debugging services. */ public class ConnectionStatusReconciler { @@ -121,8 +120,7 @@ private void addConnection(IConnection connection) { handledConnections.add(connection); for (IConnectedService service : manager.getConnectedServices(connection)) { - if (service instanceof TRKConnectedService || - service instanceof TracingConnectedService) { + if (service instanceof TRKConnectedService || isTCFTRKService(service)) { service.addStatusChangedListener(serviceStatusListener); } } @@ -213,35 +211,34 @@ boolean isSysTRK = false; EStatus trkStatus = EStatus.UNKNOWN; - EStatus traceStatus = EStatus.UNKNOWN; + EStatus tcfTRKStatus = EStatus.UNKNOWN; for (IConnectedService service : manager.getConnectedServices(connection)) { if (service instanceof TRKConnectedService) { isSysTRK = isSysTRK((TRKConnectedService) service); trkStatus = service.getStatus().getEStatus(); } - if (service instanceof TracingConnectedService) { - traceStatus = service.getStatus().getEStatus(); + if (isTCFTRKService(service)) { //$NON-NLS-1$ + tcfTRKStatus = service.getStatus().getEStatus(); } } - setConnectionStatus((IConnection2) connection, isSysTRK, trkStatus, traceStatus); + setConnectionStatus((IConnection2) connection, isSysTRK, trkStatus, tcfTRKStatus); } - private void setConnectionStatus(IConnection2 connection, boolean isSysTRK, EStatus trkStatus, EStatus traceStatus) { - // use trk status - EConnectionStatus connectionStatus = service2ConnectionStatus(trkStatus); - // NOTE: removing trace status logic for now -// // if sys trk, tracing also used -// if (isSysTRK && connectionStatus.equals(EConnectionStatus.READY)) { -// connectionStatus = service2ConnectionStatus(traceStatus); -// } + private boolean isTCFTRKService(IConnectedService service) { + return service.getService().getIdentifier().equals("com.nokia.carbide.cpp.edc.TCFTRKService"); + } + + private void setConnectionStatus(IConnection2 connection, boolean isSysTRK, EStatus trkStatus, EStatus tcfTRKStatus) { + EStatus serviceStatus = tcfTRKStatus; + EConnectionStatus connectionStatus = service2ConnectionStatus(serviceStatus); + if (!connectionStatus.equals(EConnectionStatus.READY)) { + serviceStatus = trkStatus; + connectionStatus = service2ConnectionStatus(serviceStatus); + } String shortDesc = getShortDescriptionForStatus(connectionStatus); StringBuilder longDesc = new StringBuilder(Messages.getString("ConnectionStatusReconciler_TRKServicePrefix")); //$NON-NLS-1$ - longDesc.append(getServiceStatusString(trkStatus)); -// if (isSysTRK) { -// longDesc.append(Messages.getString("ConnectionStatusReconciler_TracingServicePrefix")); //$NON-NLS-1$ -// longDesc.append(getServiceStatusString(traceStatus)); -// } + longDesc.append(getServiceStatusString(serviceStatus)); connection.setStatus(new ConnectionStatus(connectionStatus, shortDesc, longDesc.toString())); } diff -r e3bac873e5c8 -r 0142fe025ce6 debuggercdi/com.nokia.cdt.debug.cw.symbian/src/com/nokia/cdt/debug/cw/symbian/SettingsData.java --- a/debuggercdi/com.nokia.cdt.debug.cw.symbian/src/com/nokia/cdt/debug/cw/symbian/SettingsData.java Thu Aug 19 16:56:56 2010 -0500 +++ b/debuggercdi/com.nokia.cdt.debug.cw.symbian/src/com/nokia/cdt/debug/cw/symbian/SettingsData.java Fri Aug 20 09:39:24 2010 -0500 @@ -21,7 +21,6 @@ import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; -import java.util.HashSet; import java.util.List; import org.eclipse.cdt.core.CCorePlugin; @@ -42,8 +41,6 @@ import org.eclipse.debug.core.ILaunchConfiguration; import org.eclipse.debug.core.ILaunchConfigurationType; import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; -import org.eclipse.debug.core.ILaunchDelegate; -import org.eclipse.debug.core.ILaunchManager; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IWorkbenchWindow; @@ -348,21 +345,6 @@ configuration.setAttribute(PreferenceConstants.J_PN_ProgramArguments, ""); //$NON-NLS-1$ configuration.setAttribute(RemoteConnectionsTRKHelper.CONNECTION_ATTRIBUTE, Registry.CURRENT_CONNECTION_ID); - HashSet set = new HashSet(); - set.add(ILaunchManager.DEBUG_MODE); - try { - ILaunchDelegate preferredDelegate = configuration.getPreferredDelegate(set); - if (preferredDelegate == null) { - if (configuration.getType().getIdentifier().equals(APP_TRK_LAUNCH_TYPE_ID)) { - configuration.setPreferredLaunchDelegate(set, "com.nokia.carbide.cpp.edc.launch.appTRKLaunchDelegate"); //$NON-NLS-1$ - } else if (configuration.getType().getIdentifier().equals(SYS_TRK_LAUNCH_TYPE_ID)) { - configuration.setPreferredLaunchDelegate(set, "com.nokia.carbide.cpp.edc.launch.systemTRKLaunchDelegate"); //$NON-NLS-1$ - } else if (configuration.getType().getIdentifier().equals(ATTACH_LAUNCH_TYPE_ID)) { - configuration.setPreferredLaunchDelegate(set, "com.nokia.carbide.cpp.edc.launch.attachLaunchDelegate"); //$NON-NLS-1$ - } - } - } catch (CoreException e) {} - if (project != null) { String projectName = project.getName(); configuration.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, projectName); diff -r e3bac873e5c8 -r 0142fe025ce6 debuggercdi/com.nokia.cdt.debug.launch/META-INF/MANIFEST.MF --- a/debuggercdi/com.nokia.cdt.debug.launch/META-INF/MANIFEST.MF Thu Aug 19 16:56:56 2010 -0500 +++ b/debuggercdi/com.nokia.cdt.debug.launch/META-INF/MANIFEST.MF Fri Aug 20 09:39:24 2010 -0500 @@ -20,7 +20,6 @@ com.freescale.swt, org.eclipse.ui.forms, org.eclipse.ui.ide, - com.nokia.carbide.cpp.debug.kernelaware, com.nokia.carbide.cdt.builder, com.nokia.carbide.cpp.sdk.core, com.nokia.carbide.cpp.ui, diff -r e3bac873e5c8 -r 0142fe025ce6 debuggercdi/com.nokia.cdt.debug.launch/icons/Launch/dtool16/debug_exc.gif Binary file debuggercdi/com.nokia.cdt.debug.launch/icons/Launch/dtool16/debug_exc.gif has changed diff -r e3bac873e5c8 -r 0142fe025ce6 debuggercdi/com.nokia.cdt.debug.launch/icons/Launch/dtool16/environment_co.gif Binary file debuggercdi/com.nokia.cdt.debug.launch/icons/Launch/dtool16/environment_co.gif has changed diff -r e3bac873e5c8 -r 0142fe025ce6 debuggercdi/com.nokia.cdt.debug.launch/icons/Launch/dtool16/profile_exc.gif Binary file debuggercdi/com.nokia.cdt.debug.launch/icons/Launch/dtool16/profile_exc.gif has changed diff -r e3bac873e5c8 -r 0142fe025ce6 debuggercdi/com.nokia.cdt.debug.launch/icons/Launch/dtool16/run_exc.gif Binary file debuggercdi/com.nokia.cdt.debug.launch/icons/Launch/dtool16/run_exc.gif has changed diff -r e3bac873e5c8 -r 0142fe025ce6 debuggercdi/com.nokia.cdt.debug.launch/icons/Launch/dtool16/term_restart.gif Binary file debuggercdi/com.nokia.cdt.debug.launch/icons/Launch/dtool16/term_restart.gif has changed diff -r e3bac873e5c8 -r 0142fe025ce6 debuggercdi/com.nokia.cdt.debug.launch/icons/Launch/dtool16/watch_exp.gif Binary file debuggercdi/com.nokia.cdt.debug.launch/icons/Launch/dtool16/watch_exp.gif has changed diff -r e3bac873e5c8 -r 0142fe025ce6 debuggercdi/com.nokia.cdt.debug.launch/icons/Launch/etool16/debug_exc.png Binary file debuggercdi/com.nokia.cdt.debug.launch/icons/Launch/etool16/debug_exc.png has changed diff -r e3bac873e5c8 -r 0142fe025ce6 debuggercdi/com.nokia.cdt.debug.launch/icons/Launch/etool16/environment_co.gif Binary file debuggercdi/com.nokia.cdt.debug.launch/icons/Launch/etool16/environment_co.gif has changed diff -r e3bac873e5c8 -r 0142fe025ce6 debuggercdi/com.nokia.cdt.debug.launch/icons/Launch/etool16/error_obj.gif Binary file debuggercdi/com.nokia.cdt.debug.launch/icons/Launch/etool16/error_obj.gif has changed diff -r e3bac873e5c8 -r 0142fe025ce6 debuggercdi/com.nokia.cdt.debug.launch/icons/Launch/etool16/profile_exc.gif Binary file debuggercdi/com.nokia.cdt.debug.launch/icons/Launch/etool16/profile_exc.gif has changed diff -r e3bac873e5c8 -r 0142fe025ce6 debuggercdi/com.nokia.cdt.debug.launch/icons/Launch/etool16/run_exc.png Binary file debuggercdi/com.nokia.cdt.debug.launch/icons/Launch/etool16/run_exc.png has changed diff -r e3bac873e5c8 -r 0142fe025ce6 debuggercdi/com.nokia.cdt.debug.launch/icons/Launch/etool16/term_restart.gif Binary file debuggercdi/com.nokia.cdt.debug.launch/icons/Launch/etool16/term_restart.gif has changed diff -r e3bac873e5c8 -r 0142fe025ce6 debuggercdi/com.nokia.cdt.debug.launch/icons/Launch/etool16/warning_obj.gif Binary file debuggercdi/com.nokia.cdt.debug.launch/icons/Launch/etool16/warning_obj.gif has changed diff -r e3bac873e5c8 -r 0142fe025ce6 debuggercdi/com.nokia.cdt.debug.launch/icons/Launch/etool16/watch_exp.gif Binary file debuggercdi/com.nokia.cdt.debug.launch/icons/Launch/etool16/watch_exp.gif has changed diff -r e3bac873e5c8 -r 0142fe025ce6 debuggercdi/com.nokia.cdt.debug.launch/icons/NewProjectAssist/build.gif Binary file debuggercdi/com.nokia.cdt.debug.launch/icons/NewProjectAssist/build.gif has changed diff -r e3bac873e5c8 -r 0142fe025ce6 debuggercdi/com.nokia.cdt.debug.launch/icons/NewProjectAssist/debug.gif Binary file debuggercdi/com.nokia.cdt.debug.launch/icons/NewProjectAssist/debug.gif has changed diff -r e3bac873e5c8 -r 0142fe025ce6 debuggercdi/com.nokia.cdt.debug.launch/icons/NewProjectAssist/explore.gif Binary file debuggercdi/com.nokia.cdt.debug.launch/icons/NewProjectAssist/explore.gif has changed diff -r e3bac873e5c8 -r 0142fe025ce6 debuggercdi/com.nokia.cdt.debug.launch/icons/NewProjectAssist/run.gif Binary file debuggercdi/com.nokia.cdt.debug.launch/icons/NewProjectAssist/run.gif has changed diff -r e3bac873e5c8 -r 0142fe025ce6 debuggercdi/com.nokia.cdt.debug.launch/icons/warning_obj.gif Binary file debuggercdi/com.nokia.cdt.debug.launch/icons/warning_obj.gif has changed diff -r e3bac873e5c8 -r 0142fe025ce6 debuggercdi/com.nokia.cdt.debug.launch/plugin.xml --- a/debuggercdi/com.nokia.cdt.debug.launch/plugin.xml Thu Aug 19 16:56:56 2010 -0500 +++ b/debuggercdi/com.nokia.cdt.debug.launch/plugin.xml Fri Aug 20 09:39:24 2010 -0500 @@ -16,39 +16,6 @@ id="com.nokia.cdt.debug.launch.emulationLaunchDelegate"> - - - - - - - - - - - - - - - - - - - - - diff -r e3bac873e5c8 -r 0142fe025ce6 debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/AttachLaunchDelegate.java --- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/AttachLaunchDelegate.java Thu Aug 19 16:56:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,220 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -package com.nokia.cdt.internal.debug.launch; - -import org.eclipse.cdt.core.IBinaryParser.IBinaryObject; -import org.eclipse.cdt.core.model.ICProject; -import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants; -import org.eclipse.cdt.debug.core.ICDebugConfiguration; -import org.eclipse.cdt.debug.core.cdi.ICDISession; -import org.eclipse.cdt.launch.internal.ui.LaunchMessages; -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.NullProgressMonitor; -import org.eclipse.core.runtime.Path; -import org.eclipse.core.runtime.Status; -import org.eclipse.core.runtime.SubProgressMonitor; -import org.eclipse.debug.core.DebugException; -import org.eclipse.debug.core.ILaunch; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.ILaunchManager; -import org.eclipse.swt.widgets.Display; - -import com.freescale.cdt.debug.cw.core.RemoteConnectionsTRKHelper; -import com.freescale.cdt.debug.cw.core.cdi.Session; -import com.freescale.cdt.debug.cw.core.os.OSProcess; -import com.nokia.carbide.remoteconnections.interfaces.IConnection; -import com.nokia.cdt.debug.cw.symbian.SettingsData; -import com.nokia.cdt.debug.cw.symbian.SymbianPlugin; -import com.nokia.cdt.internal.debug.launch.ui.ChooseProcessDialog; - -import cwdbg.PreferenceConstants; - -public class AttachLaunchDelegate extends TRKLaunchDelegate { - - private OSProcess attachTarget; - - @Override - public void launch(ILaunchConfiguration config, String mode, - ILaunch launch, IProgressMonitor monitor) throws CoreException { - // See comment at definition of the "mutex" for why this "synchronized". - synchronized(Session.sessionStartStopMutex()) { - - if (monitor == null) { - monitor = new NullProgressMonitor(); - } - - monitor.beginTask(LaunchMessages.getString("LocalRunLaunchDelegate.Launching_Local_C_Application"), 10); //$NON-NLS-1$ - // check for cancellation - if (monitor.isCanceled()) { - return; - } - - if (!RemoteConnectionsTRKHelper.configUsesConnectionAttribute(config)) { - config = RemoteConnectionsTRKHelper.attemptUpdateLaunchConfiguration(config.getWorkingCopy()); - } - - final IConnection connection = RemoteConnectionsTRKHelper.ensureConnectionFromConfig(config); - if (connection == null) { - IStatus status = new Status(Status.ERROR, LaunchPlugin.PLUGIN_ID, - LaunchMessages.getString("TRKLaunchDelegate.NoConnectionErrorMsg")); //$NON-NLS-1$ - throw new DebugException(status); - } - connection.useConnection(true); - - try { - addBeingLaunched(config); // indicating the LC is being launched - - monitor.worked(1); - IPath exePath = verifyProgramPath(config); - ICProject project = verifyCProject(config); - IBinaryObject exeFile = verifyBinary(project, exePath); - - // See comment for this method for more. - SettingsData.setInternalPreferences(config, SettingsData.LaunchConfig_AppTRK); - - // set the default source locator if required - setDefaultSourceLocator(launch, config); - - if (mode.equals(ILaunchManager.DEBUG_MODE)) { - hookConnectionStatus(); - // debug mode - ICDebugConfiguration debugConfig = getDebugConfig(config); - ICDISession dsession = null; - String debugMode = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE, - ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN); - if (debugMode.equals(ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN)) { - dsession = debugConfig.createDebugger().createDebuggerSession(launch, exeFile, - new SubProgressMonitor(monitor, 8)); - - assert(dsession instanceof Session); - Session cwDebugSession = (Session)dsession; - - doAdditionalSessionSetup(cwDebugSession); - - IPath[] otherExecutables = getOtherExecutables(project, new Path(""), config, monitor); - { - try { - monitor.worked(1); - - // if enabled in the prefs, show the console view(s) - if (config.getAttribute(PreferenceConstants.J_PN_ViewUnframedData, false)) { - SymbianPlugin.getDefault().openUnframedDataConsole(true); - } - - if (config.getAttribute(PreferenceConstants.J_PN_ViewCommMessages, false)) { - SymbianPlugin.getDefault().openTRKCommLogConsole(true); - } - - config = synchronizeWithProjectAccessPaths(project, config); - - // Connect to device - cwDebugSession.connectRemote(monitor); - - // get processes on the device - OSProcess[] processesOnTarget = cwDebugSession.getTargetProcesses(); - - // Ask user to choose a process - String defaultProcessName = exeFile.getPath().removeFileExtension().lastSegment(); - OSProcess attachTarget = null; - String choosenProcessTarget = config.getAttribute(SettingsData.AttachToProcessDialog_Selection, ""); - if (choosenProcessTarget.length() > 0) { - attachTarget = chooseProcessTargetNoUI(processesOnTarget, choosenProcessTarget); - } else { - attachTarget = chooseProcessTarget(processesOnTarget, defaultProcessName); - } - - if (attachTarget == null) { - this.cancel(LaunchMessages.getString("LocalAttachLaunchDelegate.No_Process_ID_selected"), 0); //$NON-NLS-1$ - } else { - String processName = attachTarget.parseProcess().getProcessName(); - - for (IPath oExePath : otherExecutables) { - if (oExePath.lastSegment().startsWith(processName)) - exePath = oExePath; - } - - exeFile = verifyBinary(project, exePath); - - cwDebugSession.attachToProcess( - attachTarget, launch, config, - exeFile, otherExecutables, monitor, - project, - getTargetLabel(exeFile.getName())); - } - - } catch (CoreException e) { - Session session = (Session)dsession; - session.cleanupAfterLaunchFailure(); - throw e; - } catch (Exception e) { - Session session = (Session)dsession; - session.debuggingStopped(null); - this.abort(e.getLocalizedMessage(), null, 0); - } - } - } - hookSessionEnded(launch); - } else if (mode.equals(ILaunchManager.RUN_MODE)) { - // run mode not supported for attach - } - } catch (CoreException e) { - connection.useConnection(false); - unhookConnectionStatus(); - if (! monitor.isCanceled()) // don't throw on user cancellation - throw e; - } finally { - monitor.done(); - removeBeingLaunched(config); - } - } // end of synchronized. - } - - private OSProcess chooseProcessTarget(final OSProcess[] processesOnTarget, final String defaultProcessName) { - attachTarget = null; - - Display.getDefault().syncExec(new Runnable() { - - public void run() { - ChooseProcessDialog dialog = new ChooseProcessDialog( - processesOnTarget, defaultProcessName, Display.getDefault().getActiveShell()); - int dialogResult = dialog.open(); - - if (dialogResult == org.eclipse.jface.dialogs.Dialog.OK) { - attachTarget = dialog.getSelectedProcess(); - } - } - }); - - return attachTarget; - } - - private OSProcess chooseProcessTargetNoUI(final OSProcess[] processesOnTarget, final String choosenProcessName) { - attachTarget = null; - - for (OSProcess process : processesOnTarget) { - if (process.parseProcess().getProcessName().equals(choosenProcessName)) { - attachTarget = process; - break; - } - } - - return attachTarget; - } -} diff -r e3bac873e5c8 -r 0142fe025ce6 debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/LaunchMessages.properties --- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/LaunchMessages.properties Thu Aug 19 16:56:56 2010 -0500 +++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/LaunchMessages.properties Fri Aug 20 09:39:24 2010 -0500 @@ -1,5 +1,3 @@ CarbideCPPLaunchDelegate.DebuggerName=Carbide.c++ Debugger CarbideCPPLaunchDelegate.DebugUnderway=A debug session is running for the following launch configuration. Please kill the existing session before launching another one.\n -TRKLaunchDelegate.runSucceed=The following program is successfully launched on device. -TRKLaunchDelegate.NoConnectionErrorMsg=The connection for this launch configuration has been deleted. Please edit the configuration and select a valid connection. NokiaAbstractLaunchDelegate.LaunchUnderway=Launching "{0}" is already underway. Please find it in Progress View where you can either wait for it to finish or cancel it. \ No newline at end of file diff -r e3bac873e5c8 -r 0142fe025ce6 debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/LaunchPlugin.java --- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/LaunchPlugin.java Thu Aug 19 16:56:56 2010 -0500 +++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/LaunchPlugin.java Fri Aug 20 09:39:24 2010 -0500 @@ -18,8 +18,6 @@ import java.util.ArrayList; import java.util.List; -import java.util.MissingResourceException; -import java.util.ResourceBundle; import org.eclipse.cdt.core.model.CModelException; import org.eclipse.cdt.core.model.CoreModel; @@ -31,42 +29,23 @@ 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.Status; import org.eclipse.debug.core.DebugPlugin; -import org.eclipse.debug.core.ILaunch; import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.ILaunchConfigurationListener; import org.eclipse.debug.core.ILaunchConfigurationType; import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; -import org.eclipse.debug.core.ILaunchListener; import org.eclipse.debug.core.ILaunchManager; -import org.eclipse.debug.ui.AbstractDebugView; import org.eclipse.debug.ui.DebugUITools; import org.eclipse.debug.ui.IDebugUIConstants; -import org.eclipse.debug.ui.IDebugView; -import org.eclipse.debug.ui.contexts.DebugContextEvent; -import org.eclipse.debug.ui.contexts.IDebugContextListener; -import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.resource.ImageDescriptor; -import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.swt.widgets.Display; -import org.eclipse.ui.IActionBars; -import org.eclipse.ui.IPartListener2; -import org.eclipse.ui.IStartup; -import org.eclipse.ui.IWindowListener; -import org.eclipse.ui.IWorkbenchPage; -import org.eclipse.ui.IWorkbenchPartReference; import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.eclipse.ui.progress.UIJob; import org.osgi.framework.BundleContext; -import com.freescale.cdt.debug.cw.core.CWPlugin; -import com.freescale.cdt.debug.cw.core.ui.ShowAllVariablesToggleAction; import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin; import com.nokia.carbide.cdt.builder.EpocEngineHelper; import com.nokia.carbide.cdt.builder.project.ICarbideBuildConfiguration; @@ -82,7 +61,7 @@ /** * The main plugin class to be used in the desktop. */ -public class LaunchPlugin extends AbstractUIPlugin implements ILaunchListener, ILaunchConfigurationListener, IStartup { +public class LaunchPlugin extends AbstractUIPlugin { public interface ILaunchCreationWizardFactory { ILaunchCreationWizard createLaunchCreationWizard(LaunchOptions launchOptions) throws Exception; @@ -90,24 +69,14 @@ //The shared instance. private static LaunchPlugin plugin; - //Resource bundle. - private ResourceBundle resourceBundle; - - private ArrayList recentlyLaunchedConfigs = new ArrayList(); public static final String PLUGIN_ID = "com.nokia.cdt.debug.launch"; //$NON-NLS-1$ public static final String EMULATION_LAUNCH_TYPE = "com.nokia.cdt.debug.launch.emulationLaunch"; //$NON-NLS-1$ - public static final String PROXY_LAUNCH_TYPE = "com.nokia.cdt.debug.launch.proxyLaunch"; //$NON-NLS-1$ public static final String REMOTE_CONNECTIONS_TRK_SERVICE = "com.nokia.carbide.trk.support.service.TRKService"; //$NON-NLS-1$ public static final String REMOTE_CONNECTIONS_TRACING_SERVICE = "com.nokia.carbide.trk.support.service.TracingService"; //$NON-NLS-1$ - // Preference constants - public static final String Use_New_Project_Assist = "com.nokia.cdt.debug.launch.Use_New_Project_Assist"; //$NON-NLS-1$ - - - /** * The constructor. @@ -122,9 +91,6 @@ */ public void start(BundleContext context) throws Exception { super.start(context); - - DebugPlugin.getDefault().getLaunchManager().addLaunchListener(this); - DebugPlugin.getDefault().getLaunchManager().addLaunchConfigurationListener(this); } /** @@ -133,10 +99,6 @@ public void stop(BundleContext context) throws Exception { super.stop(context); plugin = null; - resourceBundle = null; - - DebugPlugin.getDefault().getLaunchManager().removeLaunchListener(this); - DebugPlugin.getDefault().getLaunchManager().removeLaunchConfigurationListener(this); } /** @@ -147,32 +109,6 @@ } /** - * Returns the string from the plugin's resource bundle, - * or 'key' if not found. - */ - public static String getResourceString(String key) { - ResourceBundle bundle = LaunchPlugin.getDefault().getResourceBundle(); - try { - return (bundle != null) ? bundle.getString(key) : key; - } catch (MissingResourceException e) { - return key; - } - } - - /** - * Returns the plugin's resource bundle, - */ - public ResourceBundle getResourceBundle() { - try { - if (resourceBundle == null) - resourceBundle = ResourceBundle.getBundle("com.nokia.cdt.debug.launch.LaunchPluginResources"); //$NON-NLS-1$ - } catch (MissingResourceException x) { - resourceBundle = null; - } - return resourceBundle; - } - - /** * Convenience method which returns the unique identifier of this plugin. */ public static String getUniqueIdentifier() { @@ -204,11 +140,7 @@ return getLaunchManager().getLaunchConfigurationType(LaunchPlugin.EMULATION_LAUNCH_TYPE); } - public ILaunchConfigurationType getProxyLaunchConfigType() { - return getLaunchManager().getLaunchConfigurationType(LaunchPlugin.PROXY_LAUNCH_TYPE); - } - - protected ILaunchManager getLaunchManager() { + private ILaunchManager getLaunchManager() { return DebugPlugin.getDefault().getLaunchManager(); } @@ -448,155 +380,10 @@ return AbstractUIPlugin.imageDescriptorFromPlugin("com.nokia.cdt.debug.launch", path); //$NON-NLS-1$ } - public void launchRemoved(ILaunch launch) { - // don't care about this - } - - public void launchAdded(ILaunch launch) { - // keep a list of recent launches. we're really just interested in the - // order so we can launch the most recently used config if more than one - // exists for a particular project/build config combo. - ILaunchConfiguration config = launch.getLaunchConfiguration(); - if (recentlyLaunchedConfigs.contains(config)) { - recentlyLaunchedConfigs.remove(config); - } - - // insert at the front of the list - recentlyLaunchedConfigs.add(0, config); - } - - public void launchChanged(ILaunch launch) { - // don't care about this - } - - public void launchConfigurationAdded(ILaunchConfiguration configuration) { - // don't care about this - } - - public void launchConfigurationChanged(ILaunchConfiguration configuration) { - // don't care about this - } - - public void launchConfigurationRemoved(ILaunchConfiguration configuration) { - // remove this launch config from our list of recent launches if necessary - if (recentlyLaunchedConfigs.contains(configuration)) { - recentlyLaunchedConfigs.remove(configuration); - } - } - - public void earlyStartup() { - UIJob earlyJob = new UIJob("Startup"){//$NON-NLS-1$ - - @Override - public IStatus runInUIThread(IProgressMonitor monitor) { - listenForVariablesView(); - return Status.OK_STATUS; - }}; - // earlyJob.schedule(); - } - public static IProject getSelectedProject() { return CarbideBuilderPlugin.getProjectInContext(); } - public void addShowAllVariablesAction(final IDebugView variablesView) - { - UIJob installSAVJob = new UIJob("Show All Variables Action"){//$NON-NLS-1$ - - @Override - public IStatus runInUIThread(IProgressMonitor monitor) { - ShowAllVariablesToggleAction showAllVarsAction = new ShowAllVariablesToggleAction(); - variablesView.setAction("com.freescale.cdt.debug.cw.core.ui.showAllVariablesToggle", showAllVarsAction); //$NON-NLS-1$ - - IActionBars actionBars = variablesView.getViewSite().getActionBars(); - IMenuManager viewMenu = actionBars.getMenuManager(); - viewMenu.add(showAllVarsAction); - return Status.OK_STATUS; - }}; - - installSAVJob.schedule(); - - } - - private void addVariablesViewListener(IWorkbenchWindow window) - { - window.getPartService().addPartListener(new IPartListener2() { - - public void partActivated(IWorkbenchPartReference partRef) {} - - public void partBroughtToTop(IWorkbenchPartReference partRef) {} - - public void partClosed(IWorkbenchPartReference partRef) {} - - public void partDeactivated(IWorkbenchPartReference partRef) {} - - public void partHidden(IWorkbenchPartReference partRef) {} - - public void partInputChanged(IWorkbenchPartReference partRef) {} - - public void partOpened(IWorkbenchPartReference partRef) { - if (partRef.getId().equals(IDebugUIConstants.ID_VARIABLE_VIEW)) - { - IDebugView variablesView = (IDebugView) partRef.getPart(true); - addShowAllVariablesAction(variablesView); - } - } - - public void partVisible(IWorkbenchPartReference partRef) {}}); - } - - private void setupShowAllVariablesAction(IWorkbenchWindow window) - { - IWorkbenchPage page = window.getActivePage(); - AbstractDebugView variablesView = (AbstractDebugView) page.findView(IDebugUIConstants.ID_VARIABLE_VIEW); - if (variablesView == null) - addVariablesViewListener(window); - else - addShowAllVariablesAction(variablesView); - - DebugUITools.getDebugContextManager().getContextService(window).addDebugContextListener(new IDebugContextListener() { - - public void debugContextChanged(DebugContextEvent event) { - if ((event.getFlags() & DebugContextEvent.ACTIVATED) > 0) { - contextActivated(event.getContext()); - } - } - - private void contextActivated(ISelection context) { - CWPlugin.setDebugContext(((IStructuredSelection) context).getFirstElement()); - }}); - - } - - public void listenForVariablesView() - { - - Display.getDefault().asyncExec(new Runnable() { - public void run() { - - IWorkbenchWindow[] windows = getDefault().getWorkbench().getWorkbenchWindows(); - - for (int i = 0; i < windows.length; i++) { - setupShowAllVariablesAction(windows[i]); - } - - getDefault().getWorkbench().addWindowListener(new IWindowListener() { - - public void windowActivated(IWorkbenchWindow window) {} - - public void windowClosed(IWorkbenchWindow window) {} - - public void windowDeactivated(IWorkbenchWindow window) {} - - public void windowOpened(IWorkbenchWindow window) { - setupShowAllVariablesAction(window); - }}); - - } - }); - - } - public static IService getTRKService() { return RemoteConnectionsActivator.getConnectionTypeProvider(). findServiceByID(REMOTE_CONNECTIONS_TRK_SERVICE); diff -r e3bac873e5c8 -r 0142fe025ce6 debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/NokiaAbstractLaunchDelegate.java --- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/NokiaAbstractLaunchDelegate.java Thu Aug 19 16:56:56 2010 -0500 +++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/NokiaAbstractLaunchDelegate.java Fri Aug 20 09:39:24 2010 -0500 @@ -47,7 +47,6 @@ import com.freescale.cdt.debug.cw.core.cdi.Session; import com.nokia.carbide.cdt.builder.builder.CarbideCPPBuilder; -import com.nokia.carbide.cpp.debug.kernelaware.OSDataManager; import com.nokia.cdt.debug.common.internal.source.lookup.SourceMappingUtils; import com.nokia.cdt.debug.cw.symbian.ui.executables.ExecutableTargeted; import com.nokia.cdt.internal.debug.launch.ui.ExecutablesTab; @@ -188,8 +187,6 @@ } protected void doAdditionalSessionSetup(Session session) { - if (session.getOSDataManager() == null) - session.setOSDataManager(new OSDataManager(session)); session.setExecutableTargetedCallback(new ExecutableTargeted()); } @@ -314,29 +311,6 @@ return false; } - // Move to CDT when the import wizard is integrated. There is another copy - // of this function in the import wizard code. - private void waitForParsingToComplete() { - // After adding the binary parsers to the project we have to wait for - // them to finish - // before we can extract a good list of source files. - String binaryTaskName = ""; //$NON-NLS-1$ - - IJobManager jobMan = Job.getJobManager(); - Job[] jobs = jobMan.find(null); - - for (int i = 0; i < jobs.length; i++) { - if (jobs[i].getName().equals(binaryTaskName)) { - try { - jobs[i].join(); - } catch (InterruptedException e) { - } - } - } - } - - - protected String getTargetLabel(String processName) { String format = "{0} (Launched {1})"; //$NON-NLS-1$ String timestamp = DateFormat.getInstance().format(new Date(System.currentTimeMillis())); diff -r e3bac873e5c8 -r 0142fe025ce6 debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/TRKLaunchDelegate.java --- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/TRKLaunchDelegate.java Thu Aug 19 16:56:56 2010 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,426 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ -package com.nokia.cdt.internal.debug.launch; - -import java.io.File; -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.cdt.core.IBinaryParser.IBinaryObject; -import org.eclipse.cdt.core.model.ICProject; -import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants; -import org.eclipse.cdt.debug.core.ICDebugConfiguration; -import org.eclipse.cdt.debug.core.cdi.ICDISession; -import org.eclipse.cdt.ui.CUIPlugin; -import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.IConfigurationElement; -import org.eclipse.core.runtime.IPath; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.NullProgressMonitor; -import org.eclipse.core.runtime.Path; -import org.eclipse.core.runtime.Platform; -import org.eclipse.core.runtime.Status; -import org.eclipse.core.runtime.SubProgressMonitor; -import org.eclipse.debug.core.DebugException; -import org.eclipse.debug.core.ILaunch; -import org.eclipse.debug.core.ILaunchConfiguration; -import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; -import org.eclipse.debug.core.ILaunchManager; -import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.swt.widgets.Display; - -import com.freescale.cdt.debug.cw.CWException; -import com.freescale.cdt.debug.cw.core.RemoteConnectionsTRKHelper; -import com.freescale.cdt.debug.cw.core.cdi.ISessionListener; -import com.freescale.cdt.debug.cw.core.cdi.Session; -import com.freescale.cdt.debug.cw.core.cdi.model.Target; -import com.nokia.carbide.cdt.builder.CarbideBuilderPlugin; -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.remoteconnections.interfaces.IConnection; -import com.nokia.carbide.remoteconnections.internal.api.IConnection2; -import com.nokia.carbide.remoteconnections.internal.api.IConnection2.IConnectionStatus; -import com.nokia.carbide.remoteconnections.internal.api.IConnection2.IConnectionStatusChangedListener; -import com.nokia.carbide.remoteconnections.internal.api.IConnection2.IConnectionStatus.EConnectionStatus; -import com.nokia.cdt.debug.common.internal.api.ILaunchDelegateConnectionExtension; -import com.nokia.cdt.debug.cw.symbian.SettingsData; -import com.nokia.cdt.debug.cw.symbian.SymbianPlugin; -import com.nokia.cdt.internal.debug.launch.ui.PartialUpgradeAlertDialog; - -import cwdbg.PreferenceConstants; - -public class TRKLaunchDelegate extends NokiaAbstractLaunchDelegate { - - private static final String DONT_ASK_ABOUT_PARTIAL_UPGRADE_OPTION = "DONT_ASK_ABOUT_PARTIAL_UPGRADE_OPTION"; //$NON-NLS-1$ - private static final int LARGE_SIS_THRESHOLD = 250 * 1024; // 250K - - protected Session cwDebugSession; - protected IConnection connection; - private IConnectionStatusChangedListener connectionStatusChangedListener; - private List connectionExtensions; - - public void launch( - ILaunchConfiguration config, - final String mode, - final ILaunch launch, - IProgressMonitor monitor) throws CoreException - { - // See comment at definition of the "mutex" for why this "synchronized". - synchronized(Session.sessionStartStopMutex()) { - - cwDebugSession = null; - - if (monitor == null) { - monitor = new NullProgressMonitor(); - } - - monitor.beginTask(LaunchMessages.getString("LocalRunLaunchDelegate.Launching_Local_C_Application"), 30); //$NON-NLS-1$ - // check for cancellation - if (monitor.isCanceled()) { - return; - } - - if (!RemoteConnectionsTRKHelper.configUsesConnectionAttribute(config)) { - config = RemoteConnectionsTRKHelper.attemptUpdateLaunchConfiguration(config.getWorkingCopy()); - } - - connection = RemoteConnectionsTRKHelper.ensureConnectionFromConfig(config); - if (connection == null) { - IStatus status = new Status(Status.ERROR, LaunchPlugin.PLUGIN_ID, - LaunchMessages.getString("TRKLaunchDelegate.NoConnectionErrorMsg")); //$NON-NLS-1$ - throw new DebugException(status); - } - - invokeConnectionSpecificSetup(launch, new SubProgressMonitor(monitor, 5)); - - connection.useConnection(true); - try { - addBeingLaunched(config); // indicating the LC is being launched - - monitor.worked(1); - IPath exePath = verifyProgramPath(config); - ICProject project = verifyCProject(config); - IBinaryObject exeFile = verifyBinary(project, exePath); - String arguments[] = getProgramArgumentsArray(config); - - // See comment for this method for more. - SettingsData.setInternalPreferences(config, SettingsData.LaunchConfig_AppTRK); - - // set the partial upgrade pref value - ILaunchConfigurationWorkingCopy workingCopy = config.getWorkingCopy(); - workingCopy.setAttribute(PreferenceConstants.J_PN_PUSisFileHostPath, ""); //$NON-NLS-1$ - - String sisHostPath = config.getAttribute(PreferenceConstants.J_PN_SisFileHostPath, ""); //$NON-NLS-1$ - if (sisHostPath.length() > 0) { - // app trk launch - see if there's a partial upgrade sis file - IPath sisPath = new Path(sisHostPath); - String buildConfigName = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_BUILD_CONFIG_ID, ""); //$NON-NLS-1$ - if (buildConfigName.length() > 0) { - ICarbideProjectInfo cpi = CarbideBuilderPlugin.getBuildManager().getProjectInfo(project.getProject()); - if (cpi != null) { - for (ICarbideBuildConfiguration buildConfig : cpi.getBuildConfigurations()) { - if (buildConfig.getDisplayString().equals(buildConfigName)) { - IPath puSisPath = CarbideCPPBuilder.getPartialUpgradeSisPath(buildConfig, sisPath); - if (puSisPath != null && puSisPath.toFile().exists()) { - workingCopy.setAttribute(PreferenceConstants.J_PN_PUSisFileHostPath, puSisPath.toOSString()); - } - break; - } - } - } - } - } - - // save the changes - workingCopy.doSave(); - - // set the default source locator if required - setDefaultSourceLocator(launch, config); - - if (mode.equals(ILaunchManager.DEBUG_MODE)) { - hookConnectionStatus(); - // debug mode - ICDebugConfiguration debugConfig = getDebugConfig(config); - ICDISession dsession = null; - String debugMode = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE, - ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN); - if (debugMode.equals(ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN)) { - dsession = debugConfig.createDebugger().createDebuggerSession(launch, exeFile, - new SubProgressMonitor(monitor, 8)); - - assert(dsession instanceof Session); - cwDebugSession = (Session)dsession; - - doAdditionalSessionSetup(cwDebugSession); - - IPath[] otherExecutables = getOtherExecutables(project, exePath, config, new SubProgressMonitor(monitor, 1)); - { - try { - monitor.worked(1); - - // if enabled in the prefs, show the console view(s) - if (config.getAttribute(PreferenceConstants.J_PN_ViewUnframedData, false)) { - SymbianPlugin.getDefault().openUnframedDataConsole(true); - } - - if (config.getAttribute(PreferenceConstants.J_PN_ViewCommMessages, false)) { - SymbianPlugin.getDefault().openTRKCommLogConsole(true); - } - - config = synchronizeWithProjectAccessPaths(project, config); - - File wd = getWorkingDirectory(config); - Target target = cwDebugSession.launchExecutable(launch, config, exeFile, otherExecutables, arguments, wd, getEnvironmentAsProperty(config), monitor, project, getTargetLabel(exeFile.getName()), true); - ATFLaunchSupport.saveDebugTargetFromLaunchDelegate(target.getCoreModelTarget()); - - } catch (CoreException e) { - Session session = (Session)dsession; - session.cleanupAfterLaunchFailure(); - throw e; - } catch (Exception e) { - Session session = (Session)dsession; - session.debuggingStopped(null); - this.abort(e.getLocalizedMessage(), null, 0); - } - } - } - hookSessionEnded(launch); - } - else if (mode.equals(ILaunchManager.RUN_MODE)) { - // Run the program. - // Connect to DE, download and launch the program, close debug session. - ICDebugConfiguration debugConfig = getDebugConfig(config); - ICDISession dsession = null; - - // Set up communication with DE. - dsession = debugConfig.createDebugger().createDebuggerSession(launch, exeFile, - new SubProgressMonitor(monitor, 8)); - - // Launch the program through the DE. - cwDebugSession = (Session)dsession; - cwDebugSession.launchExecutable( - launch, - config, - exeFile, - new IPath[0], - arguments, - null, - getEnvironmentAsProperty(config), - new SubProgressMonitor(monitor, 8), - project, - "", //$NON-NLS-1$ - false /* run instead of debug */); - - // The above call would throw exception on error. So it must have succeeded - // if control gets here. Show success message in a dialog. - // - // get the name of the executable that's launched instead of, say, the DLL name if - // exeFile is a DLL. - final String exeLaunched = config.getAttribute(PreferenceConstants.J_PN_RemoteProcessToLaunch, exeFile.toString()); - Display display = Display.getCurrent(); - if (display == null) { - display = Display.getDefault(); - } - - display.syncExec(new Runnable() { - public void run() { - shutdownConnection(launch); - MessageDialog.openInformation( - CUIPlugin.getActiveWorkbenchShell(), - LaunchMessages.getString("CarbideCPPLaunchDelegate.DebuggerName"), //$NON-NLS-1$ - LaunchMessages.getString("TRKLaunchDelegate.runSucceed") + //$NON-NLS-1$ - "\n\t\"" + exeLaunched + "\""); //$NON-NLS-1$ //$NON-NLS-2$ - } - }); - } - - invokeConnectionSpecificPostLaunch(launch, new SubProgressMonitor(monitor, 5)); - } catch (CWException e) { - shutdownConnection(launch); - unhookConnectionStatus(); - if (! monitor.isCanceled()) // don't throw on user cancellation - e.printStackTrace(); - } catch (CoreException e) { - shutdownConnection(launch); - unhookConnectionStatus(); - if (! monitor.isCanceled()) // don't throw on user cancellation - throw e; - } finally { - monitor.done(); - removeBeingLaunched(config); - } - } // end of synchronized. - } - - protected void shutdownConnection(ILaunch launch) { - try { - invokeConnectionSpecificShutdown(launch, new NullProgressMonitor()); - } catch (CoreException e) { - LaunchPlugin.log(e); - } finally { - connection.useConnection(false); - } - } - - /** Create the extensions every session, in case they hold state. */ - protected List getLaunchDelegateConnectionExtensions() { - if (connectionExtensions == null) { - connectionExtensions = new ArrayList(); - IConfigurationElement[] elements = - Platform.getExtensionRegistry().getConfigurationElementsFor(ILaunchDelegateConnectionExtension.ID); - for (IConfigurationElement element : elements) { - try { - connectionExtensions.add((ILaunchDelegateConnectionExtension) element.createExecutableExtension("class")); - } catch (CoreException e) { - LaunchPlugin.log(e); - } - } - } - return connectionExtensions; - } - - protected void invokeConnectionSpecificSetup(ILaunch launch, - IProgressMonitor monitor) throws CoreException { - List extensions = getLaunchDelegateConnectionExtensions(); - monitor.beginTask("", extensions.size()); - for (ILaunchDelegateConnectionExtension extension : extensions) { - extension.initializeConnection(launch, connection, new SubProgressMonitor(monitor, 1)); - } - monitor.done(); - } - - protected void invokeConnectionSpecificPostLaunch(ILaunch launch, - IProgressMonitor monitor) throws CoreException { - List extensions = getLaunchDelegateConnectionExtensions(); - monitor.beginTask("", extensions.size()); - for (ILaunchDelegateConnectionExtension extension : extensions) { - extension.launchStarted(launch, connection, new SubProgressMonitor(monitor, 1)); - } - monitor.done(); - } - - - protected void invokeConnectionSpecificShutdown( - ILaunch launch, IProgressMonitor monitor) throws CoreException { - List extensions = getLaunchDelegateConnectionExtensions(); - monitor.beginTask("", extensions.size()); - for (ILaunchDelegateConnectionExtension extension : extensions) { - extension.terminateConnection(launch, connection, new SubProgressMonitor(monitor, 1)); - } - monitor.done(); - } - - protected void hookSessionEnded(final ILaunch launch) { - if (cwDebugSession != null) { - cwDebugSession.addListener(new ISessionListener() { - public void sessionEnded() { - try { - invokeConnectionSpecificShutdown(launch, new NullProgressMonitor()); - } catch (CoreException e) { - LaunchPlugin.log(e); - } finally { - connection.useConnection(false); - unhookConnectionStatus(); - } - } - }); - } - } - - protected void hookConnectionStatus() { - if (connection instanceof IConnection2) { - connectionStatusChangedListener = new IConnectionStatusChangedListener() { - public void statusChanged(IConnectionStatus status) { - if (status.getEConnectionStatus().equals(EConnectionStatus.IN_USE_DISCONNECTED)) { - try { - cwDebugSession.getLaunch().terminate(); - } catch (Exception e) { - LaunchPlugin.log(e); - } - } - } - }; - ((IConnection2) connection).addStatusChangedListener(connectionStatusChangedListener); - } - } - - protected void unhookConnectionStatus() { - if (connection instanceof IConnection2 && connectionStatusChangedListener != null) { - ((IConnection2) connection).removeStatusChangedListener(connectionStatusChangedListener); - } - } - - @Override - public boolean buildForLaunch(final ILaunchConfiguration configuration, - String mode, IProgressMonitor monitor) throws CoreException { - // for app trk, check to see if we need to ask the user if they want to enable - // partial upgrade builds - String sisHostPath = configuration.getAttribute(PreferenceConstants.J_PN_SisFileHostPath, ""); //$NON-NLS-1$ - if (sisHostPath.length() > 0) { - // app trk launch - see if the partial upgrade option is enabled - IPath sisPath = new Path(sisHostPath); - String buildConfigName = configuration.getAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_BUILD_CONFIG_ID, ""); //$NON-NLS-1$ - if (buildConfigName.length() > 0) { - final ICProject project = verifyCProject(configuration); - ICarbideProjectInfo cpi = CarbideBuilderPlugin.getBuildManager().getProjectInfo(project.getProject()); - if (cpi != null) { - for (ICarbideBuildConfiguration buildConfig : cpi.getBuildConfigurations()) { - if (buildConfig.getDisplayString().equals(buildConfigName)) { - if (null == CarbideCPPBuilder.getPartialUpgradeSisPath(buildConfig, sisPath)) { - if (!configuration.getAttribute(DONT_ASK_ABOUT_PARTIAL_UPGRADE_OPTION, false)) { - // get the size of the sis file if it exists - File sisFile = sisPath.toFile(); - if (sisFile.exists() && sisFile.length() > LARGE_SIS_THRESHOLD) { - // it's larger than the threshold so present dialog. - - Display.getDefault().syncExec(new Runnable() { - - public void run() { - PartialUpgradeAlertDialog dlg = new PartialUpgradeAlertDialog(CUIPlugin.getActiveWorkbenchShell(), project.getProject()); - dlg.open(); - - // if they check the option then remember it - if (dlg.dontAskAgain()) { - try { - ILaunchConfigurationWorkingCopy workingCopy = configuration.getWorkingCopy(); - workingCopy.setAttribute(DONT_ASK_ABOUT_PARTIAL_UPGRADE_OPTION, true); - - // save the changes - workingCopy.doSave(); - } catch (CoreException e) { - e.printStackTrace(); - LaunchPlugin.log(e); - } - } - } - }); - } - } - } - break; - } - } - } - } - } - - - return super.buildForLaunch(configuration, mode, monitor); - } -} diff -r e3bac873e5c8 -r 0142fe025ce6 debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/FilesBlock.java --- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/FilesBlock.java Thu Aug 19 16:56:56 2010 -0500 +++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/ui/FilesBlock.java Fri Aug 20 09:39:24 2010 -0500 @@ -159,7 +159,7 @@ FileToTransfer file = (FileToTransfer)element; File hostFile = new Path(file.getHostPath()).toFile(); if (!fileExists(hostFile)) { - return LaunchPlugin.getImageDescriptor("icons/Launch/etool16/warning_obj.gif").createImage(); + return LaunchPlugin.getImageDescriptor("icons/warning_obj.gif").createImage(); } } return null; diff -r e3bac873e5c8 -r 0142fe025ce6 debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/wizard/messages.properties --- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/wizard/messages.properties Thu Aug 19 16:56:56 2010 -0500 +++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/wizard/messages.properties Fri Aug 20 09:39:24 2010 -0500 @@ -49,8 +49,8 @@ SystemTRKLaunchWizard.1=New System TRK Launch Configuration SystemTRKLaunchWizard.2=System TRK Launch Configuration SystemTRKLaunchWizard.3=System TRK is a debug agent that runs on reference boards and prototype phones and allows you to debug your executables. The debugger downloads the executable files to the phone prior to launching. With System TRK, you can also debug the binaries included in the ROM image. -TRKConnectionWizardPage.0=TRK Connection Settings -TRKConnectionWizardPage.1=Select the remote connection to use to connect to TRK +TRKConnectionWizardPage.0=Connection Settings +TRKConnectionWizardPage.1=Select the remote connection to use to connect for debugging TRKConnectionWizardPage.2=Serial Port\: TRKConnectionWizardPage.3=Specify which serial port on your PC to use for TRK connection TRKConnectionWizardPage.ConnectionSummaryLabel=Connection