Skip to content

With eclispe groovy plugin 3.x we can't compile our project anymore #737

@wagnerma

Description

@wagnerma

We try to switch our project to the Eclipse-Groovy 3.x plugin. But the project now has errors ;-(. There seems some strange problems perhaps in the area CompileStatic in combination with Java, no clue. The code is correct, it runs and compile fine with the old Eclipse-Groovy plugin.

The groovy code is CompileStatic and uses a java class of the type:

public class OpCaldocitemtypeType extends OptionObject {
    private static final long serialVersionUID = -1462780516731381671L;

	// STL-Position/Komponente
	public static final Integer BOM_ITEM = 10;
	// Arbeitsgang
	public static final Integer ROU_OPR = 20;
	// Variable
	public static final Integer VAR_ENTRY = 30;
	// Referenz auf anderes Schema
	public static final Integer CAL_DOCREF = 40;
	// Extrakosten
	public static final Integer EXTRA_COST = 50;
	// Zuschlag
	public static final Integer ITEM_OVH = 60;
	// Erlösminderung
	public static final Integer PROC_RED = 70;
    
    public static final Integer _defaultValue = 10;
    
    public static Map<String,Integer> getValues() {
        return getValues(OpCaldocitemtypeType.class);
    } 
}

Referencing such a class in groovy with:

OpCaldocitemtypeType.BOM_ITEM

creates an error: Groovy:[Static type checking] - The variable [OpCaldocitemtypeType] is undeclared.

But thats wrong, the include is available, the quick fix to import the class is not functioning.

I only see in the error log:

CodeSelectRequestor: Could not proceed due to null declaring type for org.codehaus.groovy.ast.expr.PropertyExpression@13673e2[object: org.codehaus.groovy.ast.expr.ClassExpression@78f7777[type: de.effectivecompany.app.app.OpCaldocitemtypeType] property: ConstantExpression[BOM_ITEM]]

Regards, Marcel

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions