[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.ve] visualize a dynamic composite at design time.

Hello,
I am having this scenario, and not sure how to solve it.

My Project is a plugin project that contains a viewer, a Composite, a simple text file, and a PluginResourceLoader. The content of the viewer is the composite. When you package this plugin and install into your eclipse environment, and open up this view. The view will instantiate the composite. The composite uses PluginResourceLoader to find and load the text file. the text file describes the content of the composite. So basically this composite's content is dynamically loaded based on the content of the text file. The PluginResourceLoader finds and returns the location of this file by first finding the install directory of this plugin, and then append the relative path of this file. At runtime, it works fine.

The problem I am having is at design time. I have this plugin project in my workspace, and uses VE to edit the composite. The VE displays an empty composite. This makes sense b/c this plugin is not installed ( b/c I am in developing mode ).

I am trying to solve this problem by creating a custom edit part for this composite. It does not use the PluginResourceLoader to load up the text file, but instead finding the IProject and uses the IProject to load the file, then use GEF figures to create the visual components. This seems to work but this method requires me to create custom GEF figures for each of my swt controls. I wonder if there is a method that returns a GEF figure given a composite. Hope this makes sense. Thanks.