Source:
<code>protected boolean processChanges(IWorkbenchPreferenceContainer container) { IScopeContext currContext= fLookupOrder[0]; List<Key> changedOptions= new ArrayList<>(); boolean needsBuild= getChanges(currContext, changedOptions); if (changedOptions.isEmpty()) { return true; } if (needsBuild) { int count= getRebuildCount(); if (count > fRebuildCount) { needsBuild= false; fRebuildCount= count; } } boolean doBuild= false; if (needsBuild) { String[] strings= getFullBuildDialogStrings(fProject == null); if (strings != null) { if (ResourcesPlugin.getWorkspace().getRoot().getProjects().length == 0) { doBuild= true; } else { <START> MessageDialog dialog= new MessageDialog(getShell(), strings[0], null, strings[1], MessageDialog.QUESTION, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.CANCEL_LABEL }, 1); <END> int res= dialog.open(); if (res == 0) { doBuild= true; } else { return false; } } } } if (container != null) { if (doBuild) { incrementRebuildCount(); container.registerUpdateJob(CoreUtility.getBuildJob(fProject)); } } else { try { fManager.applyChanges(); } catch (BackingStoreException e) { JavaPlugin.log(e); return false; } if (doBuild) { CoreUtility.getBuildJob(fProject).schedule(); } } return true; }</code><technical_language>Yes, I want show (since allows "cancel" option) trigger extra build if auto-build is on. yes, please check if this dialog manages *not only* jdt core preferences. In this case need a bit more work here</technical_language>

Target:
protected boolean processChanges(IWorkbenchPreferenceContainer container) { IScopeContext currContext= fLookupOrder[0]; List<Key> changedOptions= new ArrayList<>(); boolean needsBuild= getChanges(currContext, changedOptions); if (changedOptions.isEmpty()) { return true; } if (needsBuild) { int count= getRebuildCount(); if (count > fRebuildCount) { needsBuild= false; fRebuildCount= count; } } boolean doBuild= false; if (needsBuild) { boolean hasJdtCoreSettings= hasJdtCoreSettings(changedOptions); boolean isAutoBuildOn= isAutoBuilding(); boolean willAutoBuild= isAutoBuildOn && hasJdtCoreSettings; String[] strings= getFullBuildDialogStrings(fProject == null); if (strings != null) { if (ResourcesPlugin.getWorkspace().getRoot().getProjects().length == 0) { doBuild= true; } else { String[] dialogButtonLabels= new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.CANCEL_LABEL }; if (willAutoBuild) { dialogButtonLabels= new String[] { IDialogConstants.YES_LABEL, IDialogConstants.CANCEL_LABEL }; } int yesResult= 0; int cancelResult= dialogButtonLabels.length - 1; MessageDialog dialog= new MessageDialog(getShell(), strings[0], null, strings[1], MessageDialog.QUESTION, dialogButtonLabels, 1); int dialogDesult= dialog.open(); if (dialogDesult == yesResult) { if (!willAutoBuild) { doBuild= true; } } else if (dialogDesult == cancelResult) { return false; } } } } if (container != null) { if (doBuild) { incrementRebuildCount(); container.registerUpdateJob(CoreUtility.getBuildJob(fProject)); } } else { try { fManager.applyChanges(); } catch (BackingStoreException e) { JavaPlugin.log(e); return false; } if (doBuild) { CoreUtility.getBuildJob(fProject).schedule(); } } return true; }