Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to activate my custom presentation?(My presentation isn't activated, even though the org.eclipse.ui/presentationFactoryId is set in the preferences file)
How to activate my custom presentation? [message #490184] Wed, 07 October 2009 17:39 Go to next message
Marton Sigmond is currently offline Marton Sigmond
Messages: 71
Registered: July 2009
Location: Hungary
Member
Hi,

I created a custom presentation, that I want to use.

I could successfully do it via the deprecated api: IWorkbenchWindowConfigurer.setPresentationFactory()

However I could not do it via setting the org.eclipse.ui/presentationFactoryId.
This is what I did:
- created a file called preferences.ini in the plugin's root directory
- typed in the following: org.eclipse.ui/presentationFactoryId=my.presentation.factory
- modified the plugin.xml:
         <property
               name="preferenceCustomization"
               value="preferences.ini">
         </property>

The default presentation is loaded instead of mine.

Setup:
- My run configuration runs the product
- All required plugins are added to the run configuration
- Target Platform: subset of Ganymede (3.4)

Thanks for any help.

Regards,
Marton


Best Regards,
Marton Sigmond
Software Design Engineer
Re: How to activate my custom presentation? [message #490222 is a reply to message #490184] Wed, 07 October 2009 22:05 Go to previous messageGo to next message
Christian is currently offline Christian
Messages: 72
Registered: July 2009
Member
Marton Sigmond schrieb:
> Hi,
>
> I created a custom presentation, that I want to use.
>
> I could successfully do it via the deprecated api:
> IWorkbenchWindowConfigurer.setPresentationFactory()
>
> However I could not do it via setting the
> org.eclipse.ui/presentationFactoryId.
> This is what I did:
> - created a file called preferences.ini in the plugin's root directory
> - typed in the following:
> org.eclipse.ui/presentationFactoryId=my.presentation.factory
> - modified the plugin.xml:
> <property
> name="preferenceCustomization"
> value="preferences.ini">
> </property>
> The default presentation is loaded instead of mine.
>
> Setup:
> - My run configuration runs the product
> - All required plugins are added to the run configuration
> - Target Platform: subset of Ganymede (3.4)
>
> Thanks for any help.
>
> Regards,
> Marton
>

you could try to set the preferences by hand

i.e. before creating workbench:

PlatformUI.getPreferenceStore().setDefault(
IWorkbenchPreferenceConstants.PRESENTATION_FACTORY_ID,
"your.ID.To.be.loaded");


Christian
Re: How to activate my custom presentation? [message #490658 is a reply to message #490184] Fri, 09 October 2009 15:17 Go to previous messageGo to next message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

It does look correct.
org.eclipse.ui/presentationFactoryId=your.presentation.facto ry.id

And then
<property name="preferenceCustomization" value="preferences.ini"/>

Make sure that your build.properties includes the new preferences.ini file in its binary output

Is there anything in your <runtime-workspace>/.metadata/.log? Adding -consoleLog to an RCP app will print errors to the console.

PW


Re: How to activate my custom presentation? [message #490731 is a reply to message #490184] Fri, 09 October 2009 21:21 Go to previous message
Marton Sigmond is currently offline Marton Sigmond
Messages: 71
Registered: July 2009
Location: Hungary
Member
I tried to set the property from the code as Christian suggested, but no luck.

Than I had to update the application and the product from SVN, and the problem has gone.
Since no one else touches the presentation, it is still mysterious what the problem was.

Thank you for your answers, I will post again, if the problem reappears.

Best regards,
Marton


Best Regards,
Marton Sigmond
Software Design Engineer
Previous Topic:Problem whit load image
Next Topic:How can i close views?
Goto Forum:
  


Current Time: Tue Oct 21 20:10:58 GMT 2014

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

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