diff --git a/src/main/kotlin/nl/deschepers/laraveltinker/linemarkerprovider/TinkerRunLineMarkerProvider.kt b/src/main/kotlin/nl/deschepers/laraveltinker/linemarkerprovider/TinkerRunLineMarkerProvider.kt index 3202f0c..b3aacf2 100644 --- a/src/main/kotlin/nl/deschepers/laraveltinker/linemarkerprovider/TinkerRunLineMarkerProvider.kt +++ b/src/main/kotlin/nl/deschepers/laraveltinker/linemarkerprovider/TinkerRunLineMarkerProvider.kt @@ -6,9 +6,9 @@ import com.intellij.icons.AllIcons.RunConfigurations.TestState.Run import com.intellij.openapi.editor.markup.GutterIconRenderer.Alignment.RIGHT import com.intellij.psi.PsiElement import com.intellij.psi.util.elementType -import java.awt.event.MouseEvent import nl.deschepers.laraveltinker.Strings import nl.deschepers.laraveltinker.util.TinkerConsoleUtil +import java.awt.event.MouseEvent class TinkerRunLineMarkerProvider : LineMarkerProvider { companion object { diff --git a/src/main/kotlin/nl/deschepers/laraveltinker/listener/PhpProcessListener.kt b/src/main/kotlin/nl/deschepers/laraveltinker/listener/PhpProcessListener.kt index 0c71c17..a8213cf 100644 --- a/src/main/kotlin/nl/deschepers/laraveltinker/listener/PhpProcessListener.kt +++ b/src/main/kotlin/nl/deschepers/laraveltinker/listener/PhpProcessListener.kt @@ -11,7 +11,6 @@ import nl.deschepers.laraveltinker.settings.GlobalSettingsState import nl.deschepers.laraveltinker.toolwindow.TinkerOutputToolWindowFactory import nl.deschepers.laraveltinker.util.PlugUtil - class PhpProcessListener(private val project: Project) : ProcessListener { diff --git a/src/main/kotlin/nl/deschepers/laraveltinker/settings/GlobalSettingsComponent.kt b/src/main/kotlin/nl/deschepers/laraveltinker/settings/GlobalSettingsComponent.kt index 0aad9ea..fd1ee26 100644 --- a/src/main/kotlin/nl/deschepers/laraveltinker/settings/GlobalSettingsComponent.kt +++ b/src/main/kotlin/nl/deschepers/laraveltinker/settings/GlobalSettingsComponent.kt @@ -4,10 +4,10 @@ import com.intellij.ui.IdeBorderFactory import com.intellij.ui.components.JBCheckBox import com.intellij.ui.components.JBLabel import com.intellij.util.ui.FormBuilder -import javax.swing.JPanel -import javax.swing.JTextField import nl.deschepers.laraveltinker.Strings import nl.deschepers.laraveltinker.util.PlugUtil.SUPPORT_MESSAGE_EXECUTIONS +import javax.swing.JPanel +import javax.swing.JTextField class GlobalSettingsComponent { private var settingsPanel: JPanel diff --git a/src/main/kotlin/nl/deschepers/laraveltinker/settings/GlobalSettingsConfigurable.kt b/src/main/kotlin/nl/deschepers/laraveltinker/settings/GlobalSettingsConfigurable.kt index f9ec391..cce33e0 100644 --- a/src/main/kotlin/nl/deschepers/laraveltinker/settings/GlobalSettingsConfigurable.kt +++ b/src/main/kotlin/nl/deschepers/laraveltinker/settings/GlobalSettingsConfigurable.kt @@ -1,8 +1,8 @@ package nl.deschepers.laraveltinker.settings import com.intellij.openapi.options.Configurable -import javax.swing.JComponent import nl.deschepers.laraveltinker.Strings +import javax.swing.JComponent class GlobalSettingsConfigurable : Configurable { private var appSettingsComponent: GlobalSettingsComponent? = null diff --git a/src/main/kotlin/nl/deschepers/laraveltinker/settings/GlobalSettingsState.kt b/src/main/kotlin/nl/deschepers/laraveltinker/settings/GlobalSettingsState.kt index 1746e10..2064260 100644 --- a/src/main/kotlin/nl/deschepers/laraveltinker/settings/GlobalSettingsState.kt +++ b/src/main/kotlin/nl/deschepers/laraveltinker/settings/GlobalSettingsState.kt @@ -5,7 +5,6 @@ import com.intellij.openapi.components.PersistentStateComponent import com.intellij.openapi.components.State import com.intellij.openapi.components.Storage import com.intellij.util.xmlb.XmlSerializerUtil -import org.jetbrains.annotations.NotNull @State( name = "org.intellij.sdk.settings.AppSettingsState", diff --git a/src/main/kotlin/nl/deschepers/laraveltinker/settings/ProjectSettingsComponent.kt b/src/main/kotlin/nl/deschepers/laraveltinker/settings/ProjectSettingsComponent.kt index f9b0b8b..88b068f 100644 --- a/src/main/kotlin/nl/deschepers/laraveltinker/settings/ProjectSettingsComponent.kt +++ b/src/main/kotlin/nl/deschepers/laraveltinker/settings/ProjectSettingsComponent.kt @@ -7,8 +7,8 @@ import com.intellij.ui.IdeBorderFactory import com.intellij.ui.components.JBCheckBox import com.intellij.ui.components.JBLabel import com.intellij.util.ui.FormBuilder -import javax.swing.JPanel import nl.deschepers.laraveltinker.Strings +import javax.swing.JPanel class ProjectSettingsComponent { private var settingsPanel: JPanel @@ -32,7 +32,6 @@ class ProjectSettingsComponent { this.terminateAppCheckBox.isSelected = value } - init { laravelRootTextField.addBrowseFolderListener( TextBrowseFolderListener(FileChooserDescriptorFactory.createSingleFolderDescriptor()) diff --git a/src/main/kotlin/nl/deschepers/laraveltinker/settings/ProjectSettingsConfigurable.kt b/src/main/kotlin/nl/deschepers/laraveltinker/settings/ProjectSettingsConfigurable.kt index 318c278..8070ea0 100644 --- a/src/main/kotlin/nl/deschepers/laraveltinker/settings/ProjectSettingsConfigurable.kt +++ b/src/main/kotlin/nl/deschepers/laraveltinker/settings/ProjectSettingsConfigurable.kt @@ -2,8 +2,8 @@ package nl.deschepers.laraveltinker.settings import com.intellij.openapi.options.Configurable import com.intellij.openapi.project.Project -import javax.swing.JComponent import nl.deschepers.laraveltinker.Strings +import javax.swing.JComponent class ProjectSettingsConfigurable(private var project: Project) : Configurable { private var projectSettingsComponent: ProjectSettingsComponent? = null diff --git a/src/main/kotlin/nl/deschepers/laraveltinker/startup/migrations/MakeSureConsolesHaveExtensions.kt b/src/main/kotlin/nl/deschepers/laraveltinker/startup/migrations/MakeSureConsolesHaveExtensions.kt index 2514a83..11fc74b 100644 --- a/src/main/kotlin/nl/deschepers/laraveltinker/startup/migrations/MakeSureConsolesHaveExtensions.kt +++ b/src/main/kotlin/nl/deschepers/laraveltinker/startup/migrations/MakeSureConsolesHaveExtensions.kt @@ -1,8 +1,8 @@ package nl.deschepers.laraveltinker.startup.migrations import com.intellij.ide.scratch.ScratchFileService -import java.io.File import nl.deschepers.laraveltinker.util.LaravelTinkerConsolesRootType +import java.io.File class MakeSureConsolesHaveExtensions { diff --git a/src/main/kotlin/nl/deschepers/laraveltinker/util/LaravelTinkerConsolesRootType.kt b/src/main/kotlin/nl/deschepers/laraveltinker/util/LaravelTinkerConsolesRootType.kt index f8b2413..0de66ca 100644 --- a/src/main/kotlin/nl/deschepers/laraveltinker/util/LaravelTinkerConsolesRootType.kt +++ b/src/main/kotlin/nl/deschepers/laraveltinker/util/LaravelTinkerConsolesRootType.kt @@ -12,9 +12,9 @@ import com.intellij.openapi.vfs.VfsUtil import com.intellij.openapi.vfs.VirtualFile import com.intellij.ui.UIBundle import com.jetbrains.php.lang.PhpLanguage +import nl.deschepers.laraveltinker.Strings import java.io.IOException import javax.swing.Icon -import nl.deschepers.laraveltinker.Strings /** * Most content is copied from ScratchRootType - but that class is final so I can't extend it. diff --git a/src/main/kotlin/nl/deschepers/laraveltinker/util/PhpArtisanTinkerUtil.kt b/src/main/kotlin/nl/deschepers/laraveltinker/util/PhpArtisanTinkerUtil.kt index e444bff..448333b 100644 --- a/src/main/kotlin/nl/deschepers/laraveltinker/util/PhpArtisanTinkerUtil.kt +++ b/src/main/kotlin/nl/deschepers/laraveltinker/util/PhpArtisanTinkerUtil.kt @@ -18,19 +18,19 @@ import com.jetbrains.php.config.commandLine.PhpCommandSettingsBuilder import com.jetbrains.php.run.PhpEditInterpreterExecutionException import com.jetbrains.php.run.script.PhpScriptRunConfiguration import com.jetbrains.php.run.script.PhpScriptRuntimeConfigurationProducer -import java.io.BufferedReader -import java.io.File -import java.io.InputStreamReader -import java.nio.charset.StandardCharsets -import java.util.stream.Collectors import nl.deschepers.laraveltinker.Strings import nl.deschepers.laraveltinker.balloon.LaravelRootDoesNotExistBalloon -import nl.deschepers.laraveltinker.balloon.VendorFolderNotFound import nl.deschepers.laraveltinker.balloon.NoPhpInterpreterBalloon import nl.deschepers.laraveltinker.balloon.PhpInterpreterErrorBalloon +import nl.deschepers.laraveltinker.balloon.VendorFolderNotFound import nl.deschepers.laraveltinker.listener.PhpProcessListener import nl.deschepers.laraveltinker.settings.ProjectSettingsState import nl.deschepers.laraveltinker.toolwindow.TinkerOutputToolWindowFactory +import java.io.BufferedReader +import java.io.File +import java.io.InputStreamReader +import java.nio.charset.StandardCharsets +import java.util.stream.Collectors class PhpArtisanTinkerUtil(private val project: Project, private val phpCode: String) { fun run() { @@ -68,7 +68,7 @@ class PhpArtisanTinkerUtil(private val project: Project, private val phpCode: St // Check if the vendor path exists var vendorPath = projectSettings.vendorRoot.ifEmpty { laravelRoot } - if(!vendorPath.endsWith("/vendor")) { + if (!vendorPath.endsWith("/vendor")) { vendorPath = "$vendorPath/vendor" } val vendorDir = File(vendorPath) diff --git a/src/main/kotlin/nl/deschepers/laraveltinker/util/PlugUtil.kt b/src/main/kotlin/nl/deschepers/laraveltinker/util/PlugUtil.kt index 0cea800..121142f 100644 --- a/src/main/kotlin/nl/deschepers/laraveltinker/util/PlugUtil.kt +++ b/src/main/kotlin/nl/deschepers/laraveltinker/util/PlugUtil.kt @@ -23,7 +23,7 @@ object PlugUtil { SUPPORT_MESSAGE_EXECUTIONS ) { PersistentApplicationCache.instance.state.executionsCount = 0 - val plugType = listOf("patreon","paypal","kofi","linktree","colleagues").asSequence().shuffled().find{true} + val plugType = listOf("patreon", "paypal", "kofi", "linktree", "colleagues").asSequence().shuffled().find { true } return Strings.get("lt.consider_supporting", Strings.get("lt.consider_supporting.$plugType")) } }