Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Our team wants to adopt a coherent coding style, that has an automated refactor tool to spread the style across the team easily (not in terms of formatting - more like preventing "mistakes" and detecting general pitfalls in the code).
We have those needs:
- Working well with Eclipse, cross platform (linux/windows)
- Manipulate the code without changing its semantics
- Configurable (option to enable/disable rules)
- Optional: "Short Style" preferred ('v' instead of 'variable', if there is such tool that can do it)
A bit strict needs - but I'm sure SO community will do it :)
For the record I'll mention I was a member of the team developed Spartan refactoring (just a contributor - nothing too fancy), but along the way I've stepped on a few more - all of them are open source:
Spartan Refactoring - cross platform eclipse plugin. Adopts general purpose rules as long as some unique ones representing the Spartan coding style. Completely configurable.
AutoRefactor - eclipse plugin (I think it's cross platform). Adopts general purpose rules, also includes rules that considered as formatting (like braces eliminations) and also Configurable.
SonarQube - Large toolkit that also includes refactoring tool. Does the job but you also get a bunch of other tools inside (might be good or bad, depending on your needs).
To make the answer complete, have a look at:
automatic-refactoring-tools
automatic-refactoring-tools for java
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I've been trying to find a Java linter capable of running on the CLI that is separate from Eclipse that I can call as a commit hook for git or from our automated build script. Does such a thing exist?
Ideally it needs to check for unused imports and variables, that style guidelines are followed, exceptions are used properly, etc. Though some subset of those features would be better that what we have now - nothing!
SpotBugs (earlier Findbugs) for finding existing bugs. VERY GOOD!
PMD for finding patterns that can lead to bugs (e.g. unused variables)
Checkstyle to enforce coding standards and conventions (e.g. whitespace, Javadoc)
Error Prone hooks right into your application's compile step
clang-format supports java and may be available on your system already
All these tools have some overlapping rules. There are many other similar tools, but these are the most popular and supported.
Also, check out Sonar, which combines many of the other tools and provides a nice view for it too.
rules from Checkstyle, FindBugs, PMD, Clirr, fb-contrib.
Not sure exactly how to add it to a post-commit hook, but http://docs.codehaus.org/display/SONAR/Analyzing+with+Maven might be a good starting point (especially if you're using maven).
Maybe even consider using one of the approaches listed in http://docs.codehaus.org/display/SONAR/Continuous+Integration since it seems that you might be trying to look for better tooling for your whole team ("Though some subset of those features would be better that what we have now - nothing!"
This is EXACTLY what I am working on: a tool CLI-friendly to be used to check the quality of Java code. It has also an interactive modality. You can run single queries (to check for single warnings) or all queries together.
The tools is in its early stage but I am working on it almost every day. It is available here:
https://github.com/ftomassetti/effectivejava
Please let me know what do you think about it and feel free to ask questions.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I am looking for a library/API that has some out of the box data and control dependence analyses for Java programs. This would be a static analysis on the control flow graph (CFG) of the given program to compute data dependences and control dependences. I would like to avoid reimplementing these techniques/algorithms if they have already been done. An inter-procedural analysis would be great, but I could work with a library that does an intra-procedural one as well.
Any suggestions would be greatly appreciated.
Edit: One thing I have found is jChord, but I haven't been able to determine yet if it actually has any of the out of the box functionality that I am looking for or if I would have to implement it myself.
Another possibility is the joeq library which seems to at least have the infrastructure necessary for doing this, but the documentation (or lack thereof) is making it difficult for me to tell what it is actually capable of.
I am sure Eclipse does plenty of data flow analysis underneath the hood, but I haven't seen anything yet that is public facing. Anyone know of the Eclipse API having stuff like this?
Try http://www.sable.mcgill.ca/soot/
OP says he is interested in non-open source systems too.
Our DMS Software Reengineering Toolkit with its Java Front End can parse Java source code in all dialects 1.4-1.7, producing full ASTs, build symbol tables, compute types of expressions, and determine control and dataflows within methods, including explicity control dependence as requested by OP.
Usually folks that are interested in advanced analyses have something other than the raw analysis in mind. DMS is an ecosystem of program analysis and transformation tools, that can be used to leverage such analyses into diagnostics about the existing code in terms of source location (drawn directly from the ASTs) or source code (prettyprinted from a subtree of interest), or to generate new code fragments (by assembling ASTs and prettyprinting them) or finally by actually changing the original code (by modifying the ASTs using procedural modifications or better yet, source-to-source transformation, and prettyprinting the modified AST).
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I understand this question has been asked before, but that was back in 2008, and things have changed. I tried looking for Swing, but the JFC is now outdated, and I can't seem to find Swing anywhere else.
I'd like to know what the best up-to-date java GUI libraries are.
Looking at the question you link to ( Which GUI Library is the best in Java?
), the answers there are still relevant.
Short version:
There are two serious contenders for a GUI: Swing and SWT.
Swing is more mature (arguably), is part of the standard JDK (no deployment issues), very flexible and well-documented.
SWT makes it easier to behave like a native application across different OSes (but this also means significantly more portability issues). It also reportedly performs better in some scenarios (but this depends very much on what you do).
Some other considerations:
I'd seriouly consider creating a web app when making a new app nowadays. In that case, SWT scores an extra point, because it has Eclipse RAP which (more or less) lets you convert a desktop client into a web client by just recompiling against different libraries, because it uses the same API as SWT.
Also, you might consider building atop a client framework, instead of writing from scratch. In that case, if you use Eclipse as your framework, you'll have to use SWT. Or use Netbeans, which is based on Swing...
SWT has been good to me. It provides a native look-and-feel by using native controls when available.
You can optionally use it and JFace in the Eclipse Rich-Client Platform, which provides a framework for applications built atop a community of plug-ins. It has a high learning curve, but provides a mature, powerful framework that you don't have to build.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I am currently busy with a project where the main focus of the application is to be extensible (allow 3rd party developers to write plugins / their own implementations of interfaces).
Until now, I have been using Java, and built the application on the NetBeans platform. This has works perfectly fine and is quite easy to implement.
However, the program is quite computationally intense, and must be run on a grid of computers. I think C++ might be better suited for massive computations like I need.
What I would like to know. Is there any libraries like the NetBeans platform for C++. Or would I have to implement everything from scratch (not that I mind, I just wat to know)? Also, how easy is it to write extensible code with C++ and implement something like an update center? This is stuff you get for free with the NetBeans platform. My experience with the using the platform is that it allows you to write very modular code, which is something I like. New modules can be installed independantly, while the platform provides discovery of services to find all the installed plugins / impementations.
Can this be done similarly in C++?
Thanks!
I recommend that you have a look at the Qt framework. They offer a mechanism to create plugins. Have a look at this free online book about Qt. Plugins are discussed in chapter 21.
For modularity on binary level Boost.Extension might be a good choice.
For autoupdate there is for example Google's Omaha (Windows) or Update Engine (OS X)
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I know this question has been asked many times, but here are my specific needs. The obfuscator needs to come in a form of a java library, so I can make an Ant task in order to automate the build process. IE7, 8, Firefox and Chrome must be able to interpret the resulting js very fast (original js file is pretty big - 18k lines of code). If none exist which satisfy these requirements I'm willing to consider a commercial solution.
Some options:
YUI compressor. See Julien Lecomte's blog for example use from Ant.
LCA Soft provide a free Ant task interface to the Dojo Toolkit compressor.
Jawr - Ant task.
(I've not used Jawr or Dojo, so can't comment on which is best.)
Google's closure-compiler is another alternative.
There is a newer free option for Javascript Obfuscation - Roquson. They provide completely free Javascript Obfuscation with additional features like Variable renaming, Domain Locking and Expiration Date.
Check it out here: http://roquson.com
I still believe that jsutility.pjoneil.net provides the best compression of any program available except for gzip. It's obfuscation support is avoids most of the problems with obfuscation. It also now support batch operations.