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

"Since" version should be updated #309

Closed
AlexPl292 opened this issue Nov 7, 2019 · 2 comments
Closed

"Since" version should be updated #309

AlexPl292 opened this issue Nov 7, 2019 · 2 comments
Labels

Comments

@AlexPl292
Copy link
Contributor

JBTextArea is available only since 183.
org.acejump.config.AceSettingsPanel#keyboardLayoutArea

image

@AlexPl292 AlexPl292 added the bug label Nov 7, 2019
@breandan
Copy link
Collaborator

breandan commented Nov 7, 2019

A better solution might be to programmatically branch on the API version. The SDK docs do not have suggested pattern for handling API versioning, plugin authors must use the since-build or until-build attributes in the plugin manifest or otherwise maintain their own compatibility solution to support older IntelliJ Platform versions. In our case ApplicationInfo.getApiVersion() would probably do the trick, although it looks like the way IDEA-201007 was implemented this would still trigger an inspection error and require some kind of reflection to work properly on older API versions. cc: @serejke

I wonder if this would be better handled by a library similar to Android's appcompat support library.

@serejke
Copy link

serejke commented Nov 8, 2019

@breandan, by default this inspection takes since-until values from the plugin.xml but you may specify your own values in the inspection's settings (popup on the message -> right arrow -> Edit inspection profile settings).

I don't recommend doing it, though, as you might miss the same problem in other places.

API branching based on ApplicationInfo.getApiVersion() is not always possible: if a new API didn't have an alternative in previous IDE builds, you'd have to either promote "since" values or not implement the feature for older platforms.

It seems that the easiest option is to just declare "since" value to be <build used to compile your plugin>, so if it is, say, 183.6156.11 (corresponding to 2018.3.6), then set the since to 183.6156.11. Since the latest released IDE is 2019.2 and the 193 is on the way, there might be no need to support older platforms.

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

No branches or pull requests

3 participants