Record information in eclipse metadata for docker images build by IDE.
Just enough info is recored for a IDE built-image so we can avoid
parsing image metadata from the image itself (the image metadata
format is unstable and we do not have a usable api to get at it easily,
so trying to rely on it is fraught with problems).
This commit is contained in:
Kris De Volder
2022-06-24 15:31:20 -07:00
parent 078d1b1983
commit dc36d17298
6 changed files with 69 additions and 54 deletions

View File

@@ -26,7 +26,6 @@ public interface AppContext {
* somewhere in the boot dash ui.
*/
RefreshStateTracker getRefreshTracker();
boolean projectHasDevtoolsDependency();
<T extends App> T getParent(Class<T> expectedType);
}

View File

@@ -15,7 +15,6 @@ import java.util.EnumSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicInteger;
import org.eclipse.core.resources.IProject;
@@ -90,8 +89,6 @@ public class GenericRemoteAppElement extends WrappingBootDashElement<String> imp
private static final boolean DEBUG = false;
private static AtomicInteger instances = new AtomicInteger();
private LiveVariable<App> app = new LiveVariable<>();
private final Object parent;
@@ -125,6 +122,17 @@ public class GenericRemoteAppElement extends WrappingBootDashElement<String> imp
return super.getCustomRunStateIcon();
}
@Override
public <T extends App> T getParent(Class<T> expectedType) {
if (parent instanceof GenericRemoteAppElement) {
App parentApp = ((GenericRemoteAppElement) parent).getAppData();
if (parentApp!=null) {
return expectedType.cast(parentApp);
}
}
return null;
}
private ObservableSet<BootDashElement> children = ObservableSet.<BootDashElement>builder().refresh(AsyncMode.ASYNC).compute(() -> {
App appVal = app.getValue();