-
Notifications
You must be signed in to change notification settings - Fork 0
Contributing
Yaroslav Sarchuk edited this page Aug 29, 2025
·
1 revision
Thank you for your interest in contributing to the Atomic Plugin! This guide will help you get started with contributing to the project.
- Search existing issues first
- Create detailed bug reports with reproduction steps
- Include environment details (Rider version, OS, plugin version)
- Open a discussion first
- Describe the use case and benefits
- Provide examples of how it would work
- Fix typos and grammar
- Add examples and clarifications
- Translate documentation
- Create tutorials and guides
- Fix bugs
- Implement new features
- Improve performance
- Add tests
- JDK 17 or higher
- Gradle 7.6 or higher
- JetBrains Rider 2024.1 or higher
- .NET SDK 6.0 or higher
- Git
- PowerShell (Windows) or Bash (macOS/Linux)
-
Fork the Repository
# Fork via GitHub UI, then clone git clone https://github.com/YOUR_USERNAME/atomic-rider-plugin.git cd atomic-rider-plugin
-
Set Up Development Branch
git checkout -b feature/your-feature-name
-
Install Dependencies
./gradlew build
-
Run Tests
./gradlew test -
Run Rider with Plugin
./gradlew runIde
atomic-rider-plugin/
βββ src/
β βββ rider/ # Kotlin/Java frontend (IntelliJ Platform)
β β βββ main/
β β βββ kotlin/ # Plugin logic, PSI, actions
β β β βββ com/jetbrains/rider/plugins/atomic/
β β β βββ language/ # Language support
β β β βββ actions/ # IDE actions
β β β βββ psi/ # PSI elements
β β β βββ services/ # Services
β β βββ resources/
β β βββ META-INF/
β β βββ plugin.xml # Plugin configuration
β β
β βββ dotnet/ # C# backend (ReSharper)
β βββ ReSharperPlugin.AtomicPlugin/
β βββ Services/ # Code generation services
β βββ Model/ # Data models
β βββ Rider/ # Rider-specific components
β
βββ protocol/ # RD Protocol definitions
β βββ src/main/kotlin/model/
β
βββ gradle/ # Gradle configuration
βββ build.gradle.kts # Main build script
βββ settings.gradle.kts # Settings
// src/rider/main/kotlin/.../language/AtomicAnnotator.kt
class AtomicAnnotator : Annotator {
override fun annotate(element: PsiElement, holder: AnnotationHolder) {
// Your annotation logic
when (element) {
is AtomicValueItem -> annotateValue(element, holder)
is AtomicTagItem -> annotateTag(element, holder)
}
}
}class AddImportQuickFix(private val typeName: String) : LocalQuickFix {
override fun getName() = "Import '$typeName'"
override fun applyFix(project: Project, descriptor: ProblemDescriptor) {
val element = descriptor.psiElement
val file = element.containingFile as? AtomicFile ?: return
// Add import
val import = AtomicPsiFactory.createImport(project, typeName)
file.addImport(import)
}
}// src/dotnet/.../Services/CodeGenerator.cs
public class CodeGenerator : ICodeGenerator
{
public string GenerateExtensionMethods(EntityApiConfig config)
{
var sb = new StringBuilder();
// Generate tags
foreach (var tag in config.Tags)
{
sb.AppendLine(GenerateTagMethods(tag, config));
}
// Generate values
foreach (var value in config.Values)
{
sb.AppendLine(GenerateValueMethods(value, config));
}
return sb.ToString();
}
}// protocol/src/main/kotlin/model/AtomicGenerationModel.kt
object AtomicGenerationModel : Ext(Solution) {
val generateCode = signal<GenerateCodeRequest, GenerateCodeResponse>()
class GenerateCodeRequest(
val filePath: String,
val content: String
)
class GenerateCodeResponse(
val success: Boolean,
val generatedCode: String?,
val error: String?
)
}class AtomicParserTest {
@Test
fun `test parse simple atomic file`() {
val content = """
entityType: "IEntity"
namespace: "Test"
values:
Health: int
""".trimIndent()
val file = createAtomicFile(content)
val values = file.valuesSection?.valueItems
assertEquals(1, values?.size)
assertEquals("Health", values?.first()?.name)
assertEquals("int", values?.first()?.type)
}
}[TestFixture]
public class CodeGeneratorTests
{
[Test]
public void GeneratesCorrectGetterMethod()
{
var config = new EntityApiConfig
{
EntityType = "IEntity",
Values = new Dictionary<string, string> { ["Health"] = "int" }
};
var generator = new CodeGenerator();
var code = generator.GenerateExtensionMethods(config);
Assert.That(code, Contains.Substring("GetHealth"));
Assert.That(code, Contains.Substring("public static int"));
}
}- Follow Kotlin Coding Conventions
- Use 4 spaces for indentation
- Maximum line length: 120 characters
- Use meaningful variable names
// Good
val atomicFile = psiFile as? AtomicFile
val importsSection = atomicFile?.importsSection
// Bad
val f = psiFile as? AtomicFile
val is = f?.importsSection- Follow C# Coding Conventions
- Use 4 spaces for indentation
- Use PascalCase for public members
- Use camelCase for private fields
// Good
public class EntityApiConfig
{
private readonly string entityType;
public string EntityType => entityType;
}
// Bad
public class entityapiconfig
{
public string entity_type;
}- All tests pass (
./gradlew test) - Code follows style guidelines
- Documentation is updated
- Commit messages are clear
- Branch is up to date with main
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
## Testing
- [ ] Unit tests pass
- [ ] Integration tests pass
- [ ] Manual testing completed
## Screenshots (if applicable)
Add screenshots here
## Checklist
- [ ] My code follows the project style
- [ ] I've added tests for my changes
- [ ] Documentation is updated
- [ ] All tests pass- Automated checks run (tests, linting)
- Code review by maintainers
- Address feedback
- Approval and merge
# Windows
.\buildPlugin.ps1
# macOS/Linux
./gradlew buildPlugin./gradlew test./gradlew dokkaHtml- Set breakpoints in your code
- Run with debug:
./gradlew runIde --debug-jvm
- Attach debugger in Rider
import com.intellij.openapi.diagnostic.Logger
class MyClass {
companion object {
private val LOG = Logger.getInstance(MyClass::class.java)
}
fun myMethod() {
LOG.debug("Debug message")
LOG.info("Info message")
LOG.error("Error message", exception)
}
}- Grammar-Kit - For BNF grammar
- PsiViewer - PSI tree inspection
- Plugin DevKit - Plugin development tools
- Performance improvements
- Bug fixes
- Unity integration enhancements
- Documentation improvements
- Multi-file generation
- Template support
- Better refactoring support
- Advanced validation
type(scope): subject
body
footer
-
feat: New feature -
fix: Bug fix -
docs: Documentation -
style: Code style -
refactor: Refactoring -
perf: Performance -
test: Tests -
chore: Maintenance
feat(generation): add support for generic types
Add ability to use generic types in .atomic files.
Includes validation and proper code generation.
Closes #123fix(parser): handle empty values section
Previously crashed when values section was empty.
Now generates valid code with no value methods.
Fixes #456Contributors are recognized in:
- README.md contributors section
- Release notes
- GitHub contributors page
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Author: Iaroslav Sarchuk
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing to the Atomic Plugin! Your efforts help make this tool better for everyone.