This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 89594 - Please define an annotation to mark methods that could only be called from the AWT Event Thread
Summary: Please define an annotation to mark methods that could only be called from th...
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@platform
URL:
Keywords: API
Depends on: 137437
Blocks:
  Show dependency tree
 
Reported: 2006-11-19 12:15 UTC by Tim Lebedkov
Modified: 2009-01-22 19:07 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Lebedkov 2006-11-19 12:15:30 UTC
e.g.

package org.openide.util;

/**
 * Annotation for methods that should be called on the AWT Event Queue Thread.
 *
 * @author tl
 */
@Target(ElementType.METHOD) 
@Retention(RetentionPolicy.SOURCE)
public @interface AWTThreadAnnotation {
}

Thank You
Comment 1 David Simonek 2008-10-23 12:05:53 UTC
Passing to java, I don't know if we have anything like that or if JDK should define it itself?
Comment 2 Jan Lahoda 2008-11-06 09:16:14 UTC
Might be useful. It would be of course perfect in JDK would define that annotation, but that is a bit out of scope of
NetBeans, IMO.

Anyway, I do not see the relation to the Java support (the java component). Do you think that annotation should be
defined only for modules that use Java support modules? That does not seem right to me. My expectation would be that the
platform should provide such annotation. Somewhat related to issue #137437, so passing to the same component as that
issue uses.
Comment 3 Jesse Glick 2009-01-22 19:07:03 UTC
Not sure what the purpose would be; I don't know of any tool which could statically analyze your code to see if it were
potentially calling such methods off EQ. (Nor do I know how static analysis could make such a determination in any but
the most trivial cases.) Without such a tool, there is no advantage over simply mentioning this constraint in the Javadoc.