Java: GUI component for displaying diffs? [closed] - java

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'm writing a programm in which I need to generate a diff and display the result. Is there any GUI component out there, with which I can easily accomplish this task, or do I need to hack something for myself?
I'd prefer using a Swing component, but any other technology will be fine, too.

There is a diff tool available if you are building on the NetBeans platform.
If you can't use that, I don't think it would be difficult to create a basic one that uses HTML in a JEditorPane to display the results.

As far as i know there is no component for this. Any modern IDE does this job today, also source control plugins have this function, many of them are open source so you can get the idea by viewing them. But it would be hard.
#madlep has a solution with Difference algorithm for Java check this topic:
Generate formatted diff output in Java

Take a look here .
I used Diff.java to create a JPanel that will show the differences between two files.
Hope it will help !

Maybe have a look at the JDiffPlugin for jEdit (it might be easier than digging Eclipse / NetBeans / IntelliJ source code).
Or have a look at the Java diff viewer Component? thread, it seems that someone had similar needs and you will find a solution based on incava.org's Diff implementation (the location of sources changed so I'm putting the new location below):
(For the Diff sources)
http://dawes.za.net/gitweb.cgi?p=rogan/webscarab/webscarab.git;a=tree;h=148dc26a7ff3ef6ff5ddc35b206
(For the DiffPanel sources)
http://dawes.za.net/gitweb.cgi?p=rogan/webscarab/webscarab.git;a=tree;h=f6b756fbe78c6f1be21a00cffbe

I know IntelliJ IDEA can do this, and they've recently released an open-source community edition, so the code is in there somewhere. It will probably taken a bit of digging to find the relevant code though!
check here
and The code is all available here (via GIT or on the web):

https://github.com/albfan/jmeld
JMeld, A visual diff and merge tool.

Related

Documentation for java project (markdown) [closed]

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 have pretty standard java project with standard gradle layout, all sources are stored in git. I want to write documentation in markdown (or similar markup language) and keep all files in project directory (e.g. docs/ folder in the root). Then I want to generate static site or push my sources somewhere to have access to full documentation in html (should be self-hosted solution).
It will be good if I'm able to add simple link to other articles (like I do it in any wiki engine by using [[article]]). And It would be perfect if I've been able to add quick links to javadoc by the same technique as link to articles. And also it would be perfect if it has had built-in search engine.
I've gone through couple of static site generators but I didn't find anything which can satisfy my requirements at least half. Is there something like that? Or I need to code it by myself (I know it won't take to much time)? Maybe there's more common use case for documentation?
You have to use the concept of Doclets. There are some out there. Maybe just try this one:
https://github.com/Abnaxos/pegdown-doclet

Circuit Diagram visualization framework for Java [closed]

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 framework to visualize Circuit Diagrams in Java application.
I have to show Diagrams like that:
For one of my previous projects (in 2008 year) I used Jung. It worked well, but maybe somebody could propose more suitable for my needs framework? Does anyone have a similar task or know a good tools?
Also one of my tasks is to try to layout elements, because there is only info about connections in DB, but there is no layout information. I want to try to minimize manual layout work and looking for layout algorithms.
Thank you in advance.
PS: It is very desirable that the framework will be free.
PPS: Also I am interested in frameworks which can help to show (and edit) such type of diagrams using web browser.
Prefuse is very similar to Jung. I haven't used it extensively but I evaluated both Jung and Prefuse for our graph application.
Another web based option is Protovis which I came across during my evaluation. You can draw interactive graphs with it but I suspect you might need layout information already available to use this tool. Anyway looks like the authors are moving to a new library named D3 so you can check that out.
Another option I see is graphviz.
Here is a big list of graph visualization tools. http://www.mkbergman.com/414/large-scale-rdf-graph-visualization-tools/
I found a java framework named circuit. I think it could help you fix your issue.
http://code.google.com/p/circuit-framework/

Java graph library for dynamic visualisation [closed]

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 2 years ago.
Improve this question
I am in need of Java library for graphs that supports dynamic visualization. I need to have objects moving between the vertices and this has to be shown. 3D is not needed, a 2D representation will suffice.
I am currently using JUNG but it is very limited, it is more for static graphs from what I can tell.
I have looked at this question but JGraphT doesn't seem to do it either.
Late Edit:
I waited to finish the project before awarding an answer. I ended up keeping JUNG, while also using UBIGraph (dead project since 2012) as a secondary library.
Take a look:
GEF - GUI components for graphical editing, including graphs, (Eclipse) SWT based
JGraphX - former JGraph, not actively developed since March 2020
Piccolo2D - (Eclipse) SWT based
JUNG - last released in 2010 (as of 2020); was very popular back then
yWorks - not open source, not free
JGraphT - data handling and algorithms only, no integrated visualizaiton, though supports JGraphX visualization
Take a look at GraphStream, as shown from their demo video you can do some fancy stuff with graphs using their library.
Prefuse is pretty and powerful. The website is no longer there so here is an archived version
Have you had a look at Processing, or Processing.js? There are some amazing vis projects being made with this.
Not strictly Java, but easy to integrate within a Java environment, if I recall correctly.
Another option if feasible is to construct text file in graphviz dot format and process it using various tools provided. Mostly helpful for generate static images
See graphviz gallery for more details
You may also want to have a look at wilmascope (or its project page). I used it a few years ago after full research and was quite happy with it, but it has not been updated since 2004 (as of 2020).

Java CLI UI-design: frameworks or libraries? [closed]

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'm currently working on a small utility program that only requires a command line interface, and I started wondering if Java provided any standard way of creating the CLI, in a similar way that Swing and the likes exist for GUIs. I'm not really interested in command line parameters and parsing of them, but rather the command based interaction the user has with the program to use it. This is for the situations where GUI simply is unnecessary or not an option for using the program.
Googling the subject pretty much only results in tutorials on how to use BufferedReader and the likes to do rudimentary interaction with the user, aimed at people learning the basics of Java and writing simple UI that asks for name and prints "Hello World!" etc..
Are the any libraries that are focused on providing a good framework for quickly implementing a more complex CLI UI or is this really something that everyone implements in ad hoc manner for their own utilities?
Maybe someone knows of patterns for the implementation that were created back in time when not everything was graphical? That would also be useful resource.
Perhaps CLI Toolkit...
http://alexis.royer.free.fr/CLI/
You can also have a look and Clamshell-cli or spring shell:
Clamshell-cli is relatively simple and easy to use : You can look at jmx-cli to get a nice example of what can be done with it.
Spring Shell is bigger but more feature-full (tab completion, etc). It has been extracted from spring Roo and released as an independent framework
There is a project called JLine that provides cross-platform support for general command-line input handling:
http://jline.sourceforge.net/
More of a support library than a framework though.
Try searching for CURSES and java, something like http://www.google.co.uk/search?q=curses+for+java . Long time ago CHARVA ( http://www.pitman.co.za/projects/charva/index.html ) looked nice.
I've used the apache commons CLI library in the past and has worked well for me: http://commons.apache.org/cli/

Code Formatter: cleaning up horribly formatted jsp code [closed]

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
So I am working on a jsp/servlet that came to me and I'm looking at the jsp file and it is just a jungle of jstl tags, java code and html thrown together. At first it looked like someone ran the standard eclipse formatter on it and had the page width set to 40 so alot of stuff is broken up, I tried to format it with a larger page width but that seemed to make it worse to the point of not being able to tell what is going on without formatting parts of it first.
Anyone have any luck with any jsp/code formatter?
Are you using Eclipse WTP plugin? If not, take a look at it - it has quite a few ways to customize formatting of JSP.
If you are, JSP formatting can be customized under Window -> Preferences; Web -> JSP Files -> Editor; note that there are two separate links there - for XML and HTML JSP.
Netbeans does a decent job at formatting my jsp code. You could download Netbeans 6.5.1 and format the files in there.
I know that this question is for JSP, and not javascript, but this works pretty well all the same: http://jsbeautifier.org/
Use this to format any HTML,JSP or any other language tag: https://www.freeformatter.com/html-formatter.htm
Try maybe IntelliJ IDEA. I can't guarantee it will do the job better but it won't hurt to try.
This seems to work fine for mine JSP and JS code (free at the momenti'm using it)
http://www.danstools.com/javascript-beautify/

Categories