software.amazon.smithy.lsp.project.ProjectChanges Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of smithy-language-server Show documentation
Show all versions of smithy-language-server Show documentation
LSP implementation for smithy
The newest version!
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
package software.amazon.smithy.lsp.project;
import java.util.Set;
/**
* File changes to a {@link Project}.
*
* @param changedBuildFileUris The uris of changed build files
* @param createdSmithyFileUris The uris of created Smithy files
* @param deletedSmithyFileUris The uris of deleted Smithy files
*/
public record ProjectChanges(
Set changedBuildFileUris,
Set createdSmithyFileUris,
Set deletedSmithyFileUris
) {
/**
* @return Whether there are any changed build files
*/
public boolean hasChangedBuildFiles() {
return !changedBuildFileUris.isEmpty();
}
/**
* @return Whether there are any changed Smithy files
*/
public boolean hasChangedSmithyFiles() {
return !createdSmithyFileUris.isEmpty() || !deletedSmithyFileUris.isEmpty();
}
}