Skip to content

Commit

Permalink
Upgrade to platform 213 (#359)
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricziel authored Nov 27, 2021
1 parent 0ba910e commit 3556531
Show file tree
Hide file tree
Showing 10 changed files with 73 additions and 23 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ jobs:
grammar_kit_plugin_version: "2021.1.3"
since_build: "212"
until_build: "212.*"
- idea_version: "IU-213.5744.202-EAP-SNAPSHOT"
java_version: "11"
php_plugin_version: "213.5744.206"
psi_viewer_plugin_version: "213-SNAPSHOT"
grammar_kit_plugin_version: "2021.1.3"
since_build: "213"
until_build: "213.*"

steps:

Expand Down Expand Up @@ -102,6 +109,13 @@ jobs:
grammar_kit_plugin_version: "2021.1.3"
since_build: "212"
until_build: "212.*"
- idea_version: "IU-213.5744.202-EAP-SNAPSHOT"
java_version: "11"
php_plugin_version: "213.5744.206"
psi_viewer_plugin_version: "213-SNAPSHOT"
grammar_kit_plugin_version: "2021.1.3"
since_build: "213"
until_build: "213.*"

outputs:
cms-name: ${{ steps.properties.outputs.cms-name }}
Expand Down Expand Up @@ -295,6 +309,7 @@ jobs:
matrix:
include:
- since_build: "212"
- since_build: "213"

steps:

Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ jobs:
grammar_kit_plugin_version: "2021.1.3"
since_build: "212"
until_build: "212.*"
- idea_version: "IU-213.5744.202-EAP-SNAPSHOT"
java_version: "11"
php_plugin_version: "213.5744.206"
psi_viewer_plugin_version: "213-SNAPSHOT"
grammar_kit_plugin_version: "2021.1.3"
since_build: "213"
until_build: "213.*"
outputs:
prefixed-version: ${{ steps.properties.outputs.prefixed-version }}

Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## [Unreleased]
### Added

- Upgrade to platform 213
### Changed
- migrate checkHighlight to testHighlight where possible
- migrate away from using FileTypeIndex.NAME directly
Expand Down
22 changes: 13 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
import org.gradle.api.tasks.testing.logging.TestExceptionFormat

plugins {
id "org.jetbrains.intellij" version "1.1.6" apply false
id "org.jetbrains.intellij" version "1.3.0" apply false
id 'java'
id "org.jetbrains.grammarkit" version "${grammarKitPluginVersion}" apply false
id 'org.jetbrains.changelog' version '1.1.1'
}

repositories {
mavenCentral()
jcenter()
}

def htmlFixer = { htmlFile -> file(htmlFile).text.replace('<html>', '').replace('</html>', '') }

group pluginGroup

allprojects {
repositories {
mavenCentral()
}

apply plugin: 'java'
apply plugin: 'org.jetbrains.changelog'

Expand All @@ -24,6 +28,11 @@ allprojects {
tasks.withType(JavaCompile) { options.encoding = 'UTF-8' }

version = pluginVersion

test {
scanForTestClasses false
include "**/*Test.class"
}
}

subprojects {
Expand All @@ -32,12 +41,6 @@ subprojects {
apply plugin: 'java'
apply plugin: 'org.jetbrains.grammarkit'

repositories {
mavenCentral()
jcenter()
maven { url 'https://jitpack.io' }
}

changelog {
version = pluginVersion
path = "${project.rootProject.projectDir}/CHANGELOG.md"
Expand Down Expand Up @@ -73,6 +76,7 @@ subprojects {

grammarKit {
jflexRelease = jFlexRelease
grammarKitRelease = grammarKitVersion
}

runPluginVerifier {
Expand All @@ -83,7 +87,7 @@ subprojects {
}

wrapper {
gradleVersion '7.2'
gradleVersion '7.3'
}

test.testLogging.exceptionFormat = TestExceptionFormat.FULL
20 changes: 14 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,22 @@ javaTargetVersion = 1.11

jFlexRelease = 1.7.0-1

pluginVerifierIdeVersions = 2021.2
pluginVerifierIdeVersions = 2021.2,2021.3

grammarKitPluginVersion = 2021.1.3
ideaVersion = IU-2021.2.2
phpPluginVersion = 212.5284.49
psiViewerPluginVersion = 212-SNAPSHOT
customSinceBuild=212
customUntilBuild=212.*
grammarKitVersion = 2021.1.2
ideaVersion = IU-213.5744.202-EAP-SNAPSHOT
phpPluginVersion = 213.5744.206
psiViewerPluginVersion = 213-SNAPSHOT
customSinceBuild=213
customUntilBuild=213.*

#grammarKitPluginVersion = 2021.1.3
#ideaVersion = IU-2021.2.2
#phpPluginVersion = 212.5284.49
#psiViewerPluginVersion = 212-SNAPSHOT
#customSinceBuild=212
#customUntilBuild=212.*

#grammarKitPluginVersion = 2020.2.1
#ideaVersion = IU-2021.1
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@
import com.intellij.psi.util.PsiTreeUtil;
import com.intellij.testFramework.fixtures.BasePlatformTestCase;
import org.jetbrains.annotations.NotNull;
import org.junit.Ignore;

import java.util.List;

@Ignore
abstract public class AbstractFluidTest extends BasePlatformTestCase {
@Override
public void setUp() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import com.cedricziel.idea.typo3.TYPO3CMSProjectSettings;
import com.cedricziel.idea.typo3.index.RouteIndex;
import com.cedricziel.idea.typo3.routing.RouteReference;
import com.intellij.lang.annotation.Annotation;
import com.intellij.codeInspection.ProblemHighlightType;
import com.intellij.lang.annotation.AnnotationHolder;
import com.intellij.lang.annotation.Annotator;
import com.intellij.openapi.editor.DefaultLanguageHighlighterColors;
import com.intellij.lang.annotation.HighlightSeverity;
import com.intellij.openapi.util.TextRange;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiReference;
Expand Down Expand Up @@ -50,11 +50,18 @@ private void annotateRoute(@NotNull PsiElement psiElement, @NotNull AnnotationHo

if (allKeys.contains(value)) {
TextRange range = new TextRange(psiElement.getTextRange().getStartOffset(), psiElement.getTextRange().getEndOffset());
Annotation annotation = annotationHolder.createInfoAnnotation(range, null);
annotation.setTextAttributes(DefaultLanguageHighlighterColors.STRING);
annotationHolder
.newAnnotation(HighlightSeverity.INFORMATION, "")
.range(range)
.highlightType(ProblemHighlightType.INFORMATION)
.create();
} else {
TextRange range = new TextRange(psiElement.getTextRange().getStartOffset() + 1, psiElement.getTextRange().getEndOffset() - 1);
annotationHolder.createWeakWarningAnnotation(range, "Unresolved route");
annotationHolder
.newAnnotation(HighlightSeverity.WEAK_WARNING, "Unresolved route")
.range(range)
.highlightType(ProblemHighlightType.WEAK_WARNING)
.create();
}
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package com.cedricziel.idea.typo3.resources.annotation;

import com.cedricziel.idea.typo3.index.ResourcePathIndex;
import com.intellij.codeInspection.ProblemHighlightType;
import com.intellij.lang.annotation.AnnotationHolder;
import com.intellij.lang.annotation.Annotator;
import com.intellij.lang.annotation.HighlightSeverity;
import com.intellij.psi.PsiElement;
import com.jetbrains.php.lang.psi.elements.StringLiteralExpression;
import org.jetbrains.annotations.NotNull;
Expand Down Expand Up @@ -60,6 +62,9 @@ private String getContents(@NotNull PsiElement element) {
private void createErrorMessage(@NotNull PsiElement element, @NotNull AnnotationHolder holder, String resourceName) {
String message = "Resource \"%s\" could not be found in your current project.".replace("%s", resourceName);

holder.createWarningAnnotation(element, message);
holder
.newAnnotation(HighlightSeverity.WARNING, message)
.highlightType(ProblemHighlightType.WARNING)
.create();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
import com.intellij.openapi.command.WriteCommandAction;
import com.intellij.openapi.fileTypes.FileTypeManager;
import com.intellij.util.indexing.FileBasedIndex;
import org.junit.Ignore;

@Ignore
abstract public class AbstractTranslationTest extends AbstractTestCase {
@Override
protected void setUp() throws Exception {
Expand Down

0 comments on commit 3556531

Please sign in to comment.