Source:
<code>private void createAdvancedSection(final Composite composite) { if (commitId != null) return; ExpandableComposite advanced = new ExpandableComposite(composite, ExpandableComposite.TREE_NODE | ExpandableComposite.CLIENT_INDENT); advanced.setText(UIText.CreateTagDialog_advanced); advanced.setToolTipText(UIText.CreateTagDialog_advancedToolTip); advanced.setLayoutData(GridDataFactory.fillDefaults().grab(true, false) .create()); Composite advancedComposite = new Composite(advanced, SWT.WRAP); advancedComposite.setLayout(GridLayoutFactory.swtDefaults().create()); advancedComposite.setLayoutData(GridDataFactory.fillDefaults().grab( true, true).create()); Label advancedLabel = new Label(advancedComposite, SWT.WRAP); advancedLabel.setText(UIText.CreateTagDialog_advancedMessage); advancedLabel.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).create()); commitCombo = new CommitCombo(advancedComposite, SWT.NORMAL); commitCombo.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).hint(300, SWT.DEFAULT).create()); advanced.setClient(advancedComposite); advanced.addExpansionListener(new ExpansionAdapter() { public void expansionStateChanged(ExpansionEvent e) { if (((Boolean) e.data).booleanValue() && commitCombo.getItemCount() == 0) { <START> for (RevCommit revCommit : getRevCommits()) <END> commitCombo.add(revCommit); } composite.layout(true); } }); }</code><technical_language>Retrieving commit list block UI. PlatformUI.getWorkbench().getProgressService().busyCursorWhile call getRevCommits UI thread</technical_language>

Target:
private void createAdvancedSection(final Composite composite) { if (commitId != null) return; ExpandableComposite advanced = new ExpandableComposite(composite, ExpandableComposite.TREE_NODE | ExpandableComposite.CLIENT_INDENT); advanced.setText(UIText.CreateTagDialog_advanced); advanced.setToolTipText(UIText.CreateTagDialog_advancedToolTip); advanced.setLayoutData(GridDataFactory.fillDefaults().grab(true, false) .create()); Composite advancedComposite = new Composite(advanced, SWT.WRAP); advancedComposite.setLayout(GridLayoutFactory.swtDefaults().create()); advancedComposite.setLayoutData(GridDataFactory.fillDefaults().grab( true, true).create()); Label advancedLabel = new Label(advancedComposite, SWT.WRAP); advancedLabel.setText(UIText.CreateTagDialog_advancedMessage); advancedLabel.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).create()); commitCombo = new CommitCombo(advancedComposite, SWT.NORMAL); commitCombo.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).hint(300, SWT.DEFAULT).create()); advanced.setClient(advancedComposite); advanced.addExpansionListener(new ExpansionAdapter() { public void expansionStateChanged(ExpansionEvent e) { if (((Boolean) e.data).booleanValue() && commitCombo.getItemCount() == 0) { final RevWalk[] commits = new RevWalk[1]; try { PlatformUI.getWorkbench().getProgressService() .busyCursorWhile(new IRunnableWithProgress() { public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { commits[0] = getRevCommits(); } }); } catch (InvocationTargetException e1) { } catch (InterruptedException e1) { } for (RevCommit revCommit : commits[0]) commitCombo.add(revCommit); } composite.layout(true); } }); }