Compare commits

..

32 commits
master ... 242

Author SHA1 Message Date
ca64d96377
backport: 25.2.0 2025-04-20 16:10:48 +02:00
10ce9b32d2
backport: 25.1.0 2025-04-17 13:58:55 +02:00
ebd08a4913
backport: 25.0.2 2025-04-16 00:44:26 +02:00
a4483cee0e
backport: 25.0.1 2025-04-11 18:51:58 +02:00
29471b40f6
backport: 25.0.0 2025-04-11 18:38:57 +02:00
e8746f71c7
backport: 24.0.1 2025-03-27 23:05:16 +01:00
639cce4e3c
backport: 24.0.0 2025-03-27 22:07:22 +01:00
de68e65d7a
backport: 23.1.2 2025-03-27 11:50:49 +01:00
6da7815895
backport: 23.1.1 2025-03-26 23:34:11 +01:00
83d7c9d932
backport: 23.1.0 2025-03-26 16:23:50 +01:00
11fe03fe49
backport: 23.0.2 2025-03-23 14:42:03 +01:00
2c343eb940
backport: 23.0.1 2025-03-20 00:20:07 +01:00
ae7657ab7c
backport: 23.0.0 2025-03-15 16:52:12 +01:00
eeef01498c
backport: 22.0.1 2025-03-13 23:08:40 +01:00
0162e53b01
backport: 22.0.0 2025-03-13 16:41:17 +01:00
ae08287d7e
backport: 21.1.0 2025-03-11 14:21:24 +01:00
97d22f3054
backport: 21.0.0 2025-03-11 01:56:58 +01:00
13996193ac
backport: 20.3.0 2025-02-05 22:26:00 +01:00
d222e527ba
backport: 20.2.2 2025-01-30 13:27:03 +01:00
76c233a5b0
backport: 20.2.1 2025-01-22 12:29:49 +01:00
2e0870c883
backport: 20.2.0 2025-01-21 15:52:15 +01:00
5c10704f43
backport: 20.1.3 2025-01-15 20:16:25 +01:00
8a95e75de0
backport: 20.1.2 2025-01-12 14:41:46 +01:00
edbe62efcb
backport: 20.1.1 2024-12-24 12:54:36 +01:00
ea69f8b76a
backport: 20.1.0 2024-12-22 23:12:02 +01:00
814669b228
backport: 20.0.4 2024-12-11 17:15:23 +01:00
2624002696
backport: 20.0.3 2024-11-28 13:28:54 +01:00
8df2966098
backport: 20.0.2 2024-11-11 12:18:04 +01:00
39faf77f4f
backport: 20.0.1 2024-11-09 12:02:29 +01:00
d1739d85e5
ci: publishing fixes 2024-11-07 17:50:28 +01:00
4bf786ec8f
backport: 20.0.0 2024-11-07 17:21:06 +01:00
cf158f84b6
ci: lock to 2024.2 2024-11-07 17:07:56 +01:00
18 changed files with 35 additions and 37 deletions

View file

@ -6,8 +6,8 @@ import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
plugins {
kotlin("jvm") version "2.1.10" apply false
kotlin("plugin.serialization") version "2.1.10" apply false
kotlin("jvm") version "1.9.24" apply false
kotlin("plugin.serialization") version "1.9.24" apply false
id("org.jetbrains.intellij.platform") version "2.5.0"
id("org.jetbrains.changelog") version "2.2.1"
id("org.jetbrains.grammarkit") version "2022.3.2.2" apply false
@ -90,7 +90,6 @@ allprojects {
intellijPlatform {
defaultRepositories()
snapshots()
}
}
}

View file

