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

Apply a quicklist with description ending on ONLY only when the filtype matches #357

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Clindbergh
Copy link

I would like to be able to perform an action only on certain filetypes. In our case we want properties to be sorted on save. For this purpose we use a quicklist and an external plugin. With this change if a quicklist (that is executed by save actions) has a description that ends with the word ONLY, the previous word is expected to be the filetype and the quicklist is executed only for these filetypes. In our case the quicklist's description is 'properties ONLY', then it is only executed for properties file.

This would become much more powerful if multiple quicklists could be selected. This probably would be a useful feature.

I am having two problems when trying to build the plugin:

  • com/dubreuia/processors/GlobalProcessor.java:43 is marked as an error as there is no COMMAND_NAME
  • Building results in this error (when the above problem is removed): image

Any idea what the problem might be?

However testing with the runIde target works fine.

@Clindbergh
Copy link
Author

Clindbergh commented Jan 22, 2021

com.intellij.codeInsight.actions.RearrangeCodeProcessor.COMMAND_NAME has been removed in current versions.

Building the plugin works with 37fea5c which uses an older version of the SDK.

@dubreuia
Copy link
Owner

dubreuia commented Feb 7, 2021

Thank you for the PR @Clindbergh . Sorry I don't have a lot of time right now but I'll check this ASAP

@Clindbergh
Copy link
Author

Clindbergh commented Feb 9, 2021

Thanks. This is more a proof of concept and some UI would be needed to select multiple quicklists (each for different filetypes). But it works for our use case (.properties sorting on save using the String Manipulation plugin).

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

Successfully merging this pull request may close these issues.

None yet

2 participants