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

[WIP] Add specialized MCP color support #459

Draft
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

marvin-roesch
Copy link
Contributor

This adds support for various methods/functions in MCP code bases that take colors as parameters. Currently supported are hex color codes (encoded as integers) as well as [0,1] and [0,255] RGB vectors, all of them with and without alpha values.

Furthermore, this adds a basic system for loading configurations based on a project's underlying MC version. Currently, it's hardcoded to the color support, but I'll make it more useful as a general purpose feature. It's also a little "dumb" in that there's no concept of inheritance. Instead, configs for all versions upto the requested one are considered. This will also be addressed.

Part of the motivation behind the configuration is easier customization for the user. By exposing these configs (possibly through some auto-generated GUI), users may add support for their own methods (or those we missed).

import com.siyeh.ig.InspectionGadgetsFix
import org.jetbrains.annotations.Nls

class ColorComponentOutOfRangeInspection : BaseInspection() {
Copy link
Contributor

@stephan-gh stephan-gh Oct 1, 2018

Choose a reason for hiding this comment

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

Can we avoid introducing new inspections built on BaseInspection? In my opinion that class is pretty much obsolete and most things can be implemented with one of IntelliJ's base classes (here: AbstractBaseJavaLocalInspectionTool) in a nicer way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants