| Pb to create a Content Ouline Page [message #303532] |
Wed, 17 May 2006 06:03  |
Eclipse User |
|
|
|
Originally posted by: bruno_maya.hotmail.com
Hello,
I am not able to create my own Content Oultline Page inside the
getAdapter() method of my editor.
I found this example in the Eclipse FAQs which do not work in my program :
public Object getAdapter(Class required) {
if (IContentOutlinePage.class.equals(required)) {
if (myOutlinePage == null) {
myOutlinePage = new CoolLanguageContentOutlinePage(
getDocumentProvider(), this);
myOutlinePage.setInput(getEditorInput());
}
return myOutlinePage;
}
return super.getAdapter(required);
}
If I replace this line :
if (IContentOutlinePage.class.equals(required)) {
by this one :
if
(required.getName().equals("org.eclipse.ui.views.contentoutline.IContentOutlinePage "))
{
the test become true, and it is possible to create a new
CoolLanguageContentOutlinePage.
But after return :
return myOutlinePage;
Eclipse do not instanciate my Outline because it consider that
myoutlinePage it is not an instance of IContentOutlinePage (from its
doCreatePage() calling method)
In fact there are two problems, may be there are dependent ? does anyone
have an idea ?
Regards, Bruno
|
|
|
|
|
| Re: Pb to create a Content Ouline Page [message #303636 is a reply to message #303629] |
Thu, 18 May 2006 07:10  |
Eclipse User |
|
|
|
Bruno Maya wrote:
> Thank you Paul,
>
> My outline is visible now, but I cannot tell you exactly why...
>
> Here what I done :
>
> - In the Java Build Path of my plugin, I withdrew the jar file
> (org.eclipse.ui.views) where was IContentOutlinePage.
> - In the Dependencies of the pluglin.xml I added this jar file, and all
> is ok now ! For information, there is only one jar file on the disk :
> org.eclipse.ui.views_3.1.1.jar
The Java Build Path is used for java applications ... but when you
create plugins, eclipse uses the Dependencies tab of the PDE editor.
When you create plugins adding something to the Java Build Path might be
enough to get it to compile, but it would never run.
Later,
PW
|
|
|
Powered by
FUDForum. Page generated in 1.27886 seconds