Compare commits
32 commits
Author | SHA1 | Date | |
---|---|---|---|
ca64d96377 | |||
10ce9b32d2 | |||
ebd08a4913 | |||
a4483cee0e | |||
29471b40f6 | |||
e8746f71c7 | |||
639cce4e3c | |||
de68e65d7a | |||
6da7815895 | |||
83d7c9d932 | |||
11fe03fe49 | |||
2c343eb940 | |||
ae7657ab7c | |||
eeef01498c | |||
0162e53b01 | |||
ae08287d7e | |||
97d22f3054 | |||
13996193ac | |||
d222e527ba | |||
76c233a5b0 | |||
2e0870c883 | |||
5c10704f43 | |||
8a95e75de0 | |||
edbe62efcb | |||
ea69f8b76a | |||
814669b228 | |||
2624002696 | |||
8df2966098 | |||
39faf77f4f | |||
d1739d85e5 | |||
4bf786ec8f | |||
cf158f84b6 |
18 changed files with 35 additions and 37 deletions
|
@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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(),
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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?) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue