Author: jfuerth
Date: Tue Sep  2 11:44:39 2008
New Revision: 2674

Modified:
   trunk/src/ca/sqlpower/architect/swingui/olap/DimensionPane.java
   trunk/src/ca/sqlpower/architect/swingui/olap/OLAPPane.java

Log:
Removed some type parameters as a workaround for a javac bug on OS X (javac 1.5.0_13). It compiled correctly on eclipse, but not on javac. Some googling turned up a lot of people asking about the same problem, but I could not find a bug parade bug ID for this particular problem.


Modified: trunk/src/ca/sqlpower/architect/swingui/olap/DimensionPane.java
==============================================================================
--- trunk/src/ca/sqlpower/architect/swingui/olap/DimensionPane.java (original) +++ trunk/src/ca/sqlpower/architect/swingui/olap/DimensionPane.java Tue Sep 2 11:44:39 2008
@@ -202,7 +202,7 @@
     protected List<OLAPObject> getItemsFromCoordinates(
List<PlayPenCoordinate<? extends OLAPObject, ? extends OLAPObject>> coords) {
         List<OLAPObject> items = new ArrayList<OLAPObject>();
- for (PlayPenCoordinate<? extends OLAPObject, ? extends OLAPObject> coord : coords) { + for (PlayPenCoordinate coord : coords) { // Type params removed to work around javac bug (it broke the nightly build) if (coord.getIndex() == PlayPenCoordinate.ITEM_INDEX_SECTION_TITLE) { // Only add sections which are HierarchySections because they are // also OLAPObjects. If it is a Hierarchy, then we do not want to

Modified: trunk/src/ca/sqlpower/architect/swingui/olap/OLAPPane.java
==============================================================================
--- trunk/src/ca/sqlpower/architect/swingui/olap/OLAPPane.java  (original)
+++ trunk/src/ca/sqlpower/architect/swingui/olap/OLAPPane.java Tue Sep 2 11:44:39 2008
@@ -154,7 +154,10 @@
         pp.unzoomPoint(p);
         p.translate(-getX(), -getY());

-        PlayPenCoordinate<T, C> clickedCoor = pointToPPCoordinate(p);
+ // Type params removed to work around javac bug (it broke the nightly build) + // was: PlayPenCoordinate<T, C> clickedCoor = pointToPPCoordinate(p);
+        PlayPenCoordinate clickedCoor = pointToPPCoordinate(p);
+
         int clickedIndex = clickedCoor.getIndex();
         if (evt.getID() == MouseEvent.MOUSE_CLICKED) {
if (evt.getClickCount() == 2 && evt.getButton() == MouseEvent.BUTTON1) {
@@ -231,16 +234,16 @@
                             (InputEvent.SHIFT_DOWN_MASK |
                                     InputEvent.CTRL_DOWN_MASK)) == 0) {

-                        if (!isItemSelected(clickedCoor.getItem()) ){
+                        if (!isItemSelected((C) clickedCoor.getItem()) ){
                             deSelectEverythingElse(evt);
                             selectNone();
                         }
                         pp.setMouseMode(MouseModeType.SELECT_ITEM);
                     }
-                    if (isItemSelected(clickedCoor.getItem())) {
+                    if (isItemSelected((C) clickedCoor.getItem())) {
                         componentPreviouslySelected = true;
                     } else {
-                        selectItem(clickedCoor.getItem());
+                        selectItem((C) clickedCoor.getItem());
                     }

fireSelectionEvent(new SelectionEvent(this, SelectionEvent.SELECTION_EVENT,SelectionEvent.SINGLE_SELECT));

Reply via email to