From 1fbcf878b4ead0741fde3335d05282cddcc07433 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marius=20H=C3=B6fler?= <29115214+marius-h@users.noreply.github.com> Date: Mon, 23 Aug 2021 01:28:16 +0200 Subject: [PATCH] Prepare release v1.6.0 (#149) * Cleanup * Update readme * Enable force push for release --- .github/workflows/release.yml | 1 + README.md | 28 +++++++++---------- build.gradle.kts | 2 +- .../codeInsight/PubChangelogProvider.kt | 18 ++++++------ .../codeInsight/PubDocumentationProvider.kt | 3 +- .../editor/linter/LinterViewPanel.kt | 2 +- .../utils/GithubApi.kt | 18 +++++------- .../flutterenhancementsuite/utils/PsiUtils.kt | 8 ------ .../flutterenhancementsuite/utils/Utils.kt | 23 --------------- 9 files changed, 33 insertions(+), 70 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5763a630..e2a54b0a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -68,4 +68,5 @@ jobs: uses: ad-m/github-push-action@master with: branch: main + force: true github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index efcb9713..03824f0b 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ The essential plugin for making working with Flutter easier than ever!
Easy-to-use tools for managing your pubspec.yaml, snippets & more +
## Features @@ -22,7 +23,7 @@ Easy-to-use tools for managing your pubspec.yaml, snippets & more
Whenever there's a new version available for a package, it will tell you. Just press alt + ⮐
or ⌥ + ⮐
and choose "Update package".
Whenever there's a new version available for a package, it will tell you. Just press alt+⮐
or ⌥+⮐
and choose "Update package".
@@ -40,13 +41,17 @@ Easy-to-use tools for managing your pubspec.yaml, snippets & more
-
Ever wondered why you can't view the test coverage in your IDE?
-Well, with this plugin you can! Just press the "Run with coverage" button when launching your tests.
- +No more need to copy a package's name and pasting it into the searchbar on pub.dev!
+No you can just get there by pressing ctrl+B
or ⌘+B
while the cursor is on the package's name.
->Please note: This requires you to run the tests in a directory. Single files DO NOT work yet. +
For all of you who got tired pressing ⇧+F6
and adding or removing the underscore: You're finally redeemed!
Just use alt+⮐
or ⌥+⮐
to make it private or public.
When creating a new file, choose the "New Flutter Widget" option.
@@ -67,7 +72,7 @@ A bunch of snippets/LiveTemplates for quicker coding. Use ctrl+Q
or
Preview icons from different icon packs in the sidebar.
->Please note: This requires you to add the package flutter_vector_icons to your pub dependencies. The only compatible iconpacks for now are FontAwesome, Ionicons and MaterialCommunityIcons.
@@ -80,19 +85,12 @@ select the "Linter Rules Editor" tab at the bottom to see all linting options av
-
When creating a new file, choose the "New Flutter Bloc" option.
-Enter a name for your bloc and it will automatically generate all required classes for you.
-
->Please note: This requires you to add the package bloc to your pub dependencies.
-
-
-
## :arrow_down: How to install?
You can install plugin directly from IntelliJ IDEA or Android Studio:
+
1. Open _Preferences_
2. Choose _Plugins_
3. Select the _Marketplace_ tab
diff --git a/build.gradle.kts b/build.gradle.kts
index 013bdc3f..489d435c 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,4 +1,3 @@
-
import org.jetbrains.changelog.markdownToHTML
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
@@ -26,6 +25,7 @@ repositories {
dependencies {
implementation("com.squareup.retrofit2:retrofit:2.9.0")
implementation("com.squareup.retrofit2:converter-gson:2.9.0")
+ implementation("com.squareup.retrofit2:converter-scalars:2.9.0")
}
// Configure gradle-intellij-plugin plugin.
diff --git a/src/main/kotlin/de/mariushoefler/flutterenhancementsuite/codeInsight/PubChangelogProvider.kt b/src/main/kotlin/de/mariushoefler/flutterenhancementsuite/codeInsight/PubChangelogProvider.kt
index f63da494..84470328 100644
--- a/src/main/kotlin/de/mariushoefler/flutterenhancementsuite/codeInsight/PubChangelogProvider.kt
+++ b/src/main/kotlin/de/mariushoefler/flutterenhancementsuite/codeInsight/PubChangelogProvider.kt
@@ -15,10 +15,10 @@ import de.mariushoefler.flutterenhancementsuite.utils.isPubspecFile
*/
class PubChangelogProvider : DocumentationProvider {
override fun getQuickNavigateInfo(element: PsiElement, originalElement: PsiElement?): String {
- return findPackageNameAndGenerateDoc(element) ?: "Changelog not available"
+ return findPackageNameAndGenerateDoc(element)
}
- override fun generateDoc(element: PsiElement, originalElement: PsiElement?): String? {
+ override fun generateDoc(element: PsiElement, originalElement: PsiElement?): String {
return findPackageNameAndGenerateDoc(element)
}
@@ -28,18 +28,16 @@ class PubChangelogProvider : DocumentationProvider {
contextElement: PsiElement?,
targetOffset: Int
): PsiElement? {
- contextElement?.let {
- if (file.isPubspecFile() && it.parent.parent.text.matches(REGEX_DEPENDENCY.toRegex())
- ) {
- return contextElement
- }
+ return contextElement?.let {
+ return if (file.isPubspecFile() && it.parent.parent.text.matches(REGEX_DEPENDENCY.toRegex())) {
+ contextElement
+ } else null
}
- return null
}
- private fun findPackageNameAndGenerateDoc(element: PsiElement): String? {
+ private fun findPackageNameAndGenerateDoc(element: PsiElement): String {
return element.parent.parent.firstChild.text?.let {
PubApi.getPackageChangelog(it)
- }
+ } ?: "Changelog not available"
}
}
diff --git a/src/main/kotlin/de/mariushoefler/flutterenhancementsuite/codeInsight/PubDocumentationProvider.kt b/src/main/kotlin/de/mariushoefler/flutterenhancementsuite/codeInsight/PubDocumentationProvider.kt
index 53ebc5d9..46aae683 100644
--- a/src/main/kotlin/de/mariushoefler/flutterenhancementsuite/codeInsight/PubDocumentationProvider.kt
+++ b/src/main/kotlin/de/mariushoefler/flutterenhancementsuite/codeInsight/PubDocumentationProvider.kt
@@ -25,7 +25,8 @@ class PubDocumentationProvider : DocumentationProvider {
} else {
element.parent?.text?.let {
if (it.isPubPackageName()) {
- PubApi.getPackageDoc(element.text)
+ // TODO: unshorten again when performance was improved
+ PubApi.getPackageDoc(element.text, true)
} else null
}
}
diff --git a/src/main/kotlin/de/mariushoefler/flutterenhancementsuite/editor/linter/LinterViewPanel.kt b/src/main/kotlin/de/mariushoefler/flutterenhancementsuite/editor/linter/LinterViewPanel.kt
index 7c8ce772..0740568f 100644
--- a/src/main/kotlin/de/mariushoefler/flutterenhancementsuite/editor/linter/LinterViewPanel.kt
+++ b/src/main/kotlin/de/mariushoefler/flutterenhancementsuite/editor/linter/LinterViewPanel.kt
@@ -73,7 +73,7 @@ class LinterViewPanel(val project: Project, parentDisposable: Disposable) : Disp
inner class MyTableModel : AbstractTableModel() {
private val columnNames = arrayListOf("", "Rule", "Description")
- val data = ArrayList