April 11, 2008 Re: First working JFace example | ||||
---|---|---|---|---|
| ||||
Posted in reply to Frank Benoit | 在 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 > > > Due to a compiler bug (#1978), the tango collection need a fix to make 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/ |
April 11, 2008 Re: First working JFace example | ||||
---|---|---|---|---|
| ||||
Posted in reply to davidl | 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 |
April 11, 2008 Re: First working JFace example | ||||
---|---|---|---|---|
| ||||
Posted in reply to Frank Benoit | 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 > > > Due to a compiler bug (#1978), the tango collection need a fix to make 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 |
April 11, 2008 Re: First working JFace example | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bill Baxter Attachments: | 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 |
April 11, 2008 Re: First working JFace example | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bill Baxter | Bill Baxter schrieb:
> 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
>
>
>
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.
|
April 11, 2008 Re: First working JFace example | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bill Baxter | Bill Baxter schrieb:
> 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
Thanks.
Still lots of works, hehe
|
April 11, 2008 Re: First working JFace example | ||||
---|---|---|---|---|
| ||||
Posted in reply to Frank Benoit | More Examples jface/FileTreeViewer jface/ShowPrefs jface/ShowFieldPrefs |
April 11, 2008 Re: First working JFace example | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bill Baxter | Bill Baxter schrieb:
> 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
>
>
>
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.
|
April 12, 2008 Re: First working JFace example | ||||
---|---|---|---|---|
| ||||
Posted in reply to Frank Benoit | Frank Benoit wrote:
> More Examples
>
> jface/FileTreeViewer
> jface/ShowPrefs
> jface/ShowFieldPrefs
hg 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
|
April 12, 2008 Re: First working JFace example | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bill Baxter | Bill Baxter schrieb:
> Frank Benoit wrote:
>> More Examples
>>
>> jface/FileTreeViewer
>> jface/ShowPrefs
>> jface/ShowFieldPrefs
>
> hg 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
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.
|
Copyright © 1999-2021 by the D Language Foundation