OPENIDE #15 Correct collaboration of two or more IDEs based on IntelliJ IDEA

(cherry picked from commit 1f7cb2ed03217b272786e1aaebc0bfc802c31c76)
(cherry picked from commit c313f0721a)

(cherry picked from commit 31853d399e)
This commit is contained in:
Nikita Iarychenko
2024-11-19 16:15:56 +04:00
parent 3c336d8050
commit cc90d4b476
6 changed files with 89 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
<component name="CopyrightManager">
<copyright>
<option name="notice" value="Copyright 2000-&amp;#36;today.year JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license." />
<option name="notice" value="Copyright (c) Haulmont &amp;#36;today.year. All Rights Reserved.&#10;Use is subject to license terms." />
<option name="keyword" value="Copyright" />
<option name="allowReplaceKeyword" value="JetBrains" />
<option name="myName" value="apache 2 license" />

View File

@@ -16,8 +16,7 @@ internal suspend fun createCommunityBuildContext(
options: BuildOptions,
projectHome: Path = COMMUNITY_ROOT.communityRoot,
): BuildContext = BuildContextImpl.createContext(
projectHome, IdeaCommunityProperties(COMMUNITY_ROOT.communityRoot), setupTracer = true, options = options
)
projectHome, OpenIdeProperties(COMMUNITY_ROOT.communityRoot), setupTracer = true, options = options)
open class IdeaCommunityProperties(private val communityHomeDir: Path) : BaseIdeaProperties() {
companion object {

View File

@@ -0,0 +1,82 @@
// Copyright (c) Haulmont 2024. All Rights Reserved.
// Use is subject to license terms.
package org.jetbrains.intellij.build
import org.jetbrains.intellij.build.kotlin.KotlinBinaries
import java.nio.file.Path
open class OpenIdeProperties(val communityHomeDir: Path): IdeaCommunityProperties(communityHomeDir) {
override val baseFileName: String = "openide"
override fun createWindowsCustomizer(projectHome: String): WindowsDistributionCustomizer = CommunityWindowsDistributionCustomizer()
override fun createLinuxCustomizer(projectHome: String): LinuxDistributionCustomizer = CommunityLinuxDistributionCustomizer()
override fun createMacCustomizer(projectHome: String): MacDistributionCustomizer = CommunityMacDistributionCustomizer()
protected open inner class CommunityWindowsDistributionCustomizer : WindowsDistributionCustomizer() {
init {
icoPath = "${communityHomeDir}/build/conf/ideaCE/win/images/idea_CE.ico"
icoPathForEAP = "${communityHomeDir}/build/conf/ideaCE/win/images/idea_CE_EAP.ico"
installerImagesPath = "${communityHomeDir}/build/conf/ideaCE/win/images"
fileAssociations = listOf("java", "gradle", "groovy", "kt", "kts", "pom")
}
override fun getFullNameIncludingEdition(appInfo: ApplicationInfoProperties) = "OpenIDE"
override fun getFullNameIncludingEditionAndVendor(appInfo: ApplicationInfoProperties) = "OpenIDE"
}
protected open inner class CommunityLinuxDistributionCustomizer : LinuxDistributionCustomizer() {
init {
iconPngPath = "${communityHomeDir}/build/conf/ideaCE/linux/images/icon_CE_128.png"
iconPngPathForEAP = "${communityHomeDir}/build/conf/ideaCE/linux/images/icon_CE_EAP_128.png"
snapName = "open-ide"
snapDescription =
"The most intelligent Java IDE. Every aspect of OpenIDE is specifically designed to maximize developer productivity. " +
"Together, powerful static code analysis and ergonomic design make development not only productive but also an enjoyable experience."
}
override fun getRootDirectoryName(appInfo: ApplicationInfoProperties, buildNumber: String) = "openIDE-$buildNumber"
override fun generateExecutableFilesPatterns(context: BuildContext, includeRuntime: Boolean, arch: JvmArchitecture): Sequence<String> {
return super.generateExecutableFilesPatterns(context, includeRuntime, arch)
.plus(KotlinBinaries.kotlinCompilerExecutables)
.filterNot { it == "plugins/**/*.sh" }
}
}
protected open inner class CommunityMacDistributionCustomizer : MacDistributionCustomizer() {
init {
icnsPath = "${communityHomeDir}/build/conf/ideaCE/mac/images/idea.icns"
icnsPathForEAP = "${communityHomeDir}/build/conf/ideaCE/mac/images/communityEAP.icns"
urlSchemes = listOf("idea")
associateIpr = true
fileAssociations = FileAssociation.from("java", "groovy", "kt", "kts")
bundleIdentifier = "ru.openide"
dmgImagePath = "${communityHomeDir}/build/conf/ideaCE/mac/images/dmg_background.tiff"
}
override fun getRootDirectoryName(appInfo: ApplicationInfoProperties, buildNumber: String): String {
return if (appInfo.isEAP) {
"OpenIDE ${appInfo.majorVersion}.${appInfo.minorVersionMainPart} EAP.app"
}
else {
"OpenIDE.app"
}
}
override fun generateExecutableFilesPatterns(context: BuildContext, includeRuntime: Boolean, arch: JvmArchitecture): Sequence<String> {
return super.generateExecutableFilesPatterns(context, includeRuntime, arch)
.plus(KotlinBinaries.kotlinCompilerExecutables)
.filterNot { it == "plugins/**/*.sh" }
}
}
override fun getSystemSelector(appInfo: ApplicationInfoProperties, buildNumber: String): String {
return "OpenIDE${appInfo.majorVersion}.${appInfo.minorVersionMainPart}"
}
override fun getBaseArtifactName(appInfo: ApplicationInfoProperties, buildNumber: String) = "openIDE-$buildNumber"
override fun getOutputDirectoryName(appInfo: ApplicationInfoProperties) = "open-ide"
}

View File

@@ -5,7 +5,7 @@
<logo url="/idea_community_logo.png"/>
<icon svg="/idea-ce.svg" svg-small="/idea-ce_16.svg"/>
<icon-eap svg="/idea-ce-eap.svg" svg-small="/idea-ce-eap_16.svg"/>
<names product="IDEA" fullname="IntelliJ IDEA" script="idea" motto="The Leading IDE for Professional Development in Java and Kotlin"/>
<names product="OpenIDE" fullname="OpenIDE" script="openide" motto="Capable and Ergonomic IDE for JVM"/>
<essential-plugin>com.intellij.java</essential-plugin>
<essential-plugin>com.intellij.java.ide</essential-plugin>

View File

@@ -1,4 +1,5 @@
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright (c) Haulmont 2024. All Rights Reserved.
// Use is subject to license terms.
package com.intellij.idea.customization.base
import com.intellij.openapi.util.BuildNumber

View File

@@ -1,4 +1,5 @@
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
// Copyright (c) Haulmont 2024. All Rights Reserved.
// Use is subject to license terms.
package com.intellij.util.io
import java.net.URL