Skip to content

Commit

Permalink
Bump Kotlin and fix some deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenba committed Mar 16, 2022
1 parent a995513 commit 0bc309b
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ javaVersion=11
org.gradle.jvmargs='-Duser.language=en'
sources=false

intellij_version=IC-221.3427-EAP-CANDIDATE-SNAPSHOT
intellij_version=IC-221.4994-EAP-CANDIDATE-SNAPSHOT
rider_version=RD-2022.1-EAP6-SNAPSHOT
build_common_code_with=rider

Expand All @@ -18,8 +18,8 @@ applicationinsights.key=57cc111a-36a8-44b3-b044-25d293b8b77c
updateVersionRange=false
patchPluginXmlSinceBuild=221

kotlin_version=1.5.31
jackson_kotlin_version=2.13.0
kotlin_version=1.6.10
jackson_kotlin_version=2.13.1
gradle_plugin_version=1.4.0
undercouch_version=4.0.4
web_socket_version=1.5.1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2019-2021 JetBrains s.r.o.
* Copyright (c) 2019-2022 JetBrains s.r.o.
*
* All rights reserved.
*
Expand Down Expand Up @@ -28,9 +28,9 @@ import com.intellij.ide.util.PropertiesComponent
import com.intellij.openapi.fileEditor.FileEditor
import com.intellij.openapi.fileEditor.impl.LoadTextUtil
import com.intellij.openapi.project.Project
import com.intellij.openapi.util.Key
import com.intellij.openapi.vfs.VirtualFile
import com.intellij.ui.EditorNotificationPanel
import com.intellij.ui.EditorNotificationProvider
import com.intellij.ui.EditorNotifications
import com.intellij.workspaceModel.ide.WorkspaceModel
import com.jetbrains.rd.util.firstOrNull
Expand All @@ -44,13 +44,12 @@ import com.jetbrains.rider.projectView.workspace.getProjectModelEntities
import com.microsoft.intellij.configuration.AzureRiderSettings
import org.jetbrains.plugins.azure.RiderAzureBundle
import java.time.Duration
import java.util.function.Function

class AzureCoreToolsMissingNupkgNotificationProvider : EditorNotifications.Provider<EditorNotificationPanel>() {
class AzureCoreToolsMissingNupkgNotificationProvider : EditorNotificationProvider {

companion object {

private val KEY = Key.create<EditorNotificationPanel>("azure.functions.missingnupkgnotification")

private val waitForInstallDuration = Duration.ofSeconds(30)

private fun hasKnownFileSuffix(file: VirtualFile): Boolean =
Expand Down Expand Up @@ -87,9 +86,11 @@ class AzureCoreToolsMissingNupkgNotificationProvider : EditorNotifications.Provi

private data class PackageDependency(val id: String, val version: String)

override fun getKey(): Key<EditorNotificationPanel> = KEY
override fun collectNotificationData(project: Project, file: VirtualFile) = Function { editor: FileEditor ->
createNotificationPanel(file, editor, project)
}

override fun createNotificationPanel(file: VirtualFile, fileEditor: FileEditor, project: Project): EditorNotificationPanel? {
private fun createNotificationPanel(file: VirtualFile, fileEditor: FileEditor, project: Project): EditorNotificationPanel? {
if (PropertiesComponent.getInstance(project).getBoolean(AzureRiderSettings.DISMISS_NOTIFICATION_AZURE_FUNCTIONS_MISSING_NUPKG)) return null

if (!hasKnownFileSuffix(file)) return null
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
/**
* Copyright (c) 2020 JetBrains s.r.o.
* <p/>
* Copyright (c) 2020-2022 JetBrains s.r.o.
*
* All rights reserved.
* <p/>
*
* MIT License
* <p/>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
* <p/>
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
* the Software.
* <p/>
*
* THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
Expand All @@ -28,22 +28,23 @@ import com.intellij.openapi.actionSystem.ActionPlaces
import com.intellij.openapi.actionSystem.ex.ActionUtil
import com.intellij.openapi.fileEditor.FileEditor
import com.intellij.openapi.project.Project
import com.intellij.openapi.util.Key
import com.intellij.openapi.vfs.VirtualFile
import com.intellij.ui.EditorNotificationPanel
import com.intellij.ui.EditorNotificationProvider
import com.intellij.ui.EditorNotifications
import com.microsoft.intellij.configuration.AzureRiderSettings
import org.jetbrains.plugins.azure.RiderAzureBundle
import org.jetbrains.plugins.azure.identity.ad.actions.RegisterApplicationInAzureAdAction
import org.jetbrains.plugins.azure.identity.ad.appsettings.AppSettingsAzureAdSectionManager
import java.util.function.Function

class DefaultAzureAdApplicationRegistrationNotificationProvider : EditorNotifications.Provider<EditorNotificationPanel>() {
class DefaultAzureAdApplicationRegistrationNotificationProvider : EditorNotificationProvider {

private val KEY = Key.create<EditorNotificationPanel>("azure.defaultazureadappliationregistration")

override fun getKey(): Key<EditorNotificationPanel> = KEY
override fun collectNotificationData(project: Project, file: VirtualFile) = Function { editor: FileEditor ->
createNotificationPanel(file, editor, project)
}

override fun createNotificationPanel(file: VirtualFile, fileEditor: FileEditor, project: Project): EditorNotificationPanel? {
private fun createNotificationPanel(file: VirtualFile, fileEditor: FileEditor, project: Project): EditorNotificationPanel? {
if (PropertiesComponent.getInstance(project).getBoolean(AzureRiderSettings.DISMISS_NOTIFICATION_AZURE_AD_REGISTER)) return null

if (!RegisterApplicationInAzureAdAction.isAppSettingsJsonFileName(file.name)) return null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,13 @@ import com.intellij.webcore.ui.PathShortener
import com.microsoft.intellij.configuration.AzureRiderSettings
import com.microsoft.intellij.configuration.ui.AzureRiderAbstractConfigurablePanel
import com.microsoft.intellij.helpers.validator.IpAddressInputValidator
import org.jetbrains.annotations.NotNull
import org.jetbrains.plugins.azure.RiderAzureBundle
import org.jetbrains.plugins.azure.orWhenNullOrEmpty
import java.io.File
import javax.swing.*

@Suppress("UNUSED_LAMBDA_EXPRESSION")
class AzuriteConfigurationPanel(private val project: Project) : AzureRiderAbstractConfigurablePanel, @NotNull Disposable {
class AzuriteConfigurationPanel(private val project: Project) : AzureRiderAbstractConfigurablePanel, Disposable {

private val disposable = Disposer.newDisposable()
private val properties = PropertiesComponent.getInstance(project)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2020-2021 JetBrains s.r.o.
* Copyright (c) 2020-2022 JetBrains s.r.o.
*
* All rights reserved.
*
Expand Down Expand Up @@ -35,7 +35,6 @@ import com.intellij.openapi.project.Project
import com.intellij.openapi.util.Disposer
import com.intellij.ui.components.JBPanelWithEmptyText
import icons.CommonIcons
import org.jetbrains.annotations.NotNull
import org.jetbrains.plugins.azure.RiderAzureBundle
import org.jetbrains.plugins.azure.storage.azurite.actions.CleanAzuriteAction
import org.jetbrains.plugins.azure.storage.azurite.actions.ShowAzuriteSettingsAction
Expand All @@ -47,7 +46,7 @@ import javax.swing.JComponent
import javax.swing.JPanel

class AzuriteServiceViewSessionDescriptor(private val project: Project)
: SimpleServiceViewDescriptor(RiderAzureBundle.message("service.azurite.name"), CommonIcons.Azurite), @NotNull Disposable {
: SimpleServiceViewDescriptor(RiderAzureBundle.message("service.azurite.name"), CommonIcons.Azurite), Disposable {

companion object {
val defaultToolbarActions = DefaultActionGroup(
Expand Down

0 comments on commit 0bc309b

Please sign in to comment.