# HG changeset patch # User dadubrow # Date 1267475262 21600 # Node ID 698d7a6c6f6aaefc8a8011a11b32692ce3f51ac4 # Parent 7c4362faca1e205d5e101fe44364d7d34809e1f8 bug 10808 tweak UI + validation + fix issues with non-carbide project case diff -r 7c4362faca1e -r 698d7a6c6f6a debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/DebugRunProcessDialog.java --- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/DebugRunProcessDialog.java Mon Mar 01 13:19:29 2010 -0600 +++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/DebugRunProcessDialog.java Mon Mar 01 14:27:42 2010 -0600 @@ -216,9 +216,8 @@ sisLabel.setData(UID, "DebugRunProcessDialog.sisLabel"); //$NON-NLS-1$ sisFile = new Combo(composite, SWT.READ_ONLY); - GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).span(1, 1).grab(true, false).applyTo(sisLabel); + GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).span(1, 1).grab(true, false).applyTo(sisFile); sisFile.setToolTipText(Messages.getString("DebugRunProcessDialog.SISQueryTip")); //$NON-NLS-1$ - sisFile.add("None"); //$NON-NLS-1$ sisFile.setData(UID, "DebugRunProcessDialog.sisFile"); //$NON-NLS-1$ sisFile.addSelectionListener(new SelectionAdapter() { @@ -228,18 +227,7 @@ } }); - ICarbideBuildConfiguration config = cpi.getDefaultConfiguration(); - for (ISISBuilderInfo info : config.getSISBuilderInfoList()) { - IPath sisPath = info.getSigningType() == ISISBuilderInfo.DONT_SIGN ? info.getUnsignedSISFullPath() : info.getSignedSISFullPath(); - sisFile.add(sisPath.toOSString()); - } - - // select the first sis file if any, otherwise select none - if (sisFile.getItemCount() > 1) { - sisFile.select(1); - } else { - sisFile.select(0); - } + updateSisFileCombo(cpi); // listen for events so we can detect if they click on the link below and add new sis info. CoreModel.getDefault().getProjectDescriptionManager().addCProjectDescriptionListener(this, CProjectDescriptionEvent.APPLIED); @@ -278,6 +266,9 @@ validate(); } }); + String sisPath = data.getSisPath(); + if (sisPath != null) + sisEdit.setText(sisPath); sisEdit.setData(UID, "DebugRunProcessDialog.sisEdit"); //$NON-NLS-1$ sisBrowse = new Button(composite, SWT.NONE); @@ -304,6 +295,25 @@ sisBrowse.setData(UID, "DebugRunProcessDialog.sisBrowse"); //$NON-NLS-1$ } } + + + private void updateSisFileCombo(ICarbideProjectInfo cpi) { + sisFile.add(Messages.getString("DebugRunProcessDialog.NoneItem")); //$NON-NLS-1$ + + ICarbideBuildConfiguration config = cpi.getDefaultConfiguration(); + for (ISISBuilderInfo info : config.getSISBuilderInfoList()) { + IPath sisPath = info.getSigningType() == ISISBuilderInfo.DONT_SIGN ? info.getUnsignedSISFullPath() : info.getSignedSISFullPath(); + sisFile.add(sisPath.toOSString()); + } + + // select the first sis file if any, otherwise select none + if (sisFile.getItemCount() > 1) { + sisFile.select(1); + } else { + sisFile.select(0); + } + updateSisFile(); + } /** @@ -345,20 +355,7 @@ if (cpi != null) { sisFile.removeAll(); - sisFile.add(Messages.getString("DebugRunProcessDialog.NoneItem")); //$NON-NLS-1$ - - ICarbideBuildConfiguration config = cpi.getDefaultConfiguration(); - for (ISISBuilderInfo info : config.getSISBuilderInfoList()) { - IPath sisPath = info.getSigningType() == ISISBuilderInfo.DONT_SIGN ? info.getUnsignedSISFullPath() : info.getSignedSISFullPath(); - sisFile.add(sisPath.toOSString()); - } - - // select the first sis file if any, otherwise select none - if (sisFile.getItemCount() > 1) { - sisFile.select(1); - } else { - sisFile.select(0); - } + updateSisFileCombo(cpi); } } } diff -r 7c4362faca1e -r 698d7a6c6f6a debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/DebugRunProcessSection.java --- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/DebugRunProcessSection.java Mon Mar 01 13:19:29 2010 -0600 +++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/newwizard/DebugRunProcessSection.java Mon Mar 01 14:27:42 2010 -0600 @@ -58,8 +58,8 @@ else if (data.getDefaultExecutable() != null) data.setExeSelectionPath(data.getDefaultExecutable()); ICarbideProjectInfo cpi = CarbideBuilderPlugin.getBuildManager().getProjectInfo(data.getProject()); + data.setInstallPackage(!data.isSysTRKConnection()); if (cpi != null) { - data.setInstallPackage(!data.isSysTRKConnection()); ICarbideBuildConfiguration config = cpi.getDefaultConfiguration(); for (ISISBuilderInfo info : config.getSISBuilderInfoList()) { IPath sisPath = info.getSigningType() == ISISBuilderInfo.DONT_SIGN ? info.getUnsignedSISFullPath() : info.getSignedSISFullPath();