Bug 570024 - Wrong configuration in plugin.xml of org.eclipse.jdt.junit
Summary: Wrong configuration in plugin.xml of org.eclipse.jdt.junit
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.19   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-03 05:44 EST by Carsten Hammer CLA
Modified: 2023-02-04 19:46 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carsten Hammer CLA 2021-01-03 05:44:45 EST
I see the following section in this:

   <extension
         point="org.eclipse.ltk.core.refactoring.renameParticipants">
      <renameParticipant
            name="%RenameTypeParticipant.name"
            class="org.eclipse.jdt.internal.junit.refactoring.TypeRenameParticipant"
            id="org.eclipse.jdt.junit.renameTypeParticipant">
         <enablement>
           <with variable="affectedNatures">
             <iterate operator="or">
               <equals value="org.eclipse.jdt.core.javanature"/>
             </iterate>
           </with>
           <with variable="element">
             <instanceof value="org.eclipse.jdt.core.IType"/>
 	         <test property="org.eclipse.jdt.core.hasTypeOnClasspath" value="junit.framework.Test"/>
            </with>
         </enablement>
      </renameParticipant>
      <renameParticipant
            class="org.eclipse.jdt.internal.junit.refactoring.ProjectRenameParticipant"
            name="%junitRenameParticipant"
            id="org.eclipse.jdt.junit.renameProjectParticipant">
         <enablement>
           <with variable="affectedNatures">
             <iterate operator="or">
               <equals value="org.eclipse.jdt.core.javanature"/>
             </iterate>
           </with>
           <with variable="element">
   	         <instanceof value="org.eclipse.jdt.core.IJavaProject"/>
	         <test property="org.eclipse.jdt.core.hasTypeOnClasspath" value="junit.framework.Test"/>
           </with>
         </enablement>
      </renameParticipant>

Besides the error "Element 'enablement' is not legal as a child of element 'renameParticipant'." that might be caused by my broken eclipse space I see
two lines like this:

<test property="org.eclipse.jdt.core.hasTypeOnClasspath" value="junit.framework.Test"/>

In plain junit 5 projects there is no class junit.framework.Test in the classpath. As consequence this is not activated.
Comment 1 Noopur Gupta CLA 2021-01-05 03:33:31 EST
(In reply to Carsten Hammer from comment #0)
> 
> Besides the error "Element 'enablement' is not legal as a child of element
> 'renameParticipant'."

I don't see any error in my workspace.
 
> <test property="org.eclipse.jdt.core.hasTypeOnClasspath"
> value="junit.framework.Test"/>
> 
> In plain junit 5 projects there is no class junit.framework.Test in the
> classpath. As consequence this is not activated.

Is this for rename? Then, please open a separate bug with steps to reproduce and a patch so that the fix can be verified in the IDE.
Comment 2 Eclipse Genie CLA 2023-02-04 19:46:13 EST
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.

--
The automated Eclipse Genie.