Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323556 - AssertionFailedException in CEditor.installOverrideIndicator
Summary: AssertionFailedException in CEditor.installOverrideIndicator
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-editor (show other bugs)
Version: 8.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 8.0   Edit
Assignee: Andrew Gvozdev CLA
QA Contact: Anton Leherbauer CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-25 00:22 EDT by Marc-André Laperle CLA
Modified: 2010-08-25 23:23 EDT (History)
1 user (show)

See Also:


Attachments
InstallOverrideIndicator patch (1.17 KB, patch)
2010-08-25 00:22 EDT, Marc-André Laperle CLA
angvoz.dev: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marc-André Laperle CLA 2010-08-25 00:22:39 EDT
Created attachment 177384 [details]
InstallOverrideIndicator patch

Using CDT 8.0 (201008240008 hudson #328) and EGit 0.9 (201008240008 hudson #459)

Steps to reproduce:
1. Create a git repository with a CDT file in it (header or source).
2. Commit some changes to the file
3. Open the history view, double click on a revision. The CEditor tries to open the revision but throws this exception:

org.eclipse.core.runtime.AssertionFailedException: assertion failed: 
	at org.eclipse.core.runtime.Assert.isTrue(Assert.java:110)
	at org.eclipse.core.runtime.Assert.isTrue(Assert.java:96)
	at org.eclipse.cdt.internal.ui.editor.ASTProvider.runOnAST(ASTProvider.java:332)
	at org.eclipse.cdt.internal.ui.editor.CEditor.installOverrideIndicator(CEditor.java:3515)
	at org.eclipse.cdt.internal.ui.editor.CEditor.createPartControl(CEditor.java:2445)
	at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670)
	at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
	at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2863)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2768)
	at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2760)
	at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2711)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2707)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2691)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2682)
	at org.eclipse.egit.ui.internal.EgitUiEditorUtils.openEditor(EgitUiEditorUtils.java:86)
	at org.eclipse.egit.ui.internal.EgitUiEditorUtils.openEditor(EgitUiEditorUtils.java:72)




What happens is that EGit tries to open the CEditor with a FileRevisionEditorInput which is not a ITranslation unit.
Comment 1 Andrew Gvozdev CLA 2010-08-25 10:49:39 EDT
I'll take this one
Comment 2 Andrew Gvozdev CLA 2010-08-25 22:45:19 EDT
I can also reproduce the issue with CVS repository.

Committed the fix to HEAD (8.0). That fixes the exception. However, when opening file from repository, the override indicator is not showing. Let me open another bug for that.
Comment 3 CDT Genie CLA 2010-08-25 23:23:03 EDT
*** cdt cvs genie on behalf of agvozdev ***
bug 323556: AssertionFailedException in CEditor.installOverrideIndicator
Patch from Marc-Andre Laperle

[*] CEditor.java 1.216 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditor.java?root=Tools_Project&r1=1.215&r2=1.216