Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Pb to create a Content Ouline Page
Pb to create a Content Ouline Page [message #303532] Wed, 17 May 2006 06:03 Go to next message
Eclipse UserFriend
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 #303552 is a reply to message #303532] Wed, 17 May 2006 07:46 Go to previous messageGo to next message
Eclipse UserFriend
Your plugin seems to be loading the IContentOutlinePage from the wrong
place.


You should have a plugin dependency in the pde editor of
org.eclipse.ui.views.

Later,
PW
Re: Pb to create a Content Ouline Page [message #303629 is a reply to message #303552] Thu, 18 May 2006 05:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bruno_maya.hotmail.com

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

Kind Regards,
Bruno
Re: Pb to create a Content Ouline Page [message #303636 is a reply to message #303629] Thu, 18 May 2006 07:10 Go to previous message
Eclipse UserFriend
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
Previous Topic:Setting Accelerator using setText() on 3.2 doesn't seem to work
Next Topic:Printing stuff into the Console View
Goto Forum:
  


Current Time: Fri Nov 07 15:03:47 EST 2025

Powered by FUDForum. Page generated in 1.27886 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top