Code Monkey home page Code Monkey logo

databinding-support's Introduction

databinding-support plugin

Intellij plugin that support Android Data Binding Library

Features

There screenshots show popup how to use the features. The popup comes from Presentation Assistant.

Wrap with <layout></layout>

wrap

Add <data> tag

add_data

Wrap with @{}

wrap_with_tag

Wrap with @={}

wrap_2way

Switch @{} and @={}

switch

Add <import>

!add_import

Add <variable>

!add_variable

Jump Class -> Layout

!jump_to_layout

...and more features come

How to install

Use the IDE's plugin manager to find "databinding-support" and install the plugin.

License

Copyright 2017 Yoshinori Isogai

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

databinding-support's People

Contributors

sckm avatar shiraji avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

databinding-support's Issues

Labeling

Since there are a lot of issues for this plugin, need labeling first

AS 2.3 on preview error

using 1.0.9 plugin

Although the reproduction method is unknown, since it was displayed as error of databinding-support in the title part

I will report it just in case (Do you recover when I re-do Gradle Sync?)

Duplicate key com.android.tools.idea.res.LayoutDataBindingInfo@7f77a711
java.lang.IllegalStateException: Duplicate key com.android.tools.idea.res.LayoutDataBindingInfo@7f77a711
	at java.util.stream.Collectors.lambda$throwingMerger$0(Collectors.java:133)
	at java.util.HashMap.merge(HashMap.java:1253)
	at java.util.stream.Collectors.lambda$toMap$58(Collectors.java:1320)
	at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374)
	at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580)
	at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:270)
	at java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1691)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
	at com.android.tools.idea.res.ResourceFolderRepository.getDataBindingResourceFiles(ResourceFolderRepository.java:600)
	at com.android.tools.idea.res.MultiResourceRepository.getDataBindingResourceFiles(MultiResourceRepository.java:133)
	at com.android.tools.idea.databinding.DataBindingClassFinder.findClass(DataBindingClassFinder.java:48)
	at com.intellij.psi.impl.JavaPsiFacadeImpl.doFindClass(JavaPsiFacadeImpl.java:122)
	at com.intellij.psi.impl.JavaPsiFacadeImpl.findClass(JavaPsiFacadeImpl.java:99)
	at org.jetbrains.plugins.groovy.lang.psi.impl.GroovyPsiManager.findClassWithCache(GroovyPsiManager.java:137)
	at org.jetbrains.plugins.groovy.lang.psi.impl.GrLiteralClassType.resolve(GrLiteralClassType.java:156)
	at com.intellij.psi.util.TypeConversionUtil$6.visitClassType(TypeConversionUtil.java:1320)
	at com.intellij.psi.util.TypeConversionUtil$6.visitClassType(TypeConversionUtil.java:1311)
	at com.intellij.psi.PsiClassType.accept(PsiClassType.java:236)
	at com.intellij.psi.util.TypeConversionUtil.erasure(TypeConversionUtil.java:1311)
	at com.intellij.psi.util.TypeConversionUtil.erasure(TypeConversionUtil.java:1305)
	at org.jetbrains.plugins.groovy.lang.resolve.processors.GroovyResolverProcessor.eraseTypes(GroovyResolverProcessor.java:363)
	at org.jetbrains.plugins.groovy.lang.resolve.processors.GroovyResolverProcessor.<init>(GroovyResolverProcessor.java:101)
	at org.jetbrains.plugins.groovy.lang.resolve.processors.GroovyResolverProcessorImpl.<init>(GroovyResolverProcessorImpl.java:42)
	at org.jetbrains.plugins.groovy.lang.resolve.processors.GroovyResolverProcessorBuilder.build(GroovyResolverProcessorBuilder.java:41)
	at org.jetbrains.plugins.groovy.lang.psi.impl.statements.expressions.GrReferenceExpressionImpl._resolve(GrReferenceExpressionImpl.java:513)
	at org.jetbrains.plugins.groovy.lang.psi.impl.statements.expressions.GrReferenceExpressionImpl.doPolyResolve(GrReferenceExpressionImpl.java:483)
	at org.jetbrains.plugins.groovy.lang.psi.impl.statements.expressions.GrReferenceExpressionImpl.access$000(GrReferenceExpressionImpl.java:66)
	at org.jetbrains.plugins.groovy.lang.psi.impl.statements.expressions.GrReferenceExpressionImpl$1.resolve(GrReferenceExpressionImpl.java:205)
	at org.jetbrains.plugins.groovy.lang.psi.impl.statements.expressions.GrReferenceExpressionImpl$1.resolve(GrReferenceExpressionImpl.java:201)
	at com.intellij.psi.impl.source.resolve.ResolveCache$3.compute(ResolveCache.java:142)
	at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:112)
	at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:139)
	at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:167)
	at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:159)
	at org.jetbrains.plugins.groovy.lang.psi.impl.InferenceContext$1.multiResolve(InferenceContext.java:64)
	at org.jetbrains.plugins.groovy.lang.psi.impl.statements.expressions.GrReferenceExpressionImpl.multiResolve(GrReferenceExpressionImpl.java:601)
	at org.jetbrains.plugins.groovy.lang.psi.GrReferenceElement.advancedResolve(GrReferenceElement.java:44)
	at org.jetbrains.plugins.groovy.lang.psi.GrReferenceElement.resolve(GrReferenceElement.java:39)
	at org.jetbrains.plugins.groovy.lang.psi.impl.PsiImplUtil.getRuntimeQualifier(PsiImplUtil.java:289)
	at org.jetbrains.plugins.groovy.lang.psi.impl.PsiImplUtil.getQualifierType(PsiImplUtil.java:977)
	at org.jetbrains.plugins.groovy.lang.resolve.processors.GroovyResolverProcessor.<init>(GroovyResolverProcessor.java:97)
	at org.jetbrains.plugins.groovy.lang.resolve.processors.GroovyResolverProcessorImpl.<init>(GroovyResolverProcessorImpl.java:42)
	at org.jetbrains.plugins.groovy.lang.resolve.processors.GroovyResolverProcessorBuilder.build(GroovyResolverProcessorBuilder.java:41)
	at org.jetbrains.plugins.groovy.lang.psi.impl.statements.expressions.GrReferenceExpressionImpl._resolve(GrReferenceExpressionImpl.java:513)
	at org.jetbrains.plugins.groovy.lang.psi.impl.statements.expressions.GrReferenceExpressionImpl.doPolyResolve(GrReferenceExpressionImpl.java:483)
	at org.jetbrains.plugins.groovy.lang.psi.impl.statements.expressions.GrReferenceExpressionImpl.access$000(GrReferenceExpressionImpl.java:66)
	at org.jetbrains.plugins.groovy.lang.psi.impl.statements.expressions.GrReferenceExpressionImpl$1.resolve(GrReferenceExpressionImpl.java:205)
	at org.jetbrains.plugins.groovy.lang.psi.impl.statements.expressions.GrReferenceExpressionImpl$1.resolve(GrReferenceExpressionImpl.java:201)
	at com.intellij.psi.impl.source.resolve.ResolveCache$3.compute(ResolveCache.java:142)
	at com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:112)
	at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:139)
	at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:167)
	at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:159)
	at org.jetbrains.plugins.groovy.lang.psi.impl.InferenceContext$1.multiResolve(InferenceContext.java:64)
	at org.jetbrains.plugins.groovy.lang.psi.impl.statements.expressions.GrReferenceExpressionImpl.multiResolve(GrReferenceExpressionImpl.java:601)
	at org.jetbrains.plugins.groovy.lang.psi.GrReferenceElement.advancedResolve(GrReferenceElement.java:44)
	at org.jetbrains.plugins.groovy.lang.psi.GrReferenceElement.resolve(GrReferenceElement.java:39)
	at org.jetbrains.plugins.groovy.annotator.GroovyAnnotator.checkFinalFieldAccess(GroovyAnnotator.java:337)
	at org.jetbrains.plugins.groovy.annotator.GroovyAnnotator.visitReferenceExpression(GroovyAnnotator.java:308)
	at org.jetbrains.plugins.groovy.lang.psi.impl.statements.expressions.GrReferenceExpressionImpl.accept(GrReferenceExpressionImpl.java:104)
	at org.jetbrains.plugins.groovy.annotator.GrAnnotatorImpl.annotate(GrAnnotatorImpl.java:51)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.runAnnotators(DefaultHighlightVisitor.java:139)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:102)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.runVisitors(GeneralHighlightingPass.java:334)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$collectHighlights$2(GeneralHighlightingPass.java:269)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:293)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$analyzeByVisitors$3(GeneralHighlightingPass.java:296)
	at com.intellij.codeInsight.daemon.impl.analysis.HighlightVisitorImpl.lambda$analyze$1(HighlightVisitorImpl.java:175)
	at com.intellij.codeInsight.daemon.impl.analysis.RefCountHolder.analyze(RefCountHolder.java:363)
	at com.intellij.codeInsight.daemon.impl.analysis.HighlightVisitorImpl.analyze(HighlightVisitorImpl.java:174)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:296)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$analyzeByVisitors$3(GeneralHighlightingPass.java:296)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:86)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:296)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectHighlights(GeneralHighlightingPass.java:268)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:207)
	at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:82)
	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:70)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$null$0(PassExecutorService.java:434)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1029)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:427)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:494)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:443)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:426)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:402)
	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:154)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

