Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Plug-in fragment to overwrite a view
Plug-in fragment to overwrite a view [message #686501] Wed, 22 June 2011 11:26 Go to next message
Missing name Missing name is currently offline Missing name Missing nameFriend
Messages: 57
Registered: September 2009
Member
Hello,

I try to create a plug-in fragment that would overwrite an existing view, declared in the host plug-in.

Basically, I created a plug-in project (named HostProjet), using template Hello World example: "plug-in with a view" in the new project wizard dialog.

Then I created a fragment project, which HostProjet is the host plug-in.
In this fragment project, I declared the same view using extension org.eclipse.ui.views, and I used the same ID, the same category ... all is similar.
I copied SampleView.java from HostProject to my fragment project to change a graphical element to quickly see my change.

Then, when I launch my application, HostProject is running, the fragment is "Resolved", but I don't see my graphical change. My fragment does'nt seems to be used.

Do you know why ?
Is it possible ?

I tried this simple test, because it can be usefull to overwrite a dialog or a view behaviour placed in a existing plug-in.

Thanks in advance.

Valouee
Re: Plug-in fragment to overwrite a view [message #690381 is a reply to message #686501] Wed, 29 June 2011 12:56 Go to previous message
mousa.alsulaimi is currently offline mousa.alsulaimiFriend
Messages: 18
Registered: June 2011
Junior Member
I'm not sure , but i think fragments are platform specific and they are only executed when a certain criteria is not met by the host plugin , for example if the default locale of your enviroment is en_US and your host plugin has some properties files in it caled SomeThing.properties ,when a create a fragment with a properties file called SomeThing.properties . and you run your plugin you will notice that the file from the host plugin is selected .. however when you create a file in your fragment called SomeThing_fr_FR.properties and then you set your enviroment Locale to fr_FR you will notice that the file that is in your fragment will be selected .

another example is when you have some platform dependent library ( e.g windows xp.DLL and windows vista .DLL )
you can not put windows xp.DLL library in your host plugin and then you try to override them with windows vista.DLL library using a fragment and expect it to run on windows vista. the correct way of doing this is to put windows xp.DLL in a fragment plugin and put the windows vista.DLL in another fragment plugin and let your host plugin platform independent .

and one more thing . can never override an existing class in your host plug-in .


this leads my to conclude that no you can not override and existing view in your plugin simply because it is designed not to be overridden , thats why there are extension points if they are declared that means you can override the host plugin implementation .

but hey it is only my conclusion i could be wrong . if i am please share with us the solution when you get it .


Previous Topic:NOt able to launch the Help
Next Topic:Editor undo all changes when not saving
Goto Forum:
  


Current Time: Fri Apr 26 11:37:06 GMT 2024

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

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

Back to the top