Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2016-01-06 22:47:24 -0500
committerEugene Tarassov2016-01-06 22:47:24 -0500
commitca496e239868e30d53d57d73bbfb08a939282178 (patch)
tree370054869aeb82fd171eaf9f366d26def85f8d7a
parent9a820b0bbc0bf50bb8d8ac03409564dcea96ac8d (diff)
downloadorg.eclipse.tcf-1.4_WR_20160129_4.6.0_bugfix.tar.gz
org.eclipse.tcf-1.4_WR_20160129_4.6.0_bugfix.tar.xz
org.eclipse.tcf-1.4_WR_20160129_4.6.0_bugfix.zip
Bug 485132 - Debug of single project with TCF causes building of whole workspace1.4_WR_20160129_4.6.01.4_WR_20160129_4.6.0_bugfix
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/plugin.xml6
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/TCFLaunchContext.java16
-rw-r--r--plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/TCFLaunchProjectBuilder.java260
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/ChannelTCP.java4
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/.settings/.api_filters11
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/debug/ui/ITCFLaunchContext.java14
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TCFMainTab.java137
-rw-r--r--plugins/org.eclipse.tcf.debug/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.tcf.debug/plugin.xml4
-rw-r--r--plugins/org.eclipse.tcf.debug/schema/launch_project_builder.exsd72
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/debug/ITCFLaunchProjectBuilder.java28
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFLaunchDelegate.java33
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFLaunchProjectBuilder.java60
14 files changed, 633 insertions, 18 deletions
diff --git a/plugins/org.eclipse.tcf.cdt.ui/META-INF/MANIFEST.MF b/plugins/org.eclipse.tcf.cdt.ui/META-INF/MANIFEST.MF
index fcd7d5927..35243d9a6 100644
--- a/plugins/org.eclipse.tcf.cdt.ui/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.tcf.cdt.ui/META-INF/MANIFEST.MF
@@ -23,7 +23,8 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0",
org.eclipse.cdt.launch;bundle-version="7.1.0",
org.eclipse.cdt.dsf.ui;bundle-version="2.3.0",
org.eclipse.ui.editors,
- org.eclipse.ui.workbench
+ org.eclipse.ui.workbench,
+ org.eclipse.core.variables
Bundle-ActivationPolicy: lazy
Eclipse-LazyStart: true
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/plugins/org.eclipse.tcf.cdt.ui/plugin.xml b/plugins/org.eclipse.tcf.cdt.ui/plugin.xml
index 835a9cd58..b9033a763 100644
--- a/plugins/org.eclipse.tcf.cdt.ui/plugin.xml
+++ b/plugins/org.eclipse.tcf.cdt.ui/plugin.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?><!--
- Copyright (c) 2010, 2015 Wind River Systems, Inc. and others.
+ Copyright (c) 2010, 2016 Wind River Systems, Inc. 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
@@ -16,6 +16,10 @@
<class name="org.eclipse.tcf.internal.cdt.ui.TCFLaunchContext" />
</extension>
+ <extension point="org.eclipse.tcf.debug.launch_project_builder">
+ <class name="org.eclipse.tcf.internal.cdt.ui.TCFLaunchProjectBuilder" />
+ </extension>
+
<extension
point="org.eclipse.core.runtime.adapters">
<factory
diff --git a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/TCFLaunchContext.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/TCFLaunchContext.java
index f07bf0cdd..4a66ec42e 100644
--- a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/TCFLaunchContext.java
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/TCFLaunchContext.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2013 Wind River Systems, Inc. and others.
+ * Copyright (c) 2008, 2016 Wind River Systems, Inc. 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
@@ -10,12 +10,16 @@
*******************************************************************************/
package org.eclipse.tcf.internal.cdt.ui;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.model.CModelException;
import org.eclipse.cdt.core.model.CoreModel;
import org.eclipse.cdt.core.model.IBinary;
import org.eclipse.cdt.core.model.ICElement;
import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
import org.eclipse.cdt.launch.LaunchUtils;
import org.eclipse.cdt.ui.CElementLabelProvider;
@@ -226,6 +230,16 @@ public class TCFLaunchContext implements ITCFLaunchContext {
return projDes.getActiveConfiguration().getId();
}
+ public Map<String,String> getBuildConfigIDs(IProject project) {
+ ICProjectDescription projDes = CCorePlugin.getDefault().getProjectDescription(project);
+ if (projDes == null) return null;
+ ICConfigurationDescription[] configurations = projDes.getConfigurations();
+ if (configurations == null) return null;
+ Map<String,String> map = new LinkedHashMap<String,String>();
+ for (ICConfigurationDescription c : configurations) map.put(c.getId(), c.getName());
+ return map;
+ }
+
/**
* Iterate through and suck up all of the executable files that we can find.
*/
diff --git a/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/TCFLaunchProjectBuilder.java b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/TCFLaunchProjectBuilder.java
new file mode 100644
index 000000000..e937fbc62
--- /dev/null
+++ b/plugins/org.eclipse.tcf.cdt.ui/src/org/eclipse/tcf/internal/cdt/ui/TCFLaunchProjectBuilder.java
@@ -0,0 +1,260 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Xilinx, Inc. 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Xilinx - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.internal.cdt.ui;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.cdt.core.CCorePlugin;
+import org.eclipse.cdt.core.model.ICProject;
+import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
+import org.eclipse.cdt.core.settings.model.ICProjectDescription;
+import org.eclipse.cdt.launch.LaunchUtils;
+import org.eclipse.core.resources.ICommand;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspaceRunnable;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.core.variables.VariablesPlugin;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.tcf.debug.ITCFLaunchProjectBuilder;
+import org.eclipse.tcf.internal.debug.launch.TCFLaunchDelegate;
+
+/**
+ * Build CDT project.
+ * This is an specialization of the default project build logic.
+ * Unfortunately, CDT does not profile an API for building a project. See bug 313927.
+ * See org.eclipse.cdt.launch.AbstractCLaunchDelegate2 for more details.
+ */
+public class TCFLaunchProjectBuilder implements ITCFLaunchProjectBuilder {
+
+ @Override
+ public boolean isSupportedProject(String name) {
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
+ return CCorePlugin.getDefault().getCoreModel().create(project) != null;
+ }
+
+ @Override
+ public IProject[] getBuildOrder(ILaunchConfiguration configuration, String mode) throws CoreException {
+ String name = configuration.getAttribute(TCFLaunchDelegate.ATTR_PROJECT_NAME, "");
+ if (name.length() == 0) return null;
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
+ if (project == null) return null;
+ ICProject c_project = CCorePlugin.getDefault().getCoreModel().create(project);
+ if (c_project == null) return null;
+
+ IProject[] ordered_projects = null;
+ HashSet<IProject> project_set = new HashSet<IProject>();
+ getReferencedProjectSet(c_project.getProject(), project_set);
+
+ String[] ordered_names = ResourcesPlugin.getWorkspace().getDescription().getBuildOrder();
+ if (ordered_names != null) {
+ // Projects may not be in the build order but should still be built if selected
+ ArrayList<IProject> unordered_list = new ArrayList<IProject>(project_set.size());
+ ArrayList<IProject> ordered_list = new ArrayList<IProject>(project_set.size());
+ unordered_list.addAll(project_set);
+
+ for (String nm : ordered_names) {
+ for (IProject proj : unordered_list) {
+ if (proj.getName().equals(nm)) {
+ ordered_list.add(proj);
+ unordered_list.remove(proj);
+ break;
+ }
+ }
+ }
+
+ // Add any remaining projects to the end of the list
+ ordered_list.addAll(unordered_list);
+ ordered_projects = ordered_list.toArray(new IProject[ordered_list.size()]);
+ }
+ else {
+ // Try the project prerequisite order then
+ IProject[] projects = project_set.toArray(new IProject[project_set.size()]);
+ ordered_projects = ResourcesPlugin.getWorkspace().computeProjectOrder(projects).projects;
+ }
+ return ordered_projects;
+ }
+
+ /* Recursively creates a set of projects referenced by a project */
+ private void getReferencedProjectSet(IProject proj, Set<IProject> set) throws CoreException {
+ set.add(proj);
+ for (IProject ref : proj.getReferencedProjects()) {
+ if (ref.exists() && !set.contains(ref)) {
+ getReferencedProjectSet(ref, set);
+ }
+ }
+ }
+
+ /**
+ * Builds the project referenced in the launch configuration
+ */
+ public boolean buildForLaunch(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor) throws CoreException {
+ try {
+ SubMonitor submon = SubMonitor.convert(monitor, "", 1); //$NON-NLS-1$
+
+ String name = configuration.getAttribute(TCFLaunchDelegate.ATTR_PROJECT_NAME, "");
+ if (name.length() == 0) return true;
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
+ if (project == null) return true;
+
+ String buildConfigID = null;
+
+ if (configuration.getAttribute(TCFLaunchDelegate.ATTR_PROJECT_BUILD_CONFIG_AUTO, false)) {
+ String program_path = configuration.getAttribute(TCFLaunchDelegate.ATTR_LOCAL_PROGRAM_FILE, ""); //$NON-NLS-1$
+ program_path = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(program_path);
+ ICConfigurationDescription buildConfig = LaunchUtils.getBuildConfigByProgramPath(project, program_path);
+ if (buildConfig != null) buildConfigID = buildConfig.getId();
+ }
+
+ if (buildConfigID == null) buildConfigID = configuration.getAttribute(TCFLaunchDelegate.ATTR_PROJECT_BUILD_CONFIG_ID, (String)null);
+
+ // There's no guarantee the ID stored in the launch config is valid.
+ // The user may have deleted the build configuration.
+ if (buildConfigID != null) {
+ boolean idIsGood = false;
+ ICProjectDescription desc = CCorePlugin.getDefault().getProjectDescription(project, false);
+ if (desc != null) idIsGood = desc.getConfigurationById(buildConfigID) != null;
+ if (!idIsGood) buildConfigID = null; // use active configuration
+ }
+
+ buildProject(project, buildConfigID, submon.newChild(1));
+ return false;
+ }
+ finally {
+ if (monitor != null) monitor.done();
+ }
+ }
+
+ /**
+ * This is an specialization of the platform method
+ * LaunchConfigurationDelegate#buildProjects(IProject[], IProgressMonitor).
+ * It builds only one project and it builds a particular CDT build
+ * configuration of it. It was added to address bug 309126 and 312709
+ */
+ public void buildProject(final IProject project, final String buildConfigID, IProgressMonitor monitor) throws CoreException {
+ final int TOTAL_TICKS = 1000;
+
+ // Some day, this will hopefully be a simple pass-thru to a cdt.core
+ // utility. See bug 313927
+
+ IWorkspaceRunnable build = new IWorkspaceRunnable(){
+ @Override
+ public void run(IProgressMonitor pm) throws CoreException {
+ SubMonitor localmonitor = SubMonitor.convert(pm, "", TOTAL_TICKS); //$NON-NLS-1$
+ try {
+ // Number of times we'll end up calling IProject.build()
+ final int buildCount = (buildConfigID == null) ? 1 : project.getDescription().getBuildSpec().length;
+ if (buildCount == 0) return; // the case for an imported-executable project; see bugzilla 315396
+ final int subtaskTicks = TOTAL_TICKS / buildCount;
+
+ if (buildConfigID != null) {
+ // Build a specific configuration
+
+ // To pass args, we have to specify the builder name.
+ // There can be multiple so this can require multiple
+ // builds. Note that this happens under the covers in
+ // the 'else' (args-less) case below
+ Map<String,String> cfgIdArgs = cfgIdsToMap(new String[] {buildConfigID}, new HashMap<String,String>());
+ cfgIdArgs.put(CONTENTS, CONTENTS_CONFIGURATION_IDS);
+ ICommand[] commands = project.getDescription().getBuildSpec();
+ assert buildCount == commands.length;
+ for (ICommand command : commands) {
+ Map<String, String> args = command.getArguments();
+ if (args == null) {
+ args = new HashMap<String, String>(cfgIdArgs);
+ }
+ else {
+ args.putAll(cfgIdArgs);
+ }
+
+ if (localmonitor.isCanceled()) {
+ throw new OperationCanceledException();
+ }
+ project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, command.getBuilderName(), args, localmonitor.newChild(subtaskTicks));
+ }
+ }
+ else {
+ // Build the active configuration
+ project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, localmonitor.newChild(subtaskTicks));
+ }
+ }
+ finally {
+ if (pm != null) pm.done();
+ }
+ }
+ };
+ ResourcesPlugin.getWorkspace().run(build, new SubProgressMonitor(monitor, TOTAL_TICKS, 0) {
+ private boolean cancelled;
+ @Override
+ public void setCanceled(boolean b) {
+ // Only cancel this operation, not the top-level launch.
+ cancelled = b;
+ }
+ @Override
+ public boolean isCanceled() {
+ // Canceled if this monitor has been explicitly canceled
+ // || parent has been canceled.
+ return cancelled || super.isCanceled();
+ }
+ });
+ }
+
+ /** TODO: Temporarily duplicated from BuilderFactory. Remove when 313927 is addressed */
+ private static final String CONFIGURATION_IDS = "org.eclipse.cdt.make.core.configurationIds"; //$NON-NLS-1$
+
+ /** TODO: Temporarily duplicated from BuilderFactory. Remove when 313927 is addressed */
+ private static final String CONTENTS = "org.eclipse.cdt.make.core.contents"; //$NON-NLS-1$
+
+ /** TODO: Temporarily duplicated from BuilderFactory. Remove when 313927 is addressed */
+ private static final String CONTENTS_CONFIGURATION_IDS = "org.eclipse.cdt.make.core.configurationIds"; //$NON-NLS-1$
+
+ /** TODO: Temporarily duplicated from BuilderFactory. Remove when 313927 is addressed */
+ private static Map<String, String> cfgIdsToMap(String ids[], Map<String, String> map){
+ map.put(CONFIGURATION_IDS, encodeList(Arrays.asList(ids)));
+ return map;
+ }
+
+ /** TODO: Temporarily duplicated from BuilderFactory. Remove when 313927 is addressed */
+ private static String encodeList(List<String> values) {
+ StringBuffer str = new StringBuffer();
+ Iterator<String> entries = values.iterator();
+ while (entries.hasNext()) {
+ String entry = entries.next();
+ str.append(escapeChars(entry, "|\\", '\\')); //$NON-NLS-1$
+ str.append("|"); //$NON-NLS-1$
+ }
+ return str.toString();
+ }
+
+ /** TODO: Temporarily duplicated from BuilderFactory. Remove when 313927 is addressed */
+ private static String escapeChars(String string, String escapeChars, char escapeChar) {
+ StringBuffer str = new StringBuffer(string);
+ for (int i = 0; i < str.length(); i++) {
+ if (escapeChars.indexOf(str.charAt(i)) != -1) {
+ str.insert(i, escapeChar);
+ i++;
+ }
+ }
+ return str.toString();
+ }
+}
diff --git a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/ChannelTCP.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/ChannelTCP.java
index 689aceb7b..3f705ef22 100644
--- a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/ChannelTCP.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/core/ChannelTCP.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2015 Wind River Systems, Inc. and others.
+ * Copyright (c) 2007, 2016 Wind River Systems, Inc. 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
@@ -197,7 +197,7 @@ public class ChannelTCP extends StreamChannel {
closed = true;
if (started) {
socket.close();
- /*
+ /*
* We should not write anything to the stream here, just close it.
* So, don't call out.close(), because it calls out.flush().
* The socket output stream is already closed by socket.close().
diff --git a/plugins/org.eclipse.tcf.debug.ui/.settings/.api_filters b/plugins/org.eclipse.tcf.debug.ui/.settings/.api_filters
new file mode 100644
index 000000000..9d8025463
--- /dev/null
+++ b/plugins/org.eclipse.tcf.debug.ui/.settings/.api_filters
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<component id="org.eclipse.tcf.debug.ui" version="2">
+ <resource path="src/org/eclipse/tcf/debug/ui/ITCFLaunchContext.java" type="org.eclipse.tcf.debug.ui.ITCFLaunchContext">
+ <filter id="403804204">
+ <message_arguments>
+ <message_argument value="org.eclipse.tcf.debug.ui.ITCFLaunchContext"/>
+ <message_argument value="getBuildConfigIDs(IProject)"/>
+ </message_arguments>
+ </filter>
+ </resource>
+</component>
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/debug/ui/ITCFLaunchContext.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/debug/ui/ITCFLaunchContext.java
index 3357ad315..2035ac24b 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/debug/ui/ITCFLaunchContext.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/debug/ui/ITCFLaunchContext.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2012 Wind River Systems, Inc. and others.
+ * Copyright (c) 2008, 2016 Wind River Systems, Inc. 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
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.tcf.debug.ui;
+import java.util.Map;
+
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
@@ -63,11 +65,19 @@ public interface ITCFLaunchContext {
/**
* Get project build configuration ID.
* @param project
- * @return build configuration ID.
+ * @return active build configuration ID.
*/
String getBuildConfigID(IProject project);
/**
+ * Get all project build configuration IDs.
+ * @param project
+ * @return map <build configuration ID> -> <configuration name>.
+ * @since 1.4
+ */
+ Map<String,String> getBuildConfigIDs(IProject project);
+
+ /**
* Show a dialog box that allows user to select executable binary file from a list
* of available file in this context.
* @param project_name
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TCFMainTab.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TCFMainTab.java
index 16eb5204d..ae7d4a173 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TCFMainTab.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/launch/TCFMainTab.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2013 Wind River Systems, Inc. and others.
+ * Copyright (c) 2008, 2016 Wind River Systems, Inc. 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
@@ -11,6 +11,7 @@
package org.eclipse.tcf.internal.debug.ui.launch;
import java.io.File;
+import java.util.Map;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
@@ -29,27 +30,36 @@ import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Link;
+import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.tcf.debug.ui.ITCFLaunchContext;
import org.eclipse.tcf.internal.debug.launch.TCFLaunchDelegate;
import org.eclipse.tcf.internal.debug.ui.Activator;
import org.eclipse.tcf.internal.debug.ui.ImageCache;
import org.eclipse.ui.dialogs.ElementListSelectionDialog;
+import org.eclipse.ui.dialogs.PreferencesUtil;
public class TCFMainTab extends AbstractLaunchConfigurationTab {
+ private static final String LAUNCHING_PREFERENCE_PAGE_ID = "org.eclipse.debug.ui.LaunchingPreferencePage"; //$NON-NLS-1$
+
private Text project_text;
private Text local_program_text;
private Text remote_program_text;
private Text working_dir_text;
+ private Button disable_build;
+ private Button workspace_build;
private Button default_dir_button;
private Button attach_children_button;
private Button stop_at_entry_button;
@@ -57,6 +67,8 @@ public class TCFMainTab extends AbstractLaunchConfigurationTab {
private Button disconnect_on_ctx_exit;
private Button terminal_button;
private Button filter_button;
+ private Combo build_config_combo;
+ private Link workpsace_link;
private Exception init_error;
public void createControl(Composite parent) {
@@ -70,6 +82,7 @@ public class TCFMainTab extends AbstractLaunchConfigurationTab {
createHeader(comp);
createVerticalSpacer(comp, 1);
createProjectGroup(comp);
+ createBuildGroup(comp);
createApplicationGroup(comp);
createWorkingDirGroup(comp);
createVerticalSpacer(comp, 1);
@@ -102,6 +115,7 @@ public class TCFMainTab extends AbstractLaunchConfigurationTab {
project_text.setLayoutData(gd);
project_text.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent evt) {
+ updateBuildConfigCombo(false, null);
updateLaunchConfigurationDialog();
}
});
@@ -117,6 +131,69 @@ public class TCFMainTab extends AbstractLaunchConfigurationTab {
});
}
+ private void createBuildGroup(Composite parent) {
+ final Shell shell = parent.getShell();
+ Group group = new Group(parent, SWT.NONE);
+ GridLayout layout = new GridLayout(3, false);
+ group.setLayout(layout);
+ group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ group.setText("Build (if required) before launching");
+ createBuildConfigCombo(group, layout.numColumns);
+ disable_build = new Button(group, SWT.RADIO);
+ disable_build.setText("Disable auto build");
+ disable_build.setToolTipText("Requires manually building project before launching");
+ disable_build.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent evt) {
+ updateLaunchConfigurationDialog();
+ }
+ });
+ workspace_build = new Button(group, SWT.RADIO);
+ workspace_build.setText("Use workspace settings");
+ workspace_build.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent evt) {
+ updateLaunchConfigurationDialog();
+ }
+ });
+ workpsace_link = new Link(group, SWT.NONE);
+ workpsace_link.setText("<a>Configure Workspace Settings...</a>");
+ workpsace_link.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ PreferencesUtil.createPreferenceDialogOn(
+ shell,
+ LAUNCHING_PREFERENCE_PAGE_ID,
+ null,
+ null).open();
+ }
+ });
+ }
+
+ protected void createBuildConfigCombo(Composite parent, int colspan) {
+ Composite comp = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout(2, false);
+ comp.setLayout(layout);
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.horizontalSpan = colspan;
+ comp.setLayoutData(gd);
+ Label label = new Label(comp, SWT.NONE);
+ label.setText("Build configuration:");
+ build_config_combo = new Combo(comp, SWT.READ_ONLY | SWT.DROP_DOWN);
+ build_config_combo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ build_config_combo.addSelectionListener(new SelectionListener() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ updateLaunchConfigurationDialog();
+ }
+
+ @Override
+ public void widgetDefaultSelected(SelectionEvent e) {
+ updateLaunchConfigurationDialog();
+ }
+ });
+ }
+
private void createApplicationGroup(Composite parent) {
Group group = new Group(parent, SWT.NONE);
GridLayout layout = new GridLayout();
@@ -221,12 +298,6 @@ public class TCFMainTab extends AbstractLaunchConfigurationTab {
});
}
- @Override
- protected void updateLaunchConfigurationDialog() {
- super.updateLaunchConfigurationDialog();
- working_dir_text.setEnabled(!default_dir_button.getSelection());
- }
-
private void createOptionButtons(Composite parent, int col_span) {
Composite composite = new Composite(parent, SWT.NONE);
GridLayout terminal_layout = new GridLayout();
@@ -293,11 +364,46 @@ public class TCFMainTab extends AbstractLaunchConfigurationTab {
filter_button.setEnabled(true);
}
+ @Override
+ protected void updateLaunchConfigurationDialog() {
+ super.updateLaunchConfigurationDialog();
+ working_dir_text.setEnabled(!default_dir_button.getSelection());
+ }
+
+ protected void updateBuildConfigCombo(boolean auto, String selection) {
+ int selection_index = auto ? 1 : 0;
+ build_config_combo.removeAll();
+ build_config_combo.add("Use Active");
+ build_config_combo.add("Select Automatically");
+ IProject project = getProject();
+ if (project != null) {
+ ITCFLaunchContext launch_context = TCFLaunchContext.getLaunchContext(project);
+ if (launch_context != null) {
+ Map<String,String> map = launch_context.getBuildConfigIDs(project);
+ if (map != null) {
+ int cnt = 2;
+ for (String id : map.keySet()) {
+ build_config_combo.add(map.get(id));
+ if (id.equals(selection)) selection_index = cnt;
+ build_config_combo.setData(Integer.toString(cnt++), id);
+ }
+ }
+ }
+ }
+ build_config_combo.select(selection_index);
+ }
+
public void initializeFrom(ILaunchConfiguration config) {
setErrorMessage(null);
setMessage(null);
try {
project_text.setText(config.getAttribute(TCFLaunchDelegate.ATTR_PROJECT_NAME, ""));
+ boolean auto = config.getAttribute(TCFLaunchDelegate.ATTR_PROJECT_BUILD_CONFIG_AUTO, false);
+ updateBuildConfigCombo(auto, config.getAttribute(TCFLaunchDelegate.ATTR_PROJECT_BUILD_CONFIG_ID, (String)null));
+ int build = TCFLaunchDelegate.BUILD_BEFORE_LAUNCH_USE_WORKSPACE_SETTING;
+ build = config.getAttribute(TCFLaunchDelegate.ATTR_BUILD_BEFORE_LAUNCH, build);
+ disable_build.setSelection(build == TCFLaunchDelegate.BUILD_BEFORE_LAUNCH_DISABLED);
+ workspace_build.setSelection(build == TCFLaunchDelegate.BUILD_BEFORE_LAUNCH_USE_WORKSPACE_SETTING);
local_program_text.setText(config.getAttribute(TCFLaunchDelegate.ATTR_LOCAL_PROGRAM_FILE, ""));
remote_program_text.setText(config.getAttribute(TCFLaunchDelegate.ATTR_REMOTE_PROGRAM_FILE, ""));
working_dir_text.setText(config.getAttribute(TCFLaunchDelegate.ATTR_WORKING_DIRECTORY, ""));
@@ -325,6 +431,23 @@ public class TCFMainTab extends AbstractLaunchConfigurationTab {
public void performApply(ILaunchConfigurationWorkingCopy config) {
config.setAttribute(TCFLaunchDelegate.ATTR_PROJECT_NAME, project_text.getText());
+ int config_index = build_config_combo.getSelectionIndex();
+ if (config_index == 0) {
+ config.removeAttribute(TCFLaunchDelegate.ATTR_PROJECT_BUILD_CONFIG_ID);
+ config.removeAttribute(TCFLaunchDelegate.ATTR_PROJECT_BUILD_CONFIG_AUTO);
+ }
+ else if (config_index == 1) {
+ config.removeAttribute(TCFLaunchDelegate.ATTR_PROJECT_BUILD_CONFIG_ID);
+ config.setAttribute(TCFLaunchDelegate.ATTR_PROJECT_BUILD_CONFIG_AUTO, true);
+ }
+ else {
+ String config_id = (String)build_config_combo.getData(Integer.toString(config_index));
+ config.setAttribute(TCFLaunchDelegate.ATTR_PROJECT_BUILD_CONFIG_ID, config_id);
+ config.removeAttribute(TCFLaunchDelegate.ATTR_PROJECT_BUILD_CONFIG_AUTO);
+ }
+ int build = TCFLaunchDelegate.BUILD_BEFORE_LAUNCH_USE_WORKSPACE_SETTING;
+ if (disable_build.getSelection()) build = TCFLaunchDelegate.BUILD_BEFORE_LAUNCH_DISABLED;
+ config.setAttribute(TCFLaunchDelegate.ATTR_BUILD_BEFORE_LAUNCH, build);
config.setAttribute(TCFLaunchDelegate.ATTR_LOCAL_PROGRAM_FILE, local_program_text.getText());
config.setAttribute(TCFLaunchDelegate.ATTR_REMOTE_PROGRAM_FILE, remote_program_text.getText());
if (default_dir_button.getSelection()) {
diff --git a/plugins/org.eclipse.tcf.debug/META-INF/MANIFEST.MF b/plugins/org.eclipse.tcf.debug/META-INF/MANIFEST.MF
index a6c465ec3..1136d9e2a 100644
--- a/plugins/org.eclipse.tcf.debug/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.tcf.debug/META-INF/MANIFEST.MF
@@ -18,7 +18,8 @@ Import-Package: org.eclipse.core.variables,
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Eclipse-LazyStart: true
-Export-Package: org.eclipse.tcf.internal.debug;x-internal:=true,
+Export-Package: org.eclipse.tcf.debug,
+ org.eclipse.tcf.internal.debug;x-internal:=true,
org.eclipse.tcf.internal.debug.actions;x-friends:="org.eclipse.tcf.debug.ui,org.eclipse.tcf.cdt.ui,org.eclipse.tcf.te.tcf.launch.core",
org.eclipse.tcf.internal.debug.cmdline;x-friends:="org.eclipse.tcf.debug.ui",
org.eclipse.tcf.internal.debug.launch;x-friends:="org.eclipse.tcf.debug.ui,org.eclipse.tcf.cdt.ui,org.eclipse.tcf.te.tcf.launch.core",
diff --git a/plugins/org.eclipse.tcf.debug/plugin.xml b/plugins/org.eclipse.tcf.debug/plugin.xml
index 33df924fa..23eae9363 100644
--- a/plugins/org.eclipse.tcf.debug/plugin.xml
+++ b/plugins/org.eclipse.tcf.debug/plugin.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?><!--
- Copyright (c) 2010 Wind River Systems, Inc. and others.
+ Copyright (c) 2010, 2016 Wind River Systems, Inc. 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
@@ -12,6 +12,8 @@
<plugin>
+ <extension-point id="launch_project_builder" name="TCF Launch Project Builder" schema="schema/launch_project_builder.exsd"/>
+
<extension
point="org.eclipse.debug.core.breakpoints">
<breakpoint
diff --git a/plugins/org.eclipse.tcf.debug/schema/launch_project_builder.exsd b/plugins/org.eclipse.tcf.debug/schema/launch_project_builder.exsd
new file mode 100644
index 000000000..8a586e071
--- /dev/null
+++ b/plugins/org.eclipse.tcf.debug/schema/launch_project_builder.exsd
@@ -0,0 +1,72 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.tcf">
+<annotation>
+ <appInfo>
+ <meta.schema plugin="org.eclipse.tcf.debug" id="launch_project_builder" name="TCF Launch Project Builder"/>
+ </appInfo>
+ <documentation>
+ This extension point is used to register plugins
+ that want to extends TCF Launch Configuration functionality.
+ </documentation>
+
+</annotation>
+
+ <element name="extension">
+ <complexType>
+ <sequence>
+ <element ref="class" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+ a fully qualified identifier of the target extension point
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+ an optional identifier of the extension instance
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+ an optional name of the extension instance
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="class">
+ <complexType>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+ Class should implement org.eclipse.tcf.debug.ITCFLaunchProjectBuilder interface
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="apiInfo"/>
+ </appInfo>
+ <documentation>
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appInfo>
+ <meta.section type="implementation"/>
+ </appInfo>
+ <documentation>
+ </documentation>
+ </annotation>
+
+</schema>
diff --git a/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/debug/ITCFLaunchProjectBuilder.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/debug/ITCFLaunchProjectBuilder.java
new file mode 100644
index 000000000..d9643ee4d
--- /dev/null
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/debug/ITCFLaunchProjectBuilder.java
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Xilinx, Inc. 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Xilinx - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.debug;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.debug.core.ILaunchConfiguration;
+
+/**
+ * @since 1.4
+ */
+public interface ITCFLaunchProjectBuilder {
+
+ boolean isSupportedProject(String project_name);
+
+ IProject[] getBuildOrder(ILaunchConfiguration configuration, String mode) throws CoreException;
+
+ boolean buildForLaunch(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor) throws CoreException;
+}
diff --git a/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFLaunchDelegate.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFLaunchDelegate.java
index 7c062f549..ec4da2bb4 100644
--- a/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFLaunchDelegate.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFLaunchDelegate.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2014 Wind River Systems, Inc. and others.
+ * Copyright (c) 2007, 2016 Wind River Systems, Inc. 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
@@ -30,6 +30,7 @@ import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.model.LaunchConfigurationDelegate;
+import org.eclipse.tcf.debug.ITCFLaunchProjectBuilder;
import org.eclipse.tcf.internal.debug.Activator;
import org.eclipse.tcf.internal.debug.model.ITCFConstants;
import org.eclipse.tcf.internal.debug.model.TCFLaunch;
@@ -52,6 +53,9 @@ public class TCFLaunchDelegate extends LaunchConfigurationDelegate {
public static final String
ATTR_PEER_ID = ITCFConstants.ID_TCF_DEBUG_MODEL + ".PeerID",
ATTR_PROJECT_NAME = ITCFConstants.ID_TCF_DEBUG_MODEL + ".ProjectName",
+ ATTR_BUILD_BEFORE_LAUNCH = ITCFConstants.ID_TCF_DEBUG_MODEL + ".BuildBeforeLaunch",
+ ATTR_PROJECT_BUILD_CONFIG_ID = ITCFConstants.ID_TCF_DEBUG_MODEL + ".ProjectBuildConfigID",
+ ATTR_PROJECT_BUILD_CONFIG_AUTO = ITCFConstants.ID_TCF_DEBUG_MODEL + ".ProjectBuildConfigAuto",
ATTR_LOCAL_PROGRAM_FILE = ITCFConstants.ID_TCF_DEBUG_MODEL + ".LocalProgramFile",
ATTR_REMOTE_PROGRAM_FILE = ITCFConstants.ID_TCF_DEBUG_MODEL + ".ProgramFile",
ATTR_COPY_TO_REMOTE_FILE = ITCFConstants.ID_TCF_DEBUG_MODEL + ".CopyToRemote",
@@ -73,6 +77,10 @@ public class TCFLaunchDelegate extends LaunchConfigurationDelegate {
ATTR_ATTACH_PATH = ITCFConstants.ID_TCF_DEBUG_MODEL + ".Attach",
ATTR_USE_CONTEXT_FILTER = ITCFConstants.ID_TCF_DEBUG_MODEL + ".UseContextFilter";
+ public static final int
+ BUILD_BEFORE_LAUNCH_USE_WORKSPACE_SETTING = 0,
+ BUILD_BEFORE_LAUNCH_DISABLED = 1;
+
public static final String
FILES_CONTEXT_FULL_NAME = "Context",
FILES_CONTEXT_ID = "ContextID",
@@ -237,7 +245,8 @@ public class TCFLaunchDelegate extends LaunchConfigurationDelegate {
Element root = null;
try {
root = DebugPlugin.parseDocument(s);
- } catch (CoreException e) {
+ }
+ catch (CoreException e) {
// The memento does not represent a XML string
}
if (root == null) return;
@@ -330,6 +339,26 @@ public class TCFLaunchDelegate extends LaunchConfigurationDelegate {
return program_path.toOSString();
}
+ @Override
+ protected IProject[] getBuildOrder(ILaunchConfiguration configuration, String mode) throws CoreException {
+ ITCFLaunchProjectBuilder builder = TCFLaunchProjectBuilder.getLaunchProjectBuilder(configuration);
+ if (builder != null) return builder.getBuildOrder(configuration, mode);
+ String name = configuration.getAttribute(ATTR_PROJECT_NAME, "");
+ if (name.length() == 0) return null;
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
+ if (project == null) return null;
+ return new IProject[]{ project };
+ }
+
+ @Override
+ public boolean buildForLaunch(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor) throws CoreException {
+ int build = configuration.getAttribute(ATTR_BUILD_BEFORE_LAUNCH, BUILD_BEFORE_LAUNCH_USE_WORKSPACE_SETTING);
+ if (build == BUILD_BEFORE_LAUNCH_DISABLED) return false;
+ ITCFLaunchProjectBuilder builder = TCFLaunchProjectBuilder.getLaunchProjectBuilder(configuration);
+ if (builder != null) return builder.buildForLaunch(configuration, mode, monitor);
+ return super.buildForLaunch(configuration, mode, monitor);
+ }
+
/**
* Create new TCF launch object.
* @return new TCFLaunch object
diff --git a/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFLaunchProjectBuilder.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFLaunchProjectBuilder.java
new file mode 100644
index 000000000..b35cee394
--- /dev/null
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/launch/TCFLaunchProjectBuilder.java
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * Copyright (c) 2016 Xilinx, Inc. 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Xilinx - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.internal.debug.launch;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.tcf.debug.ITCFLaunchProjectBuilder;
+import org.eclipse.tcf.internal.debug.Activator;
+import org.osgi.framework.Bundle;
+
+/**
+ * TCF implements building of a project before launching a debug session.
+ * Default build logic might not work properly for some project type, e.g. CDT projects.
+ * TCF clients can implement ITCFLaunchProjectBuilder to override default launch behavior.
+ */
+public class TCFLaunchProjectBuilder {
+
+ public static ITCFLaunchProjectBuilder getLaunchProjectBuilder(ILaunchConfiguration configuration) {
+ try {
+ String project = configuration.getAttribute(TCFLaunchDelegate.ATTR_PROJECT_NAME, "");
+ if (project.length() == 0) return null;
+ IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(Activator.PLUGIN_ID, "launch_project_builder");
+ if (point == null) return null;
+ IExtension[] extensions = point.getExtensions();
+ for (IExtension extension : extensions) {
+ try {
+ Bundle bundle = Platform.getBundle(extension.getNamespaceIdentifier());
+ bundle.start(Bundle.START_TRANSIENT);
+ IConfigurationElement[] e = extension.getConfigurationElements();
+ for (int j = 0; j < e.length; j++) {
+ String nm = e[j].getName();
+ if (nm.equals("class")) { //$NON-NLS-1$
+ Class<?> c = bundle.loadClass(e[j].getAttribute("name")); //$NON-NLS-1$
+ ITCFLaunchProjectBuilder builder = (ITCFLaunchProjectBuilder)c.newInstance();
+ if (builder.isSupportedProject(project)) return builder;
+ }
+ }
+ }
+ catch (Throwable x) {
+ Activator.log("Cannot access launch project builder extension points", x);
+ }
+ }
+ }
+ catch (Exception x) {
+ Activator.log("Cannot access launch project builder extension points", x);
+ }
+ return null;
+ }
+}

Back to the top