NoSuchMethodError in Intelij 2017.1

Since I have updated to InteliJ 2017.1, I got the following error:

com.intellij.util.containers.UtilKt.isNullOrEmpty(Ljava/util/List;)Z
java.lang.NoSuchMethodError: com.intellij.util.containers.UtilKt.isNullOrEmpty(Ljava/util/List;)Z
at com.github.shiraji.databindinglayout.linemaker.LayoutNavigationLineMarkerProvider.getLineMarkerInfo(LayoutNavigationLineMarkerProvider.kt:26)
at com.intellij.codeInsight.daemon.impl.LineMarkersPass.a(LineMarkersPass.java:186)
at com.intellij.codeInsight.daemon.impl.LineMarkersPass.a(LineMarkersPass.java:111)
at com.intellij.codeInsight.daemon.impl.Divider.divideInsideAndOutsideInOneRoot(Divider.java:96)
at com.intellij.codeInsight.daemon.impl.LineMarkersPass.doCollectInformation(LineMarkersPass.java:106)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:70)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.b(PassExecutorService.java:438)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1153)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.a(PassExecutorService.java:431)
at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:556)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:501)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.c(PassExecutorService.java:430)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.d(PassExecutorService.java:406)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:142)
at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:242)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:404)
at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:165)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

Enable databinding

Check if databinding is enable or not. If not, add following code snippet.

android {
    ....
    dataBinding {
        enabled = true
    }
}

Class -> layout navigation

Add some kind of navigation that jump to layout where the class is used. If there is multiple layout, then list them. Like what Dagger plugin does.

Action to add binding call in Java file

Action to add following line

MainActivityBinding binding = DataBindingUtil.setContentView(this, R.layout.main_activity);
  • Pick layout
  • Generate the line based on the layout name

layout.xml opened remain and open project

android:onClick="@{activity::XXX}"

だけをしているlayout.xml

Assertion failed: Intention Description Dir URL is null: Wrap with @{}; WrapWithDatabindingExpressionIntention, PluginClassLoader[com.github.shiraji.databindinglayout, 1.0.8]
java.lang.Throwable
   at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:158)
   at com.intellij.codeInsight.intention.impl.config.IntentionActionMetaData.getDirURL(IntentionActionMetaData.java:109)
   at com.intellij.codeInsight.intention.impl.config.BeforeAfterActionMetaData.getDescription(BeforeAfterActionMetaData.java:155)
   at com.intellij.codeInsight.intention.impl.config.IntentionManagerSettings.processMetaData(IntentionManagerSettings.java:166)
   at com.intellij.codeInsight.intention.impl.config.IntentionManagerSettings.registerMetaData(IntentionManagerSettings.java:157)
   at com.intellij.codeInsight.intention.impl.config.IntentionManagerSettings.registerIntentionMetaData(IntentionManagerSettings.java:75)
   at com.intellij.codeInsight.intention.impl.config.IntentionManagerImpl.registerIntentionAndMetaData(IntentionManagerImpl.java:139)
   at com.intellij.codeInsight.intention.impl.config.IntentionManagerImpl.registerIntentionAndMetaData(IntentionManagerImpl.java:116)
   at com.intellij.codeInsight.intention.impl.config.IntentionManagerImpl.lambda$registerIntentionFromBean$0(IntentionManagerImpl.java:94)
   at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:222)
   at com.intellij.util.Alarm$Request$1.run(Alarm.java:378)
   at com.intellij.util.Alarm$Request.run(Alarm.java:389)
   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
   at com.intellij.util.concurrency.SchedulingWrapper$MyScheduledFutureTask.run(SchedulingWrapper.java:227)
   at com.intellij.util.concurrency.BoundedTaskExecutor.runFirstTaskThenPollAndRunRest(BoundedTaskExecutor.java:178)
   at com.intellij.util.concurrency.BoundedTaskExecutor.access$000(BoundedTaskExecutor.java:40)
   at com.intellij.util.concurrency.BoundedTaskExecutor$2.run(BoundedTaskExecutor.java:197)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
   at java.lang.Thread.run(Thread.java:745)

