Folding files in the navigation bar in webstorm - coffeescript

Iam using Webstorm for a project that uses coffeescript and Sass. In the navigation bar, I see coffeescript files along with the compiled js and map files. In the same way I see css files with the scss files. I want to be able to fold js and map files inside the corresponding coffee file for ease of navigation. I am not sure how to fix the settings for this. I want the same for scss and css files.

Yes,you can!
After google for hours,I find the answer.
Select such file(s)/folder(s) in Project View panel
"Help | Find Action" (Ctrl + Shift + A), activate check box for better results
Search for "run file watchers" (without quotes, obviously) and choose Run File Watchers entry.
see more:
PHPStorm - Run Filewatcher on existing files?

You cannot do this manually (i.e. any files you want at any time).
It's done automatically by File Watcher plugin. So .. if your *.coffee files are compiled in WebStorm by using File Watcher .. then it should be working/done automatically.
If you have File Watcher already set up -- delete intermediate files (.js/.map) and force run that file watcher.
Such grouping works if those extra files were generated after running File Watcher. IDE checks for new files and compares them with file watcher settings (Output paths to refresh field, I believe) -- based on that it creates such folding.
External file watcher (i.e. grunt-contrib-watch) is executed autonomous of IDE's File Watcher .. therefore such files will not be "grouped".
Related tickets (those few that I'm aware of) that ask about additional settings to be able to create such nesting/grouping manually:
http://youtrack.jetbrains.com/issue/WEB-8658
http://youtrack.jetbrains.com/issue/WEB-7635
http://youtrack.jetbrains.com/issue/IDEA-113347
UPDATE 2017/08/10:
As of 2016.3.x version such grouping/nesting is no longer relies on File Watchers -- it has special hard-coded rules for most common scenarios.
As of 2017.2 such rules are editable and available via Project View panel settings.

Related

Eclipse (CDT) not running Builder

I have a C-project (in Eclipse 2020-09 4.17.0) where I want to run a Web-Builder (a simple batch file which called from a cmd-shell works fine) before running the C-Compiler.
The Web-Builder is supposed to look into three different folders (one outside the project, two inside the project) and process the HTML files found there into C-Code.
Therefore I set the Web-Builders options to Refresh the entire project after building and specified the three directories as Resource in the Build Options.
I activated all 4 checkboxes (run after clean, automatic and so on).
BUT: The builder is NOT run if I modify a file in the latter two directories. It is only run if I change one of the files in the first directory (the uppermost directory in the build options).
If I now change the Build-Options such that not the complete first directory but only its files are part of the specified resources, now I can change a file in the second directory and the first directory to get the Builder executed. But any modification of a file in the third directory will not trigger the rebuild.
If I now further modify the Build-Options such that not the second directory but only its files are part of the specified resources, now I can change a file in the third directory and the first two directories to get the Builder executed.
But actually, this is a nasty hack as any additional file added to one of the directories will now go under the radar and will not trigger rebuilds as any sane author will not guess, that he has to go to some hidden Builder -> Build Options -> Specify Resources to get the new file into the build process. Probably he/she/they would activate the whole directory instead again and thus inhibit further proper build processes.
HOW can I make Eclipse process all three directories correctly?
EDIT: Issue is also in Eclipse 2022-12.

Specify Eclipse CDT Default Launch Config

PAIN POINT:
Using Eclipse CDT - the launch configs I need are rather complex (little settings that are non-default values and other misc things) too many little things to remember, and easy to skip then stuff does not work. I want to be able to semi-automate this process in project makefiles.
Background:
I have multiple projects, not stored in the workspace (my users "import the project"). In some cases projects are some what generated (they are external makefile projects.
Requirement: Specifically depending on what build configuration is required the launch config needs to change/tweak, the external Makefile can do that, or I can create one launch file for each config. Or I can pre-populate them when I create the project
[example is normal development, debug/release but with unit-test variations]
The user might tweak the settings of course and want to save them.
Requirement: So that the launch files "travel with the project" - I want to check the into GIT, thus I want the .launch files kept in the same directory as the .project and .cproject files - as described here (thus they can be checked in and things are "self contained)
Store run configuration with project in Eclipse
PROBLEMS and QUESTIONS
1) Given existing launch configurations files (.launch files) in the ".project" directory, how can I browse/select from the list of existing ones that Eclipse does seem to previously know about.
{Example: Create a launch config called "FOO", copy this to "BAR", edit the BAR config file, replacing internal occurrences of FOO with BAR)
The BROWSE button in the "common" tab lets me select a directory to save but does not allow me to select an existing file
2) How can I tell eclipse File (X) is the default launch configuration for this project, or config(X) uses file(A) and config(Y) uses file (B)
3) Is there a way within the ".project" or ".config" or ".cproject" files to specify where to look for launch configurations, where to offer them?
4) Sure would be nice to have a file (or place in the .project, or .cproject) file that says: Launch configs for this project are in this directory - offer the user a list based on the files present in that directory
bottom line:
I'm sort of stuck - I can create launch files "correctly" with all required settings but I seem to have no means to tell Eclipse to use select/use them.
No amount of automation here seems to work, and I end up having to go back to manually creating and humanly forgetting settings in the project files.
Places I've looked:
Sort of the issue but not exactly
https://superuser.com/questions/521537/remove-launch-from-run-debug-drop-down-in-eclipse
Below - ARM describes the IMPORT process, but in my case all ".launch" files are grayed out and not selectable I don't know why and that is a different problem
I'd like to not make this a multi-step process - also see above about removing stale launch configs - you end up with too many launch configs in the history.
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0446h/CJADBBIA.html
There are numerous other places but all seem to be "click here" or "use this menu item" and not addressing the external file issue.

Configure Project / Clean to delete temp files

Is there a way to configure the clean functionality of eclipse?
For example that all *.sqlite files are deleted if i execute the function.
This is necessary in my project cause i haver diverent temp outputs like csv or sqlite files. And it is anojing to delete them all by hand.
The fastest way is by create a batch file located
For example in your desktop contains some thing like that :
del C:\blablabla\yourprojectBath\*.svc
del C:\blablabla\yourprojectBath\*.sqlite
The clean functionality of Eclipse is limited to cached information and metadata associated with a project. It does not delete free form files.
The only solutions that I can recommend are:
Have your code clean up previously generate files
Use a solution as presented by Ahmed above.
Make use of Ant functionality inside of Eclipse. Create an ant
build.xml file with a clean target. Then click once on the file to highlight it and right click->Run As->Clean. The menu should show you the
different targets you can run.

How to get an Eclipse CDT project to auto-reload a .c file that has been externally modified

I'm using a ruby script to help generate a .c file based on another .c file (for a test harness called Unity).
The script runs using the pre-build option, updates the file, but the cproject doesn't see the upadted file as being touched so doesn't rebuild with it.
Using F5 updates it but I'd like to do this manually.
I can't see how to make this happen.
I had the same issue generating a C file from a Python script.
What I ended up doing is to create a special Builder for that file.
If you go to the project properties, go on the Builders tab and click New. Then select Program. You can fill all the information there. The important part is to go on the Refresh tab and select Refresh resources upon completion.
I also found it useful to unselect the stdio ("Allocate Console" in Build Options tab) so that it doesn't clear the console after a build.
the only drawback of that method is that the Builder doesn't pick-up dependencies and is called all the time.

Resources check

hey I am frequently uploading my XCode iPhone projects to an svn repository to be build on another machine.
My problem is that when I add resources to my project sometimes I forget to add the resource as relative to the project.
I know one answer is to be more careful (not easy when your tired!) but if there was a way to run a script to check my resource paths are relative when I build and warn me if they are not it would be a great time saver for me.
How would I go about doing this?
Thanks
Chris
You can select all the files in your project and set the Path Type for all of them in one go. While this isn't a script this does save a lot of time over doing the files individually
I think the best approach to script this would be to look in the .xcodeproj file - the file paths are listed in there. If your project is called MyProject you need to open (either by using Show Package Contents in Finder or just the usual cd in Terminal) the MyProject.xcodeproj directory.
In here you'll find a file called project.pbxproj - open this in a editor that won't mess up your formatting and have a peek around the file. If you search for one of your files in the project you should be able to see how Xcode stores references to the project files.
Look for a section named /* Begin PBXFileReference section */. In here all your files are listed, along with where they are relative to the project, e.g.:
... path = Classes/MyClass.h; sourceTree = SOURCE_ROOT
If you can parse this file you should be able to acheive what you want - but remember to back up the file, otherwise you might corrupt your project.
How would it be if you instead write a script that asks the SCM if anything in the project is not committed? For example, think of this scenario
Project Root
Codex
Project.xcodeproj
…
Design
anImage.png
where anImage.png being outside of Codex, where the Xcode project sits (its path starts with a ../). A strong .pbxproj parser would have to support all the variants in which Xcode references files to know exactly if there are stray files.
OTOH, the SCM knows where everything is all the time (you mentioned up-ping to a SVN server), so why not ask it instead.
We have a Ruby script that prints a warning in Xcode’s Build Log if anything in the project is not committed.