Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 26, 2025

The Behave backend was missing project selection UI and auto-fill behavior that the Java backend already had, requiring manual entry of all paths.

Changes

  • Added project selection field with Browse button to CucumberBehaveMainTab, matching Java backend UI
  • Auto-fill on creation - when creating launch config from open feature file, auto-populates project name, feature path, and working directory from active editor context
  • Created CucumberBehaveLaunchUtils - mirrors Java backend's CucumberFeatureLaunchUtils for getting active project and feature path
  • Updated CucumberBehaveLauncher to set project name when creating configs programmatically
  • Added org.eclipse.jdt.debug.ui dependency for JDIDebugUIPlugin and LauncherMessages

Implementation

Project selection dialog:

ElementListSelectionDialog dialog = new ElementListSelectionDialog(
    getShell(), WorkbenchLabelProvider.getDecoratingWorkbenchLabelProvider());
dialog.setElements(ResourcesPlugin.getWorkspace().getRoot().getProjects());

Auto-fill in setDefaults():

IProject project = CucumberBehaveLaunchUtils.getProject();
String featurePath = CucumberBehaveLaunchUtils.getFeaturePath();

if (project != null && featurePath != null) {
    config.setAttribute(ATTR_PROJECT, project.getName());
    config.setAttribute(ATTR_FEATURE_PATH, featurePath);
    config.setAttribute(ATTR_WORKING_DIRECTORY, project.getLocation().toOSString());
}

Backward compatible - existing configs without project attribute load with empty project field.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • http://download.eclipse.org:80/releases/2025-09/content.jar
    • Triggering command: REDACTED, pid is -1 (http block)
  • http://download.eclipse.org:80/releases/2025-09/p2.index
    • Triggering command: REDACTED, pid is -1 (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Creating new behave run config should include the project and reuse suggest a feature file folder</issue_title>
<issue_description>The behave backend is currently missing the eclipse-project selection (like the java backend has), also the java backend fill out the feature path automatically based on the current selected project when creating a new launch config in the wizard.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@laeubi laeubi marked this pull request as ready for review October 26, 2025 13:18
Copilot AI changed the title [WIP] Add project selection and feature path for behave run config Add project selection and auto-fill to Behave launch configuration Oct 26, 2025
Copilot AI requested a review from laeubi October 26, 2025 13:24
Copilot finished work on behalf of laeubi October 26, 2025 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Creating new behave run config should include the project and reuse suggest a feature file folder

2 participants