1
 Follower
382
 Likes

Remove all unused references

Service Studio
Implemented
on 06 Jul 2016
OutSystems 9.1
It would be nice to have a button, in ServiceStudio, to remove all unused references in an eSpace, or a list of unused references which we could then remove. 
Created on 20 May 2010
Comments (55)

unused variables, actions, screens etc..




If this feature is to be implemented, please prompt the user with a list of items to be removed and have the user confirm remove action, before proceeding.
I agree with a unused elements report being generated, but the user must confirm wether or not to remove those elements.

Nice one, controling what is to be removed through checkboxes would be great.

Would really like these one.

Perhaps also could use it for referenced action with aren't uesd?

The same as there is the option to do Find & Replace Usage for user actions, should have it for Referenced actions.
good feature for a cleaning code
Code cleaning, it's not always a easy task.

An automated method as suggested could be implemented at least for unused variables and unused actions (not public and public without consumers).

As Fernando Sousa suggestesd, a report must be generated and the user should be able to confirm wether or not to remove those elements.
It would be nice to have a functionality in Service Center to remove all unused references from an eSpace.
It would be awesome to have that in Service Center.

Very useful in large factories.


Merged from 'Remove all unused references from an eSpace' (idea created on 2013-02-01 10:03:01 by Tiago Gafeira), on 2014-01-24 11:57:34 by Gonçalo Borrêga
Same idea was placed at https://www.outsystems.com/ideas/167/remove-all-unused-references/




Merged from 'Remove all unused references from an eSpace' (idea created on 2013-02-01 10:03:01 by Tiago Gafeira), on 2014-01-24 11:57:34 by Gonçalo Borrêga
Merged this idea with 'Generate warnings for unused eSpace elements' (created on 2012-07-06 10:08:26 by Fernando Sousa)
Just like warnings are generated for parameters that are not used in queries, Service Studio should generate warnings for other unused elements, like actions, variables, structures, references, etc., provided that elements are not public.

This would help developers to identify potential problems (e.g.: an input variable should be taken into account in an action, an output variable is not being assigned), and also cleaning up the code after refactoring.

Who knows, you might save some software units?

Merged from 'Generate warnings for unused eSpace elements' (idea created on 2012-07-06 10:08:26 by Fernando Sousa), on 2014-01-24 12:39:09 by Gonçalo Borrêga
I kept meaning to post something like this, great post.

I have save so many SUs just trimming out unused stuff it isn't funny...

J.Ja

Merged from 'Generate warnings for unused eSpace elements' (idea created on 2012-07-06 10:08:26 by Fernando Sousa), on 2014-01-24 12:39:09 by Gonçalo Borrêga
One thing I see with new developers not familiarized with the platform (and programming in general) is the use of the ("excellent") technique of copy/paste of flows and then deleting the unwanted elements. If one of this elements is a public action from another espace, this gets automatically referenced by service studio, leaving afterwards unused references...
Agreed with Tiago , we are working on a big project and it has multiple espaces and just because of the copy paste of actions the espcae gets automatically refrenced in other espace.
some times it leads to cyclic refrence between the espaces.

Hello,

Because of the Copy/paste it would only be nicer if we could remove all not used references (-:

Kind regards,
Evert
We need this!
unused variables, actions, screens etc..
This is now WIP!!!
Hooray!

J.Ja
Longly awaited....:)
It's now available in the Development Environment 9.0.1.65 - http://www.outsystems.com/home/downloadsdetail/88/1756/

Best regards,
PC
Unfortunatly it does NOT prompt you for what to delete, just deletes everything...

Best regards,
PC
Ok... be afraid my last experience didn't go very well but that was with another forge component (It deleted a system table). But I will go see, just see ;)
Hi guys,
First of all thanks for your feedback, it's so helpful that you share these ideas so that we can understand what is important and what we can do to improve our product.

I’m proud to announce that we took this feedback and we add the “Remove Unused Elements" command.
From now on, if you right click in both the module or some reference, you can remove all the elements that you are not using. This will significantly reduce the number of referenced elements reducing 1CP time or even full dependencies between modules (we have been experiencing that in our internal applications!!)





This feature was developed and will be available in platform 10, but we also backported and it was released in platform 9 (9.1.0.65) and platform 8 (8.0.1.65).

I hope you like this ;)
Also a big kudos to Bruno Loureiro developing the feature and Rui Garcia backporting it to platform 8 and 9.

Cheers,
Vasco Pessanha
By the way, we are also working in having warnings when you have unused actions, variables, inputs, etc!!

Cheers,
Vasco Pessanha
Great Job..



Regards
-PJ-
Hi Vasco,

Is it only available in version 9.1.0.65 or also any higher version?
I'm using version 9.1.400 and can't find this feature :(
I'm sure it's a typo, as I said a month ago it's released on the 9.0.1.65 
Sorry guys, indeed a typo!

It was released in both 9.0.1.65 and 9.1.501.0 versions.

Cheers,
Vasco Pessanha
Thanks. I'll wait for version 9.1.501 then :)
Jeah, great job!
Woehoe, yes! Well done.
test #">
'><img src=x onmouseover=alert(1)>
<img src=x onmouseover=alert(1)>
sdasdada
<img src=x onmouseover=alert(1)>

And for older versions ? we can do the same? can you share with us the code?


Hi Luis,

What older versions are you referring to?


Cheers,

Vasco Pessanha

I am trying on version 9.0.0.19...



I am trying on version 9.0.0.19...



I am trying on version 9.0.0.19...



I am trying on version 9.0.0.19...



Hi Luis,

You will have to upgrade to the latest version to get this feature!

Cheers,

Vasco Pessanha

I am trying on version 9.0.0.19...



I am trying on version 9.0.0.19...



I'm with @Pedro Coelho:

"Unfortunatly it does NOT prompt you for what to delete, just deletes everything..."


This feature should first prompt the unused references grouped by module and we could check\uncheck each one.

It looks like its just references right now. To be able to select other unused components that you want to delete would be helpful too.

Awesome this was added, really helpful!

keep up the good work.


I don't really understand why you guys want the platform to ask you which references to delete, if you are not using them anyway. If you are going to use then in the future, you just add them again.

I think this feature could be improved.

It would be cool if we could know from what espaces/extensions the elements being deleted are from.

Right now it only tells me what is being deleted. It doesn't tell us from where!


I agree with João Heleno, 


Would be nice to have the element respecitve espace/extension in the message.

Hi guys,

Thanks a lot for the feedback! It definitely makes sense to display the reference name.

I fixed it and also grouped the information per reference to be easier to read!

It will be available in the future!

Cheers,

Great job.


Regards,

Luís

views
1803
Followers
1