getCurrentElement() null issue in Java UI Classes for Eclipse
Chris Connor May 21 2012 11:38:50 AM
Seems to be this behaviour is a "feature" of the product which may be fixed over time.A similar threads on DeveloperWorks forum (or Notes.net as I still like to call it..)
Kevin Duan http://www-10.lotus.com/ldd/nd8forum.nsf/5f27803bba85d8e285256bf10054620d/e0da559819b54d0b852579a20034ce5c?OpenDocument
Also being hinted at in some other places that the view behaviour is unreliable at best.
At the moment (until I can come up with a better idea) I am running some code as follows for this condition in the job thread
if(elem==null){
return Status.CANCEL_STATUS;
}
....
....
....
return Status.OK_STATUS;
I then check in my calling code to see what the jobs status was returning as follows
if(job.getResult().equals(Status.CANCEL_STATUS)){
MessageDialog.openInformation(composite.getShell(),"Document Not Uploaded","Document NOT Uploaded. Instead of running this process from a view please retry again from an open document.");
}
This is far from ideal. However, it is at least catching the null situation and informing the user. It is also allowing the user to attempt to perform the action from the view screen.
Anyone know of a better approach?
Tweet
- Comments [0]

