Skip to content

Show run and debug Jbang codelenses only when there is a main class or a main directive specified #138

Description

@apupier

it would be convenient to reduce the scope of when to display the run adn debug jbang to reduce potential failure at runtime when the file is not a JBang one.

It will avoid to detect Camel files as Jbang ones for instance (which are using the //DEPS notation similar to JBang):

//DEPS org.apache.commons:commons-math3:3.6.1

import org.apache.camel.builder.RouteBuilder;
import org.apache.commons.math3.util.ArithmeticUtils;

public class MyRouteBuilderWithAdditionalDependencies extends RouteBuilder{
	public void configure() {
		from("timer:timerName")
			.log("Hello with addition of 2 + 3 ="+ ArithmeticUtils.addAndCheck(2, 3));
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions