ssi-schaefer / lcdsl

Eclipse Launch Configuration DSL (Xtext based)
Eclipse Public License 1.0
23 stars 12 forks source link

Eclipse "hangs" when using ${project_loc} in "content-provider" #24

Closed buchen closed 5 years ago

buchen commented 5 years ago

Hi,

due to a discussion in buchen/portfolio#1156, I am checking out a generic way to create reliable launch configurations. I really like the approach of this project.

My Product file does not reside in the workspace (as the git projects are checked out somewhere else. I would hope to use project_loc, however, my Eclipse Installation (2019-03) --> on macOS I get a spinning wheel mouse pointer and have to abort Eclipse.

Is project_loc supported?

eclipse configuration PP {
    workspace "${workspace_loc}/../runtime-MyWorkspace";
    product name.abuchen.portfolio.bootstrap.product;

    content-provider "${project_loc}/../portfolio-product/name.abuchen.portfolio.product";

    ignore javax.servlet;
    ignore name.abuchen.portfolio.tests;
    ignore name.abuchen.portfolio.ui.tests;
    ignore org.jsr-305;

    argument "-consoleLog";
    argument "-Dorg.eclipse.e4.core.di.debug=true";
}

BTW, the resolution includes more plugins than defined in the product file - for example all test plugins. Is there a way to reduce it to the features/plugins defined in the product file only?

buchen commented 5 years ago

If I specify the project, then it works:

content-provider "${project_loc:portfolio-product}/name.abuchen.portfolio.product";

Looks to me like the resolution is not done in the context of the project in which the launch configuration resides.

mduft commented 5 years ago

Hi,

Variables are the same as can be used with "normal" launch configurations, i.e. project_loc's documentation from the launch configuration dialog: "Returns the absolute file system path of a resource's project. The target resource is the selected resource when no argument is specified, or the resource identified by a workspace relative path.". Thus if no argument given, the current selection in the workspace is used (which is probably not what you want :)).

Right now there is no other way to get to the containing project's location. There is support for "project self" with the "project" keyword toplevel, but that is for something else... Right now, strings (which may contain substitutions) are not processed by LcDsl at all, they are just copied to Eclipse. It would need a dedicated syntax for LcDsl specific variables as opposed to string substitutions...

buchen commented 5 years ago

Thanks. The syntax project_loc:portfolio-product works for me.