Simple MySQL Integration into NetBeans IDE 6.0

To celebrate the MySQL acquisition, here's some further integration (on top of that provided by 6.0, by default, by means of which you can register a MySQL connection, start/stop and even create MySQL databases). First, I followed the Options Window Module Tutorial and ended up with an extension to the Options window:

Then, as explained in the above tutorial, I passed on the file identified above and used it in a menu item's performAction:

Preferences pref = NbPreferences.forModule(MysqlPanel.class);
String app = pref.get("MySQLAdminLoc", "");

public void performAction() {

    try {
        NbProcessDescriptor desc = new NbProcessDescriptor(app, "");
        Process process = desc.exec();
        process.waitFor();
    } catch (InterruptedException ex) {
        JOptionPane.showMessageDialog(null, "Specify the location of " +
                "the MySQL Admin console" +
                " in the Options window!");
    } catch (IOException ex) {
        JOptionPane.showMessageDialog(null, "Specify the location of " +
                "the MySQL Admin console" +
                " in the Options window!");
    }

}

This is how the menu item looks:

When selected, the MySQL Admin dialog opens:

It would be best if it did not open as a modal dialog, but I don't think I can do anything to change that.

Comments:

Some of the MySQL tools (very practical by the way), seem to be developed with .NET :).
I hope now they'll be ported to Java : better NB, (platform at least) :) .

OT (sorry for being offtopic but you seem to be the expert for NB :) ):
Are there any NB plug-ins that do something like this Eclipse plugin?:
http://texlipse.sourceforge.net/

(I tried the search function from the plug- in portal:
http://plugins.netbeans.org/PluginPortal/faces/MainPage.jsp
but it's simply not working for me - not even on existing plug-ins that I see in the Tops)

Thanx

Tom.

Posted by Thomas Bernhard on February 08, 2008 at 10:11 PM PST #

This one (TeX)?:
http://plugins.netbeans.org/PluginPortal/faces/PluginDetailPage.jsp?pluginid=5749

Posted by Ramon.Ramos on February 09, 2008 at 02:26 PM PST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
12
13
14
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today