Add 2way databinding support `@={}`

Related to #2 and #3, add @={} support. Would be nice if this plugin switch @{} with @={} and vice versa

TODO

  • Switch to 2 way databinding
  • Switch to databinding tag
  • Add 2 way databinding

Support generating object extending BaseObservable

For instance, write following

private static class User extends BaseObservable {
   private String firstName;
   private String lastName;

then generate getter/setter,

private static class User extends BaseObservable {
   private String firstName;
   private String lastName;
   @Bindable
   public String getFirstName() {
       return this.firstName;
   }
   @Bindable
   public String getLastName() {
       return this.lastName;
   }
   public void setFirstName(String firstName) {
       this.firstName = firstName;
       notifyPropertyChanged(BR.firstName);
   }
   public void setLastName(String lastName) {
       this.lastName = lastName;
       notifyPropertyChanged(BR.lastName);
   }
}

java.lang.NoClassDefFoundError for AddInsideDataTagIntention

java.lang.NoClassDefFoundError: com/github/shiraji/databindinglayout/intentions/AddInsideDataTagIntention
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:642)
	at com.intellij.util.lang.UrlClassLoader._defineClass(UrlClassLoader.java:261)
	at com.intellij.util.lang.UrlClassLoader.defineClass(UrlClassLoader.java:257)
	at com.intellij.util.lang.UrlClassLoader._findClass(UrlClassLoader.java:226)
	at com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(PluginClassLoader.java:119)
	at com.intellij.ide.plugins.cl.PluginClassLoader.tryLoadingClass(PluginClassLoader.java:73)
	at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:62)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:348)
	at com.intellij.openapi.extensions.AbstractExtensionPointBean.findClass(AbstractExtensionPointBean.java:42)
	at com.intellij.openapi.extensions.AbstractExtensionPointBean.instantiate(AbstractExtensionPointBean.java:63)
	at com.intellij.openapi.extensions.CustomLoadingExtensionPointBean.instantiateExtension(CustomLoadingExtensionPointBean.java:47)
	at com.intellij.codeInsight.intention.IntentionActionBean.instantiate(IntentionActionBean.java:76)
	at com.intellij.codeInsight.intention.impl.config.IntentionActionWrapper.getDelegate(IntentionActionWrapper.java:81)
	at com.intellij.codeInsight.intention.impl.config.IntentionActionWrapper.getFamilyName(IntentionActionWrapper.java:51)
	at com.intellij.codeInsight.intention.impl.config.IntentionActionWrapper.getFullFamilyName(IntentionActionWrapper.java:73)
	at com.intellij.codeInsight.intention.impl.config.IntentionManagerSettings.getFamilyName(IntentionManagerSettings.java:129)
	at com.intellij.codeInsight.intention.impl.config.IntentionManagerSettings.isEnabled(IntentionManagerSettings.java:142)
	at com.intellij.codeInsight.intention.impl.config.IntentionManagerImpl.getAvailableIntentionActions(IntentionManagerImpl.java:260)
	at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.getActionsToShow(ShowIntentionsPass.java:302)
	at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.getIntentionActionsToShow(ShowIntentionsPass.java:225)
	at com.intellij.codeInsight.daemon.impl.ShowIntentionsPass.doCollectInformation(ShowIntentionsPass.java:201)
	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:70)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1$1.run(PassExecutorService.java:444)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1181)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass$1.run(PassExecutorService.java:435)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:446)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:392)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:432)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:408)
	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:206)
	at jsr166e.ForkJoinTask.doExec(ForkJoinTask.java:260)
	at jsr166e.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:858)
	at jsr166e.ForkJoinPool.scan(ForkJoinPool.java:1687)
	at jsr166e.ForkJoinPool.runWorker(ForkJoinPool.java:1642)
	at jsr166e.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:108)
