| Summary: | Completion on Acceleo expressions is not available in VSM if an empty service class is registered | ||
|---|---|---|---|
| Product: | [Modeling] Sirius | Reporter: | Stéphane Thibaudeau <stephane.thibaudeau> |
| Component: | Core | Assignee: | Project inbox <sirius.core-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | esteban.dugueperoux, pierre-charles.david |
| Version: | 1.0.0M5 | Keywords: | triaged |
| Target Milestone: | 2.0.0 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | trivial | ||
| Bug Depends on: | |||
| Bug Blocks: | 439103, 453053 | ||
I reproduce the NPE : java.lang.NullPointerException at org.eclipse.sirius.common.acceleo.mtl.business.internal.interpreter.DynamicAcceleoModule.compileExtendedDependencies(DynamicAcceleoModule.java:752) at org.eclipse.sirius.common.acceleo.mtl.ide.AcceleoProposalProvider.getProposals(AcceleoProposalProvider.java:131) at org.eclipse.sirius.common.tools.api.interpreter.CompoundInterpreter.getProposals(CompoundInterpreter.java:785) at org.eclipse.sirius.ui.tools.api.assist.TextContentProposalProvider.getProposals(TextContentProposalProvider.java:88) at org.eclipse.jface.fieldassist.ContentProposalAdapter.getProposals(ContentProposalAdapter.java:2057) at org.eclipse.jface.fieldassist.ContentProposalAdapter.openProposalPopup(ContentProposalAdapter.java:1903) at org.eclipse.jface.fieldassist.ContentProposalAdapter.access$16(ContentProposalAdapter.java:1898) at org.eclipse.jface.fieldassist.ContentProposalAdapter$1.handleEvent(ContentProposalAdapter.java:1769) with the following scenario: 1. Create a Viewpoint Specification Project 2. Create a test.Service empty java class 3. In the opened odesign, create a Diagram Description and a Java Extension setting test.Service for this last 4. In the precondition of the Diagram Description test completion in [/] => the NPE is thrown The cause of this NPE comes from that CompilationResult has a null status. We can consider that a null status corresponds to a OK status. https://git.eclipse.org/r/25955 has been submitted to Gerrit, remains junit test. Fixed as a56c2016821dbf41b0ffd8a8831c88598a17d764 . Available in Sirius 2.0.0. Cloned as bug 453053 to backport to 1.0.2. |
Symptom : Autocompletion on Acceleo 3 expressions is not available anymore when editing an odesign file. The autocompletion on interpreters prefix ('[/]', 'var:' , 'feature:', ...) still works, it works too for the 'var:' interpreter (probably for the others too but I havent tested). Cause : In the odesign file, a java extension was pointing to an empty class (no service method in it). The code compiling an acceleo 3 template from this class throws a NullPointerException.