views:

253

answers:

5

I'm working in Java, C ,Perl, and Bash (and a little python) on a project that all work together (mostly via RESTfull interfaces) and am looking for an IDE suited to Polyglot programming?

What IDE can i use that has:

  • jump to definition
  • call hierarchy
  • syntax highlighting

across at least these languages:

  • Java
  • C
  • Perl

all from within the same project?

ps: i'm not too concerned with building the project.

pps: It is important that context switching time be minimal, searches can cross languages, and that the call hierarchy and jump-to-definition work in all visible code all the time. diferent editors have differing concepts of "project" and I'm not concernted about that as long as these criteria are met.

A: 

I use BBEdit. It meets all your requirements except the call hierarchy.

dacracot
+3  A: 

Java and C are fully supported by Eclipse. There is also a third party plugin for Perl called EPIC. It is still in beta, but it may be sufficient to meet your needs.

How to you create a project in Eclipse that can index both java and C code in the same project?

This question more or less addresses the problem: http://stackoverflow.com/questions/179439/how-to-change-an-eclipse-default-project-to-a-java-project

Basically, open the .project file and add the requisite builders and natures.

Another alternative is to split your work into separate Eclipse projects. All of the indexing stuff should work fine across multiple projects in a workspace.

Stephen C
How to you create a project in Eclipse that can index both java and C code in the same project?
Arthur Ulfeldt
@Arthur You don't have to create one project for everything. You can create for example Java project which depends on C project - all in one workspace. As long as build artifacts deposited properly
eugener
eclipse seems to not want to create multiple projects pointing at the same source. so I cant create "one project per language" like this
Arthur Ulfeldt
1) You don't *have to* organize your projects so that they just use one source tree. 2) If you are not prepared to reorganize your source code directories ... try the builders/natures approach.
Stephen C
+1  A: 

If you're working on *nix I'd go with emacs or xemacs, with the proper extensions they'll do everything you want. On windows they aren't so good, but stil quite usable.

Jim Nutt
what extension give jump-to-definition and call-hierarchy?
Arthur Ulfeldt
for which languages are these features available?
Arthur Ulfeldt
`M-.` or `M-x find-tag` will give the jump to definition functionality.
spong
stock emacs seems not to be able to do this. see the ecb answer above. ECB seems to get 2/3 (which is still not really a solution)
Arthur Ulfeldt
+4  A: 

Have a look at Emacs with the Emacs Code Browser.

Here are some features:

  • A directory tree,
  • a list of source files in the current directory (with full support and display of the VC-state),
  • a list of functions/classes/methods/... in the current file, (ECB uses the CEDET-semantic, or Imenu, or etags, for getting this list so all languages supported by any of these tools are automatically supported by ECB too)
  • a history of recently visited files (groupable by several criteria),
  • a direct and auto-updated ecb-window for the semantic-analyzer for some intellisense,
  • the Speedbar and
  • output from compilation (the compilation window) and other modes like help, grep etc. or whatever a user defines to be displayed in this window.

alt text

Together with the appropriate language editing modes (which exist for your required languages, most likely all installed by default with Emacs: cperl, jde and cc-mode), I think this might be a good choice.

Pedro Silva
The CEDET/Semantic side is a whole lot more important than code browser, IMO. To me, the most important stuff is the _smart_ auto-completion, jumping to definitions/files, and pasting in code 'snippets' with yasnippet. But yea, Emacs rocks.
Jyaan
Will it print a function call tree?
Arthur Ulfeldt
I couldn't find anything built-in, no. However, I use [simple-call-tree.el](http://www.emacswiki.org/emacs/simple-call-tree.el). Works great for my uses, but this might be more 'hackish' than you originally wanted, what with all the biz-speak *intelli*thingies floating around in the other posts and comments.
Pedro Silva
how do you get a call tree with simple-call-tree once it's installed?
Arthur Ulfeldt
can simple-call-tree index all the files in the project?
Arthur Ulfeldt
can ecb do something like use cscope for the c files?
Arthur Ulfeldt
`simple-call-tree` is called on emacs buffers and stores the call tree on a global variable. You could write a wrapper that calls `simple-call-tree` for all open buffers and stores each tree in a separate variable.
Pedro Silva
`cscope` has an Emacs interface, which I just tested. Seems to work well.
Pedro Silva
To get a call tree with `simple-call-tree`, first run `M-x simple-call-tree-analyze` on the buffer you want, then `M-: (print simple-call-tree-alist)`;
Pedro Silva
+1  A: 

if you are considering commercial products then have a look at Intellij idea 9.

Ankit
I'm considering anything on any OS that makes this pain go away.
Arthur Ulfeldt