Skip to content
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

Protobuf spike & integration #122

Closed
phodal opened this issue Oct 24, 2024 · 0 comments
Closed

Protobuf spike & integration #122

phodal opened this issue Oct 24, 2024 · 0 comments

Comments

@phodal
Copy link
Owner

phodal commented Oct 24, 2024

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
Plugin: https://plugins.jetbrains.com/plugin/14004-protocol-buffers
PluginID: idea.plugin.protoeditor

spike for run IDL (.proto) as a mockService ?

Describe alternatives you've considered
External code to Protobuf, like .h file?

Additional context

Official Protocol buffers Features:

  • Support for proto2 and proto3 syntax levels.
  • Syntax highlighting.
  • Semantic analysis.
  • References and navigation.
  • Quick documentation.
  • Editor enhancements (completion, brace matching, etc.).
  • Navigating between protobuf files and some other languages (Java, Go, Python).
phodal added a commit that referenced this issue Nov 2, 2024
Add the new Shire Proto plugin, including its configuration in the project's settings, dependencies, and gradle properties. This plugin provides variable resolution for Protocol Buffers files within the IDE.
phodal added a commit that referenced this issue Nov 2, 2024
…122

Add a new ProtobufToolchainProvider to handle protobuf language specific toolchain context.
Also, update the language configuration to include support for Kotlin in the toolchain.
phodal added a commit that referenced this issue Nov 2, 2024
…support #122

Adds a new file structure provider for protobuf files, enhancing the shire-proto module with the capability to handle and process protobuf file structures. This includes parsing package names, imports, messages, services, and enums within protobuf files.
phodal added a commit that referenced this issue Nov 2, 2024
…ider #122

Rename the package from `protobuf` to `proto` for consistency and add a new class `ProtoClassStructureProvider` to provide class structure information for protobuf definitions. This commit includes the update of the corresponding implementation class reference in the `proto.xml` resource file.
phodal added a commit that referenced this issue Nov 2, 2024
…Provider #122

- Update ShireProtoPsiVariableProvider to handle new PsiContextVariable cases.
- Improve ProtoClassStructureProvider to include fields and usages in class structure.
- Add method to find usages of a PsiElement in ProtoClassStructureProvider.
phodal added a commit that referenced this issue Nov 2, 2024
…rviceDefinition #122

This commit introduces the ShireProtoUtils object, which includes a function to find and process callees for a given PbServiceDefinition. Additionally, it refines the handling of the CALLED_METHOD case in the ShireProtoPsiVariableProvider to utilize the new utility.
phodal added a commit that referenced this issue Nov 2, 2024
Adds the "com.phodal.shirelang.proto" module to the plugin configuration, enabling support for protocol buffers within the plugin ecosystem.
phodal added a commit that referenced this issue Nov 2, 2024
Improve the `findCallees` function in `ShireProtoUtils` to now take a `Project` parameter and return a list of strings representing the callees. This change removes the temporary, commented-out code and ensures a non-empty list is always returned. Additionally, it adds a private helper function to get items by name, potentially useful for GoTo functionality. The `ShireProtoPsiVariableProvider` is updated to utilize the new `findCallees` signature.
phodal added a commit that referenced this issue Nov 2, 2024
…ages #122

The commit updates the `ShireProtoUtils` by refactoring the `findCallees` function
@phodal phodal closed this as completed Nov 2, 2024
phodal added a commit that referenced this issue Nov 2, 2024
This commit enhances the Proto usage lookup mechanism by refining the `ShireProtoUtils` class. It updates the import statements, removes unnecessary comments, and adds a new function to handle PSI element lookup usage. Additionally, it simplifies the `ShireProtoPsiVariableProvider` by removing redundant code and utilizing the new lookup function for method caller identification.
phodal added a commit that referenced this issue Nov 3, 2024
…122

Updated the `ShireProtoUtils` to change the return type of `lookupUsage` from `List<PsiElement>` to `List<String>`. Removed unnecessary imports and optimized the implementation of `findImplClassCode` to use new formatting providers for better code structure representation. Additionally, fixed a possible null pointer issue in `FileStructureProvider.from` method by changing the return type to `FileStructure?`. Removed todo comment and unnecessary string conversion in `ShireProtoPsiVariableProvider`.
phodal added a commit that referenced this issue Nov 3, 2024
#122

Updated the PsiElement formatting and variable naming in the ShireProtoUtils and related classes to enhance code readability and maintain consistency across the project. Specifically, this commit modifies the string concatenation and lambda parameter naming, and replaces the map operation with joinToString for better string 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

No branches or pull requests

1 participant