Bug 491138 - [AQL] IllegalArgumentException on AQL completion
Summary: [AQL] IllegalArgumentException on AQL completion
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2016-04-06 05:25 EDT by EPP Error Reports CLA
Modified: 2018-06-20 07:49 EDT (History)
6 users (show)

See Also:


Attachments
Sample project to reproduce (1.63 KB, application/zip)
2016-04-06 05:30 EDT, Esteban DUGUEPEROUX CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description EPP Error Reports CLA 2016-04-06 05:25:29 EDT
The following incident was reported via the automated error reporting:


    code:                   0
    plugin:                 org.eclipse.ui_3.107.0.v20150507-1945
    message:                Unhandled event loop exception
    fingerprint:            4f924557
    exception class:        java.lang.IllegalArgumentException
    exception message:      offset must be in the range of the given expression.
    number of children:     0
    
    java.lang.IllegalArgumentException: offset must be in the range of the given expression.
    at org.eclipse.acceleo.query.runtime.impl.QueryCompletionEngine.getCompletion(QueryCompletionEngine.java:65)[REQUIRED, TOPMOST]
    at org.eclipse.sirius.common.acceleo.aql.ide.proposal.AQLProposalProvider.getProposals(AQLProposalProvider.java:106)[REQUIRED]
    at org.eclipse.sirius.common.acceleo.aql.ide.proposal.AQLProposalProvider.getProposals(AQLProposalProvider.java:80)
    at org.eclipse.sirius.common.tools.api.interpreter.CompoundInterpreter.getProposals(CompoundInterpreter.java:803)
    at org.eclipse.sirius.ui.tools.api.assist.TextContentProposalProvider.getProposals(TextContentProposalProvider.java:88)
    at org.eclipse.jface.fieldassist.ContentProposalAdapter.getProposals(ContentProposalAdapter.java:2038)
    at org.eclipse.jface.fieldassist.ContentProposalAdapter.openProposalPopup(ContentProposalAdapter.java:1882)
    at org.eclipse.jface.fieldassist.ContentProposalAdapter.access$16(ContentProposalAdapter.java:1877)
    at org.eclipse.jface.fieldassist.ContentProposalAdapter$1.handleEvent(ContentProposalAdapter.java:1748)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4230)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1491)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1514)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1499)
    at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1528)
    at org.eclipse.swt.widgets.Text.sendKeyEvent(Text.java:1662)
    at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1524)
    at org.eclipse.swt.widgets.Text.sendKeyEvent(Text.java:1627)
    at org.eclipse.swt.widgets.Control.doCommandBySelector(Control.java:1060)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:5784)
    at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(OS.java:-2)
    at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:227)
    at org.eclipse.swt.widgets.Widget.superKeyDown(Widget.java:1932)
    at org.eclipse.swt.widgets.Widget.keyDown(Widget.java:1105)
    at org.eclipse.swt.widgets.Control.keyDown(Control.java:2406)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:5694)
    at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(OS.java:-2)
    at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:227)
    at org.eclipse.swt.widgets.Widget.windowSendEvent(Widget.java:2130)
    at org.eclipse.swt.widgets.Shell.windowSendEvent(Shell.java:2337)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:5756)
    at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(OS.java:-2)
    at org.eclipse.swt.widgets.Display.applicationSendEvent(Display.java:5193)
    at org.eclipse.swt.widgets.Display.applicationProc(Display.java:5342)
    at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(OS.java:-2)
    at org.eclipse.swt.internal.cocoa.NSApplication.sendEvent(NSApplication.java:128)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3695)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)
    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:380)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-2)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
   
  

General Information:

    reported-by:      Axel Olsson
    anonymous-id:     73e86f85-9318-4595-a941-3ce00d7d9eb4
    eclipse-build-id: 4.5.0.I20150603-2000
    eclipse-product:  org.eclipse.epp.package.modeling.product
    operating system: MacOSX 10.10.4 (x86_64) - cocoa
    jre-version:      1.8.0_45-b14

The following plug-ins were present on the execution stack (*):
    1. org.eclipse.acceleo.query_3.6.0.201506080954
    2. org.eclipse.core.databinding.observable_1.5.0.v20150422-0725
    3. org.eclipse.core.databinding_1.5.0.v20150422-0725
    4. org.eclipse.core.runtime_3.11.0.v20150405-1723
    5. org.eclipse.e4.ui.workbench_1.3.0.v20150531-1948
    6. org.eclipse.e4.ui.workbench.swt_0.13.0.v20150504-0621
    7. org.eclipse.equinox.app_1.3.300.v20150423-1356
    8. org.eclipse.equinox.launcher_1.3.100.v20150511-1540
    9. org.eclipse.jface_3.11.0.v20150602-1400
    10. org.eclipse.sirius.common.acceleo.aql.ide_3.0.0.201506090807
    11. org.eclipse.sirius.common.acceleo.aql_3.0.0.201506090807
    12. org.eclipse.sirius.common_3.0.0.201506090807
    13. org.eclipse.sirius_3.0.0.201506090807
    14. org.eclipse.sirius.ui_3.0.0.201506090807
    15. org.eclipse.swt_3.104.0.v20150528-0211
    16. org.eclipse.ui_3.107.0.v20150507-1945
    17. org.eclipse.ui.ide.application_1.1.0.v20150422-0725
    18. org.eclipse.ui.ide_3.11.0.v20150510-1749

Please note that:
* Messages, stacktraces, and nested status objects may be shortened.
* Bug fields like status, resolution, and whiteboard are sent
  back to reporters.
* The list of present bundles and their respective versions was
  calculated by package naming heuristics. This may or may not reflect reality.

Other Resources:
* Report: https://dev.eclipse.org/recommenders/committers/confess/#/problems/55bf3a6de4b075a54cfda08f  
* Manual: https://dev.eclipse.org/recommenders/community/confess/#/guide


Thank you for your assistance.
Your friendly error-reports-inbox.

This bug was created on behalf of esteban.dugueperoux@xxxxxxxxxxxx.
Comment 1 Esteban DUGUEPEROUX CLA 2016-04-06 05:30:36 EDT
Created attachment 260746 [details]
Sample project to reproduce

Scenario to reproduce:

1. Import the attached project
2. Open the odesign
3. Expand the second layer of first DiagramDescription to set selection on Property Customization on labelFormat property
4. Through properties view, I have tried to replace "[OrderedSet{viewpoint::FontFormat::bold, viewpoint::FontFormat::italic}/]" A3 expression by an AQL one. To do that, I leave the expression, prefix with "aql:" and use completion => KO, I get the following exception :

java.lang.IllegalArgumentException: offset must be in the range of the given expression.
	at org.eclipse.acceleo.query.runtime.impl.QueryCompletionEngine.getCompletion(QueryCompletionEngine.java:70)
	at org.eclipse.sirius.common.acceleo.aql.ide.proposal.AQLProposalProvider.getProposals(AQLProposalProvider.java:104)
	at org.eclipse.sirius.common.acceleo.aql.ide.proposal.AQLProposalProvider.getProposals(AQLProposalProvider.java:76)
	at org.eclipse.sirius.common.tools.api.interpreter.CompoundInterpreter.getProposals(CompoundInterpreter.java:836)
	at org.eclipse.sirius.ui.tools.api.assist.TextContentProposalProvider.getProposals(TextContentProposalProvider.java:85)
	at org.eclipse.jface.fieldassist.ContentProposalAdapter.getProposals(ContentProposalAdapter.java:2038)
	at org.eclipse.jface.fieldassist.ContentProposalAdapter.openProposalPopup(ContentProposalAdapter.java:1882)
	at org.eclipse.jface.fieldassist.ContentProposalAdapter.access$16(ContentProposalAdapter.java:1877)
	at org.eclipse.jface.fieldassist.ContentProposalAdapter$1.handleEvent(ContentProposalAdapter.java:1748)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4481)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1329)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1353)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1338)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1365)
	at org.eclipse.swt.widgets.Widget.gtk_key_press_event(Widget.java:763)
	at org.eclipse.swt.widgets.Control.gtk_key_press_event(Control.java:3325)
	at org.eclipse.swt.widgets.Text.gtk_key_press_event(Text.java:1814)
	at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1980)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:5685)
	at org.eclipse.swt.widgets.Text.windowProc(Text.java:2789)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4717)
	at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
	at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:9326)
	at org.eclipse.swt.widgets.Display.eventProc(Display.java:1225)
	at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
	at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:2435)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3428)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:694)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:606)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)
	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:380)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
	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:669)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1488)
Comment 2 Esteban DUGUEPEROUX CLA 2016-04-06 05:31:12 EDT
I got that exception on Sirius master, i.e. next Sirius 4.0
Comment 3 Eclipse Genie CLA 2016-04-06 05:47:02 EDT
New Gerrit change created: https://git.eclipse.org/r/70000
Comment 4 Laurent Goubet CLA 2016-04-06 05:50:39 EDT
A simple reproduction case is to try and trigger the completion just after the ":" in the following :

aql:[


The ExpressionTrimmer sees both "aql:" and "[" as prefixes.
Comment 5 Laurent Redor CLA 2016-05-30 09:27:10 EDT
Thanks Laurent for this simple reproduction use case.