@Test public void testShow() { when(fieldInfo.getCurrentValue(IdGeneratorField.STRATEGY)).thenReturn(STRATEGY_VALUE); when(fieldInfo.getCurrentValue(IdGeneratorField.GENERATOR)).thenReturn(GENERATOR_VALUE); when(fieldInfo.isDisabled()).thenReturn(false); dialog.setProperty(fieldInfo); dialog.show(); verify(view).setGeneratorType(STRATEGY_VALUE); verify(view).setGeneratorName(GENERATOR_VALUE); verify(view).setEnabled(!fieldInfo.isDisabled()); verify(view).show(); }
@Override public void show() { DataModelerPropertyEditorFieldInfo fieldInfo = (DataModelerPropertyEditorFieldInfo) property; String strategy = (String) fieldInfo.getCurrentValue(STRATEGY); String generator = (String) fieldInfo.getCurrentValue(GENERATOR); strategy = strategy != null ? strategy : UIUtil.NOT_SELECTED; view.setGeneratorType(strategy); view.setGeneratorName(generator); view.setEnabled(!fieldInfo.isDisabled()); view.show(); }
IdGeneratorEditionDialog implements PropertyEditionPopup { @Override public void show() { DataModelerPropertyEditorFieldInfo fieldInfo = (DataModelerPropertyEditorFieldInfo) property; String strategy = (String) fieldInfo.getCurrentValue(STRATEGY); String generator = (String) fieldInfo.getCurrentValue(GENERATOR); strategy = strategy != null ? strategy : UIUtil.NOT_SELECTED; view.setGeneratorType(strategy); view.setGeneratorName(generator); view.setEnabled(!fieldInfo.isDisabled()); view.show(); } }
IdGeneratorEditionDialog implements PropertyEditionPopup { @Override public void show() { DataModelerPropertyEditorFieldInfo fieldInfo = (DataModelerPropertyEditorFieldInfo) property; String strategy = (String) fieldInfo.getCurrentValue(STRATEGY); String generator = (String) fieldInfo.getCurrentValue(GENERATOR); strategy = strategy != null ? strategy : UIUtil.NOT_SELECTED; view.setGeneratorType(strategy); view.setGeneratorName(generator); view.setEnabled(!fieldInfo.isDisabled()); view.show(); } @Inject  IdGeneratorEditionDialog(View view); }
IdGeneratorEditionDialog implements PropertyEditionPopup { @Override public void show() { DataModelerPropertyEditorFieldInfo fieldInfo = (DataModelerPropertyEditorFieldInfo) property; String strategy = (String) fieldInfo.getCurrentValue(STRATEGY); String generator = (String) fieldInfo.getCurrentValue(GENERATOR); strategy = strategy != null ? strategy : UIUtil.NOT_SELECTED; view.setGeneratorType(strategy); view.setGeneratorName(generator); view.setEnabled(!fieldInfo.isDisabled()); view.show(); } @Inject  IdGeneratorEditionDialog(View view); @Override Widget asWidget(); @Override void show(); @Override void setOkCommand(Command okCommand); @Override void setProperty(PropertyEditorFieldInfo property); @Override String getStringValue(); @Override void setStringValue(String value); }
IdGeneratorEditionDialog implements PropertyEditionPopup { @Override public void show() { DataModelerPropertyEditorFieldInfo fieldInfo = (DataModelerPropertyEditorFieldInfo) property; String strategy = (String) fieldInfo.getCurrentValue(STRATEGY); String generator = (String) fieldInfo.getCurrentValue(GENERATOR); strategy = strategy != null ? strategy : UIUtil.NOT_SELECTED; view.setGeneratorType(strategy); view.setGeneratorName(generator); view.setEnabled(!fieldInfo.isDisabled()); view.show(); } @Inject  IdGeneratorEditionDialog(View view); @Override Widget asWidget(); @Override void show(); @Override void setOkCommand(Command okCommand); @Override void setProperty(PropertyEditorFieldInfo property); @Override String getStringValue(); @Override void setStringValue(String value);  }