Caused by: java.lang.ClassNotFoundException: com.github.shiraji.databindinglayout.intentions.AddInsideDataTagIntention PluginClassLoader[com.github.shiraji.databindinglayout, 1.0.9-SNAPSHOT]
	at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:64)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 40 more

This seems weird since AddInsideDataTagIntention is abstract and didn't register plugin.xml

AS 2.4 preview3 on error (using gradle sync)

using 1.0.9 plugin

java.lang.NoSuchMethodError: com.intellij.util.containers.UtilKt.isNullOrEmpty(Ljava/util/List;)Z
	at com.github.shiraji.databindinglayout.linemaker.LayoutNavigationLineMarkerProvider.getLineMarkerInfo(LayoutNavigationLineMarkerProvider.kt:18)
	at com.intellij.codeInsight.daemon.impl.LineMarkersPass.queryProviders(LineMarkersPass.java:186)
	at com.intellij.codeInsight.daemon.impl.LineMarkersPass.lambda$doCollectInformation$3(LineMarkersPass.java:116)
	at com.intellij.codeInsight.daemon.impl.Divider.divideInsideAndOutsideInOneRoot(Divider.java:96)
	at com.intellij.codeInsight.daemon.impl.LineMarkersPass.doCollectInformation(LineMarkersPass.java:106)
	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:70)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$null$1(PassExecutorService.java:440)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1132)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:433)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:587)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:432)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:408)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:142)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:238)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:406)
	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:165)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

Deprecate "Wrap with data binding layout"?

From Android Studio 3.0, the official provides the similar intention, call "Convert to data binding layout"
However, their intention does not available if the cursor is not inside the root tag.

There are a couple of actions that I can do for this intention/plugin.

  • Delete this intention
  • Keep this intention
  • Make it available where the official intention does not support
  • Delete this plugin

Does anyone have any comment for this? Feel free to give me comment. I will wait until Android Studio v3 stable release.


Here is the official intention's behavior. $$cursor$$ is where the cursor located.

Work

<Framelayout 
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fitsSystemWindows="true"
        xmlns:tools="http://schemas.android.com/tools"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        xmlns:android="http://schemas.android.com/apk/res/android"$$cursor$$
        >
</Framelayout>

Not work

<Framelayout 
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fitsSystemWindows="true"
        xmlns:tools="http://schemas.android.com/tools"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        xmlns:android="http://schemas.android.com/apk/res/$$cursor$$android"
        >

Not work

<Framelayout 
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:fitsSystemWindows="true"
        xmlns:tools="http://schemas.android.com/tools"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        xmlns:android="http://schemas.android.com/apk/res/android"
        >
$$cursor$$
</Framelayout>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.