How to disable scalaOptions switches ("-Xlint", "-unchecked", and so on) for certain files, for example play templates *.scala.html.
Related
In Netbeans 7.4 you can configure LESS or SASS compilers. You can check the option to Compile on Save. That works great. But how can I trigger this action manually from Netbeans? I deleted the destination folder and want to recompile everything but I can't find how.
I believe it is not possible. But perhaps you could try to open project properties (right click on project) and in css preprocessors setting (see here) try one of following:
uncheck the "Compile on Save" option, confirm dialog and the open project properties again and check this option back. It could trigger recompilation
if the above won't help, try to remove all settings in the "Watch", confirm dialog and then enter your setting in the Watch section again
You need to change the paths of the css and less folders in your projects to the correct one. It should be relative to the project folder.
So if you have a folder named assets in the root of your project and inside it 2 folders css and less then their paths in the project CSS preprocessors settings should be /assets/less and /assets/css.
As soon as you correct this your less files should compile on next save
I'm using NetBeans IDE 8.2 in August 2017, and there is a Recompile All Files button in Project Properties > CSS Preprocessors.
Less runs on save in netbeans and there isn't any menu item or shortcut.
If you want to activate the setup on save and you have problems i recommend to delete the less lines in your project.properties file going to the file tab and searching for the file in the nbproject/project.properties.
I'm using libgdx for a desktop game/prototype and I want to start getting into UI design.
I followed the answer here: Default Skin LibGDX? to download the necessary skin files but I'm not sure where in my project to put the ui directory with these files. I have tried to put it right in the project directory along side libs and src, so there's libs, src, ui, Referenced Libraries, and JRE System Library but when I reference the Skin with new Skin("ui/uiskin.json") it is throwing a filenotfound exception. Should this be down in my com. package in the project viewer in Eclipse?
I understand for an Android app you use the asset folder, but I don't have one in my project since it's a desktop app, even if I were to just add it.. I still don't know at which level unfortunately. This is probably really simple.
Thanks in advance.
The skin files are being looked up as "internal" files. On Android, this will look through the Android asset directory and CLASSPATH, but with the Desktop backend, only CLASSPATH will be searched.
To be consistent with the way things generally work in Libgdx, create a directory called assets next to the src and libs directories in your desktop project. Then put your ui directory inside assets. This isn't strictly necessary (see below) but will make your project a bit more compatible with other Libgdx code and projects. With an Android project the desktop assets directory is normally linked to the Android assets directory, but without an Android project you should create a regular directory.
If you used the Libgdx Libgdx "setup tool" the desktop project's assets directory should already be on the CLASSPATH. If not, you will also need to add this assets directory to your CLASSPATH: Right click on the project -> Properties -> Java Build Path -> Source tab -> Add Folder ... -> Select the assets directory.
To be clear, if you don't want to mirror the Libgdx conventions above, you just need to make sure the directory containing your skin files is on the CLASSPATH, then they will be found as "internal" Libgdx files (for example, you could add the ui directory directly to the CLASSPATH, and then look the files up without the explicit ui/ prefix).
After a somewhat comprehensive evaluation of IDEs for use in front end development, WebStorm leads the pack I think.
The one missing piece is that we can't configure JSHint the way we need to. The WebStorm preferences GUI provides some options, but not the full set. The GUI only lets you configure 15 of the 30 or so actual available options.
This is a problem because we don't want to change our coding practices just because an IDE doesn't let us configure linting the way we want.
Is there a hacky way to go in and adjust the JSHint library behind the scenes for WebStorm?
You can configure all the options you'd like in a .jshintrc file located in the root directory of your project. This will be a project-wide setting.
From https://www.jetbrains.com/webstorm/webhelp/jshint.html:
Use config files
Select this check box to have the code verified according to the settings from a configuration file. A configuration file is a JSON file with the extension .jshintrc that specifies which JSHint options should be enabled or disabled. WebStorm will look for a .jshintrc file in the working directory. If the search fails, WebStorm will search in the parent folder, then again in the parent folder. The process is repeated until WebStorm finds a .jshintrc or reaches the project root. To have WebStorm still run verification in this case, specify the default configuration file to use.
I've been using this for a while and it works great. Plus you can commit it to your repo and ensure the entire team follows the same code style. Also a great place to add globals.
I'm not aware of any hacky way to do it, but you can vote for the existing feature request.
There's a per-file solution that works, but is not ideal. Would prefer an IDE or project-wide fix/hack.
Set JSHint options at the top of your file:
/*jshint laxcomma:true, asi:true */
I've got an app that consists of a shell app which loads in other modules. As I've made changes and put them on the web of course others on the team haven't seen updates because of older versions they've cached.
Now of course a simple fix is to change the directory I'm uploading to and symbolically linking to that file, but I thought I could get around this by custom compiler arguments...
I've been getting around the caching of the external modules by appending a random number to the url of the module to be loaded by the shell (ie loadModule(blah/blah.swf?123). But this also means that the modules get pulled everytime; that's not needed. I then created a VERSION string in the main app that I change when the modules need to be pulled (ie loadModule(module.swf?+VERSION). That works for the modules but not the main app.
I'm thinking that if I can add some sort of VERSION to the compiler - the Consts I suppose - then I could also use that CONST to compile the file with shell_{CONST}.swf (ie shell_203.swf) and make sure that the htmlTemplate ALSO embeds this versioned file...
Suggestions?
I'm very familiar with MS's Visual Studio environment, and recently I had to do some stuff for iPhone. I have a c++ project and I have performance critical components included as part of the project. This performance critical file absolutely must be compiled using optimized settings even for debug builds. That is, I have to overwrite settings for a file and pass -O2 -DNDEBUG when compiling one of the files of the project without affecting default compilation settings of the rest of the project.
Can this be done, I spent like an hour browsing through menus of XCode and wasn't able to find it!
If you go to your project window and select the file, you can get info on it with command-i or right clicking. Then go to the build tab, where you can enter additional compilation flags for this particular file.
I am on xcode 3.x but I don't imagine that they would remove this.
I note that this is just for additional compiler flags. If you need to remove some of your default flags the only option I can think of is a bit of a pain: make a new target that is set up with build options just for this file and include that target in your main target.