コード例 #1
0
 @Override
 public String getSignature(Object eObject, int showMask) {
   ProcedureResult procResult = assertProcedureResult(eObject);
   StringBuffer result = new StringBuffer();
   switch (showMask) {
     case 1:
       // Name
       result.append(procResult.getName());
       break;
     case 2:
       // Stereotype
       result.append("<<"); // $NON-NLS-1$
       result.append(getStereotype(eObject));
       result.append(">>"); // $NON-NLS-1$
       break;
     case 3:
       // Name and Stereotype
       result.append("<<"); // $NON-NLS-1$
       result.append(getStereotype(eObject));
       result.append(">> "); // $NON-NLS-1$
       result.append(procResult.getName());
       break;
     default:
       throw new TeiidRuntimeException(
           RelationalPlugin.Util.getString("Aspect.invalidShowMask", showMask)); // $NON-NLS-1$
   }
   return result.toString();
 }
コード例 #2
0
  /**
   * @see
   *     org.teiid.designer.core.metamodel.aspect.uml.UmlDiagramAspect#setSignature(java.lang.Object,
   *     java.lang.String)
   */
  @Override
  public IStatus setSignature(Object eObject, String newSignature) {
    try {
      ProcedureResult result = assertProcedureResult(eObject);
      result.setName(newSignature);
    } catch (Throwable e) {
      return new Status(
          IStatus.ERROR, RelationalMetamodelConstants.PLUGIN_ID, 0, e.getMessage(), e);
    }

    return new Status(
        IStatus.OK,
        RelationalMetamodelConstants.PLUGIN_ID,
        0,
        RelationalPlugin.Util.getString("Aspect.ok"),
        null); //$NON-NLS-1$
  }