protected Composite createBoundElementEMFComboViewer(Composite parent) {
    createDescription(
        parent,
        EnvironmentViewsRepository.BindingElement.Properties.boundElement,
        EnvironmentMessages.BindingElementPropertiesEditionPart_BoundElementLabel);
    boundElement = new EMFComboViewer(parent);
    GridData boundElementData = new GridData(GridData.FILL_HORIZONTAL);
    boundElement.getCombo().setLayoutData(boundElementData);
    boundElement.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
    boundElement.addSelectionChangedListener(
        new ISelectionChangedListener() {

          /**
           * {@inheritDoc}
           *
           * @see
           *     org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
           */
          public void selectionChanged(SelectionChangedEvent event) {
            if (propertiesEditionComponent != null)
              propertiesEditionComponent.firePropertiesChanged(
                  new PropertiesEditionEvent(
                      BindingElementPropertiesEditionPartImpl.this,
                      EnvironmentViewsRepository.BindingElement.Properties.boundElement,
                      PropertiesEditionEvent.COMMIT,
                      PropertiesEditionEvent.SET,
                      null,
                      getBoundElement()));
          }
        });
    boundElement.setContentProvider(new EMFListContentProvider());
    EditingUtils.setID(
        boundElement.getCombo(), EnvironmentViewsRepository.BindingElement.Properties.boundElement);
    EditingUtils.setEEFtype(boundElement.getCombo(), "eef::Combo"); // $NON-NLS-1$
    SWTUtils.createHelpButton(
        parent,
        propertiesEditionComponent.getHelpContent(
            EnvironmentViewsRepository.BindingElement.Properties.boundElement,
            EnvironmentViewsRepository.SWT_KIND),
        null); //$NON-NLS-1$
    // Start of user code for createBoundElementEMFComboViewer

    // End of user code
    return parent;
  }
コード例 #2
0
  protected Composite createResultEMFComboViewer(FormToolkit widgetFactory, Composite parent) {
    createDescription(
        parent,
        ChecklistViewsRepository.Item.Properties.result,
        ChecklistMessages.ItemPropertiesEditionPart_ResultLabel);
    result = new EMFComboViewer(parent);
    result.setContentProvider(new ArrayContentProvider());
    result.setLabelProvider(
        new AdapterFactoryLabelProvider(EEFRuntimePlugin.getDefault().getAdapterFactory()));
    GridData resultData = new GridData(GridData.FILL_HORIZONTAL);
    result.getCombo().setLayoutData(resultData);
    result.addSelectionChangedListener(
        new ISelectionChangedListener() {

          /**
           * {@inheritDoc}
           *
           * @see
           *     org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
           */
          public void selectionChanged(SelectionChangedEvent event) {
            if (propertiesEditionComponent != null)
              propertiesEditionComponent.firePropertiesChanged(
                  new PropertiesEditionEvent(
                      ItemPropertiesEditionPartForm.this,
                      ChecklistViewsRepository.Item.Properties.result,
                      PropertiesEditionEvent.COMMIT,
                      PropertiesEditionEvent.SET,
                      null,
                      getResult()));
          }
        });
    result.setID(ChecklistViewsRepository.Item.Properties.result);
    FormUtils.createHelpButton(
        widgetFactory,
        parent,
        propertiesEditionComponent.getHelpContent(
            ChecklistViewsRepository.Item.Properties.result, ChecklistViewsRepository.FORM_KIND),
        null); //$NON-NLS-1$
    // Start of user code for createResultEMFComboViewer

    // End of user code
    return parent;
  }
コード例 #3
0
  protected Composite createTypeEMFComboViewer(Composite parent) {
    createDescription(
        parent,
        EipViewsRepository.Router.Properties.type,
        EipMessages.RouterPropertiesEditionPart_TypeLabel);
    type = new EMFComboViewer(parent);
    type.setContentProvider(new ArrayContentProvider());
    type.setLabelProvider(
        new AdapterFactoryLabelProvider(EEFRuntimePlugin.getDefault().getAdapterFactory()));
    GridData typeData = new GridData(GridData.FILL_HORIZONTAL);
    type.getCombo().setLayoutData(typeData);
    type.addSelectionChangedListener(
        new ISelectionChangedListener() {

          /**
           * {@inheritDoc}
           *
           * @see
           *     org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
           */
          public void selectionChanged(SelectionChangedEvent event) {
            if (propertiesEditionComponent != null)
              propertiesEditionComponent.firePropertiesChanged(
                  new PropertiesEditionEvent(
                      RouterPropertiesEditionPartImpl.this,
                      EipViewsRepository.Router.Properties.type,
                      PropertiesEditionEvent.COMMIT,
                      PropertiesEditionEvent.SET,
                      null,
                      getType()));
          }
        });
    type.setID(EipViewsRepository.Router.Properties.type);
    SWTUtils.createHelpButton(
        parent,
        propertiesEditionComponent.getHelpContent(
            EipViewsRepository.Router.Properties.type, EipViewsRepository.SWT_KIND),
        null); //$NON-NLS-1$
    // Start of user code for createTypeEMFComboViewer

    // End of user code
    return parent;
  }
コード例 #4
0
  protected Composite createVisibilityEMFComboViewer(Composite parent) {
    SWTUtils.createPartLabel(
        parent,
        UmlMessages.CreationEventPropertiesEditionPart_VisibilityLabel,
        propertiesEditionComponent.isRequired(
            UmlViewsRepository.CreationEvent.Properties.visibility, UmlViewsRepository.SWT_KIND));
    visibility = new EMFComboViewer(parent);
    visibility.setContentProvider(new ArrayContentProvider());
    visibility.setLabelProvider(new AdapterFactoryLabelProvider(new EcoreAdapterFactory()));
    GridData visibilityData = new GridData(GridData.FILL_HORIZONTAL);
    visibility.getCombo().setLayoutData(visibilityData);
    visibility.addSelectionChangedListener(
        new ISelectionChangedListener() {

          /**
           * {@inheritDoc}
           *
           * @see
           *     org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
           */
          public void selectionChanged(SelectionChangedEvent event) {
            if (propertiesEditionComponent != null)
              propertiesEditionComponent.firePropertiesChanged(
                  new PropertiesEditionEvent(
                      CreationEventPropertiesEditionPartImpl.this,
                      UmlViewsRepository.CreationEvent.Properties.visibility,
                      PropertiesEditionEvent.COMMIT,
                      PropertiesEditionEvent.SET,
                      null,
                      getVisibility()));
          }
        });
    visibility.setID(UmlViewsRepository.CreationEvent.Properties.visibility);
    SWTUtils.createHelpButton(
        parent,
        propertiesEditionComponent.getHelpContent(
            UmlViewsRepository.CreationEvent.Properties.visibility, UmlViewsRepository.SWT_KIND),
        null); //$NON-NLS-1$
    return parent;
  }