Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
<copyright> Copyright (c) 2002-2007 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: IBM - Initial API and implementation </copyright> $Id: XSDRedefineItemProvider.java,v 1.7 2007/03/22 02:06:23 davidms Exp $
 
 package org.eclipse.xsd.provider;
 
 
 import java.util.List;
 
 
This is the item provider adpater for a org.eclipse.xsd.XSDRedefine object.
 
 public class XSDRedefineItemProvider
   implements 
 {
  
This constructs an instance from a factory and a notifier.
 
   public XSDRedefineItemProvider(AdapterFactory adapterFactory)
   {
     super(adapterFactory);
   }

  
This returns the property descriptors for the adapted class.
 
   @Override
   {
     if ( == null)
     {
       super.getPropertyDescriptors(object);
     }
     return ;
   }

  
 
   @Override
   public Collection<? extends EStructuralFeaturegetChildrenFeatures(Object object)
   {
     if ( == null)
     {
       super.getChildrenFeatures(object);
     }
     return ;
   }

  
This returns XSDRedefine.gif.
 
   @Override
   public Object getImage(Object object)
   {
     return ..getImage("full/obj16/XSDRedefine");
   }
 
   @Override
   public String getText(Object object)
   {
     XSDRedefine xsdRedefine = ((XSDRedefine)object);
     String result = xsdRedefine.getSchemaLocation();
     return result == null ? "" : result;
  }

  
This handles notification by calling fireNotifyChanged.
  public void notifyChanged(Notification msg
  {
    if (
         msg.getFeature() == .getXSDRedefine_Annotations() || 
         msg.getFeature() == .getXSDRedefine_Contents()
       )
    {
      fireNotifyChanged(msg);
      return;
    }
    super.notifyChanged(msg);
  }

  
This adds org.eclipse.emf.edit.command.CommandParameters describing the children that can be created under this object.
  protected void collectNewChildDescriptors(Collection<ObjectnewChildDescriptorsObject object)
  {
    super.collectNewChildDescriptors(newChildDescriptorsobject);
    XSDRedefine r = (XSDRedefineobject;
    // annotation
    // model group definition
    // attribute group definition
    // atomic, list, and union simple type definitions
    addSimpleTypeDefinitionChildParameters(newChildDescriptorsr.getXSDRedefine_Contents(), truetruetrue);
    // complex type definition
  }
New to GrepCode? Check out our FAQ X