Author: jfuerth
Date: Wed Sep  3 07:38:19 2008
New Revision: 2678

Modified:
trunk/src/ca/sqlpower/architect/swingui/olap/action/CreateOLAPChildAction.java

Log:
Another workaround for javac-vs-eclipse differences in what you're allowed to do with generics. I'm starting to think we're using generics in a "funny" way to be exposing all these cases.

Modified: trunk/src/ca/sqlpower/architect/swingui/olap/action/CreateOLAPChildAction.java
==============================================================================
--- trunk/src/ca/sqlpower/architect/swingui/olap/action/CreateOLAPChildAction.java (original) +++ trunk/src/ca/sqlpower/architect/swingui/olap/action/CreateOLAPChildAction.java Wed Sep 3 07:38:19 2008
@@ -125,7 +125,8 @@
         List<PlayPenComponent> selectedItems = playpen.getSelectedItems();
         final P pane = paneClass.cast(selectedItems.get(0));

-        pane.getModel().startCompoundEdit("Add " + friendlyChildName);
+        // workaround for javac problem (eclipse doesn't need the cast)
+ ((OLAPPane<?,?>) pane).getModel().startCompoundEdit("Add " + friendlyChildName);
         final C child = addNewChild(pane);

         final DataEntryPanel mep = createDataEntryPanel(child);
@@ -133,14 +134,14 @@
         Callable<Boolean> okCall = new Callable<Boolean>() {
             public Boolean call() throws Exception {
                 boolean applied = mep.applyChanges();
-                pane.getModel().endCompoundEdit();
+ ((OLAPPane<?,?>) pane).getModel().endCompoundEdit(); // another javac workaround
                 return applied;
             }
         };
         Callable<Boolean> cancelCall = new Callable<Boolean>() {
             public Boolean call() throws Exception {
                 child.getParent().removeChild(child);
-                pane.getModel().endCompoundEdit();
+ ((OLAPPane<?,?>) pane).getModel().endCompoundEdit(); // another javac workaround
                 return true;
             }
         };

Reply via email to