Bug 35643 - [Contributions] org.eclipse.ui.internal.ObjectActionContributorManager works wrong
Summary: [Contributions] org.eclipse.ui.internal.ObjectActionContributorManager works ...
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0.1   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-25 09:57 EST by Denis Zvonov CLA
Modified: 2009-08-30 02:15 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Denis Zvonov CLA 2003-03-25 09:57:46 EST
Two problems


1. It returns incomplete list of classes. See my comment in the code.


/**


 * Returns the class search order starting with <code>extensibleClass</code>.


 * The search order is defined in this class' comment.


 */


private List computeCombinedOrder(Class inputClass) {


	List result = new ArrayList(4);


	Class clazz = inputClass;


	while (clazz != null) {


		// add the class


		result.add(clazz);


		// add all the interfaces it implements


		Class [] interfaces = clazz.getInterfaces();


		for (int i=0; i<interfaces.length; i++) {


/***********************************


>> Denis:


HERE WE NEED TO GET ALL SUPERINTERFACES FOR INTERFACES AND SUPERINTERFACES FOR 
THEM etc. AND PLACE THEM INTO result.


*************************************/


			result.add(interfaces[i]);


		}


		// get the superclass


		clazz = clazz.getSuperclass();


	}


	return result;


}




2. private Class getCommonClass(List objects) works wrong.




Suppose we have 3 objects. First and Second has common class IProjectNature, 
while all three First, Second and Third has IAdaptable in their inheritance 
chains.


First this method searches for common for First and Second. It finds 
IProjectNature. Then it starts looking for common in IProjectNature and Third 
and finds nothing! Actually it is expected to find IAdaptable as the base for 
this three objects.


Then, more complex cases when all objects has not one but several common classes 
in their inheritance chains. You see First and Second has both IProjectNature 
and IAdaptable in common, so Object Contributors for both interfaces should 
apply.
Comment 1 Simon Arsenault CLA 2003-03-26 14:26:00 EST
Is your plugin not working properly because of these methods? If so, could you 
provide an example. Or were you just looking at the code and thought these 2 
methods were implemented wrong?
Comment 2 Denis Zvonov CLA 2003-03-27 02:29:39 EST
Does it really matters? Yes, my plugins works wrong. I've got a view in which I 
show resources from workspace (like eclipse Navigator view). Actually objects in 
tree is some objects inherited from IProject or adaptable to it (adaptable to 
IResource). And with multiple selection (n>=3) of such objects in my view no 
contributors can be seen in menu (no "Team" submenu for example). 


Comment 3 Simon Arsenault CLA 2003-03-27 12:42:49 EST
Yes its matters - if it is breaking a plugin, then its a higher priority item 
for us to fix.

Can you try your plugin using the latest 2.1 integration build. We fixed a 
problem in 2.1 that looks exactly like what you are experiencing.

If it's still a problem, please attach a sample plugin and steps to reproduce 
the problem.
Comment 4 Denis Zvonov CLA 2003-03-28 02:03:59 EST
We are planning moving our product towards 2.1 in the nearest future, after 2.1 
final release. We can wait with this bug I think.
Comment 5 Simon Arsenault CLA 2003-03-28 10:50:13 EST
After you move your plugin to 2.1, please reopen if the problem is still 
reproducable.

Note, release 2.1 of Eclipse should be today (friday, march 28, 2003)
Comment 6 Denis Roy CLA 2009-08-30 02:15:12 EDT
As of now 'LATER' and 'REMIND' resolutions are no longer supported.
Please reopen this bug if it is still valid for you.