[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmf] Re: property with File Browser Dialog

Hi Ed,

Thank you for the link. I tryed to use some of the solutions but it didn't help me very much.
For example:


The editor has this:

propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));

so you can override the the content provider to create a derived
property source:

   protected IPropertySource createPropertySource(Object object,
   IItemPropertySource itemPropertySource)
   {
     return new PropertySource(object, itemPropertySource);
   }

and you can override the property source to create a derived property
descriptor:

   protected IPropertyDescriptor
   createPropertyDescriptor(IItemPropertyDescriptor
   itemPropertyDescriptor)
   {
     return new PropertyDescriptor(object, itemPropertyDescriptor);
   }

And there you can implement whatever logic you want to produce
alternative cell editors in whatever situations they would be appropriate.



I change the propertySheetPage.setPropertySourceProviderto use my own class (new CustomAdapterFactoryContentProvider(adapterFactory));

But it's not called from Diagram. I noticed that GMF uses %Model%PropertyProvider extends GenericEMFPropertiesProvider

and only the addImagePropertyDescriptor {itemPropertyDescriptors.add(..)} from ItemProvider


and I don't know how to chnage that method to achieve the desired result



Ed Merks wrote:

John,

Try searching the EMF newsgroup like this:

http://www.eclipse.org/search/search.cgi?q=custom+cell+editor+file+dialog&cmd=Search%21&form=extended&wf=574a74&ps=10&m=all&t=5&ul=%2Fnewslists%2Fnews.eclipse.tools.emf&wm=wrd&t=News&t=Mail
<http://www.eclipse.org/search/search.cgi?q=custom+cell+editor+file+dialog&cmd=Search%21&form=extended&wf=574a74&ps=10&m=all&t=5&ul=%2Fnewslists%2Fnews.eclipse.tools.emf&wm=wrd&t=News&t=Mail>


John Watson wrote:

Hi,

I need a property where to store filename. How can I make choose the file by file browser dialog?

Thanks in advance!

John