# HG changeset patch # User stechong # Date 1276109292 18000 # Node ID 1d88f6209d70a4ff8f0d93ecdafaaa374d047965 # Parent 0a2761e65879fae0762affc13dc9f51a0a1d1a69 Add SDK version info back to SDK properties dialog; more changes to make table in SDK preference page resizable. diff -r 0a2761e65879 -r 1d88f6209d70 core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/internal/sdk/ui/SDKPreferencePage.java --- a/core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/internal/sdk/ui/SDKPreferencePage.java Wed Jun 09 13:42:27 2010 -0500 +++ b/core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/internal/sdk/ui/SDKPreferencePage.java Wed Jun 09 13:48:12 2010 -0500 @@ -448,7 +448,19 @@ sdkListTableViewer.setContentProvider(new ArrayContentProvider()); sdkList = sdkMgr.getSDKList(); sdkListTableViewer.setInput(sdkList.toArray()); - sdkListTableViewer.getTable().setToolTipText(Messages.getString("SDKPreferencePage.List_of_Available_SDKs_ToolTip")); //$NON-NLS-1$ + Table table = sdkListTableViewer.getTable(); + int count = table.getItemCount(); + if (count < 10) { // min. number of rows + count = 10; + } else + if (count > 20) { // max. number of rows + count = 20; + } + table.setToolTipText(Messages.getString("SDKPreferencePage.List_of_Available_SDKs_ToolTip")); //$NON-NLS-1$ + GridData gridData = new GridData(SWT.FILL, SWT.CENTER, true, false); + gridData.widthHint = 350; + gridData.heightHint = table.getItemHeight() * (count + 2); + table.setLayoutData(gridData); setCheckedElements(); addSDKTableViewerListeners(); if (sdkList == null || sdkList.size() == 0){ @@ -477,18 +489,7 @@ } private void createSDKTable() { - final Table table = sdkListTableViewer.getTable(); - int count = table.getItemCount(); - if (count < 10) { // min. number of rows - count = 10; - } else - if (count > 20) { // max. number of rows - count = 20; - } - GridData gridData = new GridData(SWT.FILL, SWT.CENTER, true, false); - gridData.widthHint = 350; - gridData.heightHint = table.getItemHeight() * count; - table.setLayoutData(gridData); + Table table = sdkListTableViewer.getTable(); table.setHeaderVisible(true); table.setLinesVisible(false); diff -r 0a2761e65879 -r 1d88f6209d70 core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/internal/sdk/ui/SDKPropertiesDialog.java --- a/core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/internal/sdk/ui/SDKPropertiesDialog.java Wed Jun 09 13:42:27 2010 -0500 +++ b/core/com.nokia.carbide.cpp.sdk.ui/src/com/nokia/carbide/cpp/internal/sdk/ui/SDKPropertiesDialog.java Wed Jun 09 13:48:12 2010 -0500 @@ -31,6 +31,9 @@ import org.eclipse.swt.widgets.TableItem; import org.eclipse.ui.PlatformUI; +import com.nokia.carbide.cpp.internal.api.sdk.ISBSv1BuildInfo; +import com.nokia.carbide.cpp.sdk.core.ISDKBuildInfo; +import com.nokia.carbide.cpp.sdk.core.ISymbianBuilderID; import com.nokia.carbide.cpp.sdk.core.ISymbianSDK; public class SDKPropertiesDialog extends TrayDialog { @@ -90,6 +93,12 @@ itemOSVersion.setText(new String[] {Messages.getString("SDKPropertiesDialog.OS_Version"), //$NON-NLS-2$ sdk.getOSVersion().toString()}); //$NON-NLS-1$ + // SDK Version at Row 2. + TableItem itemSDKVersion = new TableItem(propsTable, SWT.NONE); + ISBSv1BuildInfo buildInfo = (ISBSv1BuildInfo)sdk.getBuildInfo(ISymbianBuilderID.SBSV1_BUILDER); + String sdkVersion = buildInfo.getSDKVersion(sdk).toString(); + itemSDKVersion.setText(new String[] {Messages.getString("SDKPropertiesDialog.OS_Version"), sdkVersion}); //$NON-NLS-1$ + PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, SDKUIHelpIds.SDK_PROPERTIES_DIALOG); return container;