Skip to content

Commit

Permalink
Bug 546141: Incompatible Entry notification is broken
Browse files Browse the repository at this point in the history
Show incompatible entry notification also when dropping on the wizard
dialog itself.



Change-Id: I66f137aca2ba9e845f7c72ae445bb761533ec922
Signed-off-by: Leif Geiger <geiger@yatta.de>
  • Loading branch information
Leif Geiger committed Apr 16, 2019
1 parent f0d91ee commit 92202cb
Showing 1 changed file with 13 additions and 8 deletions.
Expand Up @@ -986,24 +986,29 @@ protected boolean handleInstallRequest(final SolutionInstallationInfo installInf
throw new IllegalStateException();
}

SelectionModelStateSerializer stateSerializer = new SelectionModelStateSerializer(getCatalog(),
selectionModel);
getContainer().run(true, true, monitor -> {
SelectionModelStateSerializer stateSerializer = new SelectionModelStateSerializer(getCatalog(),
selectionModel);
stateSerializer.deserialize(installInfo.getState(), nodeIdToOperation, monitor);
});

if (selectionModel.getItemToSelectedOperation().size() > 0) {
boolean hasAvailableItems = selectionModel.getItemToSelectedOperation().size() > 0;
boolean hasUnavailableItems = stateSerializer.hasUnavailableItems();
if (hasAvailableItems || hasUnavailableItems) {
Display display = getShell().getDisplay();
if (!display.isDisposed()) {
display.asyncExec(() -> {
if (getShell().isDisposed()) {
return;
}

MarketplacePage catalogPage1 = getCatalogPage();
IWizardPage currentPage = getContainer().getCurrentPage();
if (catalogPage1 == currentPage) {
catalogPage1.getViewer()
.setSelection(new StructuredSelection(
selectionModel.getSelectedCatalogItems().toArray()));

updateSelection(stateSerializer);
if (catalogPage1 == currentPage && hasAvailableItems) {
catalogPage1.show(installInfo.getCatalogDescriptor(), ContentType.SELECTION);
IWizardPage nextPage = catalogPage1.getNextPage();
IWizardPage nextPage = getNextPage(catalogPage1);
if (nextPage != null && catalogPage1.isPageComplete()) {
getContainer().showPage(nextPage);
}
Expand Down

0 comments on commit 92202cb

Please sign in to comment.