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

Bug 312292

Summary: Compile error in AbstractPane
Product: [Tools] CDT Reporter: James Blackburn <jamesblackburn+eclipse>
Component: cdt-memoryAssignee: James Blackburn <jamesblackburn+eclipse>
Status: RESOLVED FIXED QA Contact: Ted Williams <ted>
Severity: normal    
Priority: P3 CC: john.cortell
Version: 7.0   
Target Milestone: 7.0   
Hardware: PC   
OS: All   
Whiteboard:

Description James Blackburn CLA 2010-05-10 12:17:15 EDT
I'm getting this on HEAD:

Description	Resource	Path	Location	Type
The method AbstractPane.updateCaret() does not override the inherited method from Canvas since it is private to a different package	AbstractPane.java	/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional	line 496	Java Problem
Comment 1 John Cortell CLA 2010-05-10 12:27:44 EDT
I'm not getting this. The only change recently that could explain this suddenly showing up for you is that the project treats warnings as errors. Now, the error doesn't make much sense as I see no updateCaret() anywhere up the type hierarchy chain.
Comment 2 James Blackburn CLA 2010-05-10 12:31:51 EDT
(In reply to comment #1)
> I'm not getting this. The only change recently that could explain this suddenly
> showing up for you is that the project treats warnings as errors. Now, the
> error doesn't make much sense as I see no updateCaret() anywhere up the type
> hierarchy chain.

If you clean the project does it not appear? 
Canvas#updateCaret() exists.

I think you're right about the cause org.eclipse.jdt.core.prefs allows the project to build for me.
Comment 3 James Blackburn CLA 2010-05-10 12:33:05 EDT
(In reply to comment #2)
 *deleting* org.eclipse.jdt.core.prefs allows the project to build for me.
Comment 4 John Cortell CLA 2010-05-10 12:35:50 EDT
(In reply to comment #2)
> (In reply to comment #1)
> > I'm not getting this. The only change recently that could explain this suddenly
> > showing up for you is that the project treats warnings as errors. Now, the
> > error doesn't make much sense as I see no updateCaret() anywhere up the type
> > hierarchy chain.
> 
> If you clean the project does it not appear? 
> Canvas#updateCaret() exists.

Um. I've opened org.eclipse.swt.widgets.Canvas.class. There is no updateCaret(). I'm using Eclipse 3.6M7. I assume you are, too.
Comment 5 James Blackburn CLA 2010-05-10 12:37:37 EDT
Hmm... Perhaps it's peculiar to my platform:

/projects/firepath/tools/releases/eclipse/3.6m7sdk/plugins/org.eclipse.swt.gtk.linux.x86_64_3.6.0.v3644b.jar

has:

void updateCaret () {
	long /*int*/ imHandle = imHandle ();
	if (imHandle == 0) return;
	GdkRectangle rect = new GdkRectangle ();
	rect.x = caret.x;
	rect.y = caret.y;
	rect.width = caret.width;
	rect.height = caret.height;
	OS.gtk_im_context_set_cursor_location (imHandle, rect);
}
Comment 6 John Cortell CLA 2010-05-10 12:46:30 EDT
(In reply to comment #5)
> Hmm... Perhaps it's peculiar to my platform:

Yes. It appears, linux uses a customized version of that class. OK, well, having removed the prefs file, you should now be getting a warning on that method. Can you do a quick-fix to quiet the warning and commit that? That will fix the error when you get the prefs file back. Note that quieting the warning is OK since it's apparent that the updateCaret() in the memory browser has nothing to do with the one in SWT's Canvas. Ideally, we'd rename the method, but it's API so that's a no-go.
Comment 7 James Blackburn CLA 2010-05-10 12:55:21 EDT
The quick fix on this warning didn't do anything, and google didn't turn up anything, so I added:
@SuppressWarnings("all")
which is less than ideal...

Thanks John.
Comment 8 John Cortell CLA 2010-05-10 13:00:07 EDT
(In reply to comment #7)
> The quick fix on this warning didn't do anything, and google didn't turn up
> anything, so I added:
> @SuppressWarnings("all")
> which is less than ideal...
> 
> Thanks John.

Yes. Far from ideal :-( I'll open a bug against JDT to see if they'll add something to support this.
Comment 9 CDT Genie CLA 2010-07-28 15:26:25 EDT
*** cdt cvs genie on behalf of jblackburn ***
Bug 312292 suppress &quot;method AbstractPane.updateCaret() does not override the inherited method&quot; on Linux

[*] AbstractPane.java 1.3 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/memory/org.eclipse.cdt.debug.ui.memory.traditional/src/org/eclipse/cdt/debug/ui/memory/traditional/AbstractPane.java?root=Tools_Project&r1=1.2&r2=1.3