Skip to content

Commit

Permalink
CHE-11697: Remove redundant synchronize call (#12073)
Browse files Browse the repository at this point in the history
One is already called from ProjectTreeChangeHandler
  • Loading branch information
vinokurig authored Nov 30, 2018
1 parent a1a6530 commit d8c1ad1
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

import static org.eclipse.che.ide.api.notification.StatusNotification.DisplayMode.NOT_EMERGE_MODE;
import static org.eclipse.che.ide.api.notification.StatusNotification.Status.SUCCESS;
import static org.eclipse.che.ide.api.resources.ResourceDelta.REMOVED;

import com.google.web.bindery.event.shared.EventBus;
import java.util.List;
Expand All @@ -30,7 +29,6 @@
import org.eclipse.che.ide.api.editor.EditorPartPresenter;
import org.eclipse.che.ide.api.editor.events.FileContentUpdateEvent;
import org.eclipse.che.ide.api.notification.NotificationManager;
import org.eclipse.che.ide.api.resources.ExternalResourceDelta;
import org.eclipse.che.ide.resource.Path;
import org.eclipse.che.ide.util.loging.Log;

Expand Down Expand Up @@ -111,12 +109,10 @@ public void accept(String endpointId, FileStateUpdateDto params) {
{
Log.debug(getClass(), "Received removed file event status: " + stringPath);

final Path path = Path.valueOf(stringPath);
appContext.getWorkspaceRoot().synchronize(new ExternalResourceDelta(path, path, REMOVED));
if (notificationManager != null && !deletedFilesController.remove(stringPath)) {
notificationManager.notify(
"External operation", "File '" + name + "' is removed", SUCCESS, NOT_EMERGE_MODE);
closeOpenedEditor(path);
closeOpenedEditor(Path.valueOf(stringPath));
}

break;
Expand Down

0 comments on commit d8c1ad1

Please sign in to comment.