Clarification about location of a class in eclipse packages
If that question was asked before, please disregard it. I was investigating the HippieProposalComputer
class found in org.eclipse.jdt.internal.ui.text.java
package to help me write my own plugin. So I looked at the list of dependencies and one of them is org.eclipse.ui.texteditor.HippieProposalProcessor
so when I looked up org/eclipse/ui/texteditor
I was not able to find the HippieProposalProcessor
class. I perform a grep -r HippieProposalProcessor plugins
and the class was in the package org.eclipse.ui.workbench.texteditor
So my question are the packages org.eclipse.ui.workbench
and org.eclipse.ui
the same since eclipse never throw 开发者_如何学Pythonan error when Hippie is used at content-assistor?
You mistakenly assume that package names and plugin names are tight together. They are not.
In your case, the org.eclipse.ui.texteditor.HippieProposalProcessor
is located in the correct package, but in org.eclipse.ui.workbench.texteditor
plugin.
Most probably, this is a result of a refactoring and splitting the org.eclipse.ui
plugin into multiple smaller plugins, which resulted in a package, which doesn't have its plugin name as prefix.
That doesn't matter. If you look at the source, there is an import for org.eclipse.ui.texteditor.HippieProposalProcessor
in HippieProposalComputer
which makes the class visible in the code.
精彩评论