Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ice-dev] [ice-build] [eclipse/ice] 52b561: Adding hooks to register glazed list listeners to ...

Jay,

There were a few places where raw types were an issue.

In ListComponent, the value type of the listenerMap was just ListEventListener, a raw type. I changed this to ListEventListener<Object>. (I did this because these listeners are added to both an EventList<T> (the source list) and an EventList<String> (the ID list), and the only guaranteed super class of both T and String is Object).

There was also an unchecked type cast exception in the ListComponent.equals(Object) method. Since Java removes the generic types at run time, you can't cast a ListComponent<?> to a ListComponent<T> without the compiler complaining.

Most of the raw types were in the tests. I suppose raw types are not a big deal in the test code, but from what I've read raw types are an artifact from pre-generics Java and are strongly discouraged in new code. I went ahead and changed those as well. Also, using a raw type lets you do some strange things like...

ListComponent component = new ListComponent<Integer>();
component.add("string");

Jordan
Jordan Deyton
Oak Ridge National Laboratory
Telephone: (865) 574-1091
Email: deytonjh@xxxxxxxx
On 2/12/2015 10:40 AM, Jay Jay Billings wrote:

Jordan,

Do you mean that you made it ListComponent<T> instead of ListComponent<>?

Jay

On Feb 12, 2015 10:26 AM, "GitHub" <noreply@xxxxxxxxxx> wrote:
  Branch: refs/heads/jordan/VisItVisService
  Home:   https://github.com/eclipse/ice
  Commit: 52b561e61e70261a396b7d308d021edaa8896ef0
      https://github.com/eclipse/ice/commit/52b561e61e70261a396b7d308d021edaa8896ef0
  Author: Jordan Deyton <deytonjh@xxxxxxxx>
  Date:   2015-02-11 (Wed, 11 Feb 2015)

  Changed paths:
    M src/org.eclipse.ice.datastructures/src/org/eclipse/ice/datastructures/ICEObject/ListComponent.java
    M src/org.eclipse.ice.datastructures/src/org/eclipse/ice/datastructures/ICEObject/WrappedGlazedEventListener.java
    M tests/org.eclipse.ice.datastructures.test/src/org/eclipse/ice/datastructures/test/ListComponentTester.java
    A tests/org.eclipse.ice.datastructures.test/src/org/eclipse/ice/datastructures/test/TestListComponentListener.java

  Log Message:
  -----------
  Adding hooks to register glazed list listeners to ListComponents. The
IUpdateableListeners work as well, but if client code wants more detail
about what changed, a ListEventListener can be registered. Note that
these ListEventListeners are not notified when the ListComponent's ID
info is updated.

Added test code to handle this.

Added types to a lot of places where raw types were used previously.
Most of those are internal to ListComponent or in the tests.

Signed-off-by: Jordan Deyton <deytonjh@xxxxxxxx>


  Commit: 1aa198eaa36c9113fd22a19394b968e6f726b208
      https://github.com/eclipse/ice/commit/1aa198eaa36c9113fd22a19394b968e6f726b208
  Author: Jordan Deyton <deytonjh@xxxxxxxx>
  Date:   2015-02-11 (Wed, 11 Feb 2015)

  Changed paths:
    M src/org.eclipse.ice.client.widgets.moose/src/org/eclipse/ice/client/widgets/moose/MOOSEFormEditor.java
    M src/org.eclipse.ice.item/src/org/eclipse/ice/item/nuclear/MOOSEModel.java
    M src/org.eclipse.ice.viz.service.visit/src/org/eclipse/ice/viz/service/visit/VisItPlot.java
    M src/org.eclipse.ice.viz.service.visit/src/org/eclipse/ice/viz/service/visit/VisItVizService.java

  Log Message:
  -----------
  Added code to register a listener with the MOOSE Model's
ResourceComponent (which contains the mesh). If the ResourceComponent is
updated with a new mesh file, the plot is updated to use the mesh file.

Signed-off-by: Jordan Deyton <deytonjh@xxxxxxxx>


Compare: https://github.com/eclipse/ice/compare/e37972908580...1aa198eaa36c
_______________________________________________
ice-build mailing list
ice-build@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ice-build



_______________________________________________
ice-dev mailing list
ice-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ice-dev


Back to the top