From 2c69a5203a94f8f10fa86bed5d9e372488fa230a Mon Sep 17 00:00:00 2001 From: Peter Kriens Date: Fri, 21 Sep 2018 15:22:15 +0200 Subject: [PATCH] [workspace] Refresh projects If we detect a changed project we inform the workspace. Signed-off-by: Peter Kriens --- bndtools.core/src/bndtools/central/Central.java | 1 + .../src/bndtools/central/WorkspaceRepositoryChangeDetector.java | 1 + 2 files changed, 2 insertions(+) diff --git a/bndtools.core/src/bndtools/central/Central.java b/bndtools.core/src/bndtools/central/Central.java index cf6c7e82a..0312bfb79 100644 --- a/bndtools.core/src/bndtools/central/Central.java +++ b/bndtools.core/src/bndtools/central/Central.java @@ -259,6 +259,7 @@ public static Workspace getWorkspace() throws Exception { if (ws != null) { ws.close(); } + logger.logError("Init of workspace", e); throw e; } } diff --git a/bndtools.core/src/bndtools/central/WorkspaceRepositoryChangeDetector.java b/bndtools.core/src/bndtools/central/WorkspaceRepositoryChangeDetector.java index 4235dff93..1141da382 100644 --- a/bndtools.core/src/bndtools/central/WorkspaceRepositoryChangeDetector.java +++ b/bndtools.core/src/bndtools/central/WorkspaceRepositoryChangeDetector.java @@ -85,6 +85,7 @@ public boolean visit(IResourceDelta delta) throws CoreException { if (delta.getKind() == IResourceDelta.ADDED || delta.getKind() == IResourceDelta.REMOVED) { refresh.set(true); + workspace.refreshProjects(); return false; } for (IResourceDelta subDelta : delta.getAffectedChildren(IResourceDelta.ADDED | IResourceDelta.REMOVED | IResourceDelta.CHANGED))