Bug 239715 - No property tester for TestCaseElement for property "projectNature"
Summary: No property tester for TestCaseElement for property "projectNature"
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 249756 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-07-06 10:07 EDT by Benjamin Muskalla CLA
Modified: 2009-04-24 09:09 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Muskalla CLA 2008-07-06 10:07:13 EDT
I20080613-2000

Not sure if this belongs to JDT/Debug or Platform/Debug.

I saw this error message several times today in my error log but I'm not yet sure how to reproduce it.

-- Error Details --
Date: Sun Jul 06 16:04:00 CEST 2008
Message: No property tester contributes a property org.eclipse.debug.ui.projectNature to type class org.eclipse.jdt.internal.junit.model.TestCaseElement
Severity: Error
Plugin: org.eclipse.core.expressions
Comment 1 Darin Wright CLA 2008-07-07 10:41:22 EDT
Moving to JUI for comment. The property tester in question (projectNature) is contributed by org.eclipse.debug.ui.
Comment 2 Dani Megert CLA 2008-07-07 10:54:21 EDT
Cannot reproduce this problem. If you can, please reopen with steps to reproduce.
Comment 3 Dani Megert CLA 2008-10-06 12:34:26 EDT
*** Bug 249756 has been marked as a duplicate of this bug. ***
Comment 4 Dani Megert CLA 2008-10-06 12:35:21 EDT
Markus, any idea?
Comment 5 Markus Keller CLA 2008-10-06 15:07:24 EDT
Benjamin and Olivier: Did this happen in a plain Eclipse SDK, or did you have other plug-ins installed (e.g. Mylyn or Jazz)? It looks like somebody contributed an adapter factory for TestCaseElement or one of its supertypes.

The only references to <test property="org.eclipse.debug.ui.projectNature" [..]> I could find in the SDK is in the o.e.pde.ui plug-in, but those look OK.

Unfortunately, there's no stacktrace, probably because the caller used the anti-pattern
    try { /*...*/ } catch (CoreException e) { XXXPlugin.log(e.getStatus()); }
to swallow the stack.

If somebody gets this from time to time, I could add some debug switches to write out more logging to stdout when this happens again.
Comment 6 Benjamin Muskalla CLA 2008-10-06 15:15:10 EDT
Markus, at least my installation is always the SDK+Mylyn so maybe they are the "bad guys" in this case.
Comment 7 Olivier Thomann CLA 2008-10-06 21:15:42 EDT
Markus,
(In reply to comment #5)
> Benjamin and Olivier: Did this happen in a plain Eclipse SDK, or did you have
> other plug-ins installed (e.g. Mylyn or Jazz)? It looks like somebody
> contributed an adapter factory for TestCaseElement or one of its supertypes.
I use jdt/ui bundles + jdt/core tools + eclemma.
 
> If somebody gets this from time to time, I could add some debug switches to
> write out more logging to stdout when this happens again.
Please do. If I get it again, I would definitely report more details.
Comment 8 Dani Megert CLA 2008-10-07 03:25:59 EDT
Benjamin and Olivier: you could start a fresh workspace and import all plug-ins. Then search the plugin.xml files for 
test property="org.eclipse.debug.ui.projectNature
which will probably reveal the problematic contribution.
Comment 9 Markus Keller CLA 2008-10-07 10:38:24 EDT
> > If somebody gets this from time to time, I could add some debug switches to
> > write out more logging to stdout when this happens again.
> Please do. If I get it again, I would definitely report more details.

I added a nested exception to the CoreException we throw in TypeExtensionManager.getProperty(..). That should reveal the location where the stacktrace of the original exception is lost. No debug switches required.
Comment 10 Oleg Besedin CLA 2009-04-23 16:08:52 EDT
(In reply to comment #9)
> I added a nested exception to the CoreException we throw in
> TypeExtensionManager.getProperty(..). That should reveal the location where the
> stacktrace of the original exception is lost. No debug switches required.

This change causes slight slowdown on the performance tests that measure editor activation, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=258253#c12. Is that change still necessary - seems like there was no activity on this bug in about 6 months?

Comment 11 Dani Megert CLA 2009-04-24 02:39:34 EDT
I added a debug option:
org.eclipse.core.expressions/debug/TypeExtensionManager=false

The debug code will now only be executed if this is set to "true".
Comment 12 Markus Keller CLA 2009-04-24 09:09:02 EDT
> This change causes slight slowdown on the performance tests that measure editor
> activation, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=258253#c12.

Contributions are buggy in the first place if they cause such exceptions. I filed bug 273583 for the one that happen in that scenario.