-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Error while adding QuarkusRunConfigurationType in Services view
settings Fixes #1299 Signed-off-by: azerr <azerr@redhat.com>
- Loading branch information
1 parent
88d2388
commit 4547e29
Showing
5 changed files
with
434 additions
and
320 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
35 changes: 35 additions & 0 deletions
35
...dhat/devtools/intellij/quarkus/run/dashboard/QuarkusRunDashboardDefaultTypesProvider.java
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,35 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 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 http://www.eclipse.org/legal/epl-v20.html | ||
* | ||
* Contributors: | ||
* Red Hat, Inc. - initial API and implementation | ||
******************************************************************************/ | ||
package com.redhat.devtools.intellij.quarkus.run.dashboard; | ||
|
||
import com.intellij.execution.dashboard.RunDashboardDefaultTypesProvider; | ||
import com.intellij.openapi.project.Project; | ||
import com.redhat.devtools.intellij.quarkus.run.QuarkusRunConfigurationType; | ||
import com.redhat.devtools.intellij.quarkus.settings.UserDefinedQuarkusSettings; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
import java.util.Collection; | ||
import java.util.Collections; | ||
|
||
/** | ||
* Add automatically the {@link QuarkusRunConfigurationType#ID} type in the run dashboard when | ||
* the option 'Create "Quarkus Dev Mode" run configuration on project import' is activated. | ||
*/ | ||
public class QuarkusRunDashboardDefaultTypesProvider implements RunDashboardDefaultTypesProvider { | ||
|
||
@Override | ||
public @NotNull Collection<String> getDefaultTypeIds(@NotNull Project project) { | ||
if (!UserDefinedQuarkusSettings.getInstance(project).isCreateQuarkusRunConfigurationOnProjectImport()) { | ||
return Collections.emptyList(); | ||
} | ||
return Collections.singleton(QuarkusRunConfigurationType.ID); | ||
} | ||
} |
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
Oops, something went wrong.