Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid product id #22

Closed
Hanksha opened this issue Nov 23, 2018 · 6 comments
Closed

Invalid product id #22

Hanksha opened this issue Nov 23, 2018 · 6 comments
Assignees

Comments

@Hanksha
Copy link

Hanksha commented Nov 23, 2018

Hi,

I tried to use lcdsl for our RCP application but I encountered an issue.

I this config launch.lc:

eclipse configuration Coder_Studio {
    product io.toro.coder.branding.io.toro.coder.product;
    
    feature io.toro.coder.feature;
    feature io.toro.coder.gloop.feature;
    feature io.toro.coder.flux.feature;
}

Once the corresponding launch configuration is generated I check it and the select product is invalid.
image

If I do it manually it would be:
image

The plugin.xml in io.toro.coder.branding looks like this:

<plugin>
    <extension
            id="io.toro.coder.product"
            point="org.eclipse.core.runtime.products">
        <product
                description="Coder Studio"
                application="org.eclipse.ui.ide.workbench"
                name="TORO Coder Studio">
        <!-- ... -->
        </product>
    </extension>
</plugin>

Am I doing something wrong or is it an issue on lcdsl side?

@Hanksha
Copy link
Author

Hanksha commented Nov 23, 2018

This is the launch config generated by lcdsl:

Coder_Studio.txt

@mduft
Copy link
Member

mduft commented Nov 23, 2018

This seems to be a bug in LcDsl indeed. I can reproduce it with /some/ products, but others work.

From what I can tell until now there seems to be some shortcut logic that IF the product name contains dots (?), the bundle name is not prefixed to the product name, otherwise it should be prefixed with the bundle name :|

You could verify this by renaming your product to just 'product' - it should then be correctly identified both by eclipse and LcDsl as io.toro.coder.branding.product If you can confirm this, I can create a fix.

@Hanksha
Copy link
Author

Hanksha commented Nov 23, 2018

Yes I confirm, if the product id is just product then the generated config with io.toro.coder.branding.product has no warning.

@mduft mduft self-assigned this Nov 23, 2018
@Hanksha
Copy link
Author

Hanksha commented Nov 23, 2018

By the way, not sure if it's related but, if I have an invalid .lc file like this:
image

And run it from the Launch Configurations view I get an NPE:

java.lang.NullPointerException
	at org.eclipse.debug.ui.launchview.launcher.StandaloneLaunchConfigExecutor$StandaloneLauncherJob.<init>(StandaloneLaunchConfigExecutor.java:192)
	at org.eclipse.debug.ui.launchview.launcher.StandaloneLaunchConfigExecutor.launchProcess(StandaloneLaunchConfigExecutor.java:53)
	at com.wamas.ide.launching.ui.launchview.LcDslLaunchObject.launch(LcDslLaunchObject.java:96)
	at org.eclipse.debug.ui.launchview.internal.view.LaunchAction.run(LaunchAction.java:78)
	at org.eclipse.debug.ui.launchview.internal.view.LaunchViewImpl.lambda$1(LaunchViewImpl.java:130)
	at org.eclipse.jface.viewers.StructuredViewer$1.run(StructuredViewer.java:831)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil.lambda$0(JFaceUtil.java:44)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:173)
	at org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick(StructuredViewer.java:828)
	at org.eclipse.jface.viewers.AbstractTreeViewer.handleDoubleSelect(AbstractTreeViewer.java:1459)
	at org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:1258)
	at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:249)
	at org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java:247)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:306)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4258)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1502)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1525)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1510)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1314)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4082)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3699)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1499)

@mduft mduft closed this as completed in 0019b28 Nov 23, 2018
@mduft
Copy link
Member

mduft commented Nov 23, 2018

An updated version is available from the update site (caches could take a few minutes). Could you please update and try it? Fixed version is 0.1.2.N201811231318

@Hanksha
Copy link
Author

Hanksha commented Nov 23, 2018

It's working now, the config is valid and I can launch it. But I noticed that I have no more content assist/auto completion for the product names.

Also, but it's really a minor thing, it didn't detect automatically that the product used for the launch config needed a feature containing the org.eclipse.ui.ide.workbench application as per my plugin.xml defining the product.

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

No branches or pull requests

2 participants