/**
  * {@inheritDoc}
  *
  * @see
  *     org.eclipse.emf.ecoretools.design.properties.ecore.parts.EClassPropertiesEditionPart#setName(String
  *     newValue)
  */
 public void setName(String newValue) {
   if (newValue != null) {
     name.setText(newValue);
   } else {
     name.setText(""); // $NON-NLS-1$
   }
   boolean eefElementEditorReadOnlyState = isReadOnly(EcoreViewsRepository.EClass.Properties.name);
   if (eefElementEditorReadOnlyState && name.isEnabled()) {
     name.setEnabled(false);
     name.setToolTipText(EcoreMessages.EClass_ReadOnly);
   } else if (!eefElementEditorReadOnlyState && !name.isEnabled()) {
     name.setEnabled(true);
   }
 }
 /**
  * {@inheritDoc}
  *
  * @see
  *     org.obeonetwork.dsl.cinematic.flow.parts.SubflowStatePropertiesEditionPart#setDescription(String
  *     newValue)
  */
 public void setDescription(String newValue) {
   if (newValue != null) {
     description.setText(newValue);
   } else {
     description.setText(""); // $NON-NLS-1$
   }
   boolean eefElementEditorReadOnlyState =
       isReadOnly(FlowViewsRepository.SubflowState.Properties.description);
   if (eefElementEditorReadOnlyState && description.isEnabled()) {
     description.setEnabled(false);
     description.setToolTipText(FlowMessages.SubflowState_ReadOnly);
   } else if (!eefElementEditorReadOnlyState && !description.isEnabled()) {
     description.setEnabled(true);
   }
 }
 /**
  * {@inheritDoc}
  *
  * @see net.certware.verification.checklist.parts.ItemPropertiesEditionPart#setComment(String
  *     newValue)
  */
 public void setComment(String newValue) {
   if (newValue != null) {
     comment.setText(newValue);
   } else {
     comment.setText(""); // $NON-NLS-1$
   }
   boolean eefElementEditorReadOnlyState =
       isReadOnly(ChecklistViewsRepository.Item.Properties.comment);
   if (eefElementEditorReadOnlyState && comment.isEnabled()) {
     comment.setEnabled(false);
     comment.setToolTipText(ChecklistMessages.Item_ReadOnly);
   } else if (!eefElementEditorReadOnlyState && !comment.isEnabled()) {
     comment.setEnabled(true);
   }
 }
 /**
  * {@inheritDoc}
  *
  * @see org.obeonetwork.graal.parts.TransitionPropertiesEditionPart#setGuard(String newValue)
  */
 public void setGuard(String newValue) {
   if (newValue != null) {
     guard.setText(newValue);
   } else {
     guard.setText(""); // $NON-NLS-1$
   }
   boolean eefElementEditorReadOnlyState =
       isReadOnly(GraalViewsRepository.Transition.Properties.guard);
   if (eefElementEditorReadOnlyState && guard.isEnabled()) {
     guard.setEnabled(false);
     guard.setToolTipText(GraalMessages.Transition_ReadOnly);
   } else if (!eefElementEditorReadOnlyState && !guard.isEnabled()) {
     guard.setEnabled(true);
   }
 }
 /**
  * {@inheritDoc}
  *
  * @see net.certware.sacm.SACM.Evidence.parts.HasRoleInPropertiesEditionPart#setId(String
  *     newValue)
  */
 public void setId(String newValue) {
   if (newValue != null) {
     id.setText(newValue);
   } else {
     id.setText(""); // $NON-NLS-1$
   }
   boolean eefElementEditorReadOnlyState =
       isReadOnly(EvidenceViewsRepository.HasRoleIn.Properties.id);
   if (eefElementEditorReadOnlyState && id.isEnabled()) {
     id.setEnabled(false);
     id.setToolTipText(EvidenceMessages.HasRoleIn_ReadOnly);
   } else if (!eefElementEditorReadOnlyState && !id.isEnabled()) {
     id.setEnabled(true);
   }
 }
 /**
  * {@inheritDoc}
  *
  * @see org.obeonetwork.dsl.cinematic.view.parts.ViewElementPropertiesEditionPart#setLabel(String
  *     newValue)
  */
 public void setLabel(String newValue) {
   if (newValue != null) {
     label.setText(newValue);
   } else {
     label.setText(""); // $NON-NLS-1$
   }
   boolean eefElementEditorReadOnlyState =
       isReadOnly(ViewViewsRepository.ViewElement.Properties.label);
   if (eefElementEditorReadOnlyState && label.isEnabled()) {
     label.setEnabled(false);
     label.setToolTipText(ViewMessages.ViewElement_ReadOnly);
   } else if (!eefElementEditorReadOnlyState && !label.isEnabled()) {
     label.setEnabled(true);
   }
 }
 /**
  * {@inheritDoc}
  *
  * @see
  *     org.obeonetwork.dsl.environment.parts.BindingElementPropertiesEditionPart#setBindingExpression(String
  *     newValue)
  */
 public void setBindingExpression(String newValue) {
   if (newValue != null) {
     bindingExpression.setText(newValue);
   } else {
     bindingExpression.setText(""); // $NON-NLS-1$
   }
   boolean eefElementEditorReadOnlyState =
       isReadOnly(EnvironmentViewsRepository.BindingElement.Properties.bindingExpression);
   if (eefElementEditorReadOnlyState && bindingExpression.isEnabled()) {
     bindingExpression.setEnabled(false);
     bindingExpression.setToolTipText(EnvironmentMessages.BindingElement_ReadOnly);
   } else if (!eefElementEditorReadOnlyState && !bindingExpression.isEnabled()) {
     bindingExpression.setEnabled(true);
   }
 }
 /**
  * {@inheritDoc}
  *
  * @see
  *     org.eclipse.emf.eef.filters.parts.ConcreteReferenceTargetSample2PropertiesEditionPart#setName(String
  *     newValue)
  */
 public void setName(String newValue) {
   if (newValue != null) {
     name.setText(newValue);
   } else {
     name.setText(""); // $NON-NLS-1$
   }
   boolean eefElementEditorReadOnlyState =
       isReadOnly(FiltersViewsRepository.ConcreteReferenceTargetSample2.Properties.name);
   if (eefElementEditorReadOnlyState && name.isEnabled()) {
     name.setEnabled(false);
     name.setToolTipText(FiltersMessages.ConcreteReferenceTargetSample2_ReadOnly);
   } else if (!eefElementEditorReadOnlyState && !name.isEnabled()) {
     name.setEnabled(true);
   }
 }
 /**
  * {@inheritDoc}
  *
  * @see net.certware.sacm.SACM.Evidence.parts.MethodPropertiesEditionPart#setContent(String
  *     newValue)
  */
 public void setContent(String newValue) {
   if (newValue != null) {
     content.setText(newValue);
   } else {
     content.setText(""); // $NON-NLS-1$
   }
   boolean eefElementEditorReadOnlyState =
       isReadOnly(EvidenceViewsRepository.Method.Properties.content);
   if (eefElementEditorReadOnlyState && content.isEnabled()) {
     content.setEnabled(false);
     content.setToolTipText(EvidenceMessages.Method_ReadOnly);
   } else if (!eefElementEditorReadOnlyState && !content.isEnabled()) {
     content.setEnabled(true);
   }
 }
 /**
  * {@inheritDoc}
  *
  * @see com.github.lbroudoux.dsl.eip.parts.ServiceRefPropertiesEditionPart#setReference(String
  *     newValue)
  */
 public void setReference(String newValue) {
   if (newValue != null) {
     reference.setText(newValue);
   } else {
     reference.setText(""); // $NON-NLS-1$
   }
   boolean eefElementEditorReadOnlyState =
       isReadOnly(EipViewsRepository.ServiceRef.Properties.reference);
   if (eefElementEditorReadOnlyState && reference.isEnabled()) {
     reference.setEnabled(false);
     reference.setToolTipText(EipMessages.ServiceRef_ReadOnly);
   } else if (!eefElementEditorReadOnlyState && !reference.isEnabled()) {
     reference.setEnabled(true);
   }
 }
 /**
  * {@inheritDoc}
  *
  * @see org.obeonetwork.dsl.entityrelation.parts.EntityPropertiesEditionPart#setComments(String
  *     newValue)
  */
 public void setComments(String newValue) {
   if (newValue != null) {
     comments.setText(newValue);
   } else {
     comments.setText(""); // $NON-NLS-1$
   }
   boolean eefElementEditorReadOnlyState =
       isReadOnly(EntityrelationViewsRepository.Entity.Properties.comments);
   if (eefElementEditorReadOnlyState && comments.isEnabled()) {
     comments.setEnabled(false);
     comments.setBackground(comments.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
     comments.setToolTipText(EntityrelationMessages.Entity_ReadOnly);
   } else if (!eefElementEditorReadOnlyState && !comments.isEnabled()) {
     comments.setEnabled(true);
   }
 }
 /**
  * {@inheritDoc}
  *
  * @see com.github.lbroudoux.dsl.eip.parts.ServiceRefPropertiesEditionPart#setOperations(EList
  *     newValue)
  */
 public void setOperations(EList newValue) {
   operationsList = newValue;
   if (newValue != null) {
     operations.setText(operationsList.toString());
   } else {
     operations.setText(""); // $NON-NLS-1$
   }
   boolean eefElementEditorReadOnlyState =
       isReadOnly(EipViewsRepository.ServiceRef.Properties.operations);
   if (eefElementEditorReadOnlyState && operations.isEnabled()) {
     operations.setEnabled(false);
     operations.setToolTipText(EipMessages.ServiceRef_ReadOnly);
   } else if (!eefElementEditorReadOnlyState && !operations.isEnabled()) {
     operations.setEnabled(true);
   }
 }
 /**
  * {@inheritDoc}
  *
  * @see org.obeonetwork.dsl.entity.parts.BlockPropertiesEditionPart#setDescription(String
  *     newValue)
  */
 public void setDescription(String newValue) {
   if (newValue != null) {
     description.setText(newValue);
   } else {
     description.setText(""); // $NON-NLS-1$
   }
   boolean eefElementEditorReadOnlyState =
       isReadOnly(EntityViewsRepository.Block.Properties.description);
   if (eefElementEditorReadOnlyState && description.isEnabled()) {
     description.setEnabled(false);
     description.setBackground(
         description.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
     description.setToolTipText(EntityMessages.Block_ReadOnly);
   } else if (!eefElementEditorReadOnlyState && !description.isEnabled()) {
     description.setEnabled(true);
   }
 }
Esempio n. 14
0
 /**
  * Allows this entire block to be enabled/disabled
  *
  * @param enabled whether to enable it or not
  */
 protected void setEnabled(boolean enabled) {
   fUseDefaultDirButton.setEnabled(enabled);
   fUseOtherDirButton.setEnabled(enabled);
   if (fOtherWorkingText.isEnabled()) {
     fOtherWorkingText.setEnabled(enabled);
     fWorkspaceButton.setEnabled(enabled);
     fVariablesButton.setEnabled(enabled);
     fFileSystemButton.setEnabled(enabled);
   }
   // in the case where the 'other' text is selected and we want to enable
   if (fUseOtherDirButton.getSelection() && enabled == true) {
     fOtherWorkingText.setEnabled(enabled);
   }
 }
Esempio n. 15
0
 /**
  * Determine the enable state for the file selector
  *
  * @return enable state
  */
 public boolean isEnabled() {
   return path.isEnabled();
 }