Page 1 of 1

Could this be interesting in Servoy Developer?

PostPosted: Tue Aug 16, 2011 7:57 pm
by jasantana
Having a big solution with many forms sometimes is hard to find the one you need. Maybe creating folders inside the active solutions could make that easier because we could group forms the way we would like.

How many of you think that creating folders inside the active solution tree could be useful?

Re: Could this be interesting in Servoy Developer?

PostPosted: Tue Aug 16, 2011 10:47 pm
by Peter de Groot
+2

Re: Could this be interesting in Servoy Developer?

PostPosted: Wed Aug 17, 2011 6:48 am
by Adelo Herrero
+1

Re: Could this be interesting in Servoy Developer?

PostPosted: Wed Aug 17, 2011 7:54 am
by Joas
Do you all know about the locator that you get by pressing Ctrl + Shift + L ?

Re: Could this be interesting in Servoy Developer?

PostPosted: Wed Aug 17, 2011 8:31 am
by ROCLASI
Joas wrote:Do you all know about the locator that you get by pressing Ctrl + Shift + L ?

I do, and LOVE it. Major timesaver to find any Servoy object AND methods.
Also Ctrl-H is a HUGE benefit to find anything in ALL your code/forms.

Hope this helps.

Re: Could this be interesting in Servoy Developer?

PostPosted: Wed Aug 17, 2011 12:20 pm
by Robert Huber
Entering a * does not show anything in my environment, but entering a ? shows the whole string (in my case a relationship). Either I do not understand it correctly or the description in the header of the window is wrong.
How would I search for all relationships not starting with an underline?

Joas wrote:Do you all know about the locator that you get by pressing Ctrl + Shift + L ?


Servoy 5.2.9
Mac OS X 10.6.7

Regards,

Re: Could this be interesting in Servoy Developer?

PostPosted: Wed Aug 17, 2011 12:31 pm
by Joas
It searches for resources that start with the string you typed.
So if you type "?a" it will find everything that has an "a" as it's second character.
And if you type "*bla*x" you get everything that contains "bla" and further to the right also "x".

You are right that typing just "*" doesn't find anything, while it should find everything. I'm not sure why that is, but to be honest: it also doesn't make that much sense to locate everything. :)

Re: Could this be interesting in Servoy Developer?

PostPosted: Wed Aug 17, 2011 12:47 pm
by jcompagner
The first list that you see is History, and only when you really start searching for something (and that is not * because that is even implied, the * is always there as the last char) something happens.

So just typing * is exactly the same as nothing, this is default eclipse search dialog behavior

Re: Could this be interesting in Servoy Developer?

PostPosted: Wed Aug 17, 2011 12:49 pm
by Joas
I missed your question before
Robert Huber wrote:How would I search for all relationships not starting with an underline?

It is not possible to do a not-search.

However, I think this is not a good case to use the resource locator. The locator is best used to find and open one thing at a time.
If you want to see ALL relations not starting with an underline, you could better just look under relations in the solution explorer.

Re: Could this be interesting in Servoy Developer?

PostPosted: Wed Aug 17, 2011 2:09 pm
by Robert Huber
First of all thanks for all the above answers and explanations.

Joas wrote:I missed your question before
Robert Huber wrote:How would I search for all relationships not starting with an underline?

It is not possible to do a not-search.

However, I think this is not a good case to use the resource locator. The locator is best used to find and open one thing at a time.
If you want to see ALL relations not starting with an underline, you could better just look under relations in the solution explorer.


My requirement is to get the number of all database relationships. This excludes all starting with an underline, as in our convention "underline relationsships" are only for functional purposes and not existing in the database design (entity relationship model). The reason for counting the number of relationsships in Servoy is to make sure it's the same number as in the datamodel - to make sure we there is none missing and none too much, i. e. one we forgot to delete in Servoy while changing the datamodel.
I did not find an easy way of counting the number or relationships in Servoy, though.

Regards,

Re: Could this be interesting in Servoy Developer?

PostPosted: Wed Aug 17, 2011 2:44 pm
by jcompagner
count all the .rel files?
and maybe with a regxpression filter out the onces you don't want to count?

Re: Could this be interesting in Servoy Developer?

PostPosted: Wed Aug 17, 2011 3:02 pm
by Robert Huber
This works fine, thanks for the tip!

jcompagner wrote:count all the .rel files?
and maybe with a regxpression filter out the onces you don't want to count?

Re: Could this be interesting in Servoy Developer?

PostPosted: Wed Aug 17, 2011 3:04 pm
by Joas
Or in a Servoy method use the solutionModel to get all relations and then filter the ones you want:
Code: Select all
   var _relations = solutionModel.getRelations();
   _relations = _relations.filter(function (relation) { return /^_/.test(relation.name);});
   
   application.output(_relations.length);

Re: Could this be interesting in Servoy Developer?

PostPosted: Wed Aug 17, 2011 3:17 pm
by Robert Huber
Also very fine your tip, thanks Joas

Joas wrote:Or in a Servoy method use the solutionModel to get all relations and then filter the ones you want:
Code: Select all
   var _relations = solutionModel.getRelations();
   _relations = _relations.filter(function (relation) { return /^_/.test(relation.name);});
   
   application.output(_relations.length);