214 GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).span(1, 1).applyTo(sisLabel); |
214 GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.CENTER).span(1, 1).applyTo(sisLabel); |
215 sisLabel.setToolTipText(Messages.getString("DebugRunProcessDialog.SISQueryTip")); //$NON-NLS-1$ |
215 sisLabel.setToolTipText(Messages.getString("DebugRunProcessDialog.SISQueryTip")); //$NON-NLS-1$ |
216 sisLabel.setData(UID, "DebugRunProcessDialog.sisLabel"); //$NON-NLS-1$ |
216 sisLabel.setData(UID, "DebugRunProcessDialog.sisLabel"); //$NON-NLS-1$ |
217 |
217 |
218 sisFile = new Combo(composite, SWT.READ_ONLY); |
218 sisFile = new Combo(composite, SWT.READ_ONLY); |
219 GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).span(1, 1).grab(true, false).applyTo(sisLabel); |
219 GridDataFactory.fillDefaults().align(SWT.FILL, SWT.CENTER).span(1, 1).grab(true, false).applyTo(sisFile); |
220 sisFile.setToolTipText(Messages.getString("DebugRunProcessDialog.SISQueryTip")); //$NON-NLS-1$ |
220 sisFile.setToolTipText(Messages.getString("DebugRunProcessDialog.SISQueryTip")); //$NON-NLS-1$ |
221 sisFile.add("None"); //$NON-NLS-1$ |
|
222 sisFile.setData(UID, "DebugRunProcessDialog.sisFile"); //$NON-NLS-1$ |
221 sisFile.setData(UID, "DebugRunProcessDialog.sisFile"); //$NON-NLS-1$ |
223 |
222 |
224 sisFile.addSelectionListener(new SelectionAdapter() { |
223 sisFile.addSelectionListener(new SelectionAdapter() { |
225 @Override |
224 @Override |
226 public void widgetSelected(SelectionEvent e) { |
225 public void widgetSelected(SelectionEvent e) { |
227 updateSisFile(); |
226 updateSisFile(); |
228 } |
227 } |
229 }); |
228 }); |
230 |
229 |
231 ICarbideBuildConfiguration config = cpi.getDefaultConfiguration(); |
230 updateSisFileCombo(cpi); |
232 for (ISISBuilderInfo info : config.getSISBuilderInfoList()) { |
|
233 IPath sisPath = info.getSigningType() == ISISBuilderInfo.DONT_SIGN ? info.getUnsignedSISFullPath() : info.getSignedSISFullPath(); |
|
234 sisFile.add(sisPath.toOSString()); |
|
235 } |
|
236 |
|
237 // select the first sis file if any, otherwise select none |
|
238 if (sisFile.getItemCount() > 1) { |
|
239 sisFile.select(1); |
|
240 } else { |
|
241 sisFile.select(0); |
|
242 } |
|
243 |
231 |
244 // listen for events so we can detect if they click on the link below and add new sis info. |
232 // listen for events so we can detect if they click on the link below and add new sis info. |
245 CoreModel.getDefault().getProjectDescriptionManager().addCProjectDescriptionListener(this, CProjectDescriptionEvent.APPLIED); |
233 CoreModel.getDefault().getProjectDescriptionManager().addCProjectDescriptionListener(this, CProjectDescriptionEvent.APPLIED); |
246 |
234 |
247 composite.addDisposeListener(new DisposeListener() { |
235 composite.addDisposeListener(new DisposeListener() { |
276 public void modifyText(ModifyEvent e) { |
264 public void modifyText(ModifyEvent e) { |
277 updateSisFile(); |
265 updateSisFile(); |
278 validate(); |
266 validate(); |
279 } |
267 } |
280 }); |
268 }); |
|
269 String sisPath = data.getSisPath(); |
|
270 if (sisPath != null) |
|
271 sisEdit.setText(sisPath); |
281 sisEdit.setData(UID, "DebugRunProcessDialog.sisEdit"); //$NON-NLS-1$ |
272 sisEdit.setData(UID, "DebugRunProcessDialog.sisEdit"); //$NON-NLS-1$ |
282 |
273 |
283 sisBrowse = new Button(composite, SWT.NONE); |
274 sisBrowse = new Button(composite, SWT.NONE); |
284 sisBrowse.setText(Messages.getString("DebugRunProcessDialog.BrowseLabel")); //$NON-NLS-1$ |
275 sisBrowse.setText(Messages.getString("DebugRunProcessDialog.BrowseLabel")); //$NON-NLS-1$ |
285 sisBrowse.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false)); |
276 sisBrowse.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false)); |
302 } |
293 } |
303 }); |
294 }); |
304 sisBrowse.setData(UID, "DebugRunProcessDialog.sisBrowse"); //$NON-NLS-1$ |
295 sisBrowse.setData(UID, "DebugRunProcessDialog.sisBrowse"); //$NON-NLS-1$ |
305 } |
296 } |
306 } |
297 } |
|
298 |
|
299 |
|
300 private void updateSisFileCombo(ICarbideProjectInfo cpi) { |
|
301 sisFile.add(Messages.getString("DebugRunProcessDialog.NoneItem")); //$NON-NLS-1$ |
|
302 |
|
303 ICarbideBuildConfiguration config = cpi.getDefaultConfiguration(); |
|
304 for (ISISBuilderInfo info : config.getSISBuilderInfoList()) { |
|
305 IPath sisPath = info.getSigningType() == ISISBuilderInfo.DONT_SIGN ? info.getUnsignedSISFullPath() : info.getSignedSISFullPath(); |
|
306 sisFile.add(sisPath.toOSString()); |
|
307 } |
|
308 |
|
309 // select the first sis file if any, otherwise select none |
|
310 if (sisFile.getItemCount() > 1) { |
|
311 sisFile.select(1); |
|
312 } else { |
|
313 sisFile.select(0); |
|
314 } |
|
315 updateSisFile(); |
|
316 } |
307 |
317 |
308 |
318 |
309 /** |
319 /** |
310 * |
320 * |
311 */ |
321 */ |
343 if (sisFile != null) { |
353 if (sisFile != null) { |
344 ICarbideProjectInfo cpi = CarbideBuilderPlugin.getBuildManager().getProjectInfo(project); |
354 ICarbideProjectInfo cpi = CarbideBuilderPlugin.getBuildManager().getProjectInfo(project); |
345 if (cpi != null) { |
355 if (cpi != null) { |
346 sisFile.removeAll(); |
356 sisFile.removeAll(); |
347 |
357 |
348 sisFile.add(Messages.getString("DebugRunProcessDialog.NoneItem")); //$NON-NLS-1$ |
358 updateSisFileCombo(cpi); |
349 |
|
350 ICarbideBuildConfiguration config = cpi.getDefaultConfiguration(); |
|
351 for (ISISBuilderInfo info : config.getSISBuilderInfoList()) { |
|
352 IPath sisPath = info.getSigningType() == ISISBuilderInfo.DONT_SIGN ? info.getUnsignedSISFullPath() : info.getSignedSISFullPath(); |
|
353 sisFile.add(sisPath.toOSString()); |
|
354 } |
|
355 |
|
356 // select the first sis file if any, otherwise select none |
|
357 if (sisFile.getItemCount() > 1) { |
|
358 sisFile.select(1); |
|
359 } else { |
|
360 sisFile.select(0); |
|
361 } |
|
362 } |
359 } |
363 } |
360 } |
364 } |
361 } |
365 |
362 |
366 protected void initUI() { |
363 protected void initUI() { |