does a "fake folder structure" Extension exist in VSCode - visual-studio-code

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?

Related

XPages: add a ResourceBundle Editor to the Domino Designer/Eclipse

I found this properties editor that seems perfect, I have a lot of translations to maintain. I found this editor that seems to be able to handle all languages at the same time, which is perfect for me: https://github.com/essiembre/eclipse-rbe
I managed to install the plugin, but now I have to confess that I'm way out of my league. Stumbling around in the dark...
How to start it, how to use it?
Or is there a better way to maintain properties in multiple languages?
I also have to maintain an application with a multi language user interface.
First of all I also started the attempt to use eclipse plugins for editing Java resource bundles but I am also failed... :(
After some test's with different editors I decided to work with JLokalize.
My way of proceeding:
Step (Switch to the package explorer of your Domino Designer)
Step (Select a folder for export to file system, e.g. Custom Controls or XPages)
Step (Set filter types to *.properties)
Step (Finish the export to your filesystem (or a network file share, if someone else should do the translation work))
Open and edit the resource files with JLokalize
After finishing your translation work you could import the translated files (e.g. *_en.properties for files translated to english) in your application.

How to open multiple files and edit them in 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.

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!

Any way to disable syntax checking for a project?

I created a project "Sample Code"... here I just paste sample code... much of it is snippets that won't compile.
Is there some project-specific setting I can make so that Eclipse doesn't try to compile it?
I would prefer not to have the source code littered with red error markers.
Put your code in a non-java project, ie a general project.
Downside: you will have to create package directory structure (unless you can copy and paste from somewhere else).
Upside: it won't try to compile.
MY SOLUTION
ok, this is not an exact solution to my problem... but it is another way to do it and I kinda like it now...
I simply forget about using Eclipse to store the sample java files!
I found a good program CodeBox for Mac to store code snippets and I'm sure there exist such things for Windows, Linux too...
there interesting thing is that when I choose from this program to open the java snippet file (.java) in an external editor (Eclipse), it will open in Eclipse without any Syntax checking... wohoo! no squiggly lines
Because of this, it is not full blown code highlighting... classes and variables same color... but that's ok.. still quite readable. Much more than if it was in Eclipse with syntax highlighting running on it...
So basically, if you want to get rid of these red squiggles... one way to do it is don't keep sample .java (or other language) files in a project in Eclipse... simply keep them in the filesystem or code storage app and open them with Eclipse when you want to view them.
Depending on how you prefer to structure your project:
you could put your java files into a separate folder that is not configured as a source folder. There is an entry in the eclipse help on how to configure your build path.
or you can set exclusion-patterns in the build configuration, so that specific packages or files that follow a pattern you define don't get compiled.
Yet another way to handle your snippets could be to use a Scrapbook page.
Eclipse won't highlight anything in a scrapbook page but you can select code parts inside the page and execute them isolated. That's nice if you're experimenting and don't want to set up a whole class with imports and methods just to see if a specific snippet works as expected.

Eclipse: On Save execute a program

I have recently come across the LESS Leaner CSS a template engine for CSS based on ruby. The idea sounded neat, but in practice we need to compile the program to get CSS. This is cumbersome as we make too many changes while working on CSS and for every edit we don't want to compile.
In Eclipse, there are "Save-Actions" but it handles only formatting changes.
Is there a way on saving the file in Eclipse, to call or trigger the compilation?
Its easy to do this in Vi or Emacs.
I think all you need is to define a custom Builder for your project. That way, you can run a program or an ant script whenever certain files change.
Right click on the project -> Properties -> Builders -> New
While the Builders are a good solution, keep in mind they only work when a build is issued - either using auto-build or using a manual build which is invoked, well, manually. If you are looking for something that will operate after a save, regardless of the auto-build state you will need to write a plugin which listens to resource changes in Eclipse.
You do that by creating a workspace change listener and installing it like that:
ResourcesPlugin.getWorkspace().addResourceChangeListener(
..., IResourceChangeEvent.POST_CHANGE);
I'm sure you can take it from here :-)