Skip to content

Commit

Permalink
JBIDE-18493: Refresh the project instead of the current resource and …
Browse files Browse the repository at this point in the history
…its children only
  • Loading branch information
gastaldi committed Oct 2, 2014
1 parent 98beedb commit d612fd9
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@
import org.jboss.tools.forge.ui.internal.ext.context.UISelectionImpl;

public class RefreshInitialSelectionJob extends ChainedWorkspaceJob {

private UIContextImpl context;

public RefreshInitialSelectionJob() {
super("Refresh Initial Selection");
}

public void setContext(UIContextImpl context) {
this.context = context;
}

@Override
public IStatus runInWorkspace(IProgressMonitor monitor)
throws CoreException {
Expand All @@ -40,8 +40,9 @@ public IStatus runInWorkspace(IProgressMonitor monitor)
// resource was deleted
resource = resource.getParent();
}
if (resource != null) {
resource.refreshLocal(IResource.DEPTH_INFINITE, null);
if (resource != null && resource.getProject() != null) {
resource.getProject().refreshLocal(
IResource.DEPTH_INFINITE, null);
}
}
}
Expand Down

0 comments on commit d612fd9

Please sign in to comment.