@ -58,8 +58,7 @@ class ZigClionDebuggerDriverConfigurationProvider: ZigDebuggerDriverConfiguratio
return when(toolchain.debuggerKind) {
CPPDebugger.Kind.BUNDLED_GDB,
CPPDebugger.Kind.CUSTOM_GDB -> CLionGDBDriverConfiguration(project, toolchain, isEmulateTerminal = emulateTerminal)
CPPDebugger.Kind.BUNDLED_LLDB,
CPPDebugger.Kind.CUSTOM_LLDB -> CLionLLDBDriverConfiguration(project, toolchain, isEmulateTerminal = emulateTerminal)
CPPDebugger.Kind.BUNDLED_LLDB -> CLionLLDBDriverConfiguration(project, toolchain, isEmulateTerminal = emulateTerminal)
}
}
}

View file

@ -29,7 +29,6 @@ import com.intellij.openapi.options.SimpleConfigurable
import com.intellij.util.xmlb.XmlSerializerUtil
import com.intellij.xdebugger.settings.DebuggerSettingsCategory
import com.intellij.xdebugger.settings.XDebuggerSettings
import java.util.function.Supplier
class ZigDebuggerSettings: XDebuggerSettings<ZigDebuggerSettings>("Zig") {
var debuggerKind = DebuggerKind.default
@ -59,10 +58,9 @@ class ZigDebuggerSettings: XDebuggerSettings<ZigDebuggerSettings>("Zig") {
GENERAL_SETTINGS_ID,
ZigDebugBundle.message("settings.debugger.title"),
ZigDebuggerGeneralSettingsConfigurableUi::class.java,
Supplier {
) {
instance
}
)
}
companion object {

View file

@ -160,6 +160,7 @@ class WorkDirectoryConfigurable(@Transient override val serializedName: String)
class WorkDirectoryConfigModule(private val serializedName: String) : PathConfigModule<WorkDirectoryConfigurable>() {
private val field = textFieldWithBrowseButton(
null,
ZigBrainsBundle.message("dialog.title.working-directory"),
FileChooserDescriptorFactory.createSingleFolderDescriptor().withTitle(ZigBrainsBundle.message("dialog.title.working-directory"))
).also { Disposer.register(this, it) }
@ -198,7 +199,8 @@ class FilePathConfigurable(
class FilePathConfigModule(private val serializedName: String, @Nls private val label: String) : PathConfigModule<FilePathConfigurable>() {
private val field = textFieldWithBrowseButton(
null,
FileChooserDescriptorFactory.createSingleFileNoJarsDescriptor(),
null,
FileChooserDescriptorFactory.createSingleFileDescriptor(),
)
override var stringValue by field::text

View file

@ -68,7 +68,7 @@ class ZigModuleBuilder: ModuleBuilder() {
internal val peer = ZigProjectGeneratorPeer(true).also { Disposer.register(parent ?: return@also) {it.dispose()} }
override fun getComponent(): JComponent {
return peer.myComponent.withBorder()
return peer.component.withBorder()
}
override fun disposeUIResources() {

View file

@ -50,7 +50,7 @@ class ZigNewProjectWizard: LanguageGeneratorNewProjectWizard {
override fun setupUI(builder: Panel): Unit = with(builder) {
row {
cell(peer.myComponent).align(AlignX.FILL)
cell(peer.component).align(AlignX.FILL)
}
}

View file

@ -23,7 +23,6 @@
package com.falsepattern.zigbrains.project.newproject
import com.intellij.ide.util.projectWizard.SettingsStep
import com.intellij.openapi.ui.TextFieldWithBrowseButton
import com.intellij.openapi.ui.ValidationInfo
import com.intellij.platform.ProjectGeneratorPeer
import com.intellij.ui.dsl.builder.panel
@ -33,13 +32,12 @@ class ZigProjectGeneratorPeer(var handleGit: Boolean): ProjectGeneratorPeer<ZigP
val newProjectPanel by lazy {
ZigNewProjectPanel(handleGit)
}
val myComponent: JComponent by lazy {
private val myComponent: JComponent by lazy {
panel {
newProjectPanel.attach(this)
}
}
override fun getComponent(myLocationField: TextFieldWithBrowseButton, checkValid: Runnable): JComponent {
override fun getComponent(): JComponent {
return myComponent
}

View file

@ -37,7 +37,7 @@ import com.intellij.platform.backend.workspace.toVirtualFileUrl
import com.intellij.platform.workspace.jps.entities.*
import com.intellij.project.isDirectoryBased
import com.intellij.project.stateStore
import com.intellij.workspaceModel.ide.legacyBridge.LegacyBridgeJpsEntitySourceFactory
import com.intellij.workspaceModel.ide.impl.LegacyBridgeJpsEntitySourceFactory
import kotlinx.coroutines.runBlocking
import java.util.*
import javax.swing.Icon
@ -122,8 +122,8 @@ class ZigSyntheticLibrary(val project: Project) : SyntheticLibrary(), ItemPresen
builder.resolve(moduleId)?.let { moduleEntity ->
builder.removeEntity(moduleEntity)
}
val moduleEntitySource = LegacyBridgeJpsEntitySourceFactory.getInstance(project)
.createEntitySourceForModule(baseModuleDir, null)
val moduleEntitySource = LegacyBridgeJpsEntitySourceFactory
.createEntitySourceForModule(project, baseModuleDir, null)
val moduleEntity = builder.addEntity(ModuleEntity(ZIG_MODULE_ID, emptyList(), moduleEntitySource))
@ -131,8 +131,7 @@ class ZigSyntheticLibrary(val project: Project) : SyntheticLibrary(), ItemPresen
builder.removeEntity(libraryEntity)
}
val libraryEntitySource = LegacyBridgeJpsEntitySourceFactory
.getInstance(project)
.createEntitySourceForProjectLibrary(null)
.createEntitySourceForProjectLibrary(project, null)
val libraryEntity = LibraryEntity(
ZIG_LIBRARY_ID,
libraryTableId, emptyList(),

View file

@ -56,7 +56,7 @@ class LocalToolchainSelector(component: Component): LocalSelector<LocalZigToolch
} else {
val existingToolchain = zigToolchainList
.mapNotNull { it.second as? LocalZigToolchain }
.firstOrNull { it.location == tc.location }
.firstOrNull { it.location == tc!!.location }
if (existingToolchain != null) {
result = VerifyResult(
null,

View file

@ -47,7 +47,8 @@ import kotlin.io.path.pathString
class LocalZigToolchainPanel() : ImmutableNamedElementPanelBase<LocalZigToolchain>() {
private val pathToToolchain = textFieldWithBrowseButton(
null,
FileChooserDescriptorFactory.createSingleFolderDescriptor().withTitle(ZigBrainsBundle.message("dialog.title.zig-toolchain"))
ZigBrainsBundle.message("dialog.title.zig-toolchain"),
FileChooserDescriptorFactory.createSingleFolderDescriptor()
).also {
it.textField.document.addDocumentListener(object : DocumentAdapter() {
override fun textChanged(e: DocumentEvent) {
@ -69,7 +70,8 @@ class LocalZigToolchainPanel() : ImmutableNamedElementPanelBase<LocalZigToolchai
}
private val pathToStd = textFieldWithBrowseButton(
null,
FileChooserDescriptorFactory.createSingleFolderDescriptor().withTitle(ZigBrainsBundle.message("dialog.title.zig-std"))
ZigBrainsBundle.message("dialog.title.zig-std"),
FileChooserDescriptorFactory.createSingleFolderDescriptor()
).also { Disposer.register(this, it) }
private var debounce: Job? = null

View file

@ -33,7 +33,7 @@ import kotlinx.coroutines.*
import java.awt.Component
import kotlin.coroutines.CoroutineContext
inline fun <T> runModalOrBlocking(taskOwnerFactory: () -> ModalTaskOwner, titleFactory: () -> String, cancellationFactory: () -> TaskCancellation = {TaskCancellation.cancellable()}, noinline action: suspend CoroutineScope.() -> T): T {
inline fun <T> runModalOrBlocking(taskOwnerFactory: () -> ModalTaskOwner, titleFactory: () -> String, cancellationFactory: () -> TaskCancellation = TaskCancellation::cancellable, noinline action: suspend CoroutineScope.() -> T): T {
return if (application.isDispatchThread) {
runWithModalProgressBlocking(taskOwnerFactory(), titleFactory(), cancellationFactory(), action)
} else {

View file

@ -96,7 +96,7 @@ abstract class Downloader<T, V: VersionInfo>(val component: Component) {
value?.let { append(it.version.rawVersion) }
}
}
val outputPath = textFieldWithBrowseButton(null, selector.descriptor)
val outputPath = textFieldWithBrowseButton(null, selector.descriptor.title, selector.descriptor)
Disposer.register(dialog, outputPath)
outputPath.textField.columns = 50

View file

@ -66,7 +66,7 @@ abstract class LocalSelector<T>(val component: Component) {
private suspend fun doBrowseFromDisk(preSelected: Path?): T? {
val dialog = DialogBuilder()
val name = JBTextField().also { it.columns = 25 }
val path = textFieldWithBrowseButton(null, descriptor)
val path = textFieldWithBrowseButton(null, descriptor.title, descriptor)
Disposer.register(dialog, path)
lateinit var errorMessageBox: JBLabel
suspend fun verifyAndUpdate(path: Path?) {

View file

@ -87,7 +87,7 @@ abstract class UUIDMapSelector<T>(val driver: UUIDComboBoxDriver<T>): Disposable
val actual = item is ListElem.One.Actual<*>
editButton?.isEnabled = actual
editButton?.repaint()
onSelection(if (actual) item.uuid else null)
onSelection(if (actual) (item as ListElem.One.Actual<*>).uuid else null)
}
private fun itemStateChanged(event: ItemEvent) {

View file

@ -3,11 +3,11 @@ pluginRepositoryUrl=https://github.com/FalsePattern/ZigBrains
pluginVersion=25.2.0
pluginSinceBuild=251
pluginUntilBuild=
pluginSinceBuild=242
pluginUntilBuild=242.*
ideaCommunityVersion=2025.1
clionVersion=2025.1
ideaCommunityVersion=2024.2.5
clionVersion=2024.2.4
useInstaller=true
javaVersion=21
# ideaCommunity / clion
@ -17,7 +17,7 @@ lsp4jVersion=0.21.1
lsp4ijVersion=0.12.0
lsp4ijNightly=false
serializationVersion=1.7.3
serializationVersion=1.6.3
kotlin.stdlib.default.dependency=false
kotlin.code.style=official

View file

@ -43,8 +43,8 @@ import javax.swing.text.PlainDocument
class ZLSSettingsPanel() : ImmutableElementPanel<ZLSSettings> {
private val zlsConfigPath = textFieldWithBrowseButton(
null,
ZLSBundle.message("settings.zls-config-path.browse.title"),
FileChooserDescriptorFactory.createSingleFileNoJarsDescriptor()
.withTitle(ZLSBundle.message("settings.zls-config-path.browse.title"))
).also { Disposer.register(this, it) }
private val inlayHints = JBCheckBox()
private val inlayHintsMaxFileSize = ExtendableTextField(5).also { (it.document as PlainDocument).documentFilter = object: DocumentFilter() {

View file

@ -49,7 +49,8 @@ import kotlin.io.path.pathString
class ZLSPanel() : ImmutableNamedElementPanelBase<ZLSVersion>() {
private val pathToZLS = textFieldWithBrowseButton(
null,
FileChooserDescriptorFactory.createSingleFileNoJarsDescriptor().withTitle(ZLSBundle.message("dialog.title.zls"))
ZLSBundle.message("dialog.title.zls"),
FileChooserDescriptorFactory.createSingleFileNoJarsDescriptor()
).also {
it.textField.document.addDocumentListener(object : DocumentAdapter() {
override fun textChanged(e: DocumentEvent) {

View file

@ -52,7 +52,7 @@ data class ZLSVersionInfo(
return withContext(Dispatchers.IO) {
val single = toolchain != null
val url = if (single) {
getToolchainURL(toolchain, project) ?: return@withContext emptyList()
getToolchainURL(toolchain!!, project) ?: return@withContext emptyList()
} else {
multiURL
}