Ignore:
Timestamp:
04/28/11 06:28:28 (13 years ago)
Author:
wschamai
Message:

MOD: implementation of IAdaptable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modelicaml/org.openmodelica.modelicaml.common/src/org/openmodelica/modelicaml/common/instantiation/TreeObject.java

    r706 r721  
    3737import org.eclipse.emf.common.util.BasicEList;
    3838import org.eclipse.emf.common.util.EList;
     39import org.eclipse.emf.ecore.EObject;
    3940import org.eclipse.uml2.uml.Class;
    4041import org.eclipse.uml2.uml.Comment;
     
    232233     * @return the element
    233234     */
    234     public NamedElement getElement(){
    235         return this.element;
     235//  public NamedElement getElement(){
     236//      return this.element;
     237//  }
     238   
     239    public Element getUmlElement(){
     240        if (this.property != null ) { return this.property; }
     241        if (this.element != null ) { return this.element; }
     242        return null;
    236243    }
    237244   
     
    789796    @Override
    790797    public Object getAdapter(java.lang.Class adapter) {
     798        if (adapter == EObject.class) {
     799            return getUmlElement();
     800        }
     801        if (adapter == TreeObject.class) {
     802            return this;
     803        }
    791804        // TODO Auto-generated method stub
    792805        return null;
Note: See TracChangeset for help on using the changeset viewer.