Skip to content
Snippets Groups Projects
Commit ab0d846d authored by Johannes Mey's avatar Johannes Mey
Browse files

Merge branch 'chore/support-for-intellij-2023.1' into 'develop'

Chore/support for intellij 2023.1

See merge request !18
parents dbdac0e5 531e29a5
Branches
Tags v0.3.1
1 merge request!18Chore/support for intellij 2023.1
Pipeline #17796 passed
......@@ -5,16 +5,16 @@ stages:
- deploy
test:
image: openjdk:11
image: openjdk:17
stage: test
script:
- ./gradlew --continue --console=plain --info runPluginVerifier
jar:
image: openjdk:11
image: openjdk:17
stage: jar
script:
- ./gradlew --continue --console=plain --info buildPlugin
artifacts:
paths:
- "/builds/jastadd/*/build/libs/JastAddIntelliJPlugin-*.jar"
- "build/libs/JastAddIntelliJPlugin-*.jar"
# Changelog
## [Unreleased]
### Added
### Changed
### Deprecated
### Removed
### Fixed
## [0.3.1]
### Added
- Reference support for type names within aspect files.
- Usages are now highlighted.
- Refactoring of type names now also works in aspects.
- Note that although it works in the Java embeddings within aspects, it does *not* work in "real" Java classes.
- Please use this feature with caution. As with most refactoring tools, it is quite fragile and won't give correct
Please use this feature with caution. As with most refactoring tools, it is quite fragile and won't give correct
results in all cases.
- Folding support for aspect files.
- Aspects and most blocks now can be folded.
- Structure view for aspect files.
- Attributes and inter-type declarations are shown sorted by aspect.
- There are toggle buttons to show or hide attributes, inter-type declarations and rewrites.
- Note that things outside aspects, equations and some other elements are not yet included.
- Support for IntelliJ IDEA 2022.3.
### Changed
### Deprecated
### Removed
- Support for IntelliJ IDEA 2022.3 and 2023.1.
### Fixed
- A bug for type name refactoring in grammar files which prevented the actual definition from being renamed.
- Wrong inspection messages related to names in wrappers of injected java code ("x", "m", "X").
- A bug that required a visibility modifier in refined constructors.
### Removed
- Support for all IntelliJ IDEA version prior to 2022.3.
## [0.2.0]
### Added
- Support for IntelliJ IDEA 2021.2.3.
- Initial support for JastAdd aspect files.
- syntax highlighter and color settings
- two file types for jrag and jadd
- embedded java for attribute equation blocks
- Annotations for JastAdd usages in Java.
two file types for jrag and jadd
embedded java for attribute equation blocks
- configurable highlighters for attribute and api usages
- Dark mode icon which is a bit less colourful.
### Removed
- Support for IntelliJ IDEA 2020.2.4. Minimal version now is 2021.1.1.
[Unreleased]: https://git-st.inf.tu-dresden.de/jastadd/jetbrains-plugin//compare/v0.3.1...HEAD
[0.3.1]: https://git-st.inf.tu-dresden.de/jastadd/jetbrains-plugin//compare/v0.2.0...v0.3.1
[0.2.0]: https://git-st.inf.tu-dresden.de/jastadd/jetbrains-plugin//commits/v0.2.0
# JastAdd Language Support
<!-- Plugin description -->
This plugin provides support for [JastAdd](https://jastadd.cs.lth.se/) and [Relational RAGs](http://relational-rags.eu)
This plugin provides support for [JastAdd](https://jastadd.cs.lth.se/) and [Relational RAGs](https://jastadd.pages.st.inf.tu-dresden.de/relational-rags/)
<!-- Plugin description end -->
import io.gitlab.arturbosch.detekt.Detekt
import org.jetbrains.changelog.Changelog
import org.jetbrains.changelog.markdownToHTML
import org.jetbrains.grammarkit.tasks.GenerateLexer
import org.jetbrains.grammarkit.tasks.GenerateParser
import org.jetbrains.grammarkit.tasks.GenerateLexerTask
import org.jetbrains.grammarkit.tasks.GenerateParserTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
fun properties(key: String) = project.findProperty(key).toString()
......@@ -12,17 +13,17 @@ plugins {
// Java support
id("java")
// Kotlin support
id("org.jetbrains.kotlin.jvm") version "1.5.10"
id("org.jetbrains.kotlin.jvm") version "1.8.20"
// gradle-intellij-plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin
id("org.jetbrains.intellij") version "1.0"
id("org.jetbrains.intellij") version "1.13.3"
// gradle-changelog-plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
id("org.jetbrains.changelog") version "1.1.2"
id("org.jetbrains.changelog") version "2.0.0"
// detekt linter - read more: https://detekt.github.io/detekt/gradle.html
id("io.gitlab.arturbosch.detekt") version "1.18.1"
id("io.gitlab.arturbosch.detekt") version "1.23.0"
// ktlint linter - read more: https://github.com/JLLeitschuh/ktlint-gradle
id("org.jlleitschuh.gradle.ktlint") version "10.2.0"
id("org.jetbrains.grammarkit") version "2021.1.3"
id("org.jlleitschuh.gradle.ktlint") version "11.3.2"
// grammrkit - read more: https://plugins.gradle.org/plugin/org.jetbrains.grammarkit
id("org.jetbrains.grammarkit") version "2022.3.1"
}
group = properties("pluginGroup")
......@@ -32,9 +33,7 @@ version = properties("pluginVersion")
repositories {
mavenCentral()
}
dependencies {
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.18.1")
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
......@@ -68,55 +67,49 @@ sourceSets {
// Configure gradle-changelog-plugin plugin.
// Read more: https://github.com/JetBrains/gradle-changelog-plugin
changelog {
version = properties("pluginVersion")
groups = listOf("Added", "Changed", "Deprecated", "Removed", "Fixed")
version.set(properties("pluginVersion"))
groups.set(listOf("Added", "Changed", "Deprecated", "Removed", "Fixed"))
repositoryUrl.set(properties("pluginRepositoryUrl"))
}
// Configure detekt plugin.
// Read more: https://detekt.github.io/detekt/kotlindsl.html
detekt {
config = files("./detekt-config.yml")
buildUponDefaultConfig = true
reports {
html.enabled = true
xml.enabled = false
txt.enabled = false
}
source.from(files("build.gradle.kts"))
}
tasks {
val generateGrammarLexer = task<GenerateLexer>("generateGrammarLexer") {
source = "src/main/grammar/Grammar.flex"
targetDir = "src/gen/java/org/jastadd/tooling/grammar/lexer/"
targetClass = "GrammarLexer"
purgeOldFiles = true
val generateGrammarLexer = task<GenerateLexerTask>("generateGrammarLexer") {
sourceFile.set(file("src/main/grammar/Grammar.flex"))
targetDir.set("src/gen/java/org/jastadd/tooling/grammar/lexer/")
targetClass.set("GrammarLexer")
purgeOldFiles.set(true)
}
// not fully working because of https://github.com/JetBrains/gradle-grammar-kit-plugin/issues/3
val generateGrammarParser = task<GenerateParser>("generateGrammarParser") {
source = "src/main/grammar/Grammar.bnf"
targetRoot = "src/gen/java"
pathToParser = "/org/jastadd/tooling/grammar/GrammarParser.java"
pathToPsiRoot = "/org/jastadd/tooling/grammar/psi"
purgeOldFiles = true
val generateGrammarParser = task<GenerateParserTask>("generateGrammarParser") {
sourceFile.set(file("src/main/grammar/Grammar.bnf"))
targetRoot.set("src/gen/java")
pathToParser.set("/org/jastadd/tooling/grammar/GrammarParser.java")
pathToPsiRoot.set("/org/jastadd/tooling/grammar/psi")
purgeOldFiles.set(true)
}
val generateAspectLexer = task<GenerateLexer>("generateAspectLexer") {
source = "src/main/grammar/Aspect.flex"
targetDir = "src/gen/java/org/jastadd/tooling/aspect/lexer/"
targetClass = "AspectLexer"
purgeOldFiles = true
val generateAspectLexer = task<GenerateLexerTask>("generateAspectLexer") {
sourceFile.set(file("src/main/grammar/Aspect.flex"))
targetDir.set("src/gen/java/org/jastadd/tooling/aspect/lexer/")
targetClass.set("AspectLexer")
purgeOldFiles.set(true)
}
// not fully working because of https://github.com/JetBrains/gradle-grammar-kit-plugin/issues/3
val generateAspectParser = task<GenerateParser>("generateAspectParser") {
source = "src/main/grammar/Aspect.bnf"
targetRoot = "src/gen/java"
pathToParser = "/org/jastadd/tooling/aspect/AspectParser.java"
pathToPsiRoot = "/org/jastadd/tooling/aspect/psi"
purgeOldFiles = true
val generateAspectParser = task<GenerateParserTask>("generateAspectParser") {
sourceFile.set(file("src/main/grammar/Aspect.bnf"))
targetRoot.set("src/gen/java")
pathToParser.set("/org/jastadd/tooling/aspect/AspectParser.java")
pathToPsiRoot.set("/org/jastadd/tooling/aspect/psi")
purgeOldFiles.set(true)
}
compileJava {
......@@ -128,15 +121,15 @@ tasks {
// Set the compatibility versions to 1.8
withType<JavaCompile> {
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
sourceCompatibility = "17"
targetCompatibility = "17"
}
withType<KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.jvmTarget = "17"
}
withType<Detekt> {
jvmTarget = "1.8"
jvmTarget = "17"
}
patchPluginXml {
......@@ -158,11 +151,11 @@ tasks {
)
// Get the latest available change notes from the changelog file
changeNotes.set(provider { changelog.getLatest().toHTML() })
changeNotes.set(provider { changelog.renderItem(changelog.get(properties("pluginVersion")), Changelog.OutputType.HTML) })
}
runPluginVerifier {
ideVersions.set(properties("pluginVerifierIdeVersions").split(',').map(String::trim).filter(String::isNotEmpty))
jar {
dependsOn("patchChangelog")
}
publishPlugin {
......
# Default detekt configuration:
# https://github.com/detekt/detekt/blob/master/detekt-core/src/main/resources/default-detekt-config.yml
formatting:
Indentation:
continuationIndentSize: 8
ParameterListWrapping:
indentSize: 8
......@@ -4,18 +4,19 @@
pluginGroup = org.jastadd
pluginName = JastAdd
pluginVersion = 0.3.1
pluginRepositoryUrl = https://git-st.inf.tu-dresden.de/jastadd/jetbrains-plugin/
# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
# for insight into build numbers and IntelliJ Platform versions.
pluginSinceBuild = 211
pluginUntilBuild = 223.*
pluginSinceBuild = 223
pluginUntilBuild = 231.*
# Plugin Verifier integration -> https://github.com/JetBrains/gradle-intellij-plugin#plugin-verifier-dsl
# See https://jb.gg/intellij-platform-builds-list for available build versions.
pluginVerifierIdeVersions = 2021.1.3, 2021.2.4, 2021.3.3, 2022.1.4, 2022.2.4, 2022.3.1
## Plugin Verifier integration -> https://github.com/JetBrains/gradle-intellij-plugin#plugin-verifier-dsl
## See https://jb.gg/intellij-platform-builds-list for available build versions.
#pluginVerifierIdeVersions = 2022.2.4, 2022.3.1, 2023.1.2
platformType = IC
platformVersion = 2021.3.1
platformVersion = 2022.3.1
platformDownloadSources = true
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
......
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
......@@ -111,7 +111,7 @@ aspect_refine_method_declaration ::= REFINE [aspect_name] modifiers type_paramet
aspect_constructor_declaration ::= modifiers ast_type_name DOT ast_type_name formal_parameters (THROWS name_list)? LBRACE explicit_constructor_invocation? block_statement* RBRACE
aspect_refine_constructor_declaration ::= REFINE aspect_name (PUBLIC | PROTECTED | PRIVATE) ast_type_name DOT method_name formal_parameters (THROWS name_list)? LBRACE block_statement* RBRACE
aspect_refine_constructor_declaration ::= REFINE aspect_name (PUBLIC | PROTECTED | PRIVATE)? ast_type_name DOT method_name formal_parameters (THROWS name_list)? LBRACE block_statement* RBRACE
aspect_field_declaration ::= modifiers aspect_type ast_type_name DOT variable_declarator (COMMA variable_declarator)* SEMICOLON
......
<idea-plugin>
<id>org.jastadd.JastAddGrammar</id>
<name>JastAdd Grammar Language</name>
<vendor email="johannes.mey@tu-dresden.de" url="jastadd.org">The JastAdd Team</vendor>
<vendor email="johannes.mey@tu-dresden.de" url="jastadd.org">Johannes Mey</vendor>
<!-- please see https://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/plugin_compatibility.html
on how to target different products -->
......@@ -32,7 +31,7 @@
<completion.contributor language="JastAddGrammar"
implementationClass="org.jastadd.tooling.grammar.GrammarCompletionContributor"/>
<psi.referenceContributor implementation="org.jastadd.tooling.grammar.GrammarReferenceContributor"/>
<psi.referenceContributor language="JastAddGrammar" implementation="org.jastadd.tooling.grammar.GrammarReferenceContributor"/>
<lang.refactoringSupport language="JastAddGrammar"
......@@ -80,7 +79,7 @@
<colorSettingsPage implementation="org.jastadd.tooling.java.JavaColorSettingsPage"/>
<psi.referenceContributor implementation="org.jastadd.tooling.aspect.AspectReferenceContributor"/>
<psi.referenceContributor language="JastAddAspect" implementation="org.jastadd.tooling.aspect.AspectReferenceContributor"/>
<lang.elementManipulator forClass="org.jastadd.tooling.aspect.psi.JastAddAspectAstTypeName"
implementationClass="org.jastadd.tooling.aspect.psi.JastAddAspectAstTypeNameManipulator"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment