Select all text in files - eclipse

Is there a way in eclipse to view the code from multiple files in a temp file. So if I highlight multiple .java files I can view the code from all files concatenated top-down as a single file instead of copying/pasting the files into one ?

Could not find an eclipse way of doing it. But to use dos just cd into the package you want to merge the files and use - "copy *.java merge.java" This will merge all the files into one file called merge.java . Better than nothing.

Related

Rename pentaho multiple .ktr files in my folder

I have multiple .ktr transformation files in one of my folder. I've used spaces in the naming convention. So, I want to rename all those pentaho transformation files using "Spoon". Are there any steps that can rename all my files at once?
Example : I've file calles "Invoice Items.ktr".
I want to rename this file to "InvoiceItems.ktr".
There isn't a step that does "Rename" action, you need to generate a new filename and move the file to itself.
You can use this with a series of steps for this.
EDIT:
In the get file names step, in the Wildcard column, use RegEx ".*", this will select all files within that folder. In the File/Directory column you leave only the directory, not the full filename.

How to recover files that were moved to a single file?

I tried to move multiple files into a folder, but there was a mistake in my matlab code that I didn't create the folder. Now all the files were moved to a single file which cannot be opened or edited. How to recover these files?
Example of the mistake:
a=strcat('C:\Users\foldername'); % name and directory of the folder
fname=a;
% mkdir(fname); % so this command wasn't executed...
movefile('file1',fname);
movefile('file2',fname);
So now file1 and file2 were merged in file 'fname', instead of in the folder named 'fname'. How to get file1 and file2 back?
Thanks in advance!
Unfortunately, the odds may be stacked against you getting back any of the files, except for the last one. The reason why is because movefile doesn't append to an existing destination file, it overwrites it. The following will give you back your last file (by simply renaming fname):
movefile(fname, 'file2');
If you're lucky, your operating system will have options for you to restore previous versions of your files/folders. Your best bet may be to check and see if the folder containing your original files has any previous versions you can open/restore to get previous versions of 'file1' and 'file2'. For example, on my Windows machine I can right click on my default MATLAB folder, select "Properties", then select the "Previous Versions" tab, and I see this:
You can see there are a few versions I could open and copy files from if I've inadvertently deleted or overwritten anything recently. Good luck!

Copy filenames from synchronizing perspective in Eclipse

Is there a way to copy all file names listed in a synchronizing perspective ?
(i mean the list of files to synchronize)
thanks in advance for your help.
No you can't copy multiple file names at once. But you copy multiple files if you want.

How to tell WinMerge to ignore binary files in folder compare?

Is it possible to make WinMerge ignore binary files and do only text files comparison when comparing folders?
Winmerge does not detect file structures to check if they are text or binaries. However, you can create filters based on filenames or extensions to ignore certain files.
You can specify file extensions to compare this will make your compare easy.Or create a file filter. Here is the link.

How to compare two .ear files recursively

I'm modifying a build process and I need to do a complete comparison of the contents of two .ear files. That means recursively comparing each archive in the .ear. These .ear files have archives that contain archives.
I've looked at Beyond Compare and Archive Analyzer, but they only do one level at a time. I have to manually drill down into each archive. I'm looking for something more automatic.
Eclipse and UltraCompare do a binary comparison of the two .ears which is not what I want.
How can I compare two .ear files recursively?
zipdiff provides a very good open source solution.
My problem turned out to be more than just expanding the .ear file recursively (I wrote a Java class to do that - recursion made it simple.) Once the .ear files are expanded I have to diff the directories to check for any changes. If anything other than timestamps changed then I know that the build is producing a different binary.
The second problem is that our build process generates hundreds of .xml files and subsequent builds re-generate those .xml files with the elements in different order. I'm not sure why. When I expand two .ear files made by back-to-back builds with no changes to anything the diff of the resulting directories shows hundreds of .xml files with diffs, even though they are functionally equivalent.
In addition to expanding the .ear files recursively I need to do a diff and exclude the .xml files in certain directories. I thought that Cygwin diff would do this, but the --exclude switch doesn't recognize any path information:
Cygwin diff won't exclude files if a directory is included in the pattern
If I don't find a solution to this I'll write another Java class to step through the whole directory structure doing a single level diff in each directory and excluding the .xml files in the appropriate directories.
I have the feeling that I'm re-inventing the wheel, but I can't find a wheel right now.
In Beyond Compare go into the Session Settings dialog, and on the Handling tab is an Archive Handling option. If it's set to As folders always BC will treat archives just like folders, so it's fully recursive.