コード例 #1
0
 /**
  * {@inheritDoc}
  *
  * @see ewe.parts.ProjectPropertiesEditionPart#setDefaultTarget(EObject newValue)
  */
 public void setDefaultTarget(EObject newValue) {
   if (newValue != null) {
     defaultTarget.setSelection(new StructuredSelection(newValue));
   } else {
     defaultTarget.setSelection(new StructuredSelection()); // $NON-NLS-1$
   }
 }
 /**
  * {@inheritDoc}
  *
  * @see org.obeonetwork.dsl.cinematic.flow.parts.SubflowStatePropertiesEditionPart#getSubflow()
  */
 public EObject getSubflow() {
   if (subflow.getSelection() instanceof StructuredSelection) {
     Object firstElement = ((StructuredSelection) subflow.getSelection()).getFirstElement();
     if (firstElement instanceof EObject) return (EObject) firstElement;
   }
   return null;
 }
 /**
  * {@inheritDoc}
  *
  * @see
  *     org.obeonetwork.dsl.interaction.parts.InteractionUsePropertiesEditionPart#setInteraction(EObject
  *     newValue)
  */
 public void setInteraction(EObject newValue) {
   if (newValue != null) {
     interaction.setSelection(new StructuredSelection(newValue));
   } else {
     interaction.setSelection(new StructuredSelection()); // $NON-NLS-1$
   }
 }
 /**
  * {@inheritDoc}
  *
  * @see
  *     org.obeonetwork.dsl.typeslibrary.parts.SimpleNamedTypePropertiesEditionPart#setType(EObject
  *     newValue)
  */
 public void setType(EObject newValue) {
   if (newValue != null) {
     type.setSelection(new StructuredSelection(newValue));
   } else {
     type.setSelection(new StructuredSelection()); // $NON-NLS-1$
   }
 }
 /**
  * {@inheritDoc}
  *
  * @see org.obeonetwork.dsl.typeslibrary.parts.SimpleNamedTypePropertiesEditionPart#getType()
  */
 public EObject getType() {
   if (type.getSelection() instanceof StructuredSelection) {
     Object firstElement = ((StructuredSelection) type.getSelection()).getFirstElement();
     if (firstElement instanceof EObject) return (EObject) firstElement;
   }
   return null;
 }
コード例 #6
0
 /**
  * {@inheritDoc}
  *
  * @see net.certware.sacm.SACM.Evidence.parts.HasRoleInPropertiesEditionPart#getOrganization()
  */
 public EObject getOrganization() {
   if (organization.getSelection() instanceof StructuredSelection) {
     Object firstElement = ((StructuredSelection) organization.getSelection()).getFirstElement();
     if (firstElement instanceof EObject) return (EObject) firstElement;
   }
   return null;
 }
 /**
  * {@inheritDoc}
  *
  * @see
  *     org.obeonetwork.dsl.cinematic.flow.parts.SubflowStatePropertiesEditionPart#setSubflow(EObject
  *     newValue)
  */
 public void setSubflow(EObject newValue) {
   if (newValue != null) {
     subflow.setSelection(new StructuredSelection(newValue));
   } else {
     subflow.setSelection(new StructuredSelection()); // $NON-NLS-1$
   }
 }
コード例 #8
0
 /**
  * {@inheritDoc}
  *
  * @see
  *     org.eclipse.emf.eef.subPackageNonRegForFilters.parts.TestFilterPropertiesEditionPart#setTestEOFCV(EObject
  *     newValue)
  */
 public void setTestEOFCV(EObject newValue) {
   if (newValue != null) {
     testEOFCV.setSelection(new StructuredSelection(newValue));
   } else {
     testEOFCV.setSelection(new StructuredSelection()); // $NON-NLS-1$
   }
 }
コード例 #9
0
 /**
  * {@inheritDoc}
  *
  * @see
  *     org.obeonetwork.dsl.uml2.properties.uml.parts.CreationEventPropertiesEditionPart#setTemplateParameter(EObject
  *     newValue)
  */
 public void setTemplateParameter(EObject newValue) {
   if (newValue != null) {
     templateParameter.setSelection(new StructuredSelection(newValue));
   } else {
     templateParameter.setSelection(new StructuredSelection()); // $NON-NLS-1$
   }
 }
コード例 #10
0
 /**
  * {@inheritDoc}
  *
  * @see ewe.parts.ProjectPropertiesEditionPart#getDefaultTarget()
  */
 public EObject getDefaultTarget() {
   if (defaultTarget.getSelection() instanceof StructuredSelection) {
     Object firstElement = ((StructuredSelection) defaultTarget.getSelection()).getFirstElement();
     if (firstElement instanceof EObject) return (EObject) firstElement;
   }
   return null;
 }
コード例 #11
0
 /**
  * {@inheritDoc}
  *
  * @see
  *     org.obeonetwork.dsl.uml2.properties.uml.parts.CreationEventPropertiesEditionPart#getTemplateParameter()
  */
 public EObject getTemplateParameter() {
   if (templateParameter.getSelection() instanceof StructuredSelection) {
     Object firstElement =
         ((StructuredSelection) templateParameter.getSelection()).getFirstElement();
     if (firstElement instanceof EObject) return (EObject) firstElement;
   }
   return null;
 }
コード例 #12
0
  /**
   * @param parent the parent composite
   * @param widgetFactory factory to use to instanciante widget of the form
   */
  protected Composite createOrganizationFlatComboViewer(
      Composite parent, FormToolkit widgetFactory) {
    createDescription(
        parent,
        EvidenceViewsRepository.HasRoleIn.Properties.organization,
        EvidenceMessages.HasRoleInPropertiesEditionPart_OrganizationLabel);
    organization =
        new EObjectFlatComboViewer(
            parent,
            !propertiesEditionComponent.isRequired(
                EvidenceViewsRepository.HasRoleIn.Properties.organization,
                EvidenceViewsRepository.FORM_KIND));
    widgetFactory.adapt(organization);
    organization.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
    GridData organizationData = new GridData(GridData.FILL_HORIZONTAL);
    organization.setLayoutData(organizationData);
    organization.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(
                      HasRoleInPropertiesEditionPartForm.this,
                      EvidenceViewsRepository.HasRoleIn.Properties.organization,
                      PropertiesEditionEvent.COMMIT,
                      PropertiesEditionEvent.SET,
                      null,
                      getOrganization()));
          }
        });
    organization.setID(EvidenceViewsRepository.HasRoleIn.Properties.organization);
    FormUtils.createHelpButton(
        widgetFactory,
        parent,
        propertiesEditionComponent.getHelpContent(
            EvidenceViewsRepository.HasRoleIn.Properties.organization,
            EvidenceViewsRepository.FORM_KIND),
        null); //$NON-NLS-1$
    // Start of user code for createOrganizationFlatComboViewer

    // End of user code
    return parent;
  }
  /**
   * @param parent the parent composite
   * @param widgetFactory factory to use to instanciante widget of the form
   */
  protected Composite createTargetFlatComboViewer(Composite parent, FormToolkit widgetFactory) {
    createDescription(
        parent,
        DatabaseViewsRepository.ForeignKey.Properties.target,
        DatabaseMessages.ForeignKeyPropertiesEditionPart_TargetLabel);
    target =
        new EObjectFlatComboViewer(
            parent,
            !propertiesEditionComponent.isRequired(
                DatabaseViewsRepository.ForeignKey.Properties.target,
                DatabaseViewsRepository.FORM_KIND));
    widgetFactory.adapt(target);
    target.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
    GridData targetData = new GridData(GridData.FILL_HORIZONTAL);
    target.setLayoutData(targetData);
    target.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(
                      ForeignKeyPropertiesEditionPartForm.this,
                      DatabaseViewsRepository.ForeignKey.Properties.target,
                      PropertiesEditionEvent.COMMIT,
                      PropertiesEditionEvent.SET,
                      null,
                      getTarget()));
          }
        });
    target.setID(DatabaseViewsRepository.ForeignKey.Properties.target);
    FormUtils.createHelpButton(
        widgetFactory,
        parent,
        propertiesEditionComponent.getHelpContent(
            DatabaseViewsRepository.ForeignKey.Properties.target,
            DatabaseViewsRepository.FORM_KIND),
        null); //$NON-NLS-1$
    // Start of user code for createTargetFlatComboViewer

    // End of user code
    return parent;
  }
コード例 #14
0
  /**
   * @param parent the parent composite
   * @param widgetFactory factory to use to instanciante widget of the form
   */
  protected Composite createDefaultTargetFlatComboViewer(
      Composite parent, FormToolkit widgetFactory) {
    FormUtils.createPartLabel(
        widgetFactory,
        parent,
        EweMessages.ProjectPropertiesEditionPart_DefaultTargetLabel,
        propertiesEditionComponent.isRequired(
            EweViewsRepository.Project.Properties.defaultTarget, EweViewsRepository.FORM_KIND));
    defaultTarget =
        new EObjectFlatComboViewer(
            parent,
            !propertiesEditionComponent.isRequired(
                EweViewsRepository.Project.Properties.defaultTarget, EweViewsRepository.FORM_KIND));
    widgetFactory.adapt(defaultTarget);
    defaultTarget.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
    GridData defaultTargetData = new GridData(GridData.FILL_HORIZONTAL);
    defaultTarget.setLayoutData(defaultTargetData);
    defaultTarget.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(
                      ProjectPropertiesEditionPartForm.this,
                      EweViewsRepository.Project.Properties.defaultTarget,
                      PropertiesEditionEvent.COMMIT,
                      PropertiesEditionEvent.SET,
                      null,
                      getDefaultTarget()));
          }
        });
    defaultTarget.setID(EweViewsRepository.Project.Properties.defaultTarget);
    FormUtils.createHelpButton(
        widgetFactory,
        parent,
        propertiesEditionComponent.getHelpContent(
            EweViewsRepository.Project.Properties.defaultTarget, EweViewsRepository.FORM_KIND),
        null); //$NON-NLS-1$
    return parent;
  }
  /**
   * @param parent the parent composite
   * @param widgetFactory factory to use to instanciante widget of the form
   */
  protected Composite createInteractionFlatComboViewer(
      Composite parent, FormToolkit widgetFactory) {
    createDescription(
        parent,
        InteractionViewsRepository.InteractionUse.Properties.interaction_,
        InteractionMessages.InteractionUsePropertiesEditionPart_InteractionLabel);
    interaction =
        new EObjectFlatComboViewer(
            parent,
            !propertiesEditionComponent.isRequired(
                InteractionViewsRepository.InteractionUse.Properties.interaction_,
                InteractionViewsRepository.FORM_KIND));
    widgetFactory.adapt(interaction);
    interaction.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
    GridData interactionData = new GridData(GridData.FILL_HORIZONTAL);
    interaction.setLayoutData(interactionData);
    interaction.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(
                      InteractionUsePropertiesEditionPartForm.this,
                      InteractionViewsRepository.InteractionUse.Properties.interaction_,
                      PropertiesEditionEvent.COMMIT,
                      PropertiesEditionEvent.SET,
                      null,
                      getInteraction()));
          }
        });
    interaction.setID(InteractionViewsRepository.InteractionUse.Properties.interaction_);
    FormUtils.createHelpButton(
        widgetFactory,
        parent,
        propertiesEditionComponent.getHelpContent(
            InteractionViewsRepository.InteractionUse.Properties.interaction_,
            InteractionViewsRepository.FORM_KIND),
        null); //$NON-NLS-1$
    return parent;
  }
コード例 #16
0
  /** @param parent the parent composite */
  protected Composite createOwningTemplateParameterFlatComboViewer(Composite parent) {
    SWTUtils.createPartLabel(
        parent,
        UmlMessages.CreationEventPropertiesEditionPart_OwningTemplateParameterLabel,
        propertiesEditionComponent.isRequired(
            UmlViewsRepository.CreationEvent.Properties.owningTemplateParameter,
            UmlViewsRepository.SWT_KIND));
    owningTemplateParameter =
        new EObjectFlatComboViewer(
            parent,
            !propertiesEditionComponent.isRequired(
                UmlViewsRepository.CreationEvent.Properties.owningTemplateParameter,
                UmlViewsRepository.SWT_KIND));
    owningTemplateParameter.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

    owningTemplateParameter.addSelectionChangedListener(
        new ISelectionChangedListener() {

          public void selectionChanged(SelectionChangedEvent event) {
            propertiesEditionComponent.firePropertiesChanged(
                new PropertiesEditionEvent(
                    CreationEventPropertiesEditionPartImpl.this,
                    UmlViewsRepository.CreationEvent.Properties.owningTemplateParameter,
                    PropertiesEditionEvent.CHANGE,
                    PropertiesEditionEvent.SET,
                    null,
                    getOwningTemplateParameter()));
          }
        });
    GridData owningTemplateParameterData = new GridData(GridData.FILL_HORIZONTAL);
    owningTemplateParameter.setLayoutData(owningTemplateParameterData);
    owningTemplateParameter.setID(
        UmlViewsRepository.CreationEvent.Properties.owningTemplateParameter);
    SWTUtils.createHelpButton(
        parent,
        propertiesEditionComponent.getHelpContent(
            UmlViewsRepository.CreationEvent.Properties.owningTemplateParameter,
            UmlViewsRepository.SWT_KIND),
        null); //$NON-NLS-1$
    return parent;
  }
  /** @param parent the parent composite */
  protected Composite createTypeFlatComboViewer(Composite parent) {
    createDescription(
        parent,
        InteractionViewsRepository.Participant.Properties.type,
        InteractionMessages.ParticipantPropertiesEditionPart_TypeLabel);
    type =
        new EObjectFlatComboViewer(
            parent,
            !propertiesEditionComponent.isRequired(
                InteractionViewsRepository.Participant.Properties.type,
                InteractionViewsRepository.SWT_KIND));
    type.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

    type.addSelectionChangedListener(
        new ISelectionChangedListener() {

          public void selectionChanged(SelectionChangedEvent event) {
            propertiesEditionComponent.firePropertiesChanged(
                new PropertiesEditionEvent(
                    ParticipantPropertiesEditionPartImpl.this,
                    InteractionViewsRepository.Participant.Properties.type,
                    PropertiesEditionEvent.CHANGE,
                    PropertiesEditionEvent.SET,
                    null,
                    getType()));
          }
        });
    GridData typeData = new GridData(GridData.FILL_HORIZONTAL);
    type.setLayoutData(typeData);
    type.setID(InteractionViewsRepository.Participant.Properties.type);
    SWTUtils.createHelpButton(
        parent,
        propertiesEditionComponent.getHelpContent(
            InteractionViewsRepository.Participant.Properties.type,
            InteractionViewsRepository.SWT_KIND),
        null); //$NON-NLS-1$
    // Start of user code for createTypeFlatComboViewer

    // End of user code
    return parent;
  }
  /** @param parent the parent composite */
  protected Composite createTypeFlatComboViewer(Composite parent) {
    SWTUtils.createPartLabel(
        parent,
        TypeslibraryMessages.SimpleNamedTypePropertiesEditionPart_TypeLabel,
        propertiesEditionComponent.isRequired(
            TypeslibraryViewsRepository.SimpleNamedType.Properties.type,
            TypeslibraryViewsRepository.SWT_KIND));
    type =
        new EObjectFlatComboViewer(
            parent,
            !propertiesEditionComponent.isRequired(
                TypeslibraryViewsRepository.SimpleNamedType.Properties.type,
                TypeslibraryViewsRepository.SWT_KIND));
    type.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

    type.addSelectionChangedListener(
        new ISelectionChangedListener() {

          public void selectionChanged(SelectionChangedEvent event) {
            propertiesEditionComponent.firePropertiesChanged(
                new PropertiesEditionEvent(
                    SimpleNamedTypePropertiesEditionPartImpl.this,
                    TypeslibraryViewsRepository.SimpleNamedType.Properties.type,
                    PropertiesEditionEvent.CHANGE,
                    PropertiesEditionEvent.SET,
                    null,
                    getType()));
          }
        });
    GridData typeData = new GridData(GridData.FILL_HORIZONTAL);
    type.setLayoutData(typeData);
    type.setID(TypeslibraryViewsRepository.SimpleNamedType.Properties.type);
    SWTUtils.createHelpButton(
        parent,
        propertiesEditionComponent.getHelpContent(
            TypeslibraryViewsRepository.SimpleNamedType.Properties.type,
            TypeslibraryViewsRepository.SWT_KIND),
        null); //$NON-NLS-1$
    return parent;
  }
コード例 #19
0
  /** @param groupGroup */
  protected void createTestEOFCVFlatComboViewer(Composite parent, FormToolkit widgetFactory) {
    FormUtils.createPartLabel(
        widgetFactory,
        parent,
        NonregMessages.TestFilterPropertiesEditionPart_TestEOFCVLabel,
        propertiesEditionComponent.isRequired(
            NonregViewsRepository.TestFilter.testEOFCV, NonregViewsRepository.FORM_KIND));
    testEOFCV = new EObjectFlatComboViewer(parent, true);
    testEOFCV.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
    GridData testEOFCVData = new GridData(GridData.FILL_HORIZONTAL);
    testEOFCV.setLayoutData(testEOFCVData);
    testEOFCV.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(
                      TestFilterPropertiesEditionPartForm.this,
                      NonregViewsRepository.TestFilter.testEOFCV,
                      PropertiesEditionEvent.COMMIT,
                      PropertiesEditionEvent.SET,
                      null,
                      getTestEOFCV()));
          }
        });
    FormUtils.createHelpButton(
        widgetFactory,
        parent,
        propertiesEditionComponent.getHelpContent(
            NonregViewsRepository.TestFilter.testEOFCV, NonregViewsRepository.FORM_KIND),
        null); //$NON-NLS-1$
  }
  /** @param parent the parent composite */
  protected Composite createSourceFlatComboViewer(Composite parent) {
    createDescription(
        parent,
        GraalViewsRepository.Transition.Properties.source,
        GraalMessages.TransitionPropertiesEditionPart_SourceLabel);
    source =
        new EObjectFlatComboViewer(
            parent,
            !propertiesEditionComponent.isRequired(
                GraalViewsRepository.Transition.Properties.source, GraalViewsRepository.SWT_KIND));
    source.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

    source.addSelectionChangedListener(
        new ISelectionChangedListener() {

          public void selectionChanged(SelectionChangedEvent event) {
            propertiesEditionComponent.firePropertiesChanged(
                new PropertiesEditionEvent(
                    TransitionPropertiesEditionPartImpl.this,
                    GraalViewsRepository.Transition.Properties.source,
                    PropertiesEditionEvent.CHANGE,
                    PropertiesEditionEvent.SET,
                    null,
                    getSource()));
          }
        });
    GridData sourceData = new GridData(GridData.FILL_HORIZONTAL);
    source.setLayoutData(sourceData);
    source.setID(GraalViewsRepository.Transition.Properties.source);
    SWTUtils.createHelpButton(
        parent,
        propertiesEditionComponent.getHelpContent(
            GraalViewsRepository.Transition.Properties.source, GraalViewsRepository.SWT_KIND),
        null); //$NON-NLS-1$
    // Start of user code for createSourceFlatComboViewer

    // End of user code
    return parent;
  }
  /** @param parent the parent composite */
  protected Composite createWidgetFlatComboViewer(Composite parent) {
    createDescription(
        parent,
        ViewViewsRepository.ViewElement.Properties.widget,
        ViewMessages.ViewElementPropertiesEditionPart_WidgetLabel);
    widget =
        new EObjectFlatComboViewer(
            parent,
            !propertiesEditionComponent.isRequired(
                ViewViewsRepository.ViewElement.Properties.widget, ViewViewsRepository.SWT_KIND));
    widget.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

    widget.addSelectionChangedListener(
        new ISelectionChangedListener() {

          public void selectionChanged(SelectionChangedEvent event) {
            propertiesEditionComponent.firePropertiesChanged(
                new PropertiesEditionEvent(
                    ViewElementPropertiesEditionPartImpl.this,
                    ViewViewsRepository.ViewElement.Properties.widget,
                    PropertiesEditionEvent.CHANGE,
                    PropertiesEditionEvent.SET,
                    null,
                    getWidget()));
          }
        });
    GridData widgetData = new GridData(GridData.FILL_HORIZONTAL);
    widget.setLayoutData(widgetData);
    widget.setID(ViewViewsRepository.ViewElement.Properties.widget);
    SWTUtils.createHelpButton(
        parent,
        propertiesEditionComponent.getHelpContent(
            ViewViewsRepository.ViewElement.Properties.widget, ViewViewsRepository.SWT_KIND),
        null); //$NON-NLS-1$
    // Start of user code for createWidgetFlatComboViewer

    // End of user code
    return parent;
  }
  /** @param parent the parent composite */
  protected Composite createSubflowFlatComboViewer(Composite parent) {
    createDescription(
        parent,
        FlowViewsRepository.SubflowState.Properties.subflow,
        FlowMessages.SubflowStatePropertiesEditionPart_SubflowLabel);
    subflow =
        new EObjectFlatComboViewer(
            parent,
            !propertiesEditionComponent.isRequired(
                FlowViewsRepository.SubflowState.Properties.subflow, FlowViewsRepository.SWT_KIND));
    subflow.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

    subflow.addSelectionChangedListener(
        new ISelectionChangedListener() {

          public void selectionChanged(SelectionChangedEvent event) {
            propertiesEditionComponent.firePropertiesChanged(
                new PropertiesEditionEvent(
                    SubflowStatePropertiesEditionPartImpl.this,
                    FlowViewsRepository.SubflowState.Properties.subflow,
                    PropertiesEditionEvent.CHANGE,
                    PropertiesEditionEvent.SET,
                    null,
                    getSubflow()));
          }
        });
    GridData subflowData = new GridData(GridData.FILL_HORIZONTAL);
    subflow.setLayoutData(subflowData);
    subflow.setID(FlowViewsRepository.SubflowState.Properties.subflow);
    SWTUtils.createHelpButton(
        parent,
        propertiesEditionComponent.getHelpContent(
            FlowViewsRepository.SubflowState.Properties.subflow, FlowViewsRepository.SWT_KIND),
        null); //$NON-NLS-1$
    return parent;
  }
コード例 #23
0
 /**
  * {@inheritDoc}
  *
  * @see
  *     net.certware.sacm.SACM.Evidence.parts.HasRoleInPropertiesEditionPart#initOrganization(EObjectFlatComboSettings)
  */
 public void initOrganization(EObjectFlatComboSettings settings) {
   organization.setInput(settings);
   if (current != null) {
     organization.setSelection(new StructuredSelection(settings.getValue()));
   }
   boolean eefElementEditorReadOnlyState =
       isReadOnly(EvidenceViewsRepository.HasRoleIn.Properties.organization);
   if (eefElementEditorReadOnlyState && organization.isEnabled()) {
     organization.setEnabled(false);
     organization.setToolTipText(EvidenceMessages.HasRoleIn_ReadOnly);
   } else if (!eefElementEditorReadOnlyState && !organization.isEnabled()) {
     organization.setEnabled(true);
   }
 }
 /**
  * {@inheritDoc}
  *
  * @see
  *     org.obeonetwork.graal.parts.TransitionPropertiesEditionPart#initSource(EObjectFlatComboSettings)
  */
 public void initSource(EObjectFlatComboSettings settings) {
   source.setInput(settings);
   if (current != null) {
     source.setSelection(new StructuredSelection(settings.getValue()));
   }
   boolean eefElementEditorReadOnlyState =
       isReadOnly(GraalViewsRepository.Transition.Properties.source);
   if (eefElementEditorReadOnlyState && source.isEnabled()) {
     source.setEnabled(false);
     source.setToolTipText(GraalMessages.Transition_ReadOnly);
   } else if (!eefElementEditorReadOnlyState && !source.isEnabled()) {
     source.setEnabled(true);
   }
 }
 /**
  * {@inheritDoc}
  *
  * @see
  *     org.obeonetwork.dsl.cinematic.view.parts.ViewElementPropertiesEditionPart#initType(EObjectFlatComboSettings)
  */
 public void initType(EObjectFlatComboSettings settings) {
   type.setInput(settings);
   if (current != null) {
     type.setSelection(new StructuredSelection(settings.getValue()));
   }
   boolean eefElementEditorReadOnlyState =
       isReadOnly(ViewViewsRepository.ViewElement.Properties.type);
   if (eefElementEditorReadOnlyState && type.isEnabled()) {
     type.setEnabled(false);
     type.setToolTipText(ViewMessages.ViewElement_ReadOnly);
   } else if (!eefElementEditorReadOnlyState && !type.isEnabled()) {
     type.setEnabled(true);
   }
 }
 /**
  * {@inheritDoc}
  *
  * @see
  *     org.obeonetwork.dsl.database.parts.ForeignKeyPropertiesEditionPart#initTarget(EObjectFlatComboSettings)
  */
 public void initTarget(EObjectFlatComboSettings settings) {
   target.setInput(settings);
   if (current != null) {
     target.setSelection(new StructuredSelection(settings.getValue()));
   }
   boolean eefElementEditorReadOnlyState =
       isReadOnly(DatabaseViewsRepository.ForeignKey.Properties.target);
   if (eefElementEditorReadOnlyState && target.isEnabled()) {
     target.setEnabled(false);
     target.setToolTipText(DatabaseMessages.ForeignKey_ReadOnly);
   } else if (!eefElementEditorReadOnlyState && !target.isEnabled()) {
     target.setEnabled(true);
   }
 }
 /**
  * {@inheritDoc}
  *
  * @see
  *     org.obeonetwork.dsl.cinematic.flow.parts.SubflowStatePropertiesEditionPart#initSubflow(EObjectFlatComboSettings)
  */
 public void initSubflow(EObjectFlatComboSettings settings) {
   subflow.setInput(settings);
   if (current != null) {
     subflow.setSelection(new StructuredSelection(settings.getValue()));
   }
   boolean eefElementEditorReadOnlyState =
       isReadOnly(FlowViewsRepository.SubflowState.Properties.subflow);
   if (eefElementEditorReadOnlyState && subflow.isEnabled()) {
     subflow.setEnabled(false);
     subflow.setToolTipText(FlowMessages.SubflowState_ReadOnly);
   } else if (!eefElementEditorReadOnlyState && !subflow.isEnabled()) {
     subflow.setEnabled(true);
   }
 }
 /**
  * {@inheritDoc}
  *
  * @see
  *     org.obeonetwork.dsl.cinematic.flow.parts.SubflowStatePropertiesEditionPart#setSubflow(EObject
  *     newValue)
  */
 public void setSubflow(EObject newValue) {
   if (newValue != null) {
     subflow.setSelection(new StructuredSelection(newValue));
   } else {
     subflow.setSelection(new StructuredSelection()); // $NON-NLS-1$
   }
   boolean eefElementEditorReadOnlyState =
       isReadOnly(FlowViewsRepository.SubflowState.Properties.subflow);
   if (eefElementEditorReadOnlyState && subflow.isEnabled()) {
     subflow.setEnabled(false);
     subflow.setToolTipText(FlowMessages.SubflowState_ReadOnly);
   } else if (!eefElementEditorReadOnlyState && !subflow.isEnabled()) {
     subflow.setEnabled(true);
   }
 }
 /**
  * {@inheritDoc}
  *
  * @see org.obeonetwork.dsl.database.parts.ForeignKeyPropertiesEditionPart#setTarget(EObject
  *     newValue)
  */
 public void setTarget(EObject newValue) {
   if (newValue != null) {
     target.setSelection(new StructuredSelection(newValue));
   } else {
     target.setSelection(new StructuredSelection()); // $NON-NLS-1$
   }
   boolean eefElementEditorReadOnlyState =
       isReadOnly(DatabaseViewsRepository.ForeignKey.Properties.target);
   if (eefElementEditorReadOnlyState && target.isEnabled()) {
     target.setEnabled(false);
     target.setToolTipText(DatabaseMessages.ForeignKey_ReadOnly);
   } else if (!eefElementEditorReadOnlyState && !target.isEnabled()) {
     target.setEnabled(true);
   }
 }
コード例 #30
0
 /**
  * {@inheritDoc}
  *
  * @see
  *     net.certware.sacm.SACM.Evidence.parts.HasRoleInPropertiesEditionPart#setOrganization(EObject
  *     newValue)
  */
 public void setOrganization(EObject newValue) {
   if (newValue != null) {
     organization.setSelection(new StructuredSelection(newValue));
   } else {
     organization.setSelection(new StructuredSelection()); // $NON-NLS-1$
   }
   boolean eefElementEditorReadOnlyState =
       isReadOnly(EvidenceViewsRepository.HasRoleIn.Properties.organization);
   if (eefElementEditorReadOnlyState && organization.isEnabled()) {
     organization.setEnabled(false);
     organization.setToolTipText(EvidenceMessages.HasRoleIn_ReadOnly);
   } else if (!eefElementEditorReadOnlyState && !organization.isEnabled()) {
     organization.setEnabled(true);
   }
 }