X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=org.simantics.g3d%2Fsrc%2Forg%2Fsimantics%2Fg3d%2Fproperty%2FAnnotatedPropertyTabContributorFactory.java;fp=org.simantics.g3d%2Fsrc%2Forg%2Fsimantics%2Fg3d%2Fproperty%2FAnnotatedPropertyTabContributorFactory.java;h=36da53ab504ec4989339fc51dbf6f2daf4b3074e;hb=d44977b8d6c8784d6e16374c25079b41e6026e48;hp=3fcb19f5e21f62fe11b9ab028e6ce6ce62f35bc4;hpb=ac00ead304ba436797dde10d982522c7e260bb95;p=simantics%2F3d.git diff --git a/org.simantics.g3d/src/org/simantics/g3d/property/AnnotatedPropertyTabContributorFactory.java b/org.simantics.g3d/src/org/simantics/g3d/property/AnnotatedPropertyTabContributorFactory.java index 3fcb19f5..36da53ab 100644 --- a/org.simantics.g3d/src/org/simantics/g3d/property/AnnotatedPropertyTabContributorFactory.java +++ b/org.simantics.g3d/src/org/simantics/g3d/property/AnnotatedPropertyTabContributorFactory.java @@ -86,10 +86,12 @@ import org.simantics.g3d.tools.AdaptationUtils; import org.simantics.selectionview.IPropertyTab; import org.simantics.selectionview.IPropertyTab2; import org.simantics.utils.datastructures.MapList; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class AnnotatedPropertyTabContributorFactory implements PropertyTabContributorFactory { - private static final boolean DEBUG = false; + private static final Logger LOGGER = LoggerFactory.getLogger(AnnotatedPropertyTabContributorFactory.class); @SuppressWarnings("unchecked") @Override @@ -799,7 +801,7 @@ public class AnnotatedPropertyTabContributorFactory implements PropertyTabContri if (Thread.currentThread() == Display.getDefault().getThread()) { if (viewer.getTable().isDisposed()) return; - if (DEBUG)System.out.println("Viewer refresh " + id); + if (LOGGER.isTraceEnabled()) LOGGER.trace("Viewer refresh " + id); for (IPropertyItem item : resolvedItems) if (!item.equals(selectedItem)) viewer.refresh(item); @@ -815,7 +817,7 @@ public class AnnotatedPropertyTabContributorFactory implements PropertyTabContri AnnotatedPropertyTab.this.node.removeListener(AnnotatedPropertyTab.this); return; } - if (DEBUG) System.out.println("Viewer threaded refresh " + id); + if (LOGGER.isTraceEnabled()) LOGGER.trace("Viewer threaded refresh " + id); for (IPropertyItem item : resolvedItems) if (!item.equals(selectedItem)) viewer.refresh(item); @@ -903,7 +905,7 @@ public class AnnotatedPropertyTabContributorFactory implements PropertyTabContri }; } - if (DEBUG) System.err.println("CELL EDITOR: " + element); + if (LOGGER.isTraceEnabled()) LOGGER.trace("CELL EDITOR: " + element); return propertyItemEditor; } else if (item instanceof ComboPropertyItem) { @@ -927,7 +929,7 @@ public class AnnotatedPropertyTabContributorFactory implements PropertyTabContri comboEditors.put(comboPropertyItem, editor); } - if (DEBUG) System.err.println("CELL EDITOR: " + element); + if (LOGGER.isTraceEnabled()) LOGGER.trace("CELL EDITOR: " + element); return editor; } else { @@ -955,7 +957,7 @@ public class AnnotatedPropertyTabContributorFactory implements PropertyTabContri PropertyManipulator manipulator = tab.getManipulator(item);//createManipulator(item, obj); if (manipulator.getValueCount() <= index) throw new IllegalAccessError("Editing value in index " + index + " is not allowed."); - if (DEBUG)System.err.println("CELL SET VALUE: " + element + " " + value); + if (LOGGER.isTraceEnabled()) LOGGER.trace("CELL SET VALUE: " + element + " " + value); manipulator.setValue(value.toString(),index); viewer.refresh(item); nodeMap.commit("Set " + item.getId() + " value to " + value); @@ -1195,7 +1197,7 @@ public class AnnotatedPropertyTabContributorFactory implements PropertyTabContri || event.eventType == ColumnViewerEditorActivationEvent.TRAVERSAL) { if (focusCellManager != null) { try { - if (DEBUG)System.err.println("FOCUS CELL: " + focusCell); + if (LOGGER.isTraceEnabled()) LOGGER.trace("FOCUS CELL: " + focusCell); Method m = AbstractTableViewer.class.getDeclaredMethod( "getSelectionFromWidget"); @@ -1257,7 +1259,7 @@ public class AnnotatedPropertyTabContributorFactory implements PropertyTabContri row.getCell(columnIndex), getViewer()); } } - if (DEBUG) System.err.println("NEXT CELL: " + cell2edit); + if (LOGGER.isTraceEnabled()) LOGGER.trace("NEXT CELL: " + cell2edit); if (cell2edit != null) { getViewer().getControl().setRedraw(false); ColumnViewerEditorActivationEvent acEvent = new ColumnViewerEditorActivationEvent(