Hi by default komodo edit supports the following languages for its auto completion feature by default:
Ruby: require, class modules (on . and ::), class variables and methods, method calltips.
Python
Perl
PHP
XSLT
XML
Tcl
I am programming in java at the moment, and I need to have the auto completion feature with that language. Can someone please tell me where i can download it or how i can enable it. thank you in advance.
EDIT:
If i go to preferences, code intelligence, there is an option to add API catalog from my hard drive. so there must be a java api catalog? how can i get it?
Komodo's goal is to provide the same features than Java/.net IDE but this time for dynamic languages such as Perl, Python or Ruby. And as said in this post there is already a better integration of Java (or .net) in other specialized IDEs.
You should look at Eclipse, Netbeans or IntelliJ.
Related
I want to get started with Java! I have a bit of experience with C/C++ and Python development. For this i'm mainly using Emacs (a text editor) and the commandline, thus not using a heavier weight IDE for those kind of things.
I don't want to adapt my workflow to suit an IDE, but I don't know the Workflow (write, build, test) in Java so I thought about asking here. Searching the Web didn't give me good results.
Can someone give me the the basic workflow when developing Java with my requirements? I use Linux for all my programming.
Are my requirements/wishes even practical or should i consider using something like IDEA or Eclipse?
Can someone point me to documentation or blog posts about this topic or documents, that give a quick overview and/or examples on how to get started with Java (something for programmers with a little experience in other languages)?
For this I'm mainly using Emacs (a text editor) and the commandline,
thus not using a heavier weight IDE for those kind of things.
An IDE has many advantages over a text editor, mainly when navigating, debugging and refactoring code, but it is not required. Actually, working without an IDE is useful to understand the underlying technologies. My advice would be: Start without an IDE, and when everything works, try out some IDEs to see how they help you.
Can someone give me the the basic workflow when developing Java with
my requirements?
The basic workflow is (for any compiled language):
write source code
build
run
In the case of Java, that means:
1 Writing source code
You write .java files in a text editor, observing the right filesystem layout (file name = class name, directory corresponds to package etc.). You already have that covered.
2 Compiling the code
You compile the code using a Java compiler, possibly building a JAR or WAR file (depending on the type of application you are writing). You can do that manually by directly invoking javac (see for example Java - compile from command line - external jar ), but you should really use a build tool. The best tool to get started is probably Apache Maven or Gradle.
The basic idea is the same with both Maven and Gradle: You write a build file, which essentially describes your project and how to compile it (a POM file in the case of Maven, a build.xml for Gradle), then you can build by just invoking the build tool. The build tool takes care of all the nitty gritty like invoking javac etc. Most importantly, both also perform dependency resolution, meaning they can automatically download and use libraries that you use in your code.
3 Running
Finally, you run the program from the command line. How to do that depends on the type of program: A simple executable (or a Spring Boot application) can by run using java -jar myprog.jar, a WAR file must be deployed to a Servlet container (such as Apache Tomcat).
I hope this gives a general overview of How do I develop without an IDE?. For more details, look for specific questions here on Stackoverflow (or elsewhere), read the docs, and if all fails ask a more specific question here :-).
I agree with #sleske : if you really want to learn the language, it's good to start with a text editor. Later on you can use an IDE but by then you will know how the build process works and what exactly the IDE is doing. There exists no magic in coding. If something works but you don't understand why, it will certainly fail one day :)
Maybe some nice feature: I use Eclipse and added a vim plugin :)
And if you learn some useful shortcuts you can write code really fast (without a mouse)
You should download IntelliJ directly:
certain best practices like static import make your code more readable because you read it with a smart IDE. If you read code just with vim, the navigation between classes is not possible.
you have an easy access to a terminal and perform certain Maven or Gradle commands here.
I would not say the same with other languages (css, html).
Coming from Node.js and now working with Java I'm wondering about how to achieve with Java what I did with Node.js, more specifically: How to compile my templates into JS functions.
What I did before was using EJS templates, then they were compiled into a single JS file that exposed functions to call from JS with parameters, these functions returned a HTML string that I could use as it to update my view.
The great thing about this is that I could write my templates in separated files, (EJS) then dynamically Grunt/EJS (I guess, that's from Sails.js internal logic) was converting the template into a function, merged all of them and finally generating a single file usable in my app, I just had to call a function, provide arguments and that's it: I get a view dynamically generated.
I want to achieve the same in a Java environment, using Ant, maybe maven, but I don't know how to do it neither where to look for since I'm a Java novice.
Edit:
I'm talking about client-side templating, I just want to avoid the -ugly-traditionnal way to write HTML code inside JS strings and split them in separated files so I can maintain them easier. I only need to use them from JS, not from Java, but I need to "compile" them from a Java environment, using Ant.
This is somewhat similar to this post, and this one, so you may have a look there to see if there are other useful answers.
A consensus seems to be that Mustache, which has a Java-implemented compiler (among other flavors) could be executed as an Ant target. It's a logic-less template, so you may want to find another solution.
Because it is possible to call Node.js scripts from Ant, it seems like an artificial restriction to not have Node.js. You will have much more choice and flexibility in template choice if you can persuade your team to allow Node.js.
Node.js is not in an either-or relationship with Java tools. There is plenty of room for both on a project, and I've worked on C# projects that use Node.js, just as I've worked on projects that use JRuby, Java, and Rails. None of those technologies excludes the others.
Note that I'm not recommending that you try to persuade people to switch to Node.js as an environment, migrate existing code, or use Grunt, but if it's a useful tool that you're familiar with, I can't think of a single good reason why you should be denied its use.
Another solution is to use this library I discovered yesterday. I've tried it and it seems to work well, some features are also quite useful for development mode, like the watcher on the templates.
http://jcruncher.org/
I think I'll go with it, just wondering about the author and his implication, and hope to see a Handlebars 3.0.0 compatible version soon, as well as the source code on GitHub.
P.S: You can find the handlebars compiler on the CDN (select the 2.0.0 version):
http://cdnjs.com/libraries/handlebars.js/
https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/2.0.0/handlebars.runtime.min.js
We use JavaScript a kind of DSL in our project and running it using Java Scripting API. CoffeScript looks much better that JS so we want to it. T
Since there is no implementation of CoffeScript for Java Scripting, we can still us the JS implementation if we manage to compile CoffeScript to JS. The question is how to do it in a easy way? What have to be done?
CoffeScript compiler seems to require node.js, but it is not an option for us to deliver it in our installer.
The stdandard CoffeeScript-Compiler is implemented in CoffeeSCript. So it needs to run under some JavaScript environment.
But there is a JCOffeeSCript-Implementation:
Java library that converts coffeescript to javascript or compiled java executable?
That could do what you want.
But I would recommend to compile the CoffeeScript to JavaScript in your build- packaging-process before delivering it, if this is an option for you. That would lead to an easier installation process for your customers and you don't have to ship any compiler and build-scripts.
I am asking a follow-on question to help the OP from a SuperUser question which evolved into a programming question.
As you can see from the screenshots of Eclipse in my answer to that SU question, Eclipse has a robust and configurable engine for formatting XML (I'm using Eclipse Juno release, by the way).
The OP of the SU question chose Eclipse's XML engine as their preferred method of tidying their XML. Unfortunately, the OP prefers to work on the command line, and would like to capture the same functionality from Eclipse's XML formatting engine and make it run as a simple headless program that can be called from, e.g. bash.
I am aware that Eclipse is extremely modular and extensible, so my intuition tells me that Eclipse would not tightly couple the functionality behind the XML engine with the UI. So, I think that there is some OSGi module in Eclipse that implements only the XML processing routines as a headless I/O interface rather than being coupled to the Eclipse runtime. It's perfectly fine if this interface depends on other parts of Eclipse, as long as it doesn't mandate starting up the Rich Client Platform and a GUI. I'm looking for a headless solution.
At which layer of the Eclipse stack would I be able to access this interface, in order to design a command line program that, essentially, accepts an XML file and a list of formatting preferences similar to the ones in the Eclipse Preferences pane (but specified as command-line arguments) and produces the formatted XML as output?
After some reading online, I think the XML source editor in Eclipse Juno is implemented in WST, but I don't know how to separate out the parts of WST that are unrelated to this project or which have GUI functionality, so that I can only call into the headless "engine" classes that actually do the XML parsing and modifying.
This question is not about how to use the interfaces in question. It's just that the Eclipse platform is so huge that merely discovering the existence of the library interface that I need is a challenge in and of itself, hence this question. Once I find an API that is situated at the right level of abstraction for this task, I will be able to learn about the API from the documentation and write the program without much further help.
The XML formatter is in the "org.eclipse.wst.xml.core" plugin.
org.eclipse.wst.xml.core.internal.formatter.XMLFormatterFormatProcessor
The plugin uses the extension point "org.eclipse.wst.sse.core.formatProcessors" to make it available.
I'd like to use the Bean Scripting Framework to make some of my Java classes be available to users at my company who wish to write scripts + who may be familiar with Javascript or Python (via Jython) or Ruby (via JRuby).
I can't really find much tutorial documentation on how to get BSF working... what I would like to do is make a Java app that runs a shell, either in Javascript or Jython or JRuby, and exposes some Java classes of mine to the scripting language.
Any pointers? I've glanced through some of the docs at the BSF Resources page but I have a feeling I'm missing something obvious to get started.
(like there must be some shell already out there, complete w/ a rudimentary debugger...)
edit: To clarify -- I know how to run bsf.jar, it works fine. And I know how to run the Javascript shell with Rhino -- but that's specific to Javascript and has nothing to do with BSF. My question is, is there a language-agnostic shell that works with BSF?
To use BSF you need bsf.jar and the library for your scripting language of choice on the classpath. To execute Javascript, no additional libraries are required.
To open an interactive Javascript console try:
java org.mozilla.javascript.tools.shell.Main
Why do you need BSF?
Any JVM language can access Java classes directly. JRuby's way, Jython's. And any JVM language will have support for debugging somehow (an example here).
Check out dynamic JVM programming languages like Groovy or JRuby! You can use your java classes without any modification.
I don't know any language agnostic shell.
You could try jline + javax.script + $language to write it yourself. Hope it helps :)