@Override protected void updateModel() { // Check button changes CommandSupport.exec( "C++ parameter update", new Runnable() { public void run() { checkConst(); } }); }
/** Saves the body for an '<code>Parameter</code>' */ public void save() { if (selectedParameter == null) { /* Log.debug("saveBody : selectedParameter is null"); */ } else { CommandSupport.exec( "C++ parameter save", new Runnable() { public void run() { // Treat Pointer String newPtr = docPtr.get(); if (newPtr.equals("")) { StereotypeUtil.unapply(selectedParameter, Ptr.class); } else { StereotypeUtil.apply(selectedParameter, Ptr.class); } // Treat Reference String newRef = docRef.get(); if (newRef.equals("")) { StereotypeUtil.unapply(selectedParameter, Ref.class); } else { StereotypeUtil.apply(selectedParameter, Ref.class); } // Treat DefaultValue // need common class for facilitating this // selectedParameter.setDefaultValue(selectedParameter.createDefaultValue("default", // selectedParameter.getType(), null); // Treat Array String newArray = docArray.get(); if (newArray.equals("")) { StereotypeUtil.unapply(selectedParameter, Array.class); } else { StereotypeUtil.apply(selectedParameter, Array.class); // StereotypeUtil.setTaggedValue(selectedParameter, Array.class, "definition", // newArray); } } }); } }