diff --git a/.mvn/extensions.xml b/.mvn/extensions.xml
new file mode 100644
index 00000000000..9d93c39fd93
--- /dev/null
+++ b/.mvn/extensions.xml
@@ -0,0 +1,8 @@
+
+
+
+ org.eclipse.tycho.extras
+ tycho-pomless
+ 1.0.0
+
+
diff --git a/bundles/org.eclipse.launchbar.core/META-INF/MANIFEST.MF b/bundles/org.eclipse.launchbar.core/META-INF/MANIFEST.MF
index 17cfb7b85e1..e773efc6109 100644
--- a/bundles/org.eclipse.launchbar.core/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.launchbar.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: LaunchBar Core
Bundle-SymbolicName: org.eclipse.launchbar.core;singleton:=true
-Bundle-Version: 2.1.1.qualifier
+Bundle-Version: 2.2.0.qualifier
Bundle-Activator: org.eclipse.launchbar.core.internal.Activator
Bundle-Vendor: Eclipse CDT
Require-Bundle: org.eclipse.core.runtime,
@@ -11,6 +11,6 @@ Require-Bundle: org.eclipse.core.runtime,
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.launchbar.core,
- org.eclipse.launchbar.core.internal;x-friends:="org.eclipse.launchbar.core.tests",
+ org.eclipse.launchbar.core.internal;x-friends:="org.eclipse.launchbar.core.tests,org.eclipse.launchbar.ui",
org.eclipse.launchbar.core.target,
org.eclipse.launchbar.core.target.launch
diff --git a/bundles/org.eclipse.launchbar.core/pom.xml b/bundles/org.eclipse.launchbar.core/pom.xml
deleted file mode 100644
index c91c8db4b1d..00000000000
--- a/bundles/org.eclipse.launchbar.core/pom.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
- 4.0.0
-
-
- org.eclipse.launchbar
- parent
- 1.0.0-SNAPSHOT
- ../../pom.xml
-
-
- org.eclipse.launchbar.core
- 2.1.1-SNAPSHOT
-
- eclipse-plugin
-
diff --git a/bundles/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/DefaultLaunchDescriptor.java b/bundles/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/DefaultLaunchDescriptor.java
index 50cc5cbb689..28af5ce2d2b 100644
--- a/bundles/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/DefaultLaunchDescriptor.java
+++ b/bundles/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/DefaultLaunchDescriptor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2014 QNX Software Systems and others.
+ * Copyright (c) 2014, 2017 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -34,6 +34,12 @@ public class DefaultLaunchDescriptor extends PlatformObject implements ILaunchDe
if (ILaunchConfiguration.class.equals(adapter)) {
return adapter.cast(configuration);
}
+
+ T obj = configuration.getAdapter(adapter);
+ if (obj != null) {
+ return obj;
+ }
+
return super.getAdapter(adapter);
}
diff --git a/bundles/org.eclipse.launchbar.remote.core/pom.xml b/bundles/org.eclipse.launchbar.remote.core/pom.xml
deleted file mode 100644
index 300eb79704d..00000000000
--- a/bundles/org.eclipse.launchbar.remote.core/pom.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
- 4.0.0
-
-
- org.eclipse.launchbar
- parent
- 1.0.0-SNAPSHOT
- ../../pom.xml
-
-
- org.eclipse.launchbar.remote.core
- 1.0.1-SNAPSHOT
-
- eclipse-plugin
-
diff --git a/bundles/org.eclipse.launchbar.remote.ui/pom.xml b/bundles/org.eclipse.launchbar.remote.ui/pom.xml
deleted file mode 100644
index d10b2c206c4..00000000000
--- a/bundles/org.eclipse.launchbar.remote.ui/pom.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
- 4.0.0
-
-
- org.eclipse.launchbar
- parent
- 1.0.0-SNAPSHOT
- ../../pom.xml
-
-
- org.eclipse.launchbar.remote.ui
- 1.0.0-SNAPSHOT
-
- eclipse-plugin
-
diff --git a/bundles/org.eclipse.launchbar.ui.controls/pom.xml b/bundles/org.eclipse.launchbar.ui.controls/pom.xml
deleted file mode 100644
index ef9c1ef3410..00000000000
--- a/bundles/org.eclipse.launchbar.ui.controls/pom.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
- 4.0.0
-
-
- org.eclipse.launchbar
- parent
- 1.0.0-SNAPSHOT
- ../../pom.xml
-
-
- org.eclipse.launchbar.ui.controls
- 1.0.1-SNAPSHOT
-
- eclipse-plugin
-
diff --git a/bundles/org.eclipse.launchbar.ui/pom.xml b/bundles/org.eclipse.launchbar.ui/pom.xml
deleted file mode 100644
index 552f28d2140..00000000000
--- a/bundles/org.eclipse.launchbar.ui/pom.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
- 4.0.0
-
-
- org.eclipse.launchbar
- parent
- 1.0.0-SNAPSHOT
- ../../pom.xml
-
-
- org.eclipse.launchbar.ui
- 2.1.1-SNAPSHOT
-
- eclipse-plugin
-
diff --git a/bundles/org.eclipse.launchbar.ui/schema/launchBarUIContributions.exsd b/bundles/org.eclipse.launchbar.ui/schema/launchBarUIContributions.exsd
index e13cca0bb24..c052bede12d 100644
--- a/bundles/org.eclipse.launchbar.ui/schema/launchBarUIContributions.exsd
+++ b/bundles/org.eclipse.launchbar.ui/schema/launchBarUIContributions.exsd
@@ -19,6 +19,7 @@
+
@@ -48,6 +49,11 @@
+
+
+ Provides a label provider to visualize launch descriptors in the descriptor selector.
+
+
@@ -72,6 +78,46 @@
+
+
+
+ Allows launch config providers to add build settings tabs to existing launch configuration tab groups when edited from the launch bar.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/LaunchBarLaunchConfigDialog.java b/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/LaunchBarLaunchConfigDialog.java
index a3c4cbec941..188d13765fe 100644
--- a/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/LaunchBarLaunchConfigDialog.java
+++ b/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/LaunchBarLaunchConfigDialog.java
@@ -39,6 +39,7 @@ public class LaunchBarLaunchConfigDialog extends TitleAreaDialog implements ILau
private final ILaunchDescriptor descriptor;
private final ILaunchMode mode;
private final ILaunchTarget target;
+ private final ILaunchConfigurationTabGroup buildTabGroup;
private ILaunchConfigurationTabGroup group;
private CTabFolder tabFolder;
@@ -47,12 +48,16 @@ public class LaunchBarLaunchConfigDialog extends TitleAreaDialog implements ILau
private boolean initing;
public LaunchBarLaunchConfigDialog(Shell shell, ILaunchConfigurationWorkingCopy workingCopy,
- ILaunchDescriptor descriptor, ILaunchMode mode, ILaunchTarget target) {
+ ILaunchDescriptor descriptor, ILaunchMode mode, ILaunchTarget target,
+ ILaunchConfigurationTabGroup buildTabGroup) {
super(shell);
+
this.workingCopy = workingCopy;
this.descriptor = descriptor;
this.mode = mode;
this.target = target;
+ this.buildTabGroup = buildTabGroup;
+
setShellStyle(getShellStyle() | SWT.RESIZE);
}
@@ -123,25 +128,21 @@ public class LaunchBarLaunchConfigDialog extends TitleAreaDialog implements ILau
});
try {
+ if (buildTabGroup != null) {
+ buildTabGroup.createTabs(this, mode.getIdentifier());
+
+ for (ILaunchConfigurationTab configTab : buildTabGroup.getTabs()) {
+ installTab(configTab, tabFolder);
+ }
+
+ buildTabGroup.initializeFrom(workingCopy);
+ }
+
group = LaunchConfigurationPresentationManager.getDefault().getTabGroup(workingCopy, mode.getIdentifier());
group.createTabs(this, mode.getIdentifier());
for (ILaunchConfigurationTab configTab : group.getTabs()) {
- configTab.setLaunchConfigurationDialog(this);
-
- CTabItem tabItem = new CTabItem(tabFolder, SWT.NONE);
- tabItem.setData(configTab);
- tabItem.setText(configTab.getName());
- tabItem.setImage(configTab.getImage());
-
- Composite tabComp = new Composite(tabFolder, SWT.NONE);
- tabComp.setLayout(new GridLayout());
- tabItem.setControl(tabComp);
-
- configTab.createControl(tabComp);
- Control configControl = configTab.getControl();
- configControl.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
-
+ CTabItem tabItem = installTab(configTab, tabFolder);
if (lastSelection == null) {
// Select the first tab by default
tabFolder.setSelection(tabItem);
@@ -162,8 +163,30 @@ public class LaunchBarLaunchConfigDialog extends TitleAreaDialog implements ILau
return composite;
}
+ private CTabItem installTab(ILaunchConfigurationTab tab, CTabFolder tabFolder) {
+ tab.setLaunchConfigurationDialog(this);
+
+ CTabItem tabItem = new CTabItem(tabFolder, SWT.NONE);
+ tabItem.setData(tab);
+ tabItem.setText(tab.getName());
+ tabItem.setImage(tab.getImage());
+
+ Composite tabComp = new Composite(tabFolder, SWT.NONE);
+ tabComp.setLayout(new GridLayout());
+ tabItem.setControl(tabComp);
+
+ tab.createControl(tabComp);
+ Control configControl = tab.getControl();
+ configControl.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+ return tabItem;
+ }
+
@Override
protected void okPressed() {
+ if (buildTabGroup != null) {
+ buildTabGroup.performApply(workingCopy);
+ }
group.performApply(workingCopy);
super.okPressed();
}
@@ -285,7 +308,16 @@ public class LaunchBarLaunchConfigDialog extends TitleAreaDialog implements ILau
@Override
public ILaunchConfigurationTab[] getTabs() {
- return group.getTabs();
+ if (buildTabGroup != null) {
+ ILaunchConfigurationTab[] buildTabs = buildTabGroup.getTabs();
+ ILaunchConfigurationTab[] mainTabs = group.getTabs();
+ ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[buildTabs.length + mainTabs.length];
+ System.arraycopy(buildTabs, 0, tabs, 0, buildTabs.length);
+ System.arraycopy(mainTabs, 0, tabs, buildTabs.length, mainTabs.length);
+ return tabs;
+ } else {
+ return group.getTabs();
+ }
}
@Override
diff --git a/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/LaunchBarUIManager.java b/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/LaunchBarUIManager.java
index c7e3a2cd1a9..67473189279 100644
--- a/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/LaunchBarUIManager.java
+++ b/bundles/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/LaunchBarUIManager.java
@@ -31,7 +31,6 @@ import org.eclipse.debug.ui.ILaunchConfigurationTabGroup;
import org.eclipse.debug.ui.ILaunchGroup;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ILabelProvider;
-import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.window.Window;
import org.eclipse.launchbar.core.ILaunchBarManager;
import org.eclipse.launchbar.core.ILaunchDescriptor;
@@ -43,12 +42,18 @@ import org.eclipse.ui.PlatformUI;
public class LaunchBarUIManager implements ILaunchBarUIManager {
- private Map> descriptorLabelProviders = null;
+ private Map> descriptorLabelProviders;
+
+ // Map
+ private Map>> buildTabGroups;
+
private ILaunchBarManager manager = Activator.getService(ILaunchBarManager.class);
private void init() {
if (descriptorLabelProviders == null) {
descriptorLabelProviders = new HashMap<>();
+ buildTabGroups = new HashMap<>();
+
IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(Activator.PLUGIN_ID,
"launchBarUIContributions"); //$NON-NLS-1$
IExtension[] extensions = point.getExtensions();
@@ -60,6 +65,19 @@ public class LaunchBarUIManager implements ILaunchBarUIManager {
ExecutableExtension labelProvider = new ExecutableExtension<>(element,
"labelProvider"); //$NON-NLS-1$
descriptorLabelProviders.put(descriptorTypeId, labelProvider);
+ } else if (elementName.equals("buildTabGroup")) { //$NON-NLS-1$
+ String launchConfigTypeId = element.getAttribute("launchConfigType"); //$NON-NLS-1$
+ String descriptorTypeId = element.getAttribute("launchDescriptorType"); //$NON-NLS-1$
+ ExecutableExtension tabGroup = new ExecutableExtension<>(element,
+ "tabGroup"); //$NON-NLS-1$
+
+ Map> descGroup = buildTabGroups.get(launchConfigTypeId);
+ if (descGroup == null) {
+ descGroup = new HashMap<>();
+ buildTabGroups.put(launchConfigTypeId, descGroup);
+ }
+
+ descGroup.put(descriptorTypeId, tabGroup);
}
}
}
@@ -88,46 +106,36 @@ public class LaunchBarUIManager implements ILaunchBarUIManager {
return s;
}
- if (true) {
- try {
- ILaunchMode mode = manager.getActiveLaunchMode();
- ILaunchTarget target = manager.getActiveLaunchTarget();
- ILaunchConfiguration config = manager.getLaunchConfiguration(descriptor, target);
+ try {
+ ILaunchMode mode = manager.getActiveLaunchMode();
+ ILaunchTarget target = manager.getActiveLaunchTarget();
+ ILaunchConfiguration config = manager.getLaunchConfiguration(descriptor, target);
- ILaunchConfigurationWorkingCopy workingCopy = config.getWorkingCopy();
- LaunchBarLaunchConfigDialog dialog = new LaunchBarLaunchConfigDialog(shell, workingCopy, descriptor,
- mode, target);
- if (dialog.open() == Window.OK) {
- if (!workingCopy.getOriginal().equals(workingCopy)
- && !workingCopy.getOriginal().getAttributes().equals(workingCopy.getAttributes())) {
- workingCopy.doSave();
- }
+ ILaunchConfigurationWorkingCopy workingCopy = config.getWorkingCopy();
+
+ ILaunchConfigurationTabGroup buildTabGroup = null;
+ Map> descGroups = buildTabGroups
+ .get(config.getType().getIdentifier());
+ if (descGroups != null) {
+ ExecutableExtension tabGroup = descGroups
+ .get(manager.getDescriptorTypeId(descriptor.getType()));
+ if (tabGroup != null) {
+ buildTabGroup = tabGroup.create();
}
- } catch (CoreException e) {
- return e.getStatus();
}
- } else {
- // At this point, no error handling should be needed.
- try {
- ILaunchBarManager manager = Activator.getService(ILaunchBarManager.class);
- ILaunchMode mode = manager.getActiveLaunchMode();
- ILaunchTarget target = manager.getActiveLaunchTarget();
- ILaunchConfigurationType configType = manager.getLaunchConfigurationType(descriptor, target);
- ILaunchGroup group = DebugUIPlugin.getDefault().getLaunchConfigurationManager().getLaunchGroup(
- configType,
- mode.getIdentifier());
- ILaunchConfiguration config = manager.getLaunchConfiguration(descriptor, target);
- if (config instanceof ILaunchConfigurationWorkingCopy
- && ((ILaunchConfigurationWorkingCopy) config).isDirty()) {
- config = ((ILaunchConfigurationWorkingCopy) config).doSave();
+
+ LaunchBarLaunchConfigDialog dialog = new LaunchBarLaunchConfigDialog(shell, workingCopy, descriptor, mode,
+ target, buildTabGroup);
+ if (dialog.open() == Window.OK) {
+ if (!workingCopy.getOriginal().equals(workingCopy)
+ && !workingCopy.getOriginal().getAttributes().equals(workingCopy.getAttributes())) {
+ workingCopy.doSave();
}
- // open real eclipse launch configurations dialog
- DebugUIPlugin.openLaunchConfigurationsDialog(shell, new StructuredSelection(config),
- group.getIdentifier(), false);
- } catch (CoreException e2) {
- return e2.getStatus();
}
+ } catch (CoreException e) {
+ return e.getStatus();
}
+
return Status.OK_STATUS;
}
diff --git a/bundles/pom.xml b/bundles/pom.xml
new file mode 100644
index 00000000000..9d8949028b5
--- /dev/null
+++ b/bundles/pom.xml
@@ -0,0 +1,15 @@
+
+
+ 4.0.0
+
+
+ org.eclipse.launchbar
+ parent
+ 1.0.0-SNAPSHOT
+
+
+ bundles-parent
+ pom
+
diff --git a/features/org.eclipse.launchbar/feature.xml b/features/org.eclipse.launchbar/feature.xml
index 22b8bb8259b..63ddc75cbc6 100644
--- a/features/org.eclipse.launchbar/feature.xml
+++ b/features/org.eclipse.launchbar/feature.xml
@@ -2,7 +2,7 @@
diff --git a/features/org.eclipse.launchbar/pom.xml b/features/org.eclipse.launchbar/pom.xml
deleted file mode 100644
index 758ac14dffa..00000000000
--- a/features/org.eclipse.launchbar/pom.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
- 4.0.0
-
-
- org.eclipse.launchbar
- parent
- 1.0.0-SNAPSHOT
- ../../pom.xml
-
-
- org.eclipse.launchbar.features
- org.eclipse.launchbar
- 2.1.2-SNAPSHOT
- eclipse-feature
-
-
-
-
- org.eclipse.tycho.extras
- tycho-source-feature-plugin
- ${tycho-extras-version}
-
-
- source-feature
- package
-
- source-feature
-
-
-
-
-
- org.eclipse.tycho
- tycho-p2-plugin
- ${tycho-version}
-
-
- attach-p2-metadata
- package
-
- p2-metadata
-
-
-
-
-
-
-
diff --git a/features/pom.xml b/features/pom.xml
new file mode 100644
index 00000000000..94a900d2074
--- /dev/null
+++ b/features/pom.xml
@@ -0,0 +1,15 @@
+
+
+ 4.0.0
+
+
+ org.eclipse.launchbar
+ parent
+ 1.0.0-SNAPSHOT
+
+
+ features-parent
+ pom
+
diff --git a/pom.xml b/pom.xml
index f3bdced65dd..24172d34e3d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -253,6 +253,34 @@
+
+ org.eclipse.tycho.extras
+ tycho-source-feature-plugin
+ ${tycho-extras-version}
+
+
+ source-feature
+ package
+
+ source-feature
+
+
+
+
+
+ org.eclipse.tycho
+ tycho-p2-plugin
+ ${tycho-version}
+
+
+ attach-p2-metadata
+ package
+
+ p2-metadata
+
+
+
+