Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.debug.ui/ui')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/quickaccess/AbstractLaunchQuickAccessProvider.java95
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/quickaccess/DebugQuickAccessProvider.java25
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/quickaccess/LaunchQuickAccessElement.java67
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/quickaccess/ProfileQuickAccessProvider.java24
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/quickaccess/RunQuickAccessProvider.java24
5 files changed, 0 insertions, 235 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/quickaccess/AbstractLaunchQuickAccessProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/quickaccess/AbstractLaunchQuickAccessProvider.java
deleted file mode 100644
index dca05cb4e..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/quickaccess/AbstractLaunchQuickAccessProvider.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2019 Red Hat Inc. others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * - Mickael Istria (Red Hat Inc.)
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.quickaccess;
-
-import java.util.Arrays;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationListener;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.debug.core.ILaunchMode;
-import org.eclipse.debug.internal.ui.DebugPluginImages;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.ui.IDebugUIConstants;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.quickaccess.QuickAccessElement;
-import org.eclipse.ui.quickaccess.QuickAccessProvider;
-
-public abstract class AbstractLaunchQuickAccessProvider extends QuickAccessProvider {
-
- protected final ILaunchManager manager;
- protected final ILaunchMode launchMode;
-
- public AbstractLaunchQuickAccessProvider(ILaunchMode launchMode) {
- super();
- manager = DebugPlugin.getDefault().getLaunchManager();
- this.launchMode = launchMode;
- manager.addLaunchConfigurationListener(new ILaunchConfigurationListener() {
- @Override
- public void launchConfigurationRemoved(ILaunchConfiguration configuration) {
- reset();
- }
-
- @Override
- public void launchConfigurationChanged(ILaunchConfiguration configuration) {
- reset();
- }
-
- @Override
- public void launchConfigurationAdded(ILaunchConfiguration configuration) {
- reset();
- }
- });
- }
-
- @Override
- public String getId() {
- return getClass().getName();
- }
-
- @Override
- public String getName() {
- return Action.removeMnemonics(launchMode.getLabel());
- }
-
- @Override
- public ImageDescriptor getImageDescriptor() {
- return DebugPluginImages.getImageDescriptor(IDebugUIConstants.IMG_OBJS_LAUNCH_RUN);
- }
-
- @Override
- public QuickAccessElement[] getElements() {
- try {
- return Arrays.stream(manager.getLaunchConfigurations()).filter(config -> {
- try {
- return config.getType().supportsMode(launchMode.getIdentifier());
- } catch (CoreException e) {
- DebugUIPlugin.log(e);
- return false;
- }
- }).map(config -> new LaunchQuickAccessElement(this, config, launchMode)).toArray(QuickAccessElement[]::new);
- } catch (CoreException e) {
- DebugUIPlugin.log(e);
- return new QuickAccessElement[0];
- }
- }
-
- @Override
- protected void doReset() {
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/quickaccess/DebugQuickAccessProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/quickaccess/DebugQuickAccessProvider.java
deleted file mode 100644
index b1a9590b1..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/quickaccess/DebugQuickAccessProvider.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2019 Red Hat Inc. others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * - Mickael Istria (Red Hat Inc.)
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.quickaccess;
-
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchManager;
-
-public class DebugQuickAccessProvider extends AbstractLaunchQuickAccessProvider {
-
- public DebugQuickAccessProvider() {
- super(DebugPlugin.getDefault().getLaunchManager().getLaunchMode(ILaunchManager.DEBUG_MODE));
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/quickaccess/LaunchQuickAccessElement.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/quickaccess/LaunchQuickAccessElement.java
deleted file mode 100644
index 82e726b08..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/quickaccess/LaunchQuickAccessElement.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2019 Red Hat Inc. others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * - Mickael Istria (Red Hat Inc.)
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.quickaccess;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchMode;
-import org.eclipse.debug.internal.ui.DebugPluginImages;
-import org.eclipse.debug.internal.ui.DebugUIPlugin;
-import org.eclipse.debug.ui.DebugUITools;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.quickaccess.QuickAccessElement;
-import org.eclipse.ui.quickaccess.QuickAccessProvider;
-
-public class LaunchQuickAccessElement extends QuickAccessElement {
-
- private ILaunchConfiguration launch;
- private ILaunchMode launchMode;
-
- public LaunchQuickAccessElement(QuickAccessProvider provider, ILaunchConfiguration launch, ILaunchMode launchMode) {
- super(provider);
- this.launch = launch;
- this.launchMode = launchMode;
- }
-
- @Override
- public String getLabel() {
- return launch.getName();
- }
-
- @Override
- public String getMatchLabel() {
- return getLabel() + ' ' + launchMode.getLabel();
- }
-
- @Override
- public ImageDescriptor getImageDescriptor() {
- try {
- return DebugPluginImages.getImageDescriptor(launch.getType().getIdentifier());
- } catch (CoreException e) {
- DebugUIPlugin.log(e);
- return null;
- }
- }
-
- @Override
- public String getId() {
- return launch.getName() + '/' + launchMode.getIdentifier();
- }
-
- @Override
- public void execute() {
- DebugUITools.launch(launch, launchMode.getIdentifier());
- }
-
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/quickaccess/ProfileQuickAccessProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/quickaccess/ProfileQuickAccessProvider.java
deleted file mode 100644
index 2e3186f7c..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/quickaccess/ProfileQuickAccessProvider.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2019 Red Hat Inc. others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * - Mickael Istria (Red Hat Inc.)
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.quickaccess;
-
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchManager;
-
-public class ProfileQuickAccessProvider extends AbstractLaunchQuickAccessProvider {
-
- public ProfileQuickAccessProvider() {
- super(DebugPlugin.getDefault().getLaunchManager().getLaunchMode(ILaunchManager.PROFILE_MODE));
- }
-}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/quickaccess/RunQuickAccessProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/quickaccess/RunQuickAccessProvider.java
deleted file mode 100644
index deb23c295..000000000
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/quickaccess/RunQuickAccessProvider.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2019 Red Hat Inc. others.
- *
- * This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License 2.0
- * which accompanies this distribution, and is available at
- * https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * - Mickael Istria (Red Hat Inc.)
- *******************************************************************************/
-package org.eclipse.debug.internal.ui.quickaccess;
-
-import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchManager;
-
-public class RunQuickAccessProvider extends AbstractLaunchQuickAccessProvider {
-
- public RunQuickAccessProvider() {
- super(DebugPlugin.getDefault().getLaunchManager().getLaunchMode(ILaunchManager.RUN_MODE));
- }
-}

Back to the top