Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#1046 closed enhancement (fixed)

Enhance Maestro's Expression Editor

Reported by: jng Owned by: jng
Priority: medium Milestone: Maestro-2.0
Component: Maestro Version:
Severity: minor Keywords:
Cc: ksgeograf External ID:

Description

The current Expression Editor at the moment is nothing more than a simplistic text field for any editor that requires it. There are few things that can improve the usability of this component:

  • Switching the font to plain text. Makes lining up all those parentheses much easier
  • Utilising the response of GetCapabilities. It contains the list of expression functions supported by that provider (which we can easily get), along with return and argument information. By presenting the user with the list of supported expressions, this also prevents the user from entering unsupported expressions. It's like pseudo-intellisense.

Essentially it would be best to make it look and function something similar to the Expression Editor in FDO Toolbox.

Change History (9)

comment:1 by ksgeograf, 15 years ago

Milestone: Maestro-2.0
Owner: changed from jng to ksgeograf
Status: newassigned
Version: 2.0.2

I agree, with one addition: It should be possible to enter an "invalid" expression.

The OGR provider (and other providers) do not report all supported operations, so it is impossible to use such an editor with that provider.

Also, the + operator is type ignorant in some providers, eg: 1 + 'a' is valid.

With the current Studio editor, it fails to accept expressions with a +, even when the operands are both strings. All + operations must be rewritten with concat, which makes it really difficult to read.

The FDO Toolbox expression editor allows the + operator, but I suspect that there are also valid filters that are not recognized there.

comment:2 by ksgeograf, 15 years ago

Owner: changed from ksgeograf to jng
Status: assignednew

comment:3 by jng, 15 years ago

Since mapguide does not expose expression validation functionality, this is not a real problem.

The aim is improve the expression editor from what it currently is (a dumb text editor) to something better (a dumb text editor with lots of assistance provided :-) ).

But #1048 is kind of impeding the implementation I have so far, because the available expression functions are lost in deserialization.

comment:4 by ksgeograf, 15 years ago

You are right. I meant that the Expression editor should say: "The expression is invalid, continue anyway?" -> Yes/No instead of "Invalid expression" -> OK, which would happen if you copy the FDOToolbox expression editor.

I fixed bug #1048, the FunctionDefinitionList is now called FunctionDefinitionCollection.

comment:5 by jng, 15 years ago

Depending how well this would function under mono, I also plan to port the newly implemented intellisense from FDO Toolbox. But *only* if it functions under mono.

comment:6 by ksgeograf, 15 years ago

If have omitted a few non-vital items (such as file icons on resource data) when I encounter something that is not easy to get in the linux world.

Maestro can detect the OS, and skip the intellisense support when running Linux/Mono if it is difficult to get it working. (Preferably it should work under Mono as well).

comment:7 by jng, 15 years ago

Resolution: fixed
Status: newclosed

Changes applied in r4097

comment:8 by ksgeograf, 15 years ago

Super cool!

You didn't add the .png files, so I added them in r4100. (I assume they were from the Silk set).

comment:9 by ksgeograf, 15 years ago

Oh, and I put up a fresh build with the expression editor included.

Note: See TracTickets for help on using tickets.