• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

eclipse plugin development and delicious java API problem

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everybody,
I have a little problem creating eclipse plugin. I have never seen anything like it before

I have created my plugin and there is a LoginAction class. This action performs nothing but a login dialog message and basic view.



Having have two lines of code in run() method commented, everything works good. But after uncomenting, aplication starts to act up. Program should throw a DeliciousNotAuthorizedException due to bad authorization, but it does not.
However, rest of program UI works (other views or actions) normally, except I cannot call LoginAction again. (but this is probably result of previous problem)

First I thought there might be bug in API, but I created simple java aplication (NOT plugin) like

[CODE]
import del.icio.us.Delicious;

public class Main {

public static void main(String[] args) {
Delicious del = new Delicious("login", "password");
del.addPost("post", "post description");
}
}
[\CODE]

and now it works perfectly, Delicious class sends htlm request, and then throws the exception. So there is no problem in API

Thanks you VERY much for all hints, I really need to get this to word as early as possible.
 
Ondrej Forejt
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
if needed, API documentation is http://delicious-java.sourceforge.net/
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can't just let your run() method throw random RuntimeExceptions; you need to catch and handle them yourself. Those two lines need to be in a "try" block. If Eclipse catches your exception, exactly what happens next is rather unpredicatable -- everything from continued normal operation to a complete workbench crash.
reply
    Bookmark Topic Watch Topic
  • New Topic