Bug 65594 - Class resolving issues due to duplicate package names
Summary: Class resolving issues due to duplicate package names
Status: RESOLVED INVALID
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2004-06-03 14:34 EDT by Mark Melvin CLA
Modified: 2007-06-22 10:04 EDT (History)
0 users

See Also:


Attachments
Screenshot of locked up platform (255.07 KB, image/jpeg)
2004-06-03 14:49 EDT, Mark Melvin CLA
no flags Details
Error log showing NPE tracebacks (157.33 KB, text/plain)
2004-06-04 09:48 EDT, Mark Melvin CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Melvin CLA 2004-06-03 14:34:36 EDT
Well, I'm not sure if this is the best summary for this bug or not - but here is
what I am seeing...

I have a class that extends TextEditor, and thus includes the following import:

import org.eclipse.ui.editors.text.TextEditor;

So - I add the following dependencies to my plugin:

org.eclipse.ui
org.eclipse.ui.editors

However - my class will not compile and the error message is as follows:

The type org.eclipse.ui.texteditor.StatusTextEditor cannot be resolved. It is
indirectly referenced  from required .class files.

Digging into the Eclipse plugins reveals that StatusTextEditor is in a package
called org.eclipse.ui.texteditor, however this package is NOT the one included
in the plugin org.eclipse.ui.editors - it is in a package of the same name in
the plugin org.eclipse.ui.workbench.texteditor.  The PDE cannot seem to figure
out this dependecy automatically.  When I add the plugin
org.eclipse.ui.workbench.texteditor as a dependency of my plugin, the compile
error goes away.

HOWEVER - if I check for unused plugins in the PDE plugin.xml editor - it tells
me that org.eclipse.ui.workbench.texteditor is an unused dependency.  If I
remove it, the compile error is back.

I dunno if this is a compiler resolving issue, a PDE issue, or not an issue at
all - but it is kind of confusing to say the least.
Comment 1 Mark Melvin CLA 2004-06-03 14:42:34 EDT
Another issue I am sure related to this is:

I imported the 3 plugins into my workspace a source projects:

org.eclipse.ui
org.eclipse.ui.editors
org.eclipse.ui.workbench.texteditor

...while looking into this issue.  I had some editors open, then I tried to
delete these projects from my workspace and was met with the following string of
errors:

osgi> Exception creating editor: The classfile is not on the classpath
Unhandled event loop exception
Reason:
java.lang.NullPointerException
Unhandled event loop exception
Reason:
java.lang.NullPointerException
Unhandled event loop exception
Reason:
java.lang.NullPointerException
Unhandled event loop exception
Reason:
java.lang.NullPointerException
Unhandled event loop exception
Reason:
java.lang.NullPointerException
Unhandled event loop exception
Reason:
java.lang.NullPointerException
Unhandled event loop exception
Reason:
java.lang.NullPointerException
The command for the key you pressed failed
Reason:
The command for the key you pressed failed

...etc.

Now I cannot close my editor, and there are a ton of errors spewing (NPE's,
etc.).  I will attach an error log I managed to export - looks like I have to
forcibly shut down Eclipse....OK that didn't work.  More Null Pointer
Exceptions.  Looks like the 3-finger salute is in order... ;o)
Comment 2 Mark Melvin CLA 2004-06-03 14:49:20 EDT
Created attachment 11557 [details]
Screenshot of locked up platform

The error log export will not create a file - so here is a dump of my screen
before I kill Eclipse.
Comment 3 Kai-Uwe Maetzel CLA 2004-06-04 04:09:45 EDT
Different issues here. The dependencies haev changed for 3.0. See the 
migration guide for that. Please file a separate PR against PDE for the found 
issue. Regarding the NPE, please attach the log file. Otherwise, we can not do 
anything.
Comment 4 Mark Melvin CLA 2004-06-04 09:48:14 EDT
Created attachment 11592 [details]
Error log showing NPE tracebacks

Sorry.	Now that I have recovered my Eclipse install I can export the error
log.  See the ream of NPEs attached.  The final few entries at the bottom are
the classpath errors related to deleting the three mentioned projects from my
workspace.  I think this has to do with the platform being confused about which
plugins to use - the copies in the workspace or the actual installed plugins.
Comment 5 Dani Megert CLA 2004-06-04 10:06:05 EDT
The NPEs are all in UI land and not Java/Text editor.
Comment 6 Mark Melvin CLA 2004-06-04 10:17:37 EDT
Sorry for the noise.  I'll look into UI and see if this is already logged somewhere.
Comment 7 Dani Megert CLA 2004-07-23 10:41:19 EDT
.
Comment 8 Dani Megert CLA 2007-06-22 09:59:09 EDT
Get rid of deprecated state.
Comment 9 Dani Megert CLA 2007-06-22 10:04:28 EDT
.