[ 
https://issues.apache.org/jira/browse/PIVOT-1027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16790899#comment-16790899
 ] 

Roger Whitcomb commented on PIVOT-1027:
---------------------------------------

Last of the changes:

Sending core\src\org\apache\pivot\util\Resources.java
Sending wtk\src\org\apache\pivot\wtk\LinkButton.java
Sending wtk\src\org\apache\pivot\wtk\Menu.java
Sending wtk\src\org\apache\pivot\wtk\MenuBar.java
Sending wtk\src\org\apache\pivot\wtk\MenuButton.java
Sending wtk\src\org\apache\pivot\wtk\Prompt.java
Sending wtk\src\org\apache\pivot\wtk\RadioButton.java
Sending wtk\src\org\apache\pivot\wtk\TabPane.java
Sending wtk\src\org\apache\pivot\wtk\TablePane.java
Sending wtk\src\org\apache\pivot\wtk\TableView.java
Sending wtk\src\org\apache\pivot\wtk\TextArea.java
Sending wtk\src\org\apache\pivot\wtk\Window.java
Sending wtk\src\org\apache\pivot\wtk\content\TableViewMultiCellRenderer.java
Sending wtk\src\org\apache\pivot\wtk\media\SVGDiagramSerializer.java
Sending wtk\src\org\apache\pivot\wtk\skin\TextPaneSkinElementView.java
Sending wtk\src\org\apache\pivot\wtk\text\ComponentNode.java
Sending wtk\src\org\apache\pivot\wtk\text\Document.java
Sending wtk\src\org\apache\pivot\wtk\text\Element.java
Sending wtk\src\org\apache\pivot\wtk\text\ImageNode.java
Sending wtk-terra\src\org\apache\pivot\wtk\skin\terra\TerraAccordionSkin.java
Sending wtk-terra\src\org\apache\pivot\wtk\skin\terra\TerraCalendarSkin.java
Sending wtk-terra\src\org\apache\pivot\wtk\skin\terra\TerraPanoramaSkin.java
Sending wtk-terra\src\org\apache\pivot\wtk\skin\terra\TerraScrollBarSkin.java
Transmitting file data .......................done
Committing transaction...
Committed revision 1855341.

Although, arguably, there could be more javadoc and better error messages.  But 
at least the annotation is there now, and it shows up in the generated javadoc 
as a marker.

> Add an @UnsupportedOperation annotation that can be used to mark methods that 
> always throw UnsupportedOperationException when called
> ------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PIVOT-1027
>                 URL: https://issues.apache.org/jira/browse/PIVOT-1027
>             Project: Pivot
>          Issue Type: Improvement
>          Components: core
>            Reporter: Roger Whitcomb
>            Assignee: Roger Whitcomb
>            Priority: Minor
>
> This can be used to annotate (primarily in Javadoc) those methods, presumable 
> defined by an interface so they must be implemented, but which make no sense 
> in the specific implementation.  There are numerous examples, but a few 
> should suffice:
>  * NumericSpinnerData has a fixed range of values specified by the lower and 
> upper bounds, so the "remove(...)", "clear()", "add(...)", or "update(...)" 
> methods of the List<T> interface don't apply.
>  * Various iterators backed by other lists (such as VisibleNodeIterator of 
> TerraTreeViewSkin) doesn't support the "remove(...)" method for whatever 
> reason, even though it is specified in the Iterator interface.
>  * TabButton (part of TerraTabPaneSkin) is a subclass of Button, but many 
> methods are unsupported because of its unique structure (such as 
> "setTriState", "setButtonData", etc.)
>  * ImageNode (one of the unique children of TextPane) always holds a single 
> image, so the "insertRange" and "removeRange" methods make no sense.
> Note: this annotation does nothing, and is not retained at runtime, and 
> really should be in the Java language (see 
> [https://bugs.openjdk.java.net/browse/JDK-6447051] for instance), but it 
> makes documentation of unsupported operations a bit clearer at no real cost.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to