Skip to content

Commit 5b96645

Browse files
author
Nieraj Singh
committed
Github Issue 688
Do not show error popup dialogue when refreshing existing CF targets
1 parent 0197f25 commit 5b96645

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

eclipse-extensions/org.springframework.ide.eclipse.boot.dash.cf/src/org/springframework/ide/eclipse/boot/dash/cf/model/CloudFoundryBootDashModel.java

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2015, 2020 Pivotal, Inc.
2+
* Copyright (c) 2015, 2021 Pivotal, Inc.
33
* All rights reserved. This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v1.0
55
* which accompanies this distribution, and is available at
@@ -250,7 +250,18 @@ public CloudFoundryBootDashModel(CloudFoundryRunTarget target, BootDashModelCont
250250

251251
this.unsupportedPushProperties = new UnsupportedPushProperties();
252252
addDisposableChild(target.getClientExp().onChange((exp,v) -> {
253-
this.refresh(ui());
253+
254+
// https://github.com/spring-projects/sts4/issues/688
255+
// Errors occurring during refresh frequently open a pop-up
256+
// dialogue that could be annoying to users.
257+
// Since the errors are already logged and shown in the CF
258+
// target, there is no need to also open the dialogue.
259+
// To supress opening this dialogue, pass a null "UI",
260+
// as the error handler in the refresh mechanism will not
261+
// open a dialogue if there is no UI
262+
UserInteractions ui = null;
263+
this.refresh(ui);
264+
254265
ClientRequests client = exp.getValue();
255266
if (client!=null && this.getRunTarget().getTargetProperties().getStoreCredentials()==StoreCredentialsMode.STORE_TOKEN) {
256267
activeRefreshTokenListeners.incrementAndGet();

0 commit comments

Comments
 (0)