List results of search text in jar files

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
pcartier
Junior Member
Junior Member
Posts: 2
Joined: 2014-11-02, 09:11 UTC

List results of search text in jar files

Post by *pcartier »

I have added SearchInFiles=*.jar to my wincmd.ini file to allow me to search for text strings in jar files.
But I get just a list of jar files where the text was found as output.
Is there a way to output a list of actual files in the jar file (e.g. class files, property files) where the string was found?
I have tried a couple of plugins without success!
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3897
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

Please tell us, which TC version you are using!
I have tried a couple of plugins without success!
*.jar files are simple zip files.
For this kind of archives you don't need any plugin.

The magic is just to enable the option "Search archives" at search dialog :)
#5767 Personal license
User avatar
milo1012
Power Member
Power Member
Posts: 1158
Joined: 2012-02-02, 19:23 UTC

Re: List results of search text in jar files

Post by *milo1012 »

To emphasize this again, because it seems that most people don't know it:
Content plugins aren't allowed to search in archives (yet)!
TC help wrote:Note: Content plugins only work with the normal file system (files and directories), but not with virtual folders like the desktop, ftp connections, files in archives, or file system plugins.
So, no matter which plugin you'd use, they just can't search in jar files.

I really hope that this will change in the future, at least the built-in support for zip should be expanded to wdx plugins.
TC plugins: PCREsearch and RegXtract
pcartier
Junior Member
Junior Member
Posts: 2
Joined: 2014-11-02, 09:11 UTC

Post by *pcartier »

OK ... clear .
Thx
But then you cannot narrow the specification for the type of archive you want to search in.
User avatar
milo1012
Power Member
Power Member
Posts: 1158
Joined: 2012-02-02, 19:23 UTC

Post by *milo1012 »

pcartier wrote:But then you cannot narrow the specification for the type of archive you want to search in.
Why not?
You either pre-select the jar files and keep checked: Only search in selected directories/files,
or you just type a mask *.jar.

Search archives just means that if a registered/known archive is found while doing the search, TC tries to decompress and search in it.
TC plugins: PCREsearch and RegXtract
User avatar
Hacker
Moderator
Moderator
Posts: 13144
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

milo1012,
if a registered/known archive is found while doing the search, TC tries to decompress and search in it.
...using the given file mask as a filter for the files contained within the archive.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
milo1012
Power Member
Power Member
Posts: 1158
Joined: 2012-02-02, 19:23 UTC

Post by *milo1012 »

Hacker wrote:...using the given file mask as a filter for the files contained within the archive.
Sure. You either search in all archives that appear, or none.
That's why you'd need to preselect your files before doing the search,
with manual selection, quick search filter, previous search result list, or whatever.
TC plugins: PCREsearch and RegXtract
User avatar
nsp
Power Member
Power Member
Posts: 1954
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: List results of search text in jar files

Post by *nsp »

pcartier wrote:I have added SearchInFiles=*.jar to my wincmd.ini file to allow me to search for text strings in jar files.
But I get just a list of jar files where the text was found as output.
Is there a way to output a list of actual files in the jar file (e.g. class files, property files) where the string was found?
I have tried a couple of plugins without success!
--> are you trying to find jar inside jar ?

You cannot specify in wich archive file you search in a single round. The only way i know to do it is:
- search for the archive/jar you want to seach in [search 1]
- feed to listbox
- from listbox search all classes or properties files ....... that contain the text ticking search in archive.
- you will get a list of files inside archives that match your criterias. (this is only working from the standard filesystem and not from fs addon)

--> info
If you tick pluging search you silently disable in the same time search in archive... a popup or a :!: could warn you but it is not the case :(
Post Reply