Can I view a resultset in Eclipse debugger as a table - eclipse

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.

Related

How can I customise the Selenium IDE export?

Within Selenium IDE for Firefox, under Options -> C# / NUnit / Webdriver, there is a button 'Source' to view the conversion formatter.
It is displayed in read-only format.
Is it possible to get access to this file in order to customise the export process?
Sorry if this seems like a trivial question, I've found plenty of people complaining about not being able to perform various tasks online and a few responses that indicate that custom export is supported, but I can't seem to find a way to access the file to perform the work.
Thanks
I think I found a solution to this problem.
Though you can't customize any of the built in exports, like C# / NUnit / Webdriver, you can create a completely new exporter. I'd recommend modifying an excising one.
Get the source exporter you would like to modify. Ex Options->Options->Formats->C#/NUnit/Webdriver->Source. And copy it to a text editor.
Edit this code.
Options->Options->Formats->Add(button) and paste your new exporter.
I think you have to copy and paste the text, there is not file upload.
This worked for Selenium IDE 2.5.0
Hope this helps!
EDIT: In addition to my answer above, it may be easier to just write your own parser for the Source of your IDE Test.
The source is read-only because it has been provided by a Selenium IDE Plugin.
The source is usually helpful if you want to make a very simple formatter. Usually a better way is to create your own customised version of the formatter and package it in a plugin. Take a look at the source itself and the plugin tutorial at http://docs.seleniumhq.org/projects/ide/plugins.jsp
You can find some more information and slides about Selenium IDE plugins on my blog.
Cheers,
Samit Badle
Selenium IDE Maintainer. Twitter: #samitbadle
Blog: http://blog.reallysimplethoughts.com/

Indexed full text search in Eclipse?

Is it possible (via a plugin or other way) for Eclipse to build a full text index for a project, so that searching a String does not linearly search all the files in the project?
(or does it automatically build such an index to speed up future searches?)
http://code.inf.unibz.it/projects/instasearch/ (old)
Edit: https://github.com/ajermakovics/eclipse-instasearch
It's a plugin that does indexed search using Lucene. Exactly what you're looking for I think.
The index files used by the search component of Eclipse (like a SearchParticipant) are in your workspace:
.metadata\.plugins\org.eclipse.jdt.core
As mentioned in this thread,
These files are used by the search or some other tools in Eclipse.
If you remove them, they will created again when you restart Eclipse or when you will activate the indexes. Then you will see a progress bar saying the number of files that need to be indexed.
There's an absolutely amazing and free plugin made by Pivotal (the creators of spring) that does indexed search with realtime preview for eclipse and works really good. I use it every day and could not live without it:
Quick Search for Eclipse
https://marketplace.eclipse.org/content/quick-search-eclipse?mpc=true&mpc_state=
After install, it can be easily opened via ctrl+shift+L
Give it a try, in my opinion is better than eclipse instasearch, and periodically maintained
You can write a plugin that does that. Using the "Builder" example in Eclipse PDE in conjunction with Lucene, it should take a novice a couple of days to get something that works.
If you are interested, nWire (for Java or PHP) offers a full text search for all the elements in your code (not just types, but also methods, fields, constants, etc.). It does not index all the code, though.

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.

Generic code snippets or templates in Eclipse

I'm currently evaluating eclipse after using Textmate for all my development for many years. What I miss in Eclipse and what I can't find any solution for are some kind of generic templates:
I'm using PDT for my JavaScript and PHP development, and it supports code-templates. however , in my projects I'm writing large amounts of shell-scripts, yml-configuration-files, xml-files, gnu make scripts, etc., too. I'm writing source-documentation for all these scripts using a generic syntax (similar to robodoc) and you can save much time, when you can insert the doc-blocks using templates. however, besides PDT not all of the editor-plugins support templates.
Is there some generic way of storing code-snippets/templates in eclipse, which will work across all editor-plugins? I think it should be possible to implement such using eclipse monkey -- however, it seems development of monkey was stopped?
I'm using Eclipse 3.4.0.
If you have the web tools (WTP) plugins installed you should have a Snippets view which is an editor-independent place for collecting reusable code snippets. You can create and place your snippets in there and can separate them using 'drawers'. Double clicking or dragging a snippet item will insert it in the active editor.
The web tools user guide has a section about this view.
Why don't you try Snip2Code plugin?
It is a general purpose snippet manager platform that you can add to your Eclipse and will store your snippets on the cloud, so that you don't have to sync them when you reinstall Eclipse or move onto another machine.
http://www.snip2code.com/Static/Downloads

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

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.