-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanup serverstate and project #187
Merged
milesziemer
merged 9 commits into
smithy-lang:main
from
milesziemer:cleanup-serverstate
Jan 17, 2025
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
888d1da
Hide ServerState data members
milesziemer 350f0aa
Store only one collection of projects
milesziemer 0a3ab4d
Collapse Project data members into RebuildIndex
milesziemer 9e8b1a4
Dont read from disk multiple times
milesziemer d640649
Add interface for getting managed files
milesziemer 50b8d37
Add documentation to new methods
milesziemer 350d83f
Rename DocumentLifecycleManager
milesziemer 8d319d9
Cleanup some of Project's api
milesziemer 3927e8a
Get rid of extraneous Document methods
milesziemer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
23 changes: 23 additions & 0 deletions
23
src/main/java/software/amazon/smithy/lsp/ManagedFiles.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,23 @@ | ||
/* | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package software.amazon.smithy.lsp; | ||
|
||
import software.amazon.smithy.lsp.document.Document; | ||
|
||
/** | ||
* Provides access to {@link Document}s managed by the server. | ||
* | ||
* <p>A document is _managed_ if its state is controlled by the lifecycle methods | ||
* didOpen, didClose, didChange, didSave. In other words, reading from disk _may_ | ||
* not provide the accurate file content. | ||
*/ | ||
public interface ManagedFiles { | ||
/** | ||
* @param uri Uri of the document to get | ||
* @return The document if found and it is managed, otherwise {@code null} | ||
*/ | ||
Document getManagedDocument(String uri); | ||
} |
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: if
is a separator then maybe keep it on its own line