-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#1835 Extracted java-dependent code to a separate module with optiona…
…l java dependency
- Loading branch information
Showing
8 changed files
with
113 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
fun properties(key: String) = providers.gradleProperty(key) | ||
fun environment(key: String) = providers.environmentVariable(key) | ||
|
||
dependencies { | ||
listOf( | ||
":core", | ||
).forEach { | ||
compileOnly(project(it)) | ||
testCompileOnly(project(it)) | ||
runtimeOnly(project(it)) | ||
} | ||
intellijPlatform { | ||
val platformVersionProvider: Provider<String> by rootProject.extra | ||
create("IC", platformVersionProvider.get(), useInstaller = properties("useInstaller").get().toBoolean()) | ||
bundledPlugins("com.intellij.java") | ||
} | ||
} | ||
|
33 changes: 33 additions & 0 deletions
33
java/src/main/java/org/ice1000/julia/java/ui/configuration/JuliaCompileOutputEditor.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Julia language support plugin for Intellij-based IDEs. | ||
* Copyright (C) 2024 julia-intellij contributors | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package org.ice1000.julia.java.ui.configuration | ||
|
||
import com.intellij.openapi.roots.ui.configuration.BuildElementsEditor | ||
import com.intellij.openapi.roots.ui.configuration.ModuleConfigurationState | ||
import com.intellij.openapi.roots.ui.configuration.ModuleElementsEditor | ||
|
||
class JuliaCompileOutputEditor(state: ModuleConfigurationState) : ModuleElementsEditor(state) { | ||
var editor: BuildElementsEditor = object : BuildElementsEditor(state) { | ||
} | ||
|
||
override fun createComponentImpl() = editor.createComponentImpl() | ||
override fun saveData() = editor.saveData() | ||
override fun getDisplayName() = "Paths" | ||
override fun getHelpTopic() = editor.helpTopic | ||
} |
34 changes: 34 additions & 0 deletions
34
.../src/main/java/org/ice1000/julia/java/ui/configuration/JuliaModuleConfigEditorProvider.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Julia language support plugin for Intellij-based IDEs. | ||
* Copyright (C) 2024 julia-intellij contributors | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package org.ice1000.julia.java.ui.configuration | ||
|
||
import com.intellij.openapi.module.ModuleConfigurationEditor | ||
import com.intellij.openapi.roots.ui.configuration.ContentEntriesEditor | ||
import com.intellij.openapi.roots.ui.configuration.ModuleConfigurationEditorProvider | ||
import com.intellij.openapi.roots.ui.configuration.ModuleConfigurationState | ||
|
||
class JuliaModuleConfigEditorProvider : ModuleConfigurationEditorProvider { | ||
override fun createEditors(state: ModuleConfigurationState): Array<ModuleConfigurationEditor> { | ||
val module = state.currentRootModel?.module ?: return emptyArray() | ||
return arrayOf( | ||
ContentEntriesEditor(module.name, state), | ||
JuliaCompileOutputEditor(state) | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<idea-plugin package="org.ice1000.julia.java"> | ||
<dependencies> | ||
<plugin id="com.intellij.modules.java"/> | ||
</dependencies> | ||
<extensions defaultExtensionNs="com.intellij"> | ||
<moduleConfigurationEditorProvider | ||
implementation="org.ice1000.julia.java.ui.configuration.JuliaModuleConfigEditorProvider"/> | ||
</extensions> | ||
</idea-plugin> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<idea-plugin> | ||
<id>"org.ice1000.julia</id> | ||
<idea-plugin url="https://github.com/JuliaEditorSupport/julia-intellij/"> | ||
<id>org.ice1000.julia</id> | ||
<name>Julia</name> | ||
<vendor email="[email protected]" url="https://github.com/hurricup">Alexandr Evstigneev</vendor> | ||
<category>Custom Languages</category> | ||
|
@@ -10,6 +10,10 @@ | |
<depends optional="true" config-file="plugin-goland.xml">com.intellij.modules.go</depends> | ||
<depends optional="true" config-file="plugin-idea.xml">com.intellij.modules.idea</depends> | ||
|
||
<content> | ||
<module name="org.ice1000.julia.java"/> | ||
</content> | ||
|
||
<extensions defaultExtensionNs="com.intellij"> | ||
<liveTemplateContext implementation="org.ice1000.julia.lang.editing.JuliaTemplateContextType$Base"/> | ||
<liveTemplateContext implementation="org.ice1000.julia.lang.editing.JuliaTemplateContextType$Module"/> | ||
|
@@ -36,7 +40,6 @@ | |
<xdebugger.breakpointType implementation="org.ice1000.julia.lang.execution.JuliaLineBreakpointType"/> | ||
<consoleFilterProvider implementation="org.ice1000.julia.lang.execution.JuliaConsoleFilterProvider"/> | ||
<console.folding implementation="org.ice1000.julia.lang.execution.JuliaConsoleFolding"/> | ||
<moduleConfigurationEditorProvider implementation="org.ice1000.julia.lang.module.JuliaModuleConfigEditor"/> | ||
<directoryProjectGenerator implementation="org.ice1000.julia.lang.module.JuliaProjectGenerator"/> | ||
<iconProvider implementation="org.ice1000.julia.lang.editing.JuliaIconProvider"/> | ||
<errorHandler implementation="org.ice1000.julia.lang.error.GitHubErrorReporter"/> | ||
|