Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Properties View and TextEditor (or EditorPart)
Properties View and TextEditor (or EditorPart) [message #484616] Tue, 08 September 2009 14:10 Go to next message
epoch  is currently offline epoch Friend
Messages: 12
Registered: September 2009
Junior Member
Hello

I am having trouble linking an EditorPart to a PropertiesView. Maybe I have a fundamental misunderstanding but I hope that somebody can help me figure this out.

I have made it so that my EditorPart implements IAdaptable, ISelection and ISelectionProvider and I have set my EditorPart to be a selection provider using getSite().setSelectionProvider().

However, if I set my getAdapter() method to be:

public Object getAdapter(Class clazz) {
   System.out.println(clazz.getName());
   return super.getAdapter(clazz);
}


I can see that IPropertySource is never requested. I can also see that IPropertySheet is requested and I have tried to return a custom instance of IPropertySheet but this did not work either.

Could somebody suggest what is the best way make an EditorPart (the current editor) to contribute to Properties View?

Cheers!

[Updated on: Tue, 08 September 2009 14:10]

Report message to a moderator

Re: Properties View and TextEditor (or EditorPart) [message #484711 is a reply to message #484616] Tue, 08 September 2009 20:15 Go to previous messageGo to next message
Lars Vogel is currently offline Lars VogelFriend
Messages: 1098
Registered: July 2009
Senior Member

Hi,
an excellent example from Wayne Beaton for the usage of Adaptors can be
found here:

http://www.eclipse.org/articles/article.php?file=Article-Ada pters/index.html

Best regards, Lars

--
http://www.vogella.de/ - Eclipse plugin and Eclipse RCP Tutorials
http://www.twitter.com/vogella - vogella on Twitter

epoch wrote:
> Hello
> I am having trouble linking an EditorPart to a PropertiesView. Maybe I
> have a fundamental misunderstanding but I hope that somebody can help me
> figure this out.
>
> I have made it so that my EditorPart implements IAdaptable, ISelection
> and ISelectionProvider and I have set my EditorPart to be a selection
> provider using getSite().setSelectionProvider().
>
> However, if I set my getAdapter() method to be:
>
>
> public Object getAdapter(Class clazz) {
> System.out.println(clazz.getName());
> return super.getAdapter(clazz);
> }
>
>
> I can see that IPropertySource is never requested. I can also see that
> IPropertySheet is requested and I have tried to return a custom instance
> of IPropertySheet but this did not work either.
>
> Could somebody suggest what is the best way make an EditorPart (the
> current editor) to contribute to Properties View?
>
> Cheers!
>
Re: Properties View and TextEditor (or EditorPart) [message #486442 is a reply to message #484616] Thu, 17 September 2009 16:02 Go to previous message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
epoch wrote:
> Hello
> I am having trouble linking an EditorPart to a PropertiesView. Maybe I
> have a fundamental misunderstanding but I hope that somebody can help
> me figure this out.
>
> I have made it so that my EditorPart implements IAdaptable, ISelection
> and ISelectionProvider and I have set my EditorPart to be a selection
> provider using getSite().setSelectionProvider().
>
> However, if I set my getAdapter() method to be:
>
>
> public Object getAdapter(Class clazz) {
> System.out.println(clazz.getName());
> return super.getAdapter(clazz);
> }
>
>
> I can see that IPropertySource is never requested. I can also see that
> IPropertySheet is requested and I have tried to return a custom
> instance of IPropertySheet but this did not work either.
>
> Could somebody suggest what is the best way make an EditorPart (the
> current editor) to contribute to Properties View?
See: https://bugs.eclipse.org/bugs/show_bug.cgi?id=23862.

Dani
>
> Cheers!
>
Previous Topic:[jface.viewers] May CellLabelProvider.update be called by clients?
Next Topic:Subversive in RCP
Goto Forum:
  


Current Time: Mon Jan 20 19:17:11 GMT 2025

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

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

Back to the top