Twittering from NetBeans IDE

Carl Dea (who I know via a series of articles I wrote about "Filthy Rich Clients" on the NetBeans Platform, of which part 1 is here), sent me an e-mail a few days ago to encourage me to join Twitter. I did so, today, and this is my Twitter nest (is that the correct word? I totally just made it up):

https://twitter.com/GeertjanW

By the way, here's the NetBeans Twitter nest:

https://twitter.com/netbeans

It wasn't long before I wanted to send my tweets from inside NetBeans IDE, instead of the web interface.

I found out here about Twitter4J. Right as I was thinking about how to integrate that into NetBeans IDE, I found out about Kishida-san's Twitter Plugin for NetBeans. While it seems to be doing the job perfectly well, it could go a few steps further. Firstly, it could become a better NetBeans Platform citizen by getting the user to set username/password in the Options window. Secondly, it could make use of explorer views rather than a JTable.

That's what I accomplished below and it's working exactly as one would expect:

I tried to put all the pieces around the editor, rather than within a window that dominates the IDE too much, because Twittering is always going to be an ancillary activity, rather than the central focus of NetBeans IDE users. So, for example, the status bar (thanks to this very simple instruction) contains the text field where I do my twittering. (Very simple: when I press Enter in that text field, the tweet is... twittered.) Notice also the Properties window, the Message window, and the explorer mode (which contains the images of my Twitter friends), all of which provide parts of the UI of the plugin. That, I believe, is how it is meant to be done. On top of that, there's an extension to the Options window, where the username and password are set, which are stored to the NetBeans user directory via the NbPreferences class.

Now, here's the puzzle for today. Which of the following coding activities do you think took up most of my time while creating the above plugin?

  • Understanding the Twitter4J API classes.

  • Figuring out how to resize the images.

  • Synchronizing the windows with each other.

  • Sending messages to Twitter from the IDE.

  • Initializing Twitter from inside the IDE.

What do you think? With which of the above do you think I had (by far) the most trouble? (I spent more time on this than on everything else put together.)

Comments:

If you're anything like me, it would've been figuring out the third-party API. They're never as well-documented as people think. :o)

Posted by Tom Potts on February 01, 2009 at 05:02 PM PST #

so are you going to release it?

Posted by jfisher on February 01, 2009 at 06:29 PM PST #

/////////

Posted by sameera on February 15, 2009 at 11:14 PM PST #

Did you make a plugin out of your solution or could you provide instructions on how to do this? Thanks!

Posted by sellerjd on March 12, 2009 at 12:07 AM PDT #

Did you figure out how to send a tweet rather than a series of direct messages, using twitter4j?

Posted by Phil on March 25, 2009 at 07:17 AM PDT #

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