How to open multiple files and edit them in eclipse - eclipse

I'm using Practically Macros, but maybe there is some better Eclipse macro player for this task?
I run some commands on huge amount of files.
How do you open all files from a folder - one at a time - recursive, then do some commands on them?
Also is there some better fix for using the save command if there were no changes made? Like only save if changes where made. Now it generates an error so I write an character and then remove it to always be able to save.
I know how to do the file editing, but I first must open the files manually and it takes alot of time because if I select multiple I can't use the open with (Progress OpenEdge AppBuilder (OpenEdge UI Designer) is default and I don't want that but thats not the point here).
Practically Macro example:
*file editing, many commands*
Insert string: -
Delete previous character
Save
Close
Play last macro
This edit all the currently opened files like I want them (beautify).
This generates an error when there is no more files to close. How to fix?
So my macro/progress questions where:
Is there a better macro player for eclipse than Practically Macro?
Is there a way to use the save command only when needed?
Is there a way to not get errors when all files are closed? Or a way to detect when the recursive loop should end.
Is there a way to open multiple files with in Progress Developer Studio in text mode?
Is there a way to recursive open all the files in a folder (one at a time and open with OpenEdge ABL Editor) with macro?

This version of Practically Macro had semi-usable Eclipse macro support for my current version of Eclipse (Mars). Another option that seems to take a more official approach, but hasn't seemed to get much traction yet, is EASE.
If you do these kinds of tasks regularly, you could script things externally, in perl or Node.js or any other of the dozens of high-quality scripting languages out there.
WARNING: there appear to be two older versions of Practically Macro you might stumble upon. One is also on the Eclipse Marketplace but not marked with the trailing "-0". There is also another older one on SourceForge.

Related

Eclipse is very slow on Save Action. Any way to improve this?

I am using Eclipse 2019. It is very slow on Save Action. It is necessary for me to enable the Save Action to do code format and indent check. But it is really a pain to watch Eclipse busy and slow at that point.
Is there a way to improve this?
I am trying Intellij. It is much much better than Eclipse on the Save Action.
I really hope Eclipse has the same or similar performance.
EDIT:
I am using Eclipse IDE for Enterprise Java Developers, Version 2019-12.
I only installed two editor plugins: One for resource bundle file and one for bash file.
EDIT 2:
Sorry, I should say that the Save Action on big Java file is slow. We have many files are more than 2 thousand lines. Some of them are double, triple that size, or even more. We often see the dialog telling us that we can turn off the Save Action to shorten waiting time. I tested with Intellij. The same file, the same formatter and Save Action, there is no noticeable delay in Intellij but Eclipse needs more time (noticeable even that dialog does not show up) to finish the action. There is nothing to do with the change itself, change many places, or change one line is the same. My guess is that Intelliji may be tracing the changes during the process and do format and Save Action only on where is changed. But Eclipse may not tracing the changes during the process and do format and Save Action on the entire file at the end.
I have no source control and other things attached.
Were you saving with Ctrl-S?
I was having a similar (or the same problem) whenever I was Ctrl-C/V to copy/paste. It seems the underlying problem may have been that my Hyperlink key was "Ctrl", so that whenever I was about to Copy/Paste, it was trying to work out Hyperlink options - stalling the editor.
Changing the Hyperlink modifier key (General > Editors > Text Editors > Hyperlinking) to Alt and the slow copy/paste is no more.

does a "fake folder structure" Extension exist in VSCode

As an avid user of processing in my spare time, I often find myself writing more than 10 classes in a project, which of course overflows the class bar at the top of the processing IDE and makes it hard to work on all the classes in a project. The solution in any other language is to create class libraries (.net), packages (java), etc. which is not possible from within the processing IDE (It just won't accept .pde files in subfolders).
I tried using Eclipse and importing processing but it makes everything a little more messy as you have to extend Papplet and pass it in to every class that you create and then you have to say parent.rect() or something similar when you want to use Papplet methods which is just one step more than I am willing to go on every new project.
Now, I often use processing from VSCode since i prefer the IDE and i can still compile and debug just as easy from VSCode as Processing IDE, and one day i thought to myself, what if, rather than that horrible solution of using Eclipse, I have the following:
All .pde files are in the one directory (just how processing wants it) but I have an extension for VSCode that takes my files and displays them as if they were in folders within VSCode, There are no changes to the file structure, only the way they are visible to me within the IDE, this way I can comfortably see each of my files and manage larger projects!
So the project folder would look like This in file explorer
But would look like This in VSCode
So finally, my question is -> Is there some sort of extension that I can get that will do this, if not, any suggestions on where i should start in creating one?

Keep the emacs BROWSE file up to date while editing

I'm trying to use a source browser for a c++ project without using a big IDE.
My current favorite text editor is emacs.
I found a solution that fit well to my needs which is the ebrowse (not intrusive, can very easily add sources of third part dependancy...).
My problem is that it does not stay up to date while I edit a file already ebrowsed.
eg if I add a method, it will not appear in the tree, and I didn't find a command to update it.
I tried to do a script that execute the ebrowse command line with an (global-auto-revert-mode t) t try to automatically keep the open BROWSE file updated, but it complain about editing externally modificated file.
There is a solution or should I quit to redo the BROWSE file each time then reload it ?
Thanks a lot
PS: I already saw ecb, it is a bit heavy from my point of view, and there is an annoying known bug that force me to trick by an ugly way ecb permission denied bug http://blog.gmane.org/gmane.emacs.code-browser/page=2

Package development for Sublime Text 2 with multiple files without restarting

I am developing a couple of packages for sublime text, and to avoid copy and pasting massive amounts of code I began to move my classes into separate files. I have been avoiding this so far, since, in my current workflow, changes to files that are not in the main plugin file won't get updated when saved and only go into effect when I restart sublime.
Is there a way to reload a package, including all it's files, without restarting Sublime Text?
You don't actually have to restart the editor. You will have to restructure your plugins though to take advantage of this. Essentially, you can load the plugin files from some top level file. As an example, take a look at Package Control. I also do it in PersistentRegexHighlight (though the package control solution is likely more robust (I did base it on that). Still not as good as simply saving a particular file, but better than restarting! In fact, you could probably tie into the on_post_save event to automatically save the top level file when you modify a child file.
I personally found the easiest solution was to install Package Reloader, and just put a new file in the top directory of my plugin named .build. Save your top-level plugin file and enjoy not having to restart.
Virtually no restructuring of code required.
From the unofficial docs:
Sublime Text will reload top-level Python modules from packages as they change (perhaps because you are editing a .py file). By contrast, Python subpackages won’t be reloaded automatically, and this can lead to confusion while you’re developing plugins. Generally speaking, it’s best to restart Sublime Text after you’ve made changes to plugin files, so all changes can take effect.
Unfortunately, plugins are not loaded into a scope visible from the console (Ctrl`), so you can't just reload() it. EDIT But, you can call reload() from within your top-level plugin file, as detailed in #skuroda's answer.
You'll have to make the decisions on when to break classes out into separate files vs. keeping them together in one monolithic collection. Having 50 files, each with only two or three function definitions is overkill in one direction, while having 20 classes each with 10 or 15 methods all in one file is going overboard in the other, so just do what feels best for the particular project. In my experience killing/restarting ST2 doesn't take too long in any of the supported operating systems (except on XP, for some reason...), so hopefully it's not too much of a delay on your workflow. One suggestion I'd give is to create a portable installation (if you're on Windows) with just the bare essentials in extra plugins if your startup time is too long.
Good luck!

How to create a Notepad++ macro to run multiple plugins automatically?

I am using Notepad++ for different languages i.e: JAVA, C, C++. For each of these languages I have installed plugins to make coding easier in Notepad++.
The problem is that every time I start Notepad++ I have to go and run all those plugins manually. I tried recording a macro so that it will perform all these actions by one click but it didn't record anything I did with the plugins. The macro will record any changes I bring to the code or if I save the code to some other location but it won't record the actions performed by the plugins.
Can anyone guide me to a solutions.
Thank you in advance.
Have a look at AutoHotKey tool. It can send keystrokes/mouseclicks to Notepad++ so you can easily combine invoking many menu items into one command. (And much more like work with clipboard, ask for values in input boxes, run apps or DLL's.) Please see AutoHotKey usage with Notepad++ in this answer.