Does anyone know some cool PL/SQL plugin for IntelliJ Idea? - plugins

I've evaluated some plugins from official IntelliJ repository, but none of them seems to provide more then basic syntax highlighting. Even highlighting is limited. For example, Database Navigator doesn't highlight IF. It would be great to have proper highlighting. And if it would have auto-complete feature and provide file structure view I would be completely happy.
I use SQL Query Plugin when I need to post some little stuff to database or to query something from it. I use PL/SQL Developer when I need to make more complex things, or when I need to modify PL/SQL. But most of the time I need to navigate through mix of Java, JavaScript and PL/SQL code. Unfortunately, SQL Query Plugin doesn't help with that as well as PL/SQL Developer.

Have you tried SQL Query Plugin? It comes with a great host of features, including multiple query windows, direct editing of tables, and of course, proper highlighting for PL/SQL syntax and a browser of the internal database structure.
It also integrates well with the main editor: you can right-click on any selected Java string containing SQL and "Send to SQLPlugin" to strip out all of the quotes and non-SQL syntax.

I've started using the SQL Code Assistant plugin that instantly has recognised my PL/SQL packages and all these PL/SQL constructs (cursors etc) which the out-of-the-box IntelliJ functionality couldn't understand and was marking red. As of now it cannot only recognise dblinks but that's fair enough. Of course you'll have to associate *.sql file types with the plugin but it will intellij-ently inform you after you install/restart the IDE.

Related

How to setup a new language IDE

At work we are using a proprietary language and to program we are using Notepad++ with a simple code highlight. That is really annoying so, what I want to do is to invest some time to setup a text editor or an existing IDE to support my language.
I've googled a lot and there are so many options and before starting to work I wanna ask to you what is the best choice.
What I want to do is to have, like an IDE, a syntax highlight, a window with the function list tree, with the local function variables inside the same subtree, maybe text autocomplete (if I type "pro" I would like to see the suggestion "procedure" and if I press enter it will write for me something like
procedure "name" {
--code--
}
with the cursor on "name" ready to change it.
etc etc...
Can you suggest me the right path to follow?
Is it to keep using Notepad++? With sourcecookifier? functionlist?
Or I have to change to another text editor?
Or there is some famous IDE like Eclipse, NetBeans etc that allow to easily add my own language?
PS. my language is pretty simple, I don't have complex structures, is Pascal-like. Something like that:
variable int xyz
PROCEDURE asd
BEGIN
END PROCEDURE asd
I would recommend you to stay with Notepad++ and extend it with some plugins and configuration. This would be fairly quick and easy to set up and still give a big win, even though you might not be able to get all the nice features of something like Eclipse. But since you already know the Notepad++ it wouldn't require learning an entirely new tool.
Some plugins that I have found useful
Function List
Light Explorer
XBrackets Lite
There are probably a lot more that can be useful to you.
Notepad++ also got some built in auto-completion functionality that can be enabled in the settings.
Have you evaluated Eclipse XTEXT ?
What is Xtext?
Xtext is a framework for development of programming languages and domain specific languages.
The only IDE I have used for the last few years is Eclipse. There are lots of other IDEs available, also notable and popular is Netbeans. There are many others. It's important to note that all IDEs have their fans, but I can only speak to Eclipse.
Eclipse is a platform, which means it is an application on which you can build other applications. Eclipse provides a framework which you can customize and extend to produce a working application. It takes care of the user interface, preferences storage, modularisation using OSGi, and lots of other things.
Eclipse has facilities to support what you're looking for:
Syntax highlighting in the editor.
The Outline View provides function and variable listing in a tree
Autocompletion and Suggestions (activated by hitting ctrl-space)
Code Templates to fill out files and procedures etc.
The disadvantage is that customising and extending Eclipse to do what you want isn't trivial. Having written a language debugger for Eclipse, I can tell you that leveraging Eclipse's platform helped enormously, but there's a learning curve. You'd essentially have to be coming up with a new set of plugins to provide your highlighting, outlining, autocomplete suggestions and templates (I'm not sure if template support is built into the platform or not).
So I would say, unless you can find some sort of extensible editor for Eclipse - I know Aptana is extensible for tag-based markup - you are probably as well staying with your existing tooling.
Do explore the other IDEs though - I've heard good things about IDEA as well as Netbeans. :)
Good luck!
I can recommend SynWrite editor. Good support for external languages, fully customizable. (Editor of new lexers is there)

Can I view a resultset in Eclipse debugger as a table

I have a resultset in Eclipse created from an SQL query.
Coming from the world of Visual Studio, I expected to find a watch view of my variable that shows me the resultset as a table instead of just showing all the fields and properties.
Does such a solution exist for Eclipse, maybe as a plugin?
Great question!
Sadly, any plugin would have to be created based on the existing debugger. The following article talks about how to create a debugger for a new language in eclipse: http://www.eclipse.org/articles/Article-Debugger/how-to.html
The article gives great details on how the debugging process works in eclipse. I believe this would be a great feature to have in Eclipse and suggest you submit a new feature request: http://www.eclipse.org/stem/feature_request.php
As a work around, I would suggest using a string variable that would contain your query, add that string to your watch list, so you can access it while debugging. Copy the contents of the string and paste it into a tool like SQL Query Analyzer.
I don't know if there is a plugin that will format a ResultSet in the debugger, I've never seen such a thing. However, the Data Tools Platform (DTP) provides tools for interacting with databases, including table views of query results, etc. If you have the Eclipse IDE for Java EE Developers package, DTP is included in that already; otherwise, you can install it.
Here is a good tutorial on using the tools.

Is there any text editor for Mac that can be configured to have, or already has, autocomplete for Lua?

I know TextWrangler shows the option, but it doesn't actually do anything. So what I want is autocomplete, either with a key combination, or while I type.
Syntax coloring/highlighting is a requirement as well, though I know Xcode and TextWrangler have that.
You might want to use Lua Development Tools for this purpose. It has syntax coloring, plus it is doing smart autocomplete, depending on what your actual context is (required modules, ...)
It is an Eclipse Technology project, and it is Open Source! (EPL license).
Project web page - http://www.eclipse.org/koneki/ldt
Installation via Eclipse Marketplace - http://marketplace.eclipse.org/content/lua-development-tools-koneki
I don't know if you have seen this page, but it seems a good place to start:
http://lua-users.org/wiki/LuaEditorSupport
If I search for "completion" I get:
Decoda (Win)
LuaEdit (Win)
DForD (Win)
NsEditor (Win)
Visual Studio + LuaLite
Eclipse + LuaEclipse or LunarEclipse (java)
I personally use Vim + SuperTab (which only auto-fills with things that you have previously written).
There's a nice plugin for IntelliJ IDEA for Lua. IntelliJ IDEA is really nice, though kind of biggish.
Aside of that there is also TextAdept which is a lot smaller, and 100% configurable in Lua.
And probably a bunch of others.
If you want full (semantic) autocompletion, you should try lua-inspect (source code), which can be installed in the SciTE editor, and also into ViM using vim-lua-inspect.
It uses Metalua to fully parse the source code into AST and then performs code analysis. Apart from simple keyword-based syntax highlighters, it can:
differentiate between local/global variables, parameters and unused variables
jump to the definition of a variable/function
autocomplete table members
correctly rename variables/functions (not only definitions but also uses)
Even though it is not yet stable, and tends to hang on large scripts, it is very usable for standard Lua programs, mainly for it's intelligent autocompletion and renaming.

Add to language syntax in Netbeans/Eclipse

This may seem like seem like a bit of a weird/uncommon request but I am trying to find out if it is possible. I would like to add to the language syntax in Netbeans or Eclipse easily without needing to create an entirely new language. According to this question How to add more syntax elements for eclipse it is not possible in Eclipse, but that was asked in 2008 so maybe things have changed.
The reason I want to do it is I am developing in node.js and it uses callbacks quite heavily. So it would be nice if I could make the word 'callback' and 'callback()' be highlighted in a different colour so it can be easily seen in amongst the rest of the code.
Thanks for your help!
The css thing is really easy:
go to Options/Miscellaneous/Files, create new file extension less and then select proper MIME type text/x-css. I Believe that it is possible to extend syntax highlighting in NetBeans IDE but you have to write your own plugin to do that.

Eclipse Code Templates with Cobol

People,
My team is just beginning to learn how to use COBOL on Eclipse (as part of the Rational Developer for System Z package) and one of our most desired features are code templates or code snippets.
What we'd like to have is a code completion based on snippets just like we have on Java. For example, when I type try and hit ctrl-space Eclipse shows me a list of completion options, where one of those is create a try/catch block. Well, in COBOL one could leverage this when creating, for example, embedded SQL blocks, like
EXEC SQL
SELECT field, field, field,
FROM table
WHERE field = value,
field = value
END-EXEC.
However, for some reason, it seems that Eclipse treats COBOL a little differently (no wonder why) from other languages. As such, when looking for the code templates in the preferences menu for COBOL, its appearance is very different from the Java one.
The question is: how does one uses Eclipse's code templates with COBOL?
[Fair disclosure - I work for the vendor I mention below]
The answer probably depends on what COBOL & plug-in you're using. If you have the Micro Focus Eclipse product (either the one for Net Express or Server Express, or the Server Express Remote Development Option), the code snippets are supported. There's a number built in but you can also build your own.
You can get more details at http://www.microfocus.com/eclipse/
I'm afraid I don't know how/if other Eclipse plug-ins have similar capabilities.