Home » Eclipse Projects » Rich Client Platform (RCP) » Preview for Composite Objects
| | |
Re: Preview for Composite Objects [message #524758 is a reply to message #524754] |
Fri, 02 April 2010 05:50 |
Ralf Ebert Messages: 168 Registered: July 2009 |
Senior Member |
|
|
Hi André,
> yes you are right, the ...internal/core/SystemBundle is missing in
> Eclipse 3.6.
don't use internals :) 1.0.1 now works great in 3.6.
> The license idea is interesting, I agree and changed the license to the
> EPL.
Great! I already checked out the code and will help you with this wherever I can. The SWT
preview works great, it even resolves i18n Messages correctly. I always had a similar idea
dozing in the attic, but I never had the guts to actually code it :)
I paused my SWT/XML project somewhat because of the declarative UI work in e4:
http://wiki.eclipse.org/E4/XWT
http://wiki.eclipse.org/E4/UI/Toolkit_Model/org.eclipse.e4.t m.ui
But I also started to like the plain old java code approach when it comes to SWT UIs, so
your SWT Preview really hits a nerve for me :)
At first, I have a contribution to SWT/XML lying around that adds a very nice locale
switcher to the preview so you can preview other languages. I never had the time to
integrate this with the current code, I'll try to make it work with your SWT Preview plug-in.
Also, it would be cool if one could preview other kinds of UI base classes (like Dialogs,
Views, Editors).
For SWT/XML, I planned to add the Preview tab as a 2nd editor tab and have a special
editor, similar to Wicket Bench, maybe that would make a nice fit here as well:
http://www.laughingpanda.org/~inhuman/wicket-bench/docs/wick et_editor.jpg
Greetings,
Ralf
--
http://www.ralfebert.de/blog/
http://twitter.com/ralfebert/
|
|
| |
Re: Preview for Composite Objects [message #524783 is a reply to message #524765] |
Fri, 02 April 2010 13:20 |
Ralf Ebert Messages: 168 Registered: July 2009 |
Senior Member |
|
|
Hi,
> In an previous version of this plugin I tried something you describe as
> 2nd Editor Tab. The benefit of the preview as view is that you can move
> the view to the second monitor.
good point. I was thinking about the tab merely as measure to get to the preview
conveniently. The global toolbar button is a bit too obtrusive for my taste. Maybe there
could be a context menu command "SWT Preview" only for Composite classes.
> Currently I think its not an good pattern to code your gui in the
> createDialogArea or createPartControl methods. Create own composites for
> the gui and just create instances of them in this method.
hmm, also a good point, but I was thinking about existing code here. Also it would be cool
if one would have a Button to show a dialog as real dialog as it would show up at runtime.
But sticking to the Composite-only has the advantage that one could keep the UI really
separated so one doesn't run into the issue of code that cannot be executed as part of the
preview.
Sometimes, when the code doesn't compile I get a pretty obtrusive modal error dialog.
Maybe something like the ErrorComposite (I copied the UI for showing the error messages as
in Eclipse editors, see [1], maybe there is public API for this now) would fit nice here?
Is there any practical use for the Refresh button? From my experience it refreshes
automatically as soon as the class is saved.
> If you want to change the locale on the fly it should be possible to
> patch the locale information in preview-classloader.
I guess so, I'll try to come up with a patch for you for this. I always regretted that I
never added this contribution to SWT/XML, so maybe it can be put to good use here :)
btw: do you mind if I create a git mirror at github? I really like versioning and
contributing via Git, git patches should be applicable without a problem to the SVN :)
Greetings,
Ralf
http://github.com/ralfebert/swtxml/tree/master/plugins/com.s wtxml.ide/src/com/swtxml/ide/
--
http://www.ralfebert.de/blog/
http://twitter.com/ralfebert/
|
|
| | |
Goto Forum:
Current Time: Wed Apr 24 20:53:59 GMT 2024
Powered by FUDForum. Page generated in 0.04022 seconds
|