/** {@inheritDoc} */ @Override public boolean deleteAllMarkers() { if (Arrays.isNullOrEmpty(markers)) { return false; } markers = new Marker[0]; return true; }
/** {@inheritDoc} */ @Override public boolean deleteMarker(String type) { checkArgument(!isNullOrEmpty(type), "Invalid marker type occurred"); int index = -1; for (int i = 0; i < markers.length; i++) { Marker marker = markers[i]; if (marker.getType().equals(type)) { index = i; markers = remove(markers, marker); resourceManager.notifyMarkerChanged(this, marker, REMOVED); break; } } return index != -1; }
Resource[] outdated = descendants.get(); final Resource[] removed = removeAll(outdated, reloaded, false); for (Resource resource : removed) { store.dispose(resource.getLocation(), false); .filter(resource -> contains(outdated, resource)) .toArray(Resource[]::new); for (Resource resource : updated) { store.getResource(resource.getLocation()); if (registered.isPresent()) { result = Arrays.add(result, registered.get()); final Resource[] added = removeAll(reloaded, outdated, false); for (Resource resource : added) { store.register(resource); store.getResource(resource.getLocation()); if (registered.isPresent()) { result = Arrays.add(result, registered.get()); store.getResource(resource.getLocation()); if (registered.isPresent()) { result = Arrays.add(result, registered.get());
for (IndexFile file : indexedFiles) { if (!file.isIndexed()) { paths = add(paths, Path.valueOf(file.getPath()));
/** {@inheritDoc} */ @Override public void onRemoveClicked() { final GitOutputConsole console = gitOutputConsoleFactory.create(REMOVE_FROM_INDEX_COMMAND_NAME); final Resource[] resources = appContext.getResources(); checkState(!isNullOrEmpty(resources)); service .remove(project.getLocation(), toRelativePaths(resources), view.isRemoved()) .then( ignored -> { console.print(constant.removeFilesSuccessful()); consolesPanelPresenter.addCommandOutput(console); notificationManager.notify(constant.removeFilesSuccessful()); }) .catchError( error -> { handleError(error.getCause(), console); consolesPanelPresenter.addCommandOutput(console); }); view.close(); }