Skip to content

Latest commit

 

History

History
93 lines (69 loc) · 5.23 KB

File metadata and controls

93 lines (69 loc) · 5.23 KB

CodeCocoon-Plugin

Build Version Downloads

Configuration

The config file (codecocoon.yml)

The plugin requires a YAML configuration file. By default, it looks for codecocoon.yml in the project root. Alternatively, you can overwrite the path in gradle.properties:

codecocoon.config=/path/to/config.yml

Example structure for the config file:

# Absolute or project-local path to the root of the project you want to transform
projectRoot: "/absolute/path/to/your/project"

# Optional: limit transformations to these files (relative to the root). Leave empty to target the entire project
files: ['path/to/file1.kt', 'path/to/file2.kt']

# The transformation pipeline. Order matters. Each transformation has:
#   - id: unique identifier
#   - config: arbitrary nested settings; only the selected transformation should interpret it
transformations:
  - id: "TransformationA"
    config:
      prefix: "Tmp_"
      includeScopes:
        - "src/main"

Built-in transformations

  • Rename Method (id: rename-method-transformation)
    • Renames Java methods to an LLM-suggested, semantically similar name and updates usages/overrides.
    • Skips: overrides, tests, interface methods extending library interfaces, annotated methods, constructors, toString/get*/set*/is*, public methods with no refs, and methods referenced from non-Java/Kotlin files.
  • Rename Class (id: rename-class-transformation)
    • Renames Java classes to an LLM-suggested, semantically similar name and updates usages/overrides.
    • Skips: classes referenced from non-Java files, test class names and annotated classes.
  • Rename Variable (id: rename-variable-transformation)
    • Renames Java variables to an LLM-suggested, semantically similar name and updates usages.
    • Skips: variables in test classes, enums, and those declared in library-files.

Template ToDo list

This Fancy IntelliJ Platform Plugin is going to be your implementation of the brilliant ideas that you have.

This specific section is a source for the plugin.xml file which will be extracted by the Gradle during the build process.

To keep everything working, do not remove <!-- ... --> sections.

Installation

  • Using the IDE built-in plugin system:

    Settings/Preferences > Plugins > Marketplace > Search for "CodeCocoon-Plugin" > Install

  • Using JetBrains Marketplace:

    Go to JetBrains Marketplace and install it by clicking the Install to ... button in case your IDE is running.

    You can also download the latest release from JetBrains Marketplace and install it manually using Settings/Preferences > Plugins > ⚙️ > Install plugin from disk...

  • Manually:

    Download the latest release and install it manually using Settings/Preferences > Plugins > ⚙️ > Install plugin from disk...


Plugin based on the IntelliJ Platform Plugin Template.