eclipse-jdt / eclipse-jdt/.github

the use of a variable named newField in templates throws a strange exception

Open
#26 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
1
Forks
5
PR merge metrics
No merged PRs in 30d

Description

Hi,

I wrote this template:

`${result:newName(Class)} ${newField} = (${result}) Factory.CreateObject(${result}.class);`

I wasn't able to use it because I had this exception:
`class org.eclipse.jdt.internal.corext.template.java.JavaContext cannot be cast to class org.eclipse.jdt.internal.corext.template.java.JavaPostfixContext (org.eclipse.jdt.internal.corext.template.java.JavaContext and org.eclipse.jdt.internal.corext.template.java.JavaPostfixContext are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @4d097a89)`

I think it could be easier to use if the error explained the situation better.

Thank you

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.