Automatic format all files in Springs tool suite - sts-springsourcetoolsuite

How to format all file in Springs Tools suite? like ctrl+Shift+f, but all files in our project.
Is STS have setting? like before compile, all files will be formatted.
Thanks.

You can select multiple files and execute "format" on them (don't need to open them). In addition to that you can enable the cleanup actions so that every file gets formatted on every save action.

Related

automatically compile less file on save of a imported less file

I have split my less/css into several files grouped by certain categories, so the single files stay easy to maintain. Though I only want to have one css file which gets imported into the layout.
For this I have - how I call it - a master less file which imports all the others like config, forms, layout and so on.
Now the problem is, that for example WinLess or all the other copilers i tried, only monitor the save of my master file, and only then compiles it. However this is stupid, because this file nearly never gets any changes. So what I would like to have is something, that detects changes on the imported less files and then only compiles the master file.
Does anyone know any tools, which are capable of that?
Or how do you manage your less files to bypass this problem?
Further Info: I have mapped the server directory locally via SSH and edit the files in there, i.e. the files are only pseudo local. They are on the server but accessible with a local path over a drive letter. The compiler should be able to work with that setup.
Thanks for the answers!
In all honesty, your best bet is to actually use Less's own compiler which will of course be the most up to date option. It will be done through command line but it's the best way to know that everything is correct, working and up-to-date.
All the information can be found in the Less Documentation Here
More information about compiling with imports can be found HERE
The latest version of WinLESS does report that it has automatic re-compiling when an #import file is changed so it could be that your version of WinLESS is out of date. (See HERE - 3rd bullet point under Features)
Alternatively, see if you can get it to work on purely local files. If this works, it may be an issue with the compiler not being able to do asynchronous checks over SSH.
I use Notepad++ with the NppExec-plugin on-save script. If you make a convention decision to always name your primary file "master.less" you can use this script:
NPP_CONSOLE 0
NPP_SAVE
if $(EXT_PART) != .less goto end
"C:\Node.JS\node_modules\.bin\lessc.cmd" -x "$(CURRENT_DIRECTORY)\master.less" > "$(CURRENT_DIRECTORY)\master.min.css"
:end
You can do something similar with any editor that supports batch scripting (like Stewartside suggests)

Pentaho Kettle - Conversion of a job to jar file

Is it possible to convert a pentaho job to jar file? if it so please tel me how? i tried to convert a job to jar but failed due to the class problems.
In JAR, we aggregate many Java class files. But in PDI Jobs, the files are in XML files. Pentaho uses its DI Engine to read these XML files. Hence we cannot create JAR files out of an XML file.
You can run an ETL job from java code, using kettle's api. You can't convert a job into a jar.
If you launch a job or a transformation in batch mode, you have to use the scripts kitchen or pan (with sh or bat extension dopending on the OS). Actually those scripts run a java program inside, using the parameters that you pass to it. One of the parameters has to be the path of the file .Kjb (extension of a job), which is a regular xml file. So the xml files are necessary, but you can launch directly the java command (the one inside of the sh/bat script) passing the required paramenters to it. To see which parameters it needs you will have to do a reverse engineering work on the kitchen/pan script, which are really simple and short inside.

How do I make LessCSS output css which is then uploaded to webserver

I want to use LessCSS for some of its benefits, but I don't want the user to have to download the less.js file or have it do any processing client side - I don't even want to have LessCSS working on my webserver. I'd like to write some Less, push it through LessCSS and then upload the resulting CSS file to the webserver.
Ideally I'd like LessCSS to process the Less file as when I save it in NetBeans and automagically pop out a css file.
Any ideas where to start?
Have a look at my blog entry (http://blog.nickdamoulakis.com/2012/04/php-less-css-and-cssjs-minify.html) where I list and describe a method I use.
Basically, I have a tab open in my browser that points to my compile.php.
Whenever I want to 'compile' files, I just press F5 and it compiles JS-->MIN.JS, LESS-->CSS and CSS-->MIN.CSS.
An INI file specifies which directories to process.
It is not a fully automated process but it works for what I need it to do.
I hope it is of use to you.
Check out SimpLESS. It's a standalone application, but it will monitor a folder for changes in .LESS files and auto compile them into CSS.

how to convert .sou file to .sln

I downloded asp.net file but it shows in .sou extension it is not opend in my vs2008 how can i convert .sou file to .sln
The .sou file isn't the equivalent of a .sln file. They do different things.
In your Visual Studio go to File -> Open Website and navigate to your folder instead.
You can't. .sln files store completely different data than .suo files.
From MSDN:
.sln: Organizes projects, project items and solution items into the solution by providing the environment with references to their locations on disk.
.suo: Records all of the options that you might associate with your solution so that each time you open it, it includes customizations that you have made.
Looks like the .sou file and .sln files ccontain different info. See descriptions here
http://msdn.microsoft.com/en-us/library/xhkhh4zs.aspx It won't contain information that can converted.
The best way is to create a blank solution file and add the existing projects to it one by one.

Which files should go into source control in a Flex Builder project?

I noticed that Eclipse (Flex Builder) generates hundreds of metadata files. Should I check them into my source control? They seem necessary, because if I delete them Flex Builder just opens up an empty workbench...
Some of these files plainly do not belong in source control (like .history files and some cache files). If I delete them my project opens up again without a hitch. But the list is long and there seem to be no clear separation between folders that contain files that belong in source control and those that do not.
I can't just shove them all into svn, even if I were to ignore the inefficiency, because Eclipse generates new ones constantly, with different names, which in turn also seem to be crucial for the project to load.
Can someone please enlighten me?
Don't check in the hundreds of metadata files. If you want to be able to check out the project in a way that it can just be imported, then check in:
.actionScriptProperties
.project
.flexProperties
And "html-template" and "libs". As Christian says, any resources you depend on. I usually keep those as separate Flex Library projects though.
I generally put all of my source code under src, and I check in src and all of its descendents. If my project relies on any external dependencies (e.g., the Cairngorm SWC, as3corelib, etc.), Flash/graphical assets, stylesheets, or resource files, I check those in, too. But I don't check in any generated (bin-*), intermediate or IDE-specific stuff, because having that stuff in source control doesn't seem to provide much practical benefit, and in my experience has only caused me headaches; in general, I check in the most minimal set of whatever I'd need -- given a clean FlexBuilder installation (or none at all -- for example, if I were compiling instead with mxmlc or compc) and an empty project -- to build the project successfully.
Most of the eclipse project files, like .project, .properties, everything in .settings, can go into your source control. As long as the files don't have user-dependent settings like file paths or local urls, you should be fine.
One method we use is creating local property files that don't get used in SCM, but are included in the ones that do. I.E an ant build file including a local.properties file which has local metadata.
What if the .actionScriptProperties, .project, or .flexProperties have user-dependent stuff in them? Typically this will be url or path information. What's the best practice way of externalizing this? I tried creating path variables, but this only works obviously for paths. Not for things like hostname, etc.

Resources