[devkit] Extension attributes: support Integer, cleanup

GitOrigin-RevId: e874942961803b0ad33fbaea1f3f79c5635c8502
This commit is contained in:
Yann Cébron
2019-12-10 11:34:00 +01:00
committed by intellij-monorepo-bot
parent d24ad8a703
commit 668b4c0707
3 changed files with 26 additions and 14 deletions

View File

@@ -32,8 +32,11 @@
<myService serviceImplementation="foo.MyRunnable" os="mac"/>
<myService serviceImplementation="foo.MyRunnable" timeUnit="seconds"/>
<myService serviceImplementation="foo.MyRunnable" timeUnit="<error descr="Cannot resolve 'INVALID_VALUE' in java.util.concurrent.TimeUnit">INVALID_VALUE</error>"/>
<myService serviceImplementation="foo.MyRunnable" timeUnit="seconds" integerNullable="<error descr="Cannot convert empty string to target class 'java.lang.Integer'"></error>" intProperty="42"/>
<myService serviceImplementation="foo.MyRunnable" timeUnit="<error descr="Cannot resolve 'INVALID_VALUE' in java.util.concurrent.TimeUnit">INVALID_VALUE</error>"
integerNullable="<error descr="Cannot convert string 'INVALID_VALUE' to target class 'java.lang.Integer'">INVALID_VALUE</error>"
intProperty="<error descr="Cannot convert string 'INVALID_VALUE' to target class 'java.lang.Integer'">INVALID_VALUE</error>"
/>
<myPlugin.foo.bar implementation="java.util.ArrayList" os="<error descr="Unknown enum value 'INVALID_VALUE'">INVALID_VALUE</error>"/>
<completion.contributor/>

View File

@@ -161,7 +161,9 @@ class PluginXmlFunctionalTest extends JavaCodeInsightFixtureTestCase {
"import com.intellij.util.xmlb.annotations.Attribute; " +
"public class MyServiceDescriptor { " +
" @Attribute public String serviceImplementation; " +
" @Attribute public java.util.concurrent.TimeUnit timeUnit;" +
" @Attribute public java.util.concurrent.TimeUnit timeUnit; " +
" @Attribute public java.lang.Integer integerNullable; " +
" @Attribute public int intProperty; " +
"}")
configureByFile()