/*
   * Validate the input against the underlying type.
   */
  public static String isValueValid(String newValue) {
    IStructuredSelection currentSelection = Selection.getInstance().getStructuredSelection();
    Object context = currentSelection.iterator().next();
    LiteralSymbolicConstant_c v_lsc = (LiteralSymbolicConstant_c) context;

    SymbolicConstant_c v_symConst =
        SymbolicConstant_c.getOneCNST_SYCOnR1502(
            LeafSymbolicConstant_c.getOneCNST_LFSCOnR1503(v_lsc));

    DataType_c v_dt = DataType_c.getOneS_DTOnR1500(v_symConst);

    return InputValueValidator.isValid(v_dt, newValue);
  }
 public void testGlobalMigrationSymbolicConstantDomain() throws Exception {
   Ooaofooa testRoot =
       Ooaofooa.getInstance("/model_upgrade/models/model_upgrade/domain/domain.xtuml");
   SymbolicConstant_c param = SymbolicConstant_c.SymbolicConstantInstance(testRoot);
   assertNotNull("Unable to locate test element", param);
   DataType_c dt = DataType_c.getOneS_DTOnR1500(param);
   assertNotNull("Unable to locate test element", dt);
   GlobalElementInSystem_c gis =
       GlobalElementInSystem_c.getOneG_EISOnR9100(PackageableElement_c.getOnePE_PEOnR8001(dt));
   assertNotNull("SymbolicConstant was not migrated to use globals.", gis);
   assertTrue(
       "Incorrect data type associated with SymbolicConstant after global migration",
       dt.getName().equals("string"));
 }