Skip to content

Language aware Code-Actions #683

@Zabuzard

Description

@Zabuzard

Overview

The code actions (interface CodeAction) should be able to provide language black- and whitelists.

CodeMessageHandler should then respect that and only add a code action if the language matches those filters.

That way, we can ensure that actions, such as ByteCode or JShell (actions we want to add in the future) can only be executed on java. Also, the formatter could then be disabled for languages like xml, kotlin and similar (for which we know that it doesnt work well at all).

Details

If the whitelist is empty, it should be applied to all languages, other than the ones listed in the blacklist.

The special string "" should be used to indicate "no language selected".

All in all, the feature is quite straightforward. But there are a lot of nasty edge cases to consider. For example, if no code action is available, the bot should perhaps not send any message and just skip it. The same can happen if a message is edited. For example from a java message to a cpp message and then it could happen that no actions are available anymore, upon which the bot could just delete the reply.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestinactivity-closedIssues that have been closed due to inactivity, but are otherwise valid and might be reopened laterpriority: normalstale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions