Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 352452

Summary: NPE from "Content Assist"
Product: [Modeling] Acceleo Reporter: Marc Mising name <marc.poulhies>
Component: CoreAssignee: Project Inbox <acceleo-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: critical    
Priority: P3 CC: mackeysc, stephane.begaudeau
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Marc Mising name CLA 2011-07-19 09:07:39 EDT
Build Identifier: 20110615-0604

[The project has been created with eclipse 3.6 and then the workspace reused from eclipse 3.7]

When editing templates, I get some error popups «randomly» with the following unhelpful text:

'Acceleo' has encountered a problem.
An internal error occured during: "Acceleo"

When I click on "Details", I have:

An internal error occurred during: "Acceleo".
  java.lang.NullPointerException

An when I try to get more info in the Error Log, I have:
java.lang.NullPointerException
	at org.eclipse.acceleo.internal.parser.ast.ocl.environment.AcceleoTypeResolver.classifierEqual(AcceleoTypeResolver.java:228)
	at org.eclipse.acceleo.internal.parser.ast.ocl.environment.AcceleoTypeResolver.findShadowClass(AcceleoTypeResolver.java:205)
	at org.eclipse.acceleo.internal.parser.ast.ocl.environment.AcceleoTypeResolver.findShadowClass(AcceleoTypeResolver.java:1)
	at org.eclipse.ocl.AbstractTypeResolver.getShadowClass(AbstractTypeResolver.java:950)
	at org.eclipse.ocl.AbstractTypeResolver.resolveAdditionalOperation(AbstractTypeResolver.java:737)
	at org.eclipse.ocl.AbstractEnvironment.addOperation(AbstractEnvironment.java:478)
	at org.eclipse.ocl.AbstractEnvironment.addHelperOperation(AbstractEnvironment.java:456)
	at org.eclipse.ocl.ecore.EcoreEnvironment.defineOperation(EcoreEnvironment.java:582)
	at org.eclipse.acceleo.internal.parser.ast.ocl.OCLParser.addTemplateToScope(OCLParser.java:497)
	at org.eclipse.acceleo.internal.parser.ast.ocl.OCLParser.addBehavioralFeaturesToScope(OCLParser.java:443)
	at org.eclipse.acceleo.internal.parser.ast.ocl.OCLParser.addRecursivelyBehavioralFeaturesToScope(OCLParser.java:347)
	at org.eclipse.acceleo.internal.parser.ast.ocl.OCLParser.addRecursivelyBehavioralFeaturesToScope(OCLParser.java:323)
	at org.eclipse.acceleo.internal.parser.ast.CST2ASTConverterWithResolver.transformStepResolve(CST2ASTConverterWithResolver.java:185)
	at org.eclipse.acceleo.internal.parser.ast.CST2ASTConverterWithResolver.resolveAST(CST2ASTConverterWithResolver.java:125)
	at org.eclipse.acceleo.internal.parser.ast.CST2ASTConverterWithResolver.resolveAST(CST2ASTConverterWithResolver.java:104)
	at org.eclipse.acceleo.parser.AcceleoSourceBuffer.resolveAST(AcceleoSourceBuffer.java:336)
	at org.eclipse.acceleo.internal.ide.ui.editors.template.AcceleoSourceContent$AcceleoSourceBufferWithASTJob.runCreateAST(AcceleoSourceContent.java:291)
	at org.eclipse.acceleo.internal.ide.ui.editors.template.AcceleoSourceContent$AcceleoSourceBufferWithASTJob$1.run(AcceleoSourceContent.java:249)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Sometimes, this happens when simply typing text (see above) but also when invoking the autocompletion. In this case, the error log shows no stack trace with the message "Content Assist" did not complete normally.  Please see the log for more information."

This renders the use of the IDE nearly useless.


Reproducible: Always

Steps to Reproduce:
1. open existing template
2. make some changes in the template
Comment 1 Stephane Begaudeau CLA 2011-07-21 11:11:40 EDT
A new fix has been contributed post-indigo and will be available in Acceleo 3.1.1

*** This bug has been marked as a duplicate of bug 346243 ***