Expressions builder

As part of implementing Beanshell, I want to incorporate an ‘Expression Builder’ that will allow you to build basic expressions by via a gui.

I did a bit of a search hoping to find some existing source for such a beastie without luck. If anyone knows of some existing open source, I would appreciate it.

I have already written a simple version, but am not particularly happy with it. It needs to be richer and as a model, I am now looking at the Microsoft Access expression builder. Anyone have any comments, or know of a really well thought out Expression Builder?

As part of teh expression Builder, I am planning to add some more ‘VASSAL level reflection’ to property traits. I need to be able to determine the names of Properties that specific traits expose. I plan to add a new Interface PropertyNameSource that implenents the method

public List getPropertyNames();

that returns a list of property names exposed by a trait. I don’t believe this will cause any problems with existing code.

B.

Thus spake “Brent Easton”:

What exactly is an exression builder supposed to do?

J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Allows you to build up an arbitrarily complex expression by selecting appropriate elements via drop-down lists/buttons/other GUI elements. Drop-down lists of stuff like Global Properties in module, Properties available in traits in counter, Java operators, Beanshell functions etc.

e.g. The ACCESS version:
office.microsoft.com/en-us/acces … 81033.aspx

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Brent Easton”:

Wait, so do you want the thing which lets you build the expressions,
or the thing which evaluates them?


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

I can Validate and evaluate the expressions. No problem…thats done.

I want to make it easier for people to put expressions (i.e. Calculated Properties, In-line Java expressions, Property Match expressions) together.

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Brent Easton”:

Oh. That’s the thing I know about. The other thing, not so much.

I think you’re going to have to hand-build a dialog for that.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Brent, have you tried the Eclipse Visual Editor - Might be what you are
looking for perhaps?

ibm.com/developerworks/opens … -ecvisual/

Tim

Post generated using Mail2Forum (mail2forum.com)

That’s what I figure. I did one version, but I don’t like it much. The problem is getting a usable dialog as much as what goes into it. SQL Filter builders are very similiar. I was hoping someone could point to one in product X that works really well. There is in TOAD for ORACLE that works quite well.

I’ll keep playing.

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

*********** REPLY SEPARATOR ***********

On 17/05/2009 at 7:19 AM Tim McCarron wrote:

Thanks Tim, but no, not really.

I did find a couple of Open Source things, but they where really Fugly, both in look and usability.

I’ll keep working on the one I have started.

B.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)