Is there something like CodeRush for Java?
The real answer is that Many Java IDE's give the same types of features (as relevant for Java), so you should really check them out and then ask about a specific missing feature that you had in CodeRush that you think would be relevant to a Java IDE.
While not quite like CodeRush, you can try JetBrains IDE for java (IntelliJ) to get similar functionality to what Resharper offers (not that dissimilar to CodeRush)
Nothing exist that is exactly like CodeRush for Java. The closest thing you will find is the JetBrains IDE as saret said.
The design philosophy of CodeRush/Refactor! is to never show a modal dialog like Eclipse/Resharper/Visual Studio does for refactoring. Instead CodeRush uses context sensitivity, by watching the AST, and only shows you refactorings that make sense. CodeRush/Refactor draws on top of the editor and animates things where appropriate.
Animation example:
Image source: http://www.skorkin.com/2012/07/reordering-method-parameters-with-visual-studio-and-coderush/
Related
I am trying to create a screen like this one
Initially I was trying to port a console program to java. I have found things like jcurses and charva but there is almost no documentation on them and I really cant understand how to use them.
So I figured that I could create a console like screen that resembled the one above.
what library / framwork would I be best using. Should I use swing as it if fully portable?
what would be the best approach being that I need to be able to navigate and alter the 00 in the picture above?
Easily usable would be great but as long as it has good documentation that I can learn it from that would be fine.
(Answering as if you're looking for a hex editor.)
http://jhecomponent.sourceforge.net/
http://www.fifesoft.com/hexeditor/
http://hexedit-lib.sourceforge.net/
Played a bit with the fifesoft.com offering, kinda cool.
If you're not looking for a hex editor, can you be more specific? If you just want a cursor-addressable window you'll probably have to suck it up and figure out something like jcurses or libjcsi :)
If you prefer to create a full fledged GUI with Java you could certainly use Swing. I would prefer SWT as a matter of personal taste, the widget library of Eclipse. You will find a lot of snippets and tutorials (same for Swing). Here is the Widget Library.
Here is a discussion about SWT versus Swing.
You could use the table layout manager to create the layout shown in your screenshot. If you rewrite the application from scretch, you should be able to handle the GUI events and update the widgets according to your application needs. You will easily find articles when you search for swt and table. If you would like to keep the code base and just exchange the GUI, I 'm not sure about the best approach. Maybe, the libs jcurses and charva are the way to go.
Unless you are looking to run the app on a headless VM (where a console/tty is all you've got), I'd use Swing. Create a JTable with a custom TableModel (to provide the data) and custom renderers (to provide the hex formatting) and everything should just work. Consider deriving from the various DefaultXXX implementations to save a lot of work.
I have no Java experience and prefer Visual Basic; I've found a very nice translation IDE called Basic4android (www.basic4android.com). It works by interpreting a scripting language that's similar to Visual Basic and then using it to generate and compile native Java code. Rather ingenious, if you ask me. In fact I believe I found it from a reference here on StackOverflow.
I'm having some trouble wrapping PayPal's Mobile Payments Library:
www.x.com/community/ppx/xspaces/mobile/mep (scroll down for the HTML Tutorial)
I need to do it in a way that promotes the library's functionality so that B4A can in turn expose it to the Android device (emulator in this case). I've made some halting progress so far, but now I'm stuck on NullPointerExceptions occurring deep within the MPL.
The saga is pretty well described in a thread at their forum:
http://www.basic4ppc.com/forum/additional-libraries-official-updates/8819-looking-download-link.html
Here's my wrapper and the generated code—download here—as only licensed users may access downloads in that particular forum section.
The latest NullPointerException occurs a few calls down from the initWithAppID function. The JD-GUI decompiler reports an internal error when it gets to the com.paypal.android.b.b class, so it doesn't appear to be possible to know exactly what's going on down there.
I'm certain this can be done; I just need to know how to open the proper communication channel between the device and the MPL.
I'm new at Java and I'm new at Android. Quite a combination, wouldn't you say?
It turns out the problem is in the way PayPal bundles their resource files; non-Eclipse projects can't get at them.
More info on the original B4A thread.
Thanks,
Jeff
I think if you ask here about something that generates code for you, you won't be provided with any answers because you can't give any useful source code or something. Also, if you use something like this tool, you never know what it's generating. Also, you can't fix any occurring errors with the generated code... I could go on and on and on...
If you want to use Android the way it's supposed to be used, you'll need to learn Java and Android. If you are good with VB, this shouldn't be that hard. And this is what anyone is going to tell you.
So I am working with Eclipse, and am trying to enable Java error highlighting inside of a standalone SourceViewer. I have done quite a bit of searching the web, but nothing seems to come up. I have looked into dealing with Annotations, Markers, etc... Everything that comes up seems to be for implementing custom methods.
http://wiki.eclipse.org/Platform_Text
has helped a bit, but seems to be not exactly what I want.
The SourceViewer is going to be a basic Java editor, so it can be assumed that everything will be java code. I would just like the red squiggly lines to appear under syntax errors, maybe also have the red boxes on a ruler on the side. There should be a default easy way to enable this, but I cannot find it.
Thanks in advance!
It is doable, but it can be a bit of work. What makes it difficult is that a standalone SourceViewer widget doesn't support the IDocumentProvider interface that does a lot of the work so you have to do all of that yourself.
I found this post helpful as far as adding the red squiggly lines is concerned:
http://www.eclipsezone.com/eclipse/forums/t30082.html
For the squiggly lines you want to set up an AnnotationPainter.
If you want the red boxes on a ruler, use the SourceViewer constructor that accepts an IOverviewRuler. There's a standard OverviewRuler that should work for you.
+1 for thehiatus.
The annotation stuff is really complicated. I tried to convert an editor to a IViewPart some time back... It took at long time to get it to work... well almost... almost, but quite like the real thing :-) (A bit like Swing and Microsoft Vista).
Also have a look at TextEditor and the the methods createAnnotationAccess() and configureSourceViewerDecorationSupport(...).
I wonder if someone can help me... I've been developing VB.Net for years and C++/VB before that. I've also got some PHP experience. I'm now moving to Java to write an app for my Android mobile. I'm trying to use MOTODev Studio (Which extends eclipse)
I've not developed in Java before so it's a bit of a learning curve anyway. I'm fairly confident I'll be able to work out the important bits but I'm in a new IDE in a new language developing for a new platform.
As I'm new to Java, I was hoping to be able to rely on auto-code generation, intellisense, etc. I'm starting to think this was either very optimistic or I'm using eclipse very poorly.
For example, I know I need to override the OnClickListener() event but am unsure of the exact syntax. In VS, I'd just start typing Override in a class and up would pop intellisense with everything I can override and the appropriate signature, however, in eclipse none of the intellisense options seem to apply when I type public voidor #Override. Is this because I'm doing something wrong/is eclipse intellisense incomplete not very good?
In VS there's a bar at the top of the code page which lists objects in the file on the left and methods of the current object on the right. Does eclipse have an equivalent? If so, where?
I've managed to use the IDE to the extent that I've got a "Hello World" installed on my mob so it's more code generation techniques than windows/dialogues/etc.
I suppose what I really need is for someone to recommend some good resources to help me transition. I'd also appreciate any comments or advice from others that have done similar
Thanks in advance
So you learning three items at once
Language (Java)
Platform (Android)
Tool (Eclipse)
Here are my two cents for each of them:
Java - besides annotations guide already mentioned by Falmarri all java tutorials on oracle site are worth seeing you can find them here
Android - From my point of view very good entering points into android development are Android Developer Dev guide and API Demos project which demonstrates many android aspects ( You can add this project into your workspace in Eclipse via ->New Android Project-> Select from sample ->Choose target version -> Click OK , Voila you have new project in your workspace with a lot of useful android related code, describing many advanced and not so advanced topics). BTW Android developers blog is worth reading but
it usually covers more advanced topics
Eclipse - Falmarri already pointed and pretty good tutorial about Eclipse, I from my side would suggest to start from Help-> Help Contents -> Java Development User Guide
It covers all basic tasks and concepts. For your particular problem with overriding ( actually implementing) an interface method you've to first indicate that your class implements View.OnClickListener via class MyClass implements OnClickListener at this point eclipse will notice that you claiming to implement interface but didn't actually implemented some of it methods ( in this situation onClick(View v)) and will mark class declaration with error marker. Go to your class declaration and press Ctrl + 1 ( also known as "quick fix") and you will get some options to fix broken code. At the other hand if you really want to override parent class method you can press Ctrl + Space in a class body ( e.g not inside the method) and you will get option to override avalible methods.
Hope it helps
http://download.oracle.com/javase/tutorial/java/javaOO/annotations.html
yes, it's the default java perspective. Have you even installed the IDE yet?
http://www.vogella.de/articles/Eclipse/article.html
I'm not entirely sure I fully understand your questions, but if I'm in a Java class in Eclipse that implements some Interface and I want to implement methods I either select the quick fix (Ctrl+1) for the compiler error telling me I'm not implementing the Interface or I trigger content assist (Ctrl+Space) in the class body to get a list of methods to override. And with the bar you mention, do you mean something like the breadcrumb navigation (Alt+Shift+B)?
I am a cameraman and I want to make an app for my Moto Droid that will
calculate my depth of field given four inputs.
I am literally brand
new to javascript and this programming stuff, so I was wondering if
anyone could help me out.
I have a very basic GUI set up using Droiddraw which allows me to
input my 4 variables, which are:
Focus (#+id/focust)
Focal Length (#+id/flt)
Aperture (#+id/apt)
Circle of Confusion (#+id/coct)
Equations for this calculation are located here
for example...
to get hyperfocal distance I need to get: ((f^2)/(N*c))+f
all of these variables will be drawn from inputs in the GUI, but I don't know how to call them, how to write the actual math, and how to address the results so I can make them appear in the "results area" on the bottom of the screen.
I've never done java before and I only want to make this app because the existing ones don't fit my needs.
Can someone help?
Thanks!
If I'm not mistaken, DroidDraw is a tool for building the XML user interface description used by the Java API. If you want to program for Android in JavaScript, something like PhoneGap might be a better choice. It lets you build real Android application using HTML and JavaScript.
On the other hand, if you want to use the XML and Java APIs, then you should probably run through the Android tutorials. The first one is Hello, World.
Since you're just getting started with programming, I can't stress tutorials enough. It's true that your idea shouldn't be too hard to implement, but you need to understand the basics first.
I don't mean to give the impression that one style (PhoneGap vs. Java and XML) is better. For your purposes, either should be fine. It's more a question of what you prefer. Java/XML is the paradigm supported by Google, and provides access to more functionality. On the other hand, if you already know HTML or JavaScript (or are interested in learning them), PhoneGap will certainly provide everything you need. I think PhoneGap is also intended to make it easier for beginners, though I haven't used it, so I don't know how successful they have been.
The XML file that is generated by DroidDraw can't be used within PhoneGap. If you do choose to use PhoneGap, then you will need to build the interface in HTML. You might be able to use something like DreamWeaver or FrontPage or one of any number of HTML editors to help you with this step.
The XML file is just a description of an interface. When you start your application, the Android platform uses this description to build the user interface that you see. Once that has happened, you can move data from the interface to Java, or from Java to the interface, without any hassle. You certainly won't be limited by the XML interface description - it's pretty flexible.
If you've been going through the Android tutorials, then it might be best to forget that I even mentioned PhoneGap. It's a wildly different alternative that is the right choice for some people and some applications. But the Android tutorials won't help you to understand it. I only brought it up because you mentioned JavaScript in your original post.