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

Bug 324622

Summary: ProjectHelper2 cannot be cast to org.eclipse.ant.internal.ui.editor.utils.ProjectHelper
Product: [Eclipse Project] Platform Reporter: Andrey Pavlenko <andrey.a.pavlenko>
Component: AntAssignee: Platform-Ant-Inbox <platform-ant-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: andrey.a.pavlenko
Version: 4.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard: stalebug
Attachments:
Description Flags
AntModel.patch none

Description Andrey Pavlenko CLA 2010-09-07 04:00:42 EDT
Build Identifier: 3.6.0

I'm trying to integrate Eclipse with Ant 1.8.1 but getting the following exception when editing build files with "<import>"-s:

java.lang.ClassCastException: org.apache.tools.ant.helper.ProjectHelper2 cannot be cast to org.eclipse.ant.internal.ui.editor.utils.ProjectHelper
at org.eclipse.ant.internal.ui.model.AntModel.parseDocument(AntModel.java:312)
at org.eclipse.ant.internal.ui.model.AntModel.reconcile(AntModel.java:267)
at org.eclipse.ant.internal.ui.editor.text.XMLReconcilingStrategy.internalReconcile(XMLReconcilingStrategy.java:43)
at org.eclipse.ant.internal.ui.editor.text.XMLReconcilingStrategy.reconcile(XMLReconcilingStrategy.java:56)
at org.eclipse.jface.text.reconciler.MonoReconciler.process(MonoReconciler.java:77)
at org.eclipse.ant.internal.ui.editor.text.NotifyingReconciler.process(NotifyingReconciler.java:39)
at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:206)

Reproducible: Always

Steps to Reproduce:
1. Install org.apache.ant_1.8.1.zip from https://bugs.eclipse.org/bugs/show_bug.cgi?id=302296
2. Try to edit build files with "<import>"-s
Comment 1 Andrey Pavlenko CLA 2010-09-07 04:06:54 EDT
Created attachment 178299 [details]
AntModel.patch

The attached patch avoids ClassCastException, but I'm not sure if it fixes the issue completely.
Comment 2 Lars Vogel CLA 2019-09-24 13:52:10 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.