Bug 125291

Summary: Enable conditional loading of APT
Product: [Eclipse Project] JDT Reporter: Dani Megert <daniel_megert>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: VERIFIED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: eclipse, jgarms, martinae
Version: 3.2   
Target Milestone: 3.2 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Dani Megert CLA 2006-01-26 03:54:19 EST
I20060125-0800.

When developping 1.4 code in Eclipse running on a 5.0 SDK the two APT plug-ins get loaded (activated state). They should only be loaded when needed.

The JDT Core extension point should allow to express the required source level.
Comment 1 Jerome Lanneluc CLA 2006-01-26 07:30:47 EST
Note that the apt.ui plugin gets activated by JDT UI through ContributedProcessorDescriptor#getProcessor(ICompilationUnit).

So we need a more general solution than adding the required source level on the 'compilationParticipant' extension point.
Comment 2 Philipe Mulet CLA 2006-01-26 08:59:12 EST
It feels that the UI participant (quickfix) should be parameterized by some marker type; i.e. until APT markers are created, there is no need to compute quickfixes for APT problems.
Comment 3 Jerome Lanneluc CLA 2006-01-27 05:59:49 EST
I was too fast when I say a general solution was required (I was actually thinking of using the Bundle-RequiredExecutionEvironment, but this is at the runtime level.

So we'll fix the JDT Core part by adding a required source level on the 'compilationParticipant' extension point. I entered bug 125450 against JDT UI for its counterpart.
Comment 4 Jerome Lanneluc CLA 2006-01-27 06:24:14 EST
Added 'requiredSourceLevel' attribute in 'compilationParticipant.exsd'.
Changed JavaModelManager.CompilationParticipants to check this attribute and compare it to the project's source level.

Added regression test ReconcilerTests#testReconcileParticipant07()
Comment 5 Dani Megert CLA 2006-01-27 06:47:03 EST
Jess, do you need a bug against APT?
Comment 6 Jess Garms CLA 2006-01-27 12:03:52 EST
I'll make the fix to APT directly.
Comment 7 Frederic Fusier CLA 2006-02-14 09:14:53 EST
Verified for 3.2 M5 using build I20060214-0010.