diff options
author | Polina Koval <kovalp@google.com> | 2020-11-27 18:15:43 +0000 |
---|---|---|
committer | TreeHugger Robot <treehugger-gerrit@google.com> | 2020-12-04 17:14:30 +0000 |
commit | 74a7a5881059f6410b4e0c18bf2b6d5d5f2e6df2 (patch) | |
tree | fdc46589dee42def0791ec35f9ae5ba1a3901f67 /compose-ide-plugin/resources | |
parent | 369c2dbb661d878eca0bee1a4afaa45b3e2a3a14 (diff) | |
download | idea-74a7a5881059f6410b4e0c18bf2b6d5d5f2e6df2.tar.gz |
[Compose] Add ComposeWrapModifiersAction
Action wraps Modifier(androidx.compose.ui.Modifier) chain that is two modifiers or longer, in one modifier per line.
Bug: 154502969
Test: ComposeWrapModifiersActionTest
Change-Id: Ifc79f30adcc36d142cdcdb95efded6e752fe911d
Diffstat (limited to 'compose-ide-plugin/resources')
4 files changed, 32 insertions, 0 deletions
diff --git a/compose-ide-plugin/resources/intentionDescriptions/ComposeWrapModifiersAction/after.kt.template b/compose-ide-plugin/resources/intentionDescriptions/ComposeWrapModifiersAction/after.kt.template new file mode 100644 index 00000000000..b8911cc3993 --- /dev/null +++ b/compose-ide-plugin/resources/intentionDescriptions/ComposeWrapModifiersAction/after.kt.template @@ -0,0 +1,7 @@ +@Composable +fun NewsStory() { + Modifier + .padding(padding) + .clickable(onClick = onClick) + .fillMaxWidth() +}
\ No newline at end of file diff --git a/compose-ide-plugin/resources/intentionDescriptions/ComposeWrapModifiersAction/before.kt.template b/compose-ide-plugin/resources/intentionDescriptions/ComposeWrapModifiersAction/before.kt.template new file mode 100644 index 00000000000..6534d42bf08 --- /dev/null +++ b/compose-ide-plugin/resources/intentionDescriptions/ComposeWrapModifiersAction/before.kt.template @@ -0,0 +1,4 @@ +@Composable +fun NewsStory() { + Modifier.padding(padding).clickable(onClick = onClick).fillMaxWidth() +}
\ No newline at end of file diff --git a/compose-ide-plugin/resources/intentionDescriptions/ComposeWrapModifiersAction/description.html b/compose-ide-plugin/resources/intentionDescriptions/ComposeWrapModifiersAction/description.html new file mode 100644 index 00000000000..816369b42ec --- /dev/null +++ b/compose-ide-plugin/resources/intentionDescriptions/ComposeWrapModifiersAction/description.html @@ -0,0 +1,20 @@ +<!-- + ~ Copyright (C) 2020 The Android Open Source Project + ~ + ~ 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. + --> +<html> +<body> +Wraps Modifier chain that is two modifiers or longer, in one modifier per line. +</body> +</html>
\ No newline at end of file diff --git a/compose-ide-plugin/resources/messages/ComposeBundle.properties b/compose-ide-plugin/resources/messages/ComposeBundle.properties index d5323cfdb3f..cbe2715af0b 100644 --- a/compose-ide-plugin/resources/messages/ComposeBundle.properties +++ b/compose-ide-plugin/resources/messages/ComposeBundle.properties @@ -7,3 +7,4 @@ import.get.value=Import getValue compose.enable.insertion.handler=Enable enhanced auto-completion when using Jetpack Compose create.composable.function=Create @Composable function remove.wrapper=Remove wrapper +wrap.modifiers=Wrap modifiers |