-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
VFS file watcher based use cases implementations (#2339)
* che#1910: added several new user workflows implementations for VFS Signed-off-by: Dmitry Kuleshov <[email protected]>
- Loading branch information
Dmitry Kuleshov
authored
Sep 7, 2016
1 parent
8df0560
commit 5d267fe
Showing
87 changed files
with
2,431 additions
and
845 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
...e-core-ide-api/src/main/java/org/eclipse/che/ide/api/event/ng/DeletedFilesController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2012-2016 Codenvy, S.A. | ||
* 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 | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Codenvy, S.A. - initial API and implementation | ||
*******************************************************************************/ | ||
package org.eclipse.che.ide.api.event.ng; | ||
|
||
import com.google.inject.Singleton; | ||
|
||
import java.util.HashSet; | ||
import java.util.Set; | ||
|
||
/** | ||
* Contains the list of paths that correspond to opened files and should not trigger events | ||
* notifications from file system because they are initiated by ourselves (e.g. refactoring, | ||
* git checkout etc.) | ||
* | ||
* @author Valeriy Svydenko | ||
*/ | ||
@Singleton | ||
public class DeletedFilesController { | ||
private Set<String> deletedFiles = new HashSet<>(); | ||
|
||
/** | ||
* Adds the path to the file which need to skip. | ||
* | ||
* @param path | ||
* path to the file | ||
*/ | ||
public void add(String path) { | ||
deletedFiles.add(path); | ||
} | ||
|
||
/** | ||
* Removes the path to the file which need to skip. | ||
* | ||
* @param path | ||
* path to the file | ||
* | ||
* @return {@code true} if set contains the specified path | ||
*/ | ||
public boolean remove(String path) { | ||
return deletedFiles.remove(path); | ||
} | ||
|
||
/** Returns {@code true} if this set contains the specified path. */ | ||
public boolean contains(String path) { | ||
return deletedFiles.contains(path); | ||
} | ||
} |
Oops, something went wrong.