[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform.swt] Re: About GUI SWT Builder

Scott Stanchfield <scott@xxxxxxxxxxxx> wrote:


> Re 2-way, I've stated my opinion on the wiki and these groups (briefly, I
> think 1-way is the right approach, allowing the code generator to optimize
> without worrying about creating code that can't easily be parsed. Of course
> the output doesn't have to be code -- it could be XML or some other
> representation).
  Yes, XML can be interesting for some application, but I think, that Java code
is requirement of 95% of users.

> I still haven't heard a good argument (IMO) why 2-way is "highly
> desireable" -- if you're using a good GUI builder, you shouldn't have to
> ever touch the generated code...
  I have pros and cons for both methods. 
  In 1-way you can generate good code using templates, and also different
formats, like XML. But all editing you should done in model editor. And, of
course 1-way is more simple for implementation.
  AFAIK simple modifications like change Button text more simple to do directly
in code. Or... Hm... In any case I will need to switch back to editor to see,
how my Dialog will look. And find Button in code is a little more hard than just
click on it in GUI builder...
  I don't know. I just don't like limitations, when I can do things using only
one way. But when I think about more arguments, I can not find them...

  How do you think, in case of 1-way editor, where should be code generated?
As in WSAD - insert pieces of code in users code, i.e. add several methods, which
should changed only by designer?

> Re layout manager editing, for Penumbra, I'm using GEF's edit policy support
> for this, and allowing additional layout manager plugins.
  This is obvious, but how to edit layout comfortably?
  I don't want to have designer, which forces me just edit field values for
GridLayout and GridData, I can do this in code and do faster.


> Later,
> -- Scott

> "Konstantin Scheglov" <scheglov_ke@xxxxxxx> wrote in message
> news:0n4WZLBIDHA.3216@xxxxxxxxxxxxxxxx
>> Dave Tirak <dtirak@xxxxxxxxx> wrote:
>>
>> > The screenshots provided look very promising.  I am excited to see
>> > development on this plugin continue.  This would be an invaluable tool
> for
>> > people just starting out in SWT or for quickly generating a GUI starting
>> > point.  And having a "two-way" tool is highly desirable.
>>   I hope, that I will receive some input from community about asked
> questions, but
>> it seems, that nobody wants to discuss this. :-(
>>
>>
>> > /dt
>>
>>
>> > Konstantin Scheglov wrote:
>>
>> >> draco <dracodoc@xxxxxxxx> wrote:
>>
>> >>   I have plans for building SWT GUI builder. I did some basic things
> like:
>> >> 1. Parsing Java code (using AST of course) for SWT widgets;
>> >> 2. Convinient (I hope) property table with support of any property
> editor;
>> >> 3. Widget tree;
>> >> 4. Visual view using GEF. You see real images of real controls, i.e. as
> your
>> >> window will look when you will start it (well, only when all properties
> are
>> >> detected);
>>
>> >>   You can see some screenshots on
> http://eclipsedesigner.sourceforge.net
>>
>> >>   Currently I don't have much time (I have enough work with Eclipse
> profiler
>> > plugin
>> >> http://eclipsecolorer.sourceforge.net). But I would like to hear, what
>> > people think
>> >> about current state (source are only in CVS and it is not so easy to
> test,
>> > so most
>> >> probably you will have only screenshots). And what is most
> interesting -
>> > where to
>> >> go, which features are needed.
>>
>> >> 1. Do you think, that current idea about 2-way tool is good?
>> >>    I parse one method for Control's creation, calls of setXXX and then
>> >> use this information. When user changes property in editor I modify
> Java
>> >> code by changeing or adding call of setXXX.
>> >>    Or may be I should just edit some model and then generate Java code
>> >> from template (i.e. implement one-way tool)?
>> >>    Or may be I should as WSAD generate field members for each control
> and
>> >> method creating of each control?
>>
>> >> 2. How to implement layout edit support?
>> >>    Currently it is almost impossible to add controls to composites
> using
>> >> designer. Yes, you can place control from palette, but this is just
> hack.
>> >>    I have one idea. I think, that would be convinient to place controls
> with
>> >> absolute locations and sizes, and then generate set of Layout's and
>> >> Composite's, which approximate these locations and sizes. However I am
>> >> not sure about algorithm.
>> >>    For editing you could place control directly with layout or "break"
>> > layout,
>> >> add control with absolute location and size and then regenerate layout.
>> >>    What do you think about this?
>>
>> >> 3. How do you think, is designer for SWT needed at all?
>> >>    Personally I feel, that would be usefull at least to see before
> start, how
>> >> dialog will like like. But may be you have another idea...
>>
>>
>> >> > I liked SWT very much, it seemed like the major defect of Java
> desktop
>> >> > application had been complemented.
>> >> > However, it seemed that there is no plan of a GUI builder for SWT...
>> >> > I read some gossip said:
>>
>> >> > Eclipse can't even call
>> >> > itself a Java IDE, and Sun have made threats of legal moves to stop
> IBM
>> >> > from ever calling Eclipse a Java IDE.  One result of this is the fact
> the
>> >> > IBM created GUI builder that runs on Eclipse lets you build Swing/AWT
> GUIs,
>> >> > but doesn't let you drag and drop SWT widgets.
>>
>> >> > Is this the reason? But I can't see the connection.
>> >> > There is a company trying to develop a commercial GUI SWT builder
>> >> > http://www.swtworkbench.com/index.shtml
>> >> > But we don't know when will it appear.
>>
>> >> > What's your opinion?
>>
>> >> > Cheers
>> >> > draco
>>
>> >> -- 
>> >> SY, Konstantin.
>>
>>
>>
>>
>> -- 
>> SY, Konstantin.



-- 
SY, Konstantin.