diff --git a/eclipse-extensions/org.springframework.ide.eclipse.boot.dash/src/org/springframework/ide/eclipse/boot/dash/model/BootProjectDashElement.java b/eclipse-extensions/org.springframework.ide.eclipse.boot.dash/src/org/springframework/ide/eclipse/boot/dash/model/BootProjectDashElement.java index 98d403d44..9327b800d 100644 --- a/eclipse-extensions/org.springframework.ide.eclipse.boot.dash/src/org/springframework/ide/eclipse/boot/dash/model/BootProjectDashElement.java +++ b/eclipse-extensions/org.springframework.ide.eclipse.boot.dash/src/org/springframework/ide/eclipse/boot/dash/model/BootProjectDashElement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015, 2020 Pivotal, Inc. + * Copyright (c) 2015, 2021 Pivotal, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -100,7 +100,7 @@ public class BootProjectDashElement extends AbstractLaunchConfigurationsDashElem this.childFactory = childFactory; hasMainMethod.refresh(); - addElementState(hasMainMethod); + addModelState(hasMainMethod); addDisposableChild(hasMainMethod); // if (DEBUG) { // onDispose((e) -> { diff --git a/eclipse-extensions/org.springframework.ide.eclipse.boot.dash/src/org/springframework/ide/eclipse/boot/dash/model/WrappingBootDashElement.java b/eclipse-extensions/org.springframework.ide.eclipse.boot.dash/src/org/springframework/ide/eclipse/boot/dash/model/WrappingBootDashElement.java index eeea6ad82..9234ed5c5 100644 --- a/eclipse-extensions/org.springframework.ide.eclipse.boot.dash/src/org/springframework/ide/eclipse/boot/dash/model/WrappingBootDashElement.java +++ b/eclipse-extensions/org.springframework.ide.eclipse.boot.dash/src/org/springframework/ide/eclipse/boot/dash/model/WrappingBootDashElement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015, 2017 Pivotal, Inc. + * Copyright (c) 2015, 2021 Pivotal, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -251,6 +251,15 @@ public abstract class WrappingBootDashElement extends AbstractDisposable impl state.addListener(elementStateNotifier); } + /** + * Ensure that model state notifications are fired when a given liveExp's value changes. + */ + protected void addModelState(LiveExpression state) { + state.onChange((e,v) -> { + getBootDashModel().notifyModelStateChanged(); + }); + } + @Override public String getUrl() { return Utils.createUrl(getLiveHost(), getLivePort(), getDefaultRequestMappingPath());