permissions-dispatcher / permissions-dispatcher-plugin Goto Github PK
View Code? Open in Web Editor NEWIntelliJ plugin for supporting PermissionsDispatcher
Home Page: https://plugins.jetbrains.com/plugin/8349
License: Apache License 2.0
IntelliJ plugin for supporting PermissionsDispatcher
Home Page: https://plugins.jetbrains.com/plugin/8349
License: Apache License 2.0
android studio 2.2.2
when i install this plugin from browse repositories, it can't download.
so i use install plugin from disk, this can install but when i restart android studio, it warn this plugin has some problems.
please help me!
compile('com.github.hotchemi:permissionsdispatcher:2.4.0')
or
compile('com.github.hotchemi:permissionsdispatcher:2.4.0') { exclude module: "support-v13" }
https://github.com/shiraji/permissions-dispatcher-plugin/blob/master/build.gradle#L22
Let's use latest version!
It seems compile using Java8...
It maybe too late but this plugin should not require org.jetbrains.kotlin
. It should be optional.
This may be related to #46, intention or generate action for adding XXXDispacher.functionWith (this)
can be helpful.
When I trying to generate some methods with "Generate Runtime Permissions" in kotlin file, I'm getting the following error
[ 139300] ERROR - llij.ide.plugins.PluginManager - org.jetbrains.kotlin.resolve.ImportPath.<init>(Ljava/lang/String;)V
java.lang.NoSuchMethodError: org.jetbrains.kotlin.resolve.ImportPath.<init>(Ljava/lang/String;)V
at com.github.shiraji.permissionsdispatcherplugin.handlers.GeneratePMCodeHandlerKt.addImport(GeneratePMCodeHandlerKt.kt:115)
at com.github.shiraji.permissionsdispatcherplugin.handlers.GeneratePMCodeHandler.addRuntimePermissionAnnotation(GeneratePMCodeHandler.kt:33)
at com.github.shiraji.permissionsdispatcherplugin.handlers.GeneratePMCodeHandler.invoke(GeneratePMCodeHandler.kt:19)
at com.github.shiraji.permissionsdispatcherplugin.handlers.GeneratePMCodeHandlerKt.invoke(GeneratePMCodeHandlerKt.kt:17)
at com.intellij.codeInsight.actions.CodeInsightAction.lambda$null$0(CodeInsightAction.java:59)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:898)
at com.intellij.codeInsight.actions.CodeInsightAction.lambda$actionPerformedImpl$1(CodeInsightAction.java:62)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:129)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:100)
at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:86)
at com.intellij.codeInsight.actions.CodeInsightAction.actionPerformedImpl(CodeInsightAction.java:55)
at com.intellij.codeInsight.actions.CodeInsightAction.actionPerformed(CodeInsightAction.java:41)
at com.github.shiraji.permissionsdispatcherplugin.actions.GeneratePMCodeAction.access$actionPerformed$s-307674507(GeneratePMCodeAction.kt:30)
at com.github.shiraji.permissionsdispatcherplugin.actions.GeneratePMCodeAction$actionPerformed$2.invoke(GeneratePMCodeAction.kt:102)
at com.github.shiraji.permissionsdispatcherplugin.actions.GeneratePMCodeAction.actionPerformed(GeneratePMCodeAction.kt:124)
at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:197)
at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:88)
at com.intellij.openapi.application.TransactionGuardImpl.submitTransactionAndWait(TransactionGuardImpl.java:156)
at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:211)
at com.intellij.ui.popup.PopupFactoryImpl$ActionPopupStep.performAction(PopupFactoryImpl.java:875)
at com.intellij.ui.popup.PopupFactoryImpl$ActionPopupStep.lambda$onChosen$0(PopupFactoryImpl.java:863)
at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:199)
at com.intellij.ui.popup.AbstractPopup.lambda$null$7(AbstractPopup.java:1390)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:795)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:631)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:387)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
[ 139306] ERROR - llij.ide.plugins.PluginManager - Android Studio 2.3.3 Build #AI-162.4069837
[ 139308] ERROR - llij.ide.plugins.PluginManager - JDK: 1.8.0_92
[ 139308] ERROR - llij.ide.plugins.PluginManager - VM: Java HotSpot(TM) 64-Bit Server VM
[ 139308] ERROR - llij.ide.plugins.PluginManager - Vendor: Oracle Corporation
[ 139308] ERROR - llij.ide.plugins.PluginManager - OS: Mac OS X
[ 139308] ERROR - llij.ide.plugins.PluginManager - Last Action: Generate
It now bundle support v13. I think when add dependemcies, ask user if the app include android.app.Fragment or not.
At this moment, PdVersion manages latest version of PM. I want add settings to edit "latest version".
For instance, if someone implements
@NeedsPermission(Camera)
fun foo() {
}
Then, generating @OnShowRationale(Camera)
.
Currently, we have a lot of duplicated methods and logics in View classes.
After createing generating missing functions, I think it's time to refactoring code.
PermissionsDispatcher v2.2.0 is available https://github.com/hotchemi/PermissionsDispatcher/releases/tag/2.2.0
I don't think there is no change for this plugin but make sure it is working.
I lie. This plugin need to support maxSdkVersion
. Maybe add checkbox and then if the checkbox is selected, add maxSdkVersion = 18
from manifest file. (or just show text box for maxSdkVersion value)
compile 'com.github.hotchemi:permissionsdispatcher:${latest.version}'
I haven't used this one, yet, but it is nice to have binding library to handle UI, like checkbox. https://github.com/ReactiveX/RxSwing seems the library for swing binding.
I don't know how but because PermissionsDispatcher support Kotlin, this plugin should support that, too.
There are many place use file.classes[0]
. At this moment, it only supports first class...but at least use local variable!
Add this to app/build.gradle
buildscript {
dependencies {
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
}
}
apply plugin: 'android-apt'
dependencies {
compile 'com.github.hotchemi:permissionsdispatcher:2.1.3'
apt 'com.github.hotchemi:permissionsdispatcher-processor:2.1.3'
}
2.1.3
is hard coded for first release.
From v2.4.0, some users need to exclude support v13.
i think better
select line on existed function on generete Runtime Permissions,
NeedPermission into functionName in TextBox
and Generate push
existing function above additonal Annotation.
This is too much hope
Existed function using replace
XXXDispacher.functionWith (this)
It is awesome if you can
It should be com.android.voicemail.permission.ADD_VOICEMAIL
It is annoying to ask me rebuild the project, since i always need to do it.
Provide "Don't show this dialog" and settings for always rebuild
/don't rebuild project
Now, if onRequestPermissionsResult/onActivityResult method exists, it does not insert XxxPermissionsDispatcher.onRequestPermissionsResult(this, requestCode, grantResults);
. This plugin should check if developer already write the delegation call, and then if does not exist, insert the line.
as usual...
PD 2.3.2 is released. AFAIK, there is no issue to this plugin with v2.3.2. Check if there is no issue and update README.
I think this plugin should group under "Generate..."
Create inspection that add missing onRequestPermissionsResult
compile 'com.github.hotchemi:permissionsdispatcher:2.3.1'
annotationProcessor 'com.github.hotchemi:permissionsdispatcher-processor:2.3.1'
PermissionsDispatcher is now 2.3.2
i hope to update 'Add dependencies'
Using the latest Android Studio 2.1.1
Plugin Error: PermissionsDispatcher plugin threw an uncaught NullPointerException. Disable Plugin 12:38:45 NullPointerException: null
This plugin does not generate onActivityResult when developers select special permission.
Same as #12, this plugin does not generate missing delegating method call. There are TODO comments where I should write the code...
see #18
I'm not quite sure if it is possible but if the user pick one permission, then add corresponding uses-permission to AndroidManifest.
From this PR, the recommended code of PermissionRequest is final. I think this plugin should support that as well.
Tend to forget to update latest version of PD, I really need to have it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.