Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
Is there a good Eclipse plugin for recording and playing back macros?
I've tried this one, but it didn't do me any good- it seemed like it wasn't ready for prime time.
I know about editor templates, but I'm looking for something that I can use to record my keystrokes and then apply multiple times against a wad of text.
This seems like a strange hole in an IDE. Am I missing some built-in facility for this?
I put something together over the last month or so that you may find useful. It has limitations since the Eclipse editor/commands weren't designed with macro support in mind, but I think it works reasonably well. I just posted Practical Macro at SourceForge a couple of days ago. It requires Eclipse 3.4.
Emacs+ Version 3.x adds keyboard macros (http://www.mulgasoft.com/emacsplus) to its feature set.
This seems like a strange hole in an IDE, am I missing some builtin facility for this?
This is a common problem. There are around four bugs opened in Eclipse tracker for this. Unfortunately you would probably see macros in Eclipse in v4.0 or later.
I've had success using AutoHotKey (Windows only, though).
There was a plug-in called Eclipse Monkey which allowed writing scripts that execute inside the IDE. It was terminated about a month ago due to lack of interest.
It is based on an older plug-in called Groovy Monkey. If you google it, you can still get it. The Aptana team has some more information on using it.
Note that this allows writing scripts, but not recording actions.
This is not an Eclipse-specific one, but it can be used there as well:
http://sikuli.org/
For simple text expansion on a Windows computer, you could use AutoHotkey. It's not as powerful as most macro tools, but since it's not tied to any one program, it can be used in other editors, emails, etc.
For example, if I type ";;ln" AutoHotkey instantly sends the keystrokes to delete this and replace it with "System.out.println();" with the cursor in between the parentheses.
Just for the record, there is another project called MacroSchmacro that does Eclipse macros, but it doesn't record many important things (like searching to navigate). It is also extremely slow.
Talking about Emacs, jEdit has a very strong macro facility. There are a lot of high quality macros and plug-ins, and several macros are already built it in. You can even add some logic using bean scripting, which is analogous to VBA. So, you can write very powerful stuff (any many people have done so).
jEdit is obviously a separate editor, but I think it's worth a shot. See http://www.jedit.org/
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
The company I work at has a piece of code they would like to rewrite. It uses Java/Java server faces. The problems with it are that it is old and uses depreciated code, was written in an IDE that is no longer available and doesn't work well with netbeans, and that it is kind of sloppy coding in the first place. No one really knows its structure and there is limited documentation.
Before beginning on the rewrite, we would like to find the structure of the old program and get a decent UML diagram. What tools would work the best in this situation? So far we have looked at one called Agilej.
Sorry if this is a little vague, I'm just a lowly intern an haven't been filled in on everything yet =p
You can use JArchitect, a pretty complete java static analysis tool
I'm not giving clickable hyperlinks as you should be able to find them easily through a web search and there may be more than 1 link that is useful for you
Sparx Systems Enterprise Architect has very powerful reverse engineering capabilities. Java (also compiled binary JAR) is in the list of supported languages.
I have used Enterprise Architect's reverse engineering features several years ago to help us understand and design modifications of legacy C++, QT code.
Enterprise Architect was able to automatically retrieve the class model. I then used the raw class model to drag/drop draw several other diagrams including only classes of my interest with level of detail I needed etc.
In the range of other static code analysis tools (e.g. the code flow visualization) I don't know which tool particularly supports Java well enough. Quick Google points e.g. to Coder Gears JArchitect. In the past project I have mentioned we used Doxygen's automatically generated documentation. Part of that were also some automatically generated graphviz dependency diagrams.
To clarify the design and visualize the flow (especially big legacy functions) I have found useful the Rapid Quality Systems Code Rocket flow visualizer
Once you get the basic facts at your hands through the various reverse engineering tools next step would be to go through them, annotate what is the unknown, what is doing what, basically apply some formal code review method (e.g. Fagan inspection or some of its derivatives).
(using evaluation versions of the various tools may be enough if you think ahead what are the required deliverables for your follow up actions. I guess the company is not planing to give you a >0$ budget)
The Agile Modeling site may have some good refactoring tips and some minimal UML mapping guidelines, start e.g. at Agile Legacy System Analysis and Integration Modeling
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
We are a small team of developers working on a common Java/Maven project. We are using different versions of Eclipse, a common Mercurial repository (on Bitbucket) and three different operating systems. Since each developer has his/her personal preferences, we all use different coding styles and code formattings ("else" on the same line/on a different as the previous closing bracket, or using at most 80/100/120 charactes per line because some of use have bigger screens than others, etc.). As a result, when code is commited to the repository, it sometimes appears that there have been changes to a class, even though only the formatting was changed. This makes the real changes hard to trace.
So we were discussing solutions, and probably the best would be, if we would agree on a project standard and from now on, every code in the repo has to comply to this standard. If a collegue checks out code from the repo, a tool would convert it into his/her favourite format and just before committing it is converted back to the repo standard.
I was wondering if there is a tool for formatting code, that
could be run on any operating system
could be easily and extensively configured (such as the Eclipse formatter)
would allow for configurations to be shared
AND could be run, without the developer noticing that it is there.
OPTIONALLY could be run also from the console or as a separate task (eg. from maven)
OPTIONALLY is free
The point about automation is very important: I should easily integrate and ideally not bother the developer by forcing him/her to run a special script or press an extra button on each commit.
What I have done so far:
I added the following line to my .hgrc to create a hook.
[hooks]
precommit = python:.hg/perform_code_formatting.py:perform
and created a file called perform_code_formatting.py
import re,os,sys,mercurial
def perform(repo, **kwargs):
from subprocess import call
call(["ls", "-l"])
Of course, call will eventually replaced by a code formatting tool. But this approach is already flawed, because I am not sure what tool there is, that will run on any operating system and fulfill all the requirements mentioned above.
Tools
beautyj: runs on java, but not enough configuration options
indent/astyle: powerful tools, however, OS dependent
Jindent: not free
eclipse formatter: so far the best option. Could also be run from the console. However, since everybody has a different installation directory, some initial effort has to be made and the script/mercurial configuration has to be done on each working station individually.
My questions
Is there a tool, that fulfills all the requirements I listed? Does anybody have any experience with this "different formatting issue" and has come up with solutions / workflows / policies to deal with it?
Thank you in advance ;)
You can use Jalopy, an open source tool for code formatting. Probably your team can try this.
http://jalopy.sourceforge.net/
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I am currently doing an intership in a company and my task is to reevaluate the tool suite used to translate applications as it has become a problem internally. I've looked everywhere on the web and my conclusion is there is just no proper documented end to end workflow for this type of task, so I am asking the community to help me understand what they have seen in the field.
Our current flow looks like this:
java, properties files and resource bundles in the code
custom made tool to extract keys from code based on classes. bit clunky, as it uses class loading and therefore has many practical constraints
custom made web tool to do translations and handle code revisions
Here are some constraints and improvements we're looking towards:
we'd like for external translators to help us for additional languages our company cannot handle
we would like to add metadata to translation keys, such as validation flags, categorization data and description data, something not handled by properties files
we're going to have external translators and would wish to be able to use standards where possible to properly integrate with their tools
Here's what I've found on the web:
GNU Gettext's plural handling and context messages are nice. However, our existing code is written using keys and would not work with writing plain english messages in the code.
XLIFF provides means to have all the extra metadata we would like to add. However, all existing tools are either incomplete, buggy, or costly. Many of the tools add their own metadata which complicates working with XLIFF.
Pootle pretty much does what our custom made web tool does except fails to work on multiple Git branches.
Weblate, which is similar to Pootle, has the ability to work on multiple Git branches. However, updating a project with many languages and many translations takes time. It fails to meet our needs of continuous development.
So what is your recommended tool suite for internationalization of a complex multi-module java application?
Gettext (.po) is possible by a two stage key: key -> English, English as key. Disambiguation can be done with the original key. The original key can be preserved.
Gettext seems to be more extensively used than XLIFF - but I may be wrong meanwhile.
Web interfaces are fine - as a secondary tool. Translation agencies will complain when offered such a thing.
I cannot stress sufficiently that the delivery of the text is very important, to prevent that every translator has to do extra work. Almost the same text that might be united is such an example. A Translation Memory might give a fuzzy translation, but it is better to do processing by someone dedicated, before delivering things to translate. Also things like "Select from the menu 'Process thumbleweed'" and "Process thumbleweed" could well need a translation responsible person, to have coherent translations. XLIFF might offer more technicalities, but in general I think it is best to let an experienced developer ensure, develop this process. A common glossary of specific terms.
Also being able to have the application switch between showing a specific language and the key "[key]".
How about Tapiji? Not sure if it will meet all your requirements, but it is a time saver. If you are using Eclipse, or can use it, it might be worth a look. From the site:
The implemented editor is based on the Babel Messages Editor Resource-Bundle editor, which considers the whole Resource-Bundle as the object under modification instead of a single property file. Furthermore, a Resource-Bundle view adds rich functionality for browsing resources and directly comparing different languages. In parallel, RCP and RAP based stand-alone applications enable the translation of resources without the need of programming skills.
Weblate indeed is not the fastest tool for import (but there are many improvements in the upcoming 1.6 release), but there are several hints in the documentation how to improve this. Have you tried those?
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
we're writing some sort of compiler from Pascal to JVM Bytecode. And we've already implemented an expression tree generation, so the next step should be the creation of .class file. Can you suggest any guide/tutorial of how to generate any .class file at least from some static data? Because I've googled for 2 hours already and read JVM specification, but I really need some even simplest example to start developing the whole stuff.
Someone has already written a widely-used byte code generation library: CGLIB.
You'd have it knocked if you could figure out how to get your AST into CGLIB.
Actually there is an example file inside ASM folder that you download. It's called Helloworld and it's located in examples subfolder. It shows how to compile (generate from scratch) .class file that corresponds to simple hello world app. It also shows how to get date from .class files but it's another story.
Maybe this is'n the best way, but when you need to start with java byte code generation and you need some basic examples it's a good idea to have a look at ASM and the examples that are bundled within standard package.
Moreover Groovy uses ASM to generate its code :)
I don't know if you are aware, but there is a backend for the FPC that generates bytecode compliant to the JDK 1.5. The development looks fairly recent (November 2011). You should have a look at it.
There are a couple of widely-used bytecode generation projects.
ASM and CGLib are probably the two best examples.
You probably don't want to build a generation library for yourself from scratch - it's a lot of work, difficult to get right and probably doesn't offer you much over using an existing project.
ASM is widely used by non-Java languages on the JVM, has OK-ish documentation and is not too bad to get going.
I haven't used CGLib as much, but I didn't find it as easy to get started with.
As a final data point, the Java 8 team are prototyping some of the new Java features (including lambda expressions) with ASM.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I write applications in Java, and I'm looking for ways to speedup GUI programming. Binding frameworks help, but the particular application I'm working on now wouldn't benefit too much from that (it doesn't display a lot of data, just a lot of ways to manipulate the data). I feel like I spend way too much time writing boiler-plate GUI code, like adding action listeners, laying out components, etc. While I'm not a C# developer, I've heard XAML works very well and have seen JAXX, which appears to be similar to XAML. I'm also looking at the Groovy Swing Builder. It just seems like there are so many options, maybe even too many.
Can anyone share their thoughts on alternatives to hand writing simple Java UI code?
Also, I'd be interested in discussing how to migrate existing Java Swing code to use some of these options.
thanks,
Jeff
How about using MiGLayout?
It is extremely simple to learn and use.
I strongly recommend it to you. In my last project, it helped me to reduce much time to implement lots of GUI.
Layouts:
For layouts, I have abandoned the JDK Layout Managers in favor of the JGoodies Forms tool. I find it much more effective. It reads at a higher level, and reduces significantly the amount of code related to layouts.
I recommend using Clojure
It allows you to write Java GUIs quickly without the boilerplate.
Griffon is a Groovy framework for creating Java desktop applications. Admittedly, if you don't already know Groovy, you'll need to learn (some parts of) a new language to use it effectively, but the enhanced productivity is worth the effort in my opinion.
You should definitely use an IDE with GUI builder.
IntelliJ IDEA and NetBeans have very good GUI builders, they allow you to automatically bind objects and would reduce tremendously the amount of effort needed to create a GUI as opposed of doing it completely by hand.
I agree with others that tying down to NetBeans seems dangerous - especially when working with other developers. I've used the (commercial) Swing Designer (by "instantiations") plugin for Eclipse with quite a lot of success - the thing I like about it is that it round-trips, generating code that you are free to alter by hand. Not perfect, but a good time-saver.
But the biggest difference in my Swing programming came with the discovery of better layout managers. I went from FormLayout (good), to TableLayout (better), but now I don't use anything but MiGLayout (incredible).
You can try ZK(the best open source Java framework for building enterprise web and mobile apps).
http://www.zkoss.org/
I'm no expert in GUI programming, but have you tried using NetBeans as a platform for your app?