From 82d11a63fc7d79de26a170c36c690e18638094e1 Mon Sep 17 00:00:00 2001 From: Fred Bricon Date: Mon, 26 Jun 2023 13:33:41 +0200 Subject: [PATCH] fix: remove downloadable Quarkus/Qute support in Java projects Signed-off-by: Fred Bricon --- .github/workflows/update.yml | 41 ------------ .../QuarkusFrameworkSupportProvider.java | 64 ------------------ .../quarkus/facet/QuarkusFrameworkType.java | 26 -------- .../quarkus/facet/QuarkusLibraryType.java | 41 ------------ .../facet/QuteFrameworkSupportProvider.java | 66 ------------------- .../qute/facet/QuteFrameworkType.java | 26 -------- .../intellij/qute/facet/QuteLibraryType.java | 41 ------------ src/main/resources/META-INF/plugin.xml | 6 -- src/main/resources/quarkus.xml | 9 --- src/main/resources/qute.xml | 9 --- 10 files changed, 329 deletions(-) delete mode 100644 .github/workflows/update.yml delete mode 100644 src/main/java/com/redhat/devtools/intellij/quarkus/facet/QuarkusFrameworkSupportProvider.java delete mode 100644 src/main/java/com/redhat/devtools/intellij/quarkus/facet/QuarkusFrameworkType.java delete mode 100644 src/main/java/com/redhat/devtools/intellij/quarkus/facet/QuarkusLibraryType.java delete mode 100644 src/main/java/com/redhat/devtools/intellij/qute/facet/QuteFrameworkSupportProvider.java delete mode 100644 src/main/java/com/redhat/devtools/intellij/qute/facet/QuteFrameworkType.java delete mode 100644 src/main/java/com/redhat/devtools/intellij/qute/facet/QuteLibraryType.java delete mode 100644 src/main/resources/quarkus.xml delete mode 100644 src/main/resources/qute.xml diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml deleted file mode 100644 index 79904ac4e..000000000 --- a/.github/workflows/update.yml +++ /dev/null @@ -1,41 +0,0 @@ -# This workflow will build a Java project with Gradle -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle - -name: Verify Quarkus updates - -on: - schedule: - - cron: "0 0 * * *" -jobs: - check: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - with: - token: ${{ secrets.JBOSSTOOLSCI_TOKEN }} - - name: Update source tree - run: | - last_quarkus_version=`curl -s https://repo1.maven.org/maven2/io/quarkus/quarkus-universe-bom/maven-metadata.xml | grep '' | sed -e "s#.*\(.\+\).*#\1#" | grep Final | sort -V | tail -1` - plugin_quarkus_version=`grep 'artifact ' src/main/resources/quarkus.xml | head -1 | sed -e "s#.*version=\"\(.\+\)\" .*#\1#"` - if [ ! -z "$last_quarkus_version" ] && [ "$last_quarkus_version" != "$plugin_quarkus_version" ]; then - echo "Versions differ" - branch_name="update_runtime_version_from_${plugin_quarkus_version}_to_${last_quarkus_version}" - git fetch origin - branch_exists=$(git branch -a --format='%(refname)' | grep "${branch_name}" || true) - if [ "${branch_exists}" != "refs/remotes/origin/${branch_name}" ]; then - git checkout -b "${branch_name}" - git config user.email jbosstoolsci@jboss.org - git config user.name "jbosstoolsci Bot" - find . \( -path ./.git -o -path ./projects/lsp4mp -o -path ./projects/quarkus -o -path ./projects/qute \) -prune -false -o -type f -exec sed -i '' -e "s/$plugin_quarkus_version/$last_quarkus_version/g" {} \; - git add -A - git commit -s -m "fix: Update the Quarkus runtime used by the plugin to version $last_quarkus_version" - git push origin "${branch_name}:${branch_name}" - echo "${{ secrets.JBOSSTOOLSCI_TOKEN }}" >github-token.txt - gh auth login --with-token { - - public QuarkusFrameworkSupportProvider() { - super(QuarkusFacet.getQuarkusFacetType()); - } - @Override - protected void setupConfiguration(QuarkusFacet facet, ModifiableRootModel rootModel, FrameworkVersion version) { - - } - - @NotNull - @Override - public FrameworkSupportConfigurable createConfigurable(@NotNull FrameworkSupportModel model) { - return new QuarkusFrameworkSupportConfigurable(model); - } - - private class QuarkusFrameworkSupportConfigurable extends FrameworkSupportConfigurableBase implements FrameworkSupportWithLibrary { - public QuarkusFrameworkSupportConfigurable(FrameworkSupportModel model) { - super(QuarkusFrameworkSupportProvider.this, model, QuarkusFrameworkSupportProvider.this.getVersions(), QuarkusFrameworkSupportProvider.this.getVersionLabelText()); - } - - public JComponent getComponent() { - JPanel allPanel = new JPanel(new BorderLayout()); - allPanel.add((Component) ObjectUtils.assertNotNull(super.getComponent()), "Center"); - return allPanel; - } - - @NotNull - public CustomLibraryDescription createLibraryDescription() { - return DownloadableLibraryService.getInstance().createDescriptionForType(QuarkusLibraryType.class); - } - - public boolean isLibraryOnly() { - return false; - } - } -} diff --git a/src/main/java/com/redhat/devtools/intellij/quarkus/facet/QuarkusFrameworkType.java b/src/main/java/com/redhat/devtools/intellij/quarkus/facet/QuarkusFrameworkType.java deleted file mode 100644 index 0c24ea716..000000000 --- a/src/main/java/com/redhat/devtools/intellij/quarkus/facet/QuarkusFrameworkType.java +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2019 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at https://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - ******************************************************************************/ -package com.redhat.devtools.intellij.quarkus.facet; - -import com.intellij.framework.library.LibraryBasedFrameworkType; -import org.jetbrains.annotations.NotNull; - -public class QuarkusFrameworkType extends LibraryBasedFrameworkType { - protected QuarkusFrameworkType() { - super("quarkus", QuarkusLibraryType.class); - } - - @NotNull - @Override - public String getPresentableName() { - return "Quarkus"; - } -} diff --git a/src/main/java/com/redhat/devtools/intellij/quarkus/facet/QuarkusLibraryType.java b/src/main/java/com/redhat/devtools/intellij/quarkus/facet/QuarkusLibraryType.java deleted file mode 100644 index d50fc130e..000000000 --- a/src/main/java/com/redhat/devtools/intellij/quarkus/facet/QuarkusLibraryType.java +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2019 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at https://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - ******************************************************************************/ -package com.redhat.devtools.intellij.quarkus.facet; - -import com.intellij.facet.ui.FacetBasedFrameworkSupportProvider; -import com.intellij.framework.library.DownloadableLibraryType; -import com.intellij.openapi.util.IconLoader; -import org.jetbrains.annotations.NotNull; - -import javax.swing.Icon; - -public class QuarkusLibraryType extends DownloadableLibraryType { - - public QuarkusLibraryType() { - super("Quarkus", "quarkus", "quarkus", QuarkusLibraryType.class.getResource("/quarkus.xml")); - } - - @NotNull - @Override - protected String[] getDetectionClassNames() { - return new String[]{"io.quarkus.runtime.LaunchMode", "io.quarkus.runtime.Quarkus"}; - } - - @NotNull - @Override - public Icon getLibraryTypeIcon() { - return IconLoader.getIcon("/quarkus_icon_rgb_16px_default.png", QuarkusLibraryType.class); - } - - public final String getUnderlyingFrameworkTypeId() { - return FacetBasedFrameworkSupportProvider.getProviderId(QuarkusFacet.FACET_TYPE_ID); - } -} diff --git a/src/main/java/com/redhat/devtools/intellij/qute/facet/QuteFrameworkSupportProvider.java b/src/main/java/com/redhat/devtools/intellij/qute/facet/QuteFrameworkSupportProvider.java deleted file mode 100644 index 1bc575f18..000000000 --- a/src/main/java/com/redhat/devtools/intellij/qute/facet/QuteFrameworkSupportProvider.java +++ /dev/null @@ -1,66 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2019 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at https://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - ******************************************************************************/ -package com.redhat.devtools.intellij.qute.facet; - -import com.intellij.facet.ui.FacetBasedFrameworkSupportProvider; -import com.intellij.framework.library.DownloadableLibraryService; -import com.intellij.framework.library.FrameworkSupportWithLibrary; -import com.intellij.ide.util.frameworkSupport.FrameworkSupportConfigurable; -import com.intellij.ide.util.frameworkSupport.FrameworkSupportConfigurableBase; -import com.intellij.ide.util.frameworkSupport.FrameworkSupportModel; -import com.intellij.ide.util.frameworkSupport.FrameworkVersion; -import com.intellij.openapi.roots.ModifiableRootModel; -import com.intellij.openapi.roots.ui.configuration.libraries.CustomLibraryDescription; -import com.intellij.util.ObjectUtils; -import org.jetbrains.annotations.NotNull; - -import javax.swing.JComponent; -import javax.swing.JPanel; -import java.awt.BorderLayout; -import java.awt.Component; - -public class QuteFrameworkSupportProvider extends FacetBasedFrameworkSupportProvider { - - public QuteFrameworkSupportProvider() { - super(QuteFacet.getQuteFacetType()); - } - @Override - protected void setupConfiguration(QuteFacet facet, ModifiableRootModel rootModel, FrameworkVersion version) { - - } - - @NotNull - @Override - public FrameworkSupportConfigurable createConfigurable(@NotNull FrameworkSupportModel model) { - return new QuarkusFrameworkSupportConfigurable(model); - } - - private class QuarkusFrameworkSupportConfigurable extends FrameworkSupportConfigurableBase implements FrameworkSupportWithLibrary { - public QuarkusFrameworkSupportConfigurable(FrameworkSupportModel model) { - super(QuteFrameworkSupportProvider.this, model, QuteFrameworkSupportProvider.this.getVersions(), QuteFrameworkSupportProvider.this.getVersionLabelText()); - } - - public JComponent getComponent() { - JPanel allPanel = new JPanel(new BorderLayout()); - allPanel.add((Component) ObjectUtils.assertNotNull(super.getComponent()), "Center"); - return allPanel; - } - - @NotNull - public CustomLibraryDescription createLibraryDescription() { - return DownloadableLibraryService.getInstance().createDescriptionForType(QuteLibraryType.class); - } - - public boolean isLibraryOnly() { - return false; - } - } -} diff --git a/src/main/java/com/redhat/devtools/intellij/qute/facet/QuteFrameworkType.java b/src/main/java/com/redhat/devtools/intellij/qute/facet/QuteFrameworkType.java deleted file mode 100644 index 3ae8a9af6..000000000 --- a/src/main/java/com/redhat/devtools/intellij/qute/facet/QuteFrameworkType.java +++ /dev/null @@ -1,26 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2019 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at https://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - ******************************************************************************/ -package com.redhat.devtools.intellij.qute.facet; - -import com.intellij.framework.library.LibraryBasedFrameworkType; -import org.jetbrains.annotations.NotNull; - -public class QuteFrameworkType extends LibraryBasedFrameworkType { - protected QuteFrameworkType() { - super("qute", QuteLibraryType.class); - } - - @NotNull - @Override - public String getPresentableName() { - return "Qute"; - } -} diff --git a/src/main/java/com/redhat/devtools/intellij/qute/facet/QuteLibraryType.java b/src/main/java/com/redhat/devtools/intellij/qute/facet/QuteLibraryType.java deleted file mode 100644 index 8ea41077f..000000000 --- a/src/main/java/com/redhat/devtools/intellij/qute/facet/QuteLibraryType.java +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2019 Red Hat, Inc. - * Distributed under license by Red Hat, Inc. All rights reserved. - * This program is made available under the terms of the - * Eclipse Public License v2.0 which accompanies this distribution, - * and is available at https://www.eclipse.org/legal/epl-v20.html - * - * Contributors: - * Red Hat, Inc. - initial API and implementation - ******************************************************************************/ -package com.redhat.devtools.intellij.qute.facet; - -import com.intellij.facet.ui.FacetBasedFrameworkSupportProvider; -import com.intellij.framework.library.DownloadableLibraryType; -import com.intellij.openapi.util.IconLoader; -import org.jetbrains.annotations.NotNull; - -import javax.swing.Icon; - -public class QuteLibraryType extends DownloadableLibraryType { - - public QuteLibraryType() { - super("Qute", "qute", "qute", QuteLibraryType.class.getResource("/qute.xml")); - } - - @NotNull - @Override - protected String[] getDetectionClassNames() { - return new String[]{"io.quarkus.qute.Engine"}; - } - - @NotNull - @Override - public Icon getLibraryTypeIcon() { - return IconLoader.getIcon("/quarkus_icon_rgb_16px_default.png", QuteLibraryType.class); - } - - public final String getUnderlyingFrameworkTypeId() { - return FacetBasedFrameworkSupportProvider.getProviderId(QuteFacet.FACET_TYPE_ID); - } -} diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index af0e3b947..72cbe244f 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -251,10 +251,7 @@ - - - - - - - - - - - - - diff --git a/src/main/resources/qute.xml b/src/main/resources/qute.xml deleted file mode 100644 index b965a69b5..000000000 --- a/src/main/resources/qute.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - -