Skip to content

Conversation

@rli
Copy link
Contributor

@rli rli commented Feb 10, 2025

This is the initial iteration of the bare minimum of process management to interact with Amazon Q logic vended by Flare.
It is a direct port of the exploratory work done in https://github.com/rli/lsp-exp/tree/master/src/main/kotlin/org/example/lsp4j

Missing are tests and any sort of edge case handling

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • My code follows the code style of this project
  • I have added tests to cover my changes
  • A short description of the change has been added to the CHANGELOG if the change is customer-facing in the IDE.
  • I have added metrics for my changes (if required)

License

I confirm that my contribution is made under the terms of the Apache 2.0 license.

@github-actions
Copy link

github-actions bot commented Feb 10, 2025

Qodana Community for JVM

4 new problems were found

Inspection name Severity Problems
Unused symbol 🔶 Warning 2
Constructor parameter is never used as a property 🔶 Warning 1
Function or property has platform type ◽️ Notice 1

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at [email protected]

showMessage(message)
}

override fun getConnectionMetadata() = CompletableFuture.completedFuture(

Check notice

Code scanning / QDJVMC

Function or property has platform type Note

Declaration has type inferred from a platform call, which can lead to unchecked nullability issues. Specify type explicitly as nullable or non-nullable.
}

@Service(Service.Level.PROJECT)
class AmazonQLspService(project: Project, private val cs: CoroutineScope) : Disposable {

Check warning

Code scanning / QDJVMC

Unused symbol Warning

Class "AmazonQLspService" is never used
}

@Service(Service.Level.PROJECT)
class AmazonQLspService(project: Project, private val cs: CoroutineScope) : Disposable {

Check warning

Code scanning / QDJVMC

Constructor parameter is never used as a property Warning

Constructor parameter is never used as a property
val encrypted: String,
)

data class UpdateCredentialsPayloadData(

Check warning

Code scanning / QDJVMC

Unused symbol Warning

Class "UpdateCredentialsPayloadData" is never used
@rli rli marked this pull request as ready for review February 11, 2025 19:59
@rli rli requested a review from a team as a code owner February 11, 2025 19:59
*/
class AmazonQLanguageClientImpl : AmazonQLanguageClient {
override fun telemetryEvent(`object`: Any) {
println(`object`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: not needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we're going to keep the prints until they are implemented properly


package software.aws.toolkits.jetbrains.services.amazonq.lsp

import com.google.gson.ToNumberPolicy
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we be using gson?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes lsp4j only works with gson

}.traceMessages(
PrintWriter(
object : StringWriter() {
private val traceLogger = LOG.atLevel(if (isDeveloperMode()) Level.INFO else Level.DEBUG)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ohh this is a good idea, maybe we can convert this to a util?

}

@Service(Service.Level.PROJECT)
class AmazonQLspService(project: Project, private val cs: CoroutineScope) : Disposable {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would this be triggered?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

future pr

@rli rli merged commit d651a46 into feature/q-lsp Feb 12, 2025
14 of 17 checks passed
@rli rli deleted the rli/lsp-init branch February 12, 2025 00:58
samgst-amazon pushed a commit that referenced this pull request Feb 12, 2025
This is the initial iteration of the bare minimum of process management to interact with Amazon Q logic vended by Flare.
It is a direct port of the exploratory work done in https://github.com/rli/lsp-exp/tree/master/src/main/kotlin/org/example/lsp4j

Missing are tests and any sort of edge case handling
leigaol pushed a commit to leigaol/aws-toolkit-jetbrains that referenced this pull request Mar 20, 2025
This is the initial iteration of the bare minimum of process management to interact with Amazon Q logic vended by Flare.
It is a direct port of the exploratory work done in https://github.com/rli/lsp-exp/tree/master/src/main/kotlin/org/example/lsp4j

Missing are tests and any sort of edge case handling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants