Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Problem using AddJavaDocStubOperation
Problem using AddJavaDocStubOperation [message #213399] Thu, 25 August 2005 10:59 Go to next message
Eclipse UserFriend
Originally posted by: david.nitenberg.gmail.com

Hi,

I am trying to add a Javadoc comment to some methods in a .java file but I
have some little problems. Here the source code I am using:

IMethod[] methods;
try {
methods = type.getMethods();
if (methods.length != 0) {
AddJavaDocStubOperation addDoc =
new AddJavaDocStubOperation (methods);
addDoc.run(null);
}
} catch (CoreException e1) {
e1.printStackTrace();
}catch (OperationCanceledException e1) {
e1.printStackTrace();
}


I have 2 behaviors :
- if the file I am trying to add the Javadoc comments is not opened in
the eclipse editor, nothing happens...
- if the file is opened in the eclipse editor, I get the following
exception when the addDoc.run(null) statement is executed :
Exception in thread "AWT-EventQueue-0" org.eclipse.swt.SWTException:

Invalid thread access

I don't understand where it comes from...
If anyone could help me ?

David

PS : I know that the use of AddJavaDocStubOperation is not recommended,
but I did not find a better way, so I am opened to other solutions :-)
Re: Problem using AddJavaDocStubOperation - Please HELP [message #213706 is a reply to message #213399] Mon, 29 August 2005 05:56 Go to previous message
Eclipse UserFriend
Originally posted by: david.nitenberg.gmail.com

I really don't understand why do I get this exception. I tried to look in
google to solve this problem, but without success (even if there is some
documentation about it).
So if someone could help me here, I would really appreciate it :-)

Thanx for your help,
David
Previous Topic:Modify a .java file not opened in the editor
Next Topic:Java compilence compability level
Goto Forum:
  


Current Time: Tue May 13 09:42:50 EDT 2025

Powered by FUDForum. Page generated in 0.03842 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top