Skip to content

Commit 731802f

Browse files
authored
feat: adds support for IDEA version 2024.2.x (#11)
2 parents 9b49b57 + b698ad4 commit 731802f

20 files changed

+135
-98
lines changed

build.gradle.kts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ repositories {
2121
mavenCentral()
2222
}
2323

24-
// Set the JVM language level used to build the project. Use Java 11 for 2020.3+, and Java 17 for 2022.2+.
24+
// Set the JVM language level used to build the project. Use Java 21 for 2024.2+
2525
kotlin {
2626
jvmToolchain(17)
2727
}
@@ -74,7 +74,7 @@ tasks {
7474
val start = "<!-- Plugin description -->"
7575
val end = "<!-- Plugin description end -->"
7676

77-
with (it.lines()) {
77+
with(it.lines()) {
7878
if (!containsAll(listOf(start, end))) {
7979
throw GradleException("Plugin description section not found in README.md:\n$start ... $end")
8080
}
@@ -117,6 +117,7 @@ tasks {
117117
// The pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3
118118
// Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more:
119119
// https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel
120-
channels = properties("pluginVersion").map { listOf(it.split('-').getOrElse(1) { "default" }.split('.').first()) }
120+
channels =
121+
properties("pluginVersion").map { listOf(it.split('-').getOrElse(1) { "default" }.split('.').first()) }
121122
}
122123
}

gradle.properties

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# IntelliJ Platform Artifacts Repositories -> https://plugins.jetbrains.com/docs/intellij/intellij-artifacts.html
2-
pluginGroup=ski.chrzanow.foldableprojectview
2+
pluginGroup=com.pj.foldableprojectview
33
pluginName=Foldable Project View
44
pluginRepositoryUrl=https://github.com/pavankjadda/intellij-foldable-projectview
55
# SemVer format -> https://semver.org
6-
pluginVersion=3.0.0
6+
pluginVersion=4.0.0
77
# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
8-
pluginSinceBuild=223
9-
pluginUntilBuild=241.*
8+
pluginSinceBuild=241
9+
pluginUntilBuild=242.*
1010
# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
1111
platformType=IC
1212
platformVersion=2023.3.3
@@ -24,3 +24,5 @@ org.gradle.configuration-cache=true
2424
org.gradle.caching=true
2525
# Enable Gradle Kotlin DSL Lazy Property Assignment -> https://docs.gradle.org/current/userguide/kotlin_dsl.html#kotdsl:assignment
2626
systemProp.org.gradle.unsafe.kotlin.assignment=true
27+
# Enable Kotlin Official Code Style -> https://kotlinlang.org/docs/coding-conventions.html
28+
kotlin.code.style=official

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

src/main/kotlin/ski/chrzanow/foldableprojectview/FoldableProjectViewBundle.kt renamed to src/main/kotlin/com/pj/foldableprojectview/FoldableProjectViewBundle.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package ski.chrzanow.foldableprojectview
1+
package com.pj.foldableprojectview
22

33
import com.intellij.AbstractBundle
44
import org.jetbrains.annotations.NonNls
@@ -12,8 +12,7 @@ object FoldableProjectViewBundle : AbstractBundle("messages.FoldableProjectView"
1212

1313
@Suppress("SpreadOperator")
1414
@JvmStatic
15-
fun message(@PropertyKey(resourceBundle = BUNDLE) key: String, vararg params: Any) =
16-
getMessage(key, *params)
15+
fun message(@PropertyKey(resourceBundle = BUNDLE) key: String, vararg params: Any) = getMessage(key, *params)
1716

1817
@Suppress("SpreadOperator")
1918
@JvmStatic
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package com.pj.foldableprojectview
2+
3+
object FoldableProjectViewConstants {
4+
const val DEFAULT_RULE_NAME = "Rule name"
5+
const val DEFAULT_RULE_PATTERN = "*.md"
6+
const val COLOR_COLUMN_TEXT = "Aa"
7+
const val STORAGE_FILE = "FoldableProjectView.xml"
8+
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
package ski.chrzanow.foldableprojectview.actionSystem
1+
package com.pj.foldableprojectview.actionSystem
22

33
import com.intellij.ide.projectView.ProjectView
44
import com.intellij.openapi.actionSystem.ToggleOptionAction
55
import com.intellij.openapi.components.service
66
import com.intellij.openapi.project.DumbAware
7-
import ski.chrzanow.foldableprojectview.settings.FoldableProjectSettings
7+
import com.pj.foldableprojectview.settings.FoldableProjectSettings
88
import java.util.function.Function
99

1010
class FoldIgnoredFilesAction : DumbAware, ToggleOptionAction(Function {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
package ski.chrzanow.foldableprojectview.actionSystem
1+
package com.pj.foldableprojectview.actionSystem
22

33
import com.intellij.ide.projectView.ProjectView
44
import com.intellij.openapi.actionSystem.ToggleOptionAction
55
import com.intellij.openapi.components.service
66
import com.intellij.openapi.project.DumbAware
7-
import ski.chrzanow.foldableprojectview.settings.FoldableProjectSettings
7+
import com.pj.foldableprojectview.settings.FoldableProjectSettings
88
import java.util.function.Function
99

1010
class FoldRootFilesAction : DumbAware, ToggleOptionAction(Function {
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package ski.chrzanow.foldableprojectview.projectView
1+
package com.pj.foldableprojectview.projectView
22

33
import com.intellij.icons.AllIcons.General.CollapseComponent
44
import com.intellij.ide.projectView.PresentationData
@@ -15,17 +15,18 @@ import com.intellij.psi.PsiFileSystemItem
1515
import com.intellij.psi.search.PsiElementProcessor
1616
import com.intellij.ui.SimpleTextAttributes
1717
import com.intellij.ui.SimpleTextAttributes.STYLE_PLAIN
18-
import ski.chrzanow.foldableprojectview.psi.search.FoldableProjectSearchScope
19-
import ski.chrzanow.foldableprojectview.settings.FoldableProjectSettings
20-
import ski.chrzanow.foldableprojectview.settings.Rule
18+
import com.pj.foldableprojectview.psi.search.FoldableProjectSearchScope
19+
import com.pj.foldableprojectview.settings.FoldableProjectSettings
20+
import com.pj.foldableprojectview.settings.Rule
2121

2222
class FoldableProjectViewNode(
2323
project: Project,
2424
private val viewSettings: ViewSettings?,
2525
private val settings: FoldableProjectSettings,
2626
private val rule: Rule,
2727
private val parent: PsiDirectoryNode,
28-
) : ProjectViewNode<String>(project, rule.name, viewSettings), PsiFileSystemItemFilter, PsiElementProcessor<PsiFileSystemItem> {
28+
) : ProjectViewNode<String>(project, rule.name, viewSettings), PsiFileSystemItemFilter,
29+
PsiElementProcessor<PsiFileSystemItem> {
2930

3031
val containsMatchedChildKey: Key<Boolean> = Key.create("FOLDABLE_PROJECT_VIEW_CONTAINS_MATCHED_CHILD")
3132
val ruleScope = FoldableProjectSearchScope(project, rule.pattern, settings)
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package ski.chrzanow.foldableprojectview.projectView
1+
package com.pj.foldableprojectview.projectView
22

33
import com.intellij.ide.projectView.ProjectView
44
import com.intellij.ide.projectView.ProjectViewNode
@@ -18,9 +18,9 @@ import com.intellij.openapi.vcs.FileStatusListener
1818
import com.intellij.openapi.vcs.FileStatusManager
1919
import com.intellij.openapi.vcs.changes.ignore.cache.PatternCache
2020
import com.intellij.openapi.vcs.changes.ignore.lang.Syntax
21-
import ski.chrzanow.foldableprojectview.or
22-
import ski.chrzanow.foldableprojectview.settings.FoldableProjectSettings
23-
import ski.chrzanow.foldableprojectview.settings.FoldableProjectSettingsListener
21+
import com.pj.foldableprojectview.or
22+
import com.pj.foldableprojectview.settings.FoldableProjectSettings
23+
import com.pj.foldableprojectview.settings.FoldableProjectSettingsListener
2424

2525
class FoldableTreeStructureProvider(private val project: Project) : TreeStructureProvider {
2626

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
package ski.chrzanow.foldableprojectview.psi.search
1+
package com.pj.foldableprojectview.psi.search
22

33
import com.intellij.openapi.actionSystem.DataContext
44
import com.intellij.openapi.components.service
55
import com.intellij.openapi.project.Project
66
import com.intellij.psi.search.SearchScope
77
import com.intellij.psi.search.SearchScopeProvider
8-
import ski.chrzanow.foldableprojectview.FoldableProjectViewBundle
9-
import ski.chrzanow.foldableprojectview.settings.FoldableProjectSettings
8+
import com.pj.foldableprojectview.FoldableProjectViewBundle
9+
import com.pj.foldableprojectview.settings.FoldableProjectSettings
1010

1111
class FoldableProjectScopesProvider : SearchScopeProvider {
1212

0 commit comments

Comments
 (0)