digitalmars.D.dwt - First working JFace example
- Frank Benoit (15/15) Apr 10 2008 Now the JFace stuff compiles with the available dwt on win/linux.
- Bill Baxter (6/26) Apr 10 2008 Cool. I don't really know what it is, but it seems to be all the rage
- Frank Benoit (6/39) Apr 10 2008 Yes
- Bill Baxter (27/50) Apr 10 2008 I made those changes to svn tango,
- Frank Benoit (5/9) Apr 10 2008 hm, should be Seq instead of Set.
- Frank Benoit (6/10) Apr 10 2008 There were indead some compile errors left, due to my latest code
- Bill Baxter (7/20) Apr 10 2008 Where is this supposed to be found?
- Frank Benoit (6/15) Apr 10 2008 There are two folders containing images for compile time inclusion.
- Bill Baxter (4/24) Apr 10 2008 And neither one contains eclipse-icon-red-16.png. Is it possible you
- Frank Benoit (2/6) Apr 10 2008 yes ;)
- davidl (7/22) Apr 10 2008 The harder you work, the more shameful I feel for not being able to do
- Bill Baxter (3/8) Apr 10 2008 Yep, this is great stuff!
- Frank Benoit (3/14) Apr 11 2008 Thanks.
- Bill Baxter (28/51) Apr 11 2008 I started trying to port the code from here:
- Bill Baxter (4/10) Apr 11 2008 Sorry that should be listing 4&5 not just 4.
- Frank Benoit (5/22) Apr 11 2008 Yes, there are problems still everywhere :)
- Frank Benoit (22/39) Apr 11 2008 Meanwhile i changed many stuff in jface.
- Frank Benoit (4/4) Apr 11 2008 More Examples
- Bill Baxter (6/11) Apr 11 2008 hg pull && hg updated all my dwt directories, but...
- Frank Benoit (4/19) Apr 11 2008 ok, thanks. should work now.
- Jesse Phillips (2/17) Apr 12 2008 Just a little side note `$ hg pull -u` will do the pull and then update.
- Bill Baxter (3/21) Apr 12 2008 Ah. Thanks for the tip.
- Frank Benoit (3/8) Apr 12 2008 Now the LabelProvider in those examples are working and the texts and
- Frank Benoit (3/12) Apr 13 2008 And now they also work on windows.
Now the JFace stuff compiles with the available dwt on win/linux. dwt-samples/jface/ActionAndStatusbar is a first showcase. More example code as showcases and testcases is very welcome. Snippets can be found here: http://wiki.eclipse.org/index.php/JFaceSnippets JFace not going into a endless loop. - tango.util.collection.mode.View line 39 : public Dispenser!(T) duplicate(); change to: public View!(T) duplicate(); - tango.util.collection.mode.Set line 37 add: public Set!(T) duplicate(); public alias duplicat dup;
Apr 10 2008
Frank Benoit wrote:Now the JFace stuff compiles with the available dwt on win/linux.Cool. I don't really know what it is, but it seems to be all the rage among SWT coders.dwt-samples/jface/ActionAndStatusbar is a first showcase. More example code as showcases and testcases is very welcome. Snippets can be found here: http://wiki.eclipse.org/index.php/JFaceSnippetsTo try this out we need to update both dwt-samples and dwt-addons?JFace not going into a endless loop. - tango.util.collection.mode.ViewShould be .model.View, not .mode.View right?line 39 : public Dispenser!(T) duplicate(); change to: public View!(T) duplicate(); - tango.util.collection.mode.Set line 37 add: public Set!(T) duplicate(); public alias duplicat dup;Should be alias duplicate not alias duplicat, right?
Apr 10 2008
Bill Baxter Wrote:Frank Benoit wrote:YesNow the JFace stuff compiles with the available dwt on win/linux.Cool. I don't really know what it is, but it seems to be all the rage among SWT coders.dwt-samples/jface/ActionAndStatusbar is a first showcase. More example code as showcases and testcases is very welcome. Snippets can be found here: http://wiki.eclipse.org/index.php/JFaceSnippetsTo try this out we need to update both dwt-samples and dwt-addons?YesJFace not going into a endless loop. - tango.util.collection.mode.ViewShould be .model.View, not .mode.View right?Yes And instead Set it should be Seq. I will try to do a better description on a wiki page in a few hours.line 39 : public Dispenser!(T) duplicate(); change to: public View!(T) duplicate(); - tango.util.collection.mode.Set line 37 add: public Set!(T) duplicate(); public alias duplicat dup;Should be alias duplicate not alias duplicat, right?
Apr 10 2008
Frank Benoit wrote:Now the JFace stuff compiles with the available dwt on win/linux. dwt-samples/jface/ActionAndStatusbar is a first showcase. More example code as showcases and testcases is very welcome. Snippets can be found here: http://wiki.eclipse.org/index.php/JFaceSnippets JFace not going into a endless loop. - tango.util.collection.mode.View line 39 : public Dispenser!(T) duplicate(); change to: public View!(T) duplicate(); - tango.util.collection.mode.Set line 37 add: public Set!(T) duplicate(); public alias duplicat dup;I made those changes to svn tango, hg pulled & updated dwt-win and dwt-addons did dsss build and dsss install for all three, but I'm getting errors with dsss build on dwt-addons. For instance dwt-addons/dwtx/jface/viewers/AbstractListViewer.d(474) is using Java style anonymous declaration. And then the tango changes seem to be leading to lots of compiler erorrs in dwtx.core: dwtx\core\commands\operations\TriggeredOperations.d(200): Error: cannot implicitly convert expression (this.children.duplicate()) of type tango.util.collection.model.View.View!(IUndoableOperation).View to tango.util.collection.model.Seq.Seq!(IUndoableOperation).Seq dwtx\core\commands\operations\TriggeredOperations.d(237): Error: cannot implicitly convert expression (childrenToRestore) of type tango.util.collection.model.View.View!(IUndoableOperation).View to tango.util.collection.model.Seq.Seq!(IUndoableOperation).Seq dwtx\core\commands\operations\TriggeredOperations.d(243): Error: cannot implicitly convert expression (childrenToRestore) of type tango.util.collection.model.View.View!(IUndoableOperation).View to tango.util.collection.model.Seq.Seq!(IUndoableOperation).Seq dwtx\core\commands\operations\TriggeredOperations.d(247): Error: cannot implicitly convert expression (childrenToRestore) of type tango.util.collection.model.View.View!(IUndoableOperation).View to tango.util.collection.model.Seq.Seq!(IUndoableOperation).Seq --bb
Apr 10 2008
hm, should be Seq instead of Set. - tango.util.collection.mode.Seq line 37 add: public Seq!(T) duplicate(); public alias duplicate dup;- tango.util.collection.mode.Set line 37 add: public Set!(T) duplicate(); public alias duplicat dup;
Apr 10 2008
Bill Baxter schrieb:I made those changes to svn tango, hg pulled & updated dwt-win and dwt-addons did dsss build and dsss install for all three, but I'm getting errors with dsss build on dwt-addons.There were indead some compile errors left, due to my latest code changes. I did only compile the example without rebuilding all files in dwtx, so i did not saw the error. It should work now. I added some more info here: http://www.dsource.org/projects/dwt/wiki/JFace
Apr 10 2008
Frank Benoit wrote:Bill Baxter schrieb:Where is this supposed to be found? f:/usr/pkg/d/dsss/bin\..\include\d\dwt\dwthelper\utils.di(944): Error: file "eclipse-icon-red-16.png" cannot be found, check -Jpath I can't locate it in any of the dwt-* res dirs. Is it possible you forgot to check it in? --bbI made those changes to svn tango, hg pulled & updated dwt-win and dwt-addons did dsss build and dsss install for all three, but I'm getting errors with dsss build on dwt-addons.There were indead some compile errors left, due to my latest code changes. I did only compile the example without rebuilding all files in dwtx, so i did not saw the error. It should work now. I added some more info here: http://www.dsource.org/projects/dwt/wiki/JFace
Apr 10 2008
Bill Baxter schrieb:Where is this supposed to be found? f:/usr/pkg/d/dsss/bin\..\include\d\dwt\dwthelper\utils.di(944): Error: file "eclipse-icon-red-16.png" cannot be found, check -Jpath I can't locate it in any of the dwt-* res dirs. Is it possible you forgot to check it in? --bbThere are two folders containing images for compile time inclusion. dwt-samples/res dwt-addons/res both folders need to be given with -J Its also mentioned on the wiki page.
Apr 10 2008
Frank Benoit wrote:Bill Baxter schrieb:And neither one contains eclipse-icon-red-16.png. Is it possible you forgot to check it in? --bbWhere is this supposed to be found? f:/usr/pkg/d/dsss/bin\..\include\d\dwt\dwthelper\utils.di(944): Error: file "eclipse-icon-red-16.png" cannot be found, check -Jpath I can't locate it in any of the dwt-* res dirs. Is it possible you forgot to check it in? --bbThere are two folders containing images for compile time inclusion. dwt-samples/res dwt-addons/res both folders need to be given with -J Its also mentioned on the wiki page.
Apr 10 2008
Bill Baxter schrieb:And neither one contains eclipse-icon-red-16.png. Is it possible you forgot to check it in? --bbyes ;)
Apr 10 2008
在 Thu, 10 Apr 2008 17:23:31 +0800,Frank Benoit <keinfarbton googlemail.com> 写道:Now the JFace stuff compiles with the available dwt on win/linux. dwt-samples/jface/ActionAndStatusbar is a first showcase. More example code as showcases and testcases is very welcome. Snippets can be found here: http://wiki.eclipse.org/index.php/JFaceSnippets JFace not going into a endless loop. - tango.util.collection.mode.View line 39 : public Dispenser!(T) duplicate(); change to: public View!(T) duplicate(); - tango.util.collection.mode.Set line 37 add: public Set!(T) duplicate(); public alias duplicat dup;The harder you work, the more shameful I feel for not being able to do some dwt-related coding recently. Anyway, good job! :) -- 使用 Opera 革命性的电子邮件客户程序: http://www.opera.com/mail/
Apr 10 2008
davidl wrote:在 Thu, 10 Apr 2008 17:23:31 +0800,Frank Benoit <keinfarbton googlemail.com> 写道:The harder you work, the more shameful I feel for not being able to do some dwt-related coding recently. Anyway, good job! :)Yep, this is great stuff! --bb
Apr 10 2008
Bill Baxter schrieb:davidl wrote:Thanks. Still lots of works, hehe在 Thu, 10 Apr 2008 17:23:31 +0800,Frank Benoit <keinfarbton googlemail.com> 写道:The harder you work, the more shameful I feel for not being able to do some dwt-related coding recently. Anyway, good job! :)Yep, this is great stuff! --bb
Apr 11 2008
Frank Benoit wrote:Now the JFace stuff compiles with the available dwt on win/linux. dwt-samples/jface/ActionAndStatusbar is a first showcase. More example code as showcases and testcases is very welcome. Snippets can be found here: http://wiki.eclipse.org/index.php/JFaceSnippets JFace not going into a endless loop. - tango.util.collection.mode.View line 39 : public Dispenser!(T) duplicate(); change to: public View!(T) duplicate(); - tango.util.collection.mode.Set line 37 add: public Set!(T) duplicate(); public alias duplicat dup;I started trying to port the code from here: http://www.ibm.com/developerworks/java/library/os-ecgui1/index.html?dwzone=java I got through listings 1-3 just fine, but listing 4 which uses a TreeViewer seems to be crapping out over ResourceBundle not being quite implemented. (dwt.dwthelpers.ResourceBundle.getBundle(char[] filename) just creates an empty bundle). The problems seem to start in in dwtx/jface/resource/JFaceResources.d. At least I think that's what's up. Here's the output I get: f:\usr\pkg\d\dmd\import\dwt-addons\dwtx\jface\viewers\AbstractTreeViewer.d 918: doUpdateItem f:\usr\pkg\d\dmd\import\dwt-addons\dwtx\jface\viewers\AbstractTreeViewer.d 939: doUpdateItem f:\usr\pkg\d\dmd\import\dwt-addons\dwtx\jface\viewers\ColumnViewer.d 223: getViewerColumn f:\usr\pkg\d\dmd\import\dwt-addons\dwtx\jface\viewers\ContentViewer.d 141: f:\usr\pkg\d\dmd\import\dwt-addons\dwtx\jface\viewers\ContentViewer.d 143: Exception occurred Exception of type object.Exception in (0): Access Violation Exception in (0): Access Violation Exception occurred Exception of type tango.core.Exception.NoSuchElementException in (0): no matching key Exception in (0): no matching key tango.core.Exception.IllegalArgumentException: Argument cannot be null --bb
Apr 11 2008
Bill Baxter wrote:Frank Benoit wrote:I got through listings 1-3 just fine, but listing 4 which uses a TreeViewer seems to be crapping out over ResourceBundle not being quite implemented. (dwt.dwthelpers.ResourceBundle.getBundle(char[] filename) just creates an empty bundle). The problems seem to start in in dwtx/jface/resource/JFaceResources.d.Sorry that should be listing 4&5 not just 4. DWT versions attached in case you have a chance to look into it. --bb
Apr 11 2008
Bill Baxter schrieb:Bill Baxter wrote:Yes, there are problems still everywhere :) At the moment its more easy to say what works, than to list the untested and problematic code. I will look into your example code.Frank Benoit wrote:I got through listings 1-3 just fine, but listing 4 which uses a TreeViewer seems to be crapping out over ResourceBundle not being quite implemented. (dwt.dwthelpers.ResourceBundle.getBundle(char[] filename) just creates an empty bundle). The problems seem to start in in dwtx/jface/resource/JFaceResources.d.Sorry that should be listing 4&5 not just 4. DWT versions attached in case you have a chance to look into it. --bb
Apr 11 2008
Bill Baxter schrieb:Bill Baxter wrote:Meanwhile i changed many stuff in jface. Nevertheless, works now, with doing this: class FileTreeContentProvider : ITreeContentProvider { Object[] getChildren(Object element) { try{ Object[] kids; foreach( item; cast(FilePath) elements ){ kids ~= FilePath.from(item); } return kids; } catch( Exception e ){ return null; } } .... See also the jface/FileTreeViewer example. A problem is, the LabelProvider gets completely ignored. This is why the icons and name do not show up properly.Frank Benoit wrote:I got through listings 1-3 just fine, but listing 4 which uses a TreeViewer seems to be crapping out over ResourceBundle not being quite implemented. (dwt.dwthelpers.ResourceBundle.getBundle(char[] filename) just creates an empty bundle). The problems seem to start in in dwtx/jface/resource/JFaceResources.d.Sorry that should be listing 4&5 not just 4. DWT versions attached in case you have a chance to look into it. --bb
Apr 11 2008
More Examples jface/FileTreeViewer jface/ShowPrefs jface/ShowFieldPrefs
Apr 11 2008
Frank Benoit wrote:More Examples jface/FileTreeViewer jface/ShowPrefs jface/ShowFieldPrefshg pull && hg updated all my dwt directories, but... jface\FileTreeViewer.d(29): module stacktrace cannot read file 'jive\stacktrace.d' Where can I get that? --bb
Apr 11 2008
Bill Baxter schrieb:Frank Benoit wrote:ok, thanks. should work now. jive.stacktrace is a linux-only tool to make tango exceptions have the stacktrace info. Its normally only active when version=JIVE is given.More Examples jface/FileTreeViewer jface/ShowPrefs jface/ShowFieldPrefshg pull && hg updated all my dwt directories, but... jface\FileTreeViewer.d(29): module stacktrace cannot read file 'jive\stacktrace.d' Where can I get that? --bb
Apr 11 2008
On Sat, 12 Apr 2008 10:56:12 +0900, Bill Baxter wrote:Frank Benoit wrote:Just a little side note `$ hg pull -u` will do the pull and then update.More Examples jface/FileTreeViewer jface/ShowPrefs jface/ShowFieldPrefshg pull && hg updated all my dwt directories, but... jface\FileTreeViewer.d(29): module stacktrace cannot read file 'jive\stacktrace.d' Where can I get that? --bb
Apr 12 2008
Jesse Phillips wrote:On Sat, 12 Apr 2008 10:56:12 +0900, Bill Baxter wrote:Ah. Thanks for the tip. --bbFrank Benoit wrote:Just a little side note `$ hg pull -u` will do the pull and then update.More Examples jface/FileTreeViewer jface/ShowPrefs jface/ShowFieldPrefshg pull && hg updated all my dwt directories, but... jface\FileTreeViewer.d(29): module stacktrace cannot read file 'jive\stacktrace.d' Where can I get that? --bb
Apr 12 2008
Frank Benoit schrieb:More Examples jface/FileTreeViewer jface/ShowPrefs jface/ShowFieldPrefsNow the LabelProvider in those examples are working and the texts and images show up correctly.
Apr 12 2008
Frank Benoit schrieb:Frank Benoit schrieb:And now they also work on windows. I discovered and fixed two bugs in dwt-win.More Examples jface/FileTreeViewer jface/ShowPrefs jface/ShowFieldPrefsNow the LabelProvider in those examples are working and the texts and images show up correctly.
Apr 13 2008