/** * Generated with Acceleo */ package net.certware.measurement.sco.parts.impl; import org.eclipse.emf.common.util.Enumerator; import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider; import org.eclipse.emf.eef.runtime.EEFRuntimePlugin; import org.eclipse.emf.eef.runtime.api.component.IPropertiesEditionComponent; import org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent; import org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart; import org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent; import org.eclipse.emf.eef.runtime.impl.parts.CompositePropertiesEditionPart; import org.eclipse.emf.eef.runtime.ui.parts.PartComposer; import org.eclipse.emf.eef.runtime.ui.parts.sequence.BindingCompositionSequence; import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionSequence; import org.eclipse.emf.eef.runtime.ui.parts.sequence.CompositionStep; import org.eclipse.emf.eef.runtime.ui.utils.EditingUtils; import org.eclipse.emf.eef.runtime.ui.widgets.EMFComboViewer; import org.eclipse.emf.eef.runtime.ui.widgets.SWTUtils; import org.eclipse.jface.viewers.ArrayContentProvider; import org.eclipse.jface.viewers.ISelectionChangedListener; import org.eclipse.jface.viewers.SelectionChangedEvent; import org.eclipse.jface.viewers.StructuredSelection; import org.eclipse.swt.SWT; import org.eclipse.swt.events.FocusAdapter; import org.eclipse.swt.events.FocusEvent; import org.eclipse.swt.events.KeyAdapter; import org.eclipse.swt.events.KeyEvent; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Group; import org.eclipse.swt.widgets.Text; // Start of user code for imports import net.certware.measurement.sco.parts.NewFeatureChangeOrdersPropertiesEditionPart; import net.certware.measurement.sco.parts.ScoViewsRepository; import net.certware.measurement.sco.providers.ScoMessages; // End of user code /** * * */ public class NewFeatureChangeOrdersPropertiesEditionPartImpl extends CompositePropertiesEditionPart implements ISWTPropertiesEditionPart, NewFeatureChangeOrdersPropertiesEditionPart { protected Text name; protected Text value; protected EMFComboViewer type; protected Text brokenLines; protected Text fixedLines; protected Text repairEffort; /** * Default constructor * @param editionComponent the {@link IPropertiesEditionComponent} that manage this part * */ public NewFeatureChangeOrdersPropertiesEditionPartImpl(IPropertiesEditionComponent editionComponent) { super(editionComponent); } /** * {@inheritDoc} * * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart# * createFigure(org.eclipse.swt.widgets.Composite) * */ public Composite createFigure(final Composite parent) { view = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 3; view.setLayout(layout); createControls(view); return view; } /** * {@inheritDoc} * * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart# * createControls(org.eclipse.swt.widgets.Composite) * */ public void createControls(Composite view) { CompositionSequence newFeatureChangeOrdersStep = new BindingCompositionSequence(propertiesEditionComponent); CompositionStep propertiesStep = newFeatureChangeOrdersStep.addStep(ScoViewsRepository.NewFeatureChangeOrders.Properties.class); propertiesStep.addStep(ScoViewsRepository.NewFeatureChangeOrders.Properties.name); propertiesStep.addStep(ScoViewsRepository.NewFeatureChangeOrders.Properties.value); propertiesStep.addStep(ScoViewsRepository.NewFeatureChangeOrders.Properties.type); propertiesStep.addStep(ScoViewsRepository.NewFeatureChangeOrders.Properties.brokenLines); propertiesStep.addStep(ScoViewsRepository.NewFeatureChangeOrders.Properties.fixedLines); propertiesStep.addStep(ScoViewsRepository.NewFeatureChangeOrders.Properties.repairEffort); composer = new PartComposer(newFeatureChangeOrdersStep) { @Override public Composite addToPart(Composite parent, Object key) { if (key == ScoViewsRepository.NewFeatureChangeOrders.Properties.class) { return createPropertiesGroup(parent); } if (key == ScoViewsRepository.NewFeatureChangeOrders.Properties.name) { return createNameText(parent); } if (key == ScoViewsRepository.NewFeatureChangeOrders.Properties.value) { return createValueText(parent); } if (key == ScoViewsRepository.NewFeatureChangeOrders.Properties.type) { return createTypeEMFComboViewer(parent); } if (key == ScoViewsRepository.NewFeatureChangeOrders.Properties.brokenLines) { return createBrokenLinesText(parent); } if (key == ScoViewsRepository.NewFeatureChangeOrders.Properties.fixedLines) { return createFixedLinesText(parent); } if (key == ScoViewsRepository.NewFeatureChangeOrders.Properties.repairEffort) { return createRepairEffortText(parent); } return parent; } }; composer.compose(view); } /** * */ protected Composite createPropertiesGroup(Composite parent) { Group propertiesGroup = new Group(parent, SWT.NONE); propertiesGroup.setText(ScoMessages.NewFeatureChangeOrdersPropertiesEditionPart_PropertiesGroupLabel); GridData propertiesGroupData = new GridData(GridData.FILL_HORIZONTAL); propertiesGroupData.horizontalSpan = 3; propertiesGroup.setLayoutData(propertiesGroupData); GridLayout propertiesGroupLayout = new GridLayout(); propertiesGroupLayout.numColumns = 3; propertiesGroup.setLayout(propertiesGroupLayout); return propertiesGroup; } protected Composite createNameText(Composite parent) { createDescription(parent, ScoViewsRepository.NewFeatureChangeOrders.Properties.name, ScoMessages.NewFeatureChangeOrdersPropertiesEditionPart_NameLabel); name = SWTUtils.createScrollableText(parent, SWT.BORDER); GridData nameData = new GridData(GridData.FILL_HORIZONTAL); name.setLayoutData(nameData); name.addFocusListener(new FocusAdapter() { /** * {@inheritDoc} * * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent) * */ @Override @SuppressWarnings("synthetic-access") public void focusLost(FocusEvent e) { if (propertiesEditionComponent != null) propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(NewFeatureChangeOrdersPropertiesEditionPartImpl.this, ScoViewsRepository.NewFeatureChangeOrders.Properties.name, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, name.getText())); } }); name.addKeyListener(new KeyAdapter() { /** * {@inheritDoc} * * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent) * */ @Override @SuppressWarnings("synthetic-access") public void keyPressed(KeyEvent e) { if (e.character == SWT.CR) { if (propertiesEditionComponent != null) propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(NewFeatureChangeOrdersPropertiesEditionPartImpl.this, ScoViewsRepository.NewFeatureChangeOrders.Properties.name, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, name.getText())); } } }); EditingUtils.setID(name, ScoViewsRepository.NewFeatureChangeOrders.Properties.name); EditingUtils.setEEFtype(name, "eef::Text"); //$NON-NLS-1$ SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(ScoViewsRepository.NewFeatureChangeOrders.Properties.name, ScoViewsRepository.SWT_KIND), null); //$NON-NLS-1$ // Start of user code for createNameText // End of user code return parent; } protected Composite createValueText(Composite parent) { createDescription(parent, ScoViewsRepository.NewFeatureChangeOrders.Properties.value, ScoMessages.NewFeatureChangeOrdersPropertiesEditionPart_ValueLabel); value = SWTUtils.createScrollableText(parent, SWT.BORDER); GridData valueData = new GridData(GridData.FILL_HORIZONTAL); value.setLayoutData(valueData); value.addFocusListener(new FocusAdapter() { /** * {@inheritDoc} * * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent) * */ @Override @SuppressWarnings("synthetic-access") public void focusLost(FocusEvent e) { if (propertiesEditionComponent != null) propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(NewFeatureChangeOrdersPropertiesEditionPartImpl.this, ScoViewsRepository.NewFeatureChangeOrders.Properties.value, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, value.getText())); } }); value.addKeyListener(new KeyAdapter() { /** * {@inheritDoc} * * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent) * */ @Override @SuppressWarnings("synthetic-access") public void keyPressed(KeyEvent e) { if (e.character == SWT.CR) { if (propertiesEditionComponent != null) propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(NewFeatureChangeOrdersPropertiesEditionPartImpl.this, ScoViewsRepository.NewFeatureChangeOrders.Properties.value, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, value.getText())); } } }); EditingUtils.setID(value, ScoViewsRepository.NewFeatureChangeOrders.Properties.value); EditingUtils.setEEFtype(value, "eef::Text"); //$NON-NLS-1$ SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(ScoViewsRepository.NewFeatureChangeOrders.Properties.value, ScoViewsRepository.SWT_KIND), null); //$NON-NLS-1$ // Start of user code for createValueText // End of user code return parent; } protected Composite createTypeEMFComboViewer(Composite parent) { createDescription(parent, ScoViewsRepository.NewFeatureChangeOrders.Properties.type, ScoMessages.NewFeatureChangeOrdersPropertiesEditionPart_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(NewFeatureChangeOrdersPropertiesEditionPartImpl.this, ScoViewsRepository.NewFeatureChangeOrders.Properties.type, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getType())); } }); type.setID(ScoViewsRepository.NewFeatureChangeOrders.Properties.type); SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(ScoViewsRepository.NewFeatureChangeOrders.Properties.type, ScoViewsRepository.SWT_KIND), null); //$NON-NLS-1$ // Start of user code for createTypeEMFComboViewer // End of user code return parent; } protected Composite createBrokenLinesText(Composite parent) { createDescription(parent, ScoViewsRepository.NewFeatureChangeOrders.Properties.brokenLines, ScoMessages.NewFeatureChangeOrdersPropertiesEditionPart_BrokenLinesLabel); brokenLines = SWTUtils.createScrollableText(parent, SWT.BORDER); GridData brokenLinesData = new GridData(GridData.FILL_HORIZONTAL); brokenLines.setLayoutData(brokenLinesData); brokenLines.addFocusListener(new FocusAdapter() { /** * {@inheritDoc} * * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent) * */ @Override @SuppressWarnings("synthetic-access") public void focusLost(FocusEvent e) { if (propertiesEditionComponent != null) propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(NewFeatureChangeOrdersPropertiesEditionPartImpl.this, ScoViewsRepository.NewFeatureChangeOrders.Properties.brokenLines, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, brokenLines.getText())); } }); brokenLines.addKeyListener(new KeyAdapter() { /** * {@inheritDoc} * * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent) * */ @Override @SuppressWarnings("synthetic-access") public void keyPressed(KeyEvent e) { if (e.character == SWT.CR) { if (propertiesEditionComponent != null) propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(NewFeatureChangeOrdersPropertiesEditionPartImpl.this, ScoViewsRepository.NewFeatureChangeOrders.Properties.brokenLines, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, brokenLines.getText())); } } }); EditingUtils.setID(brokenLines, ScoViewsRepository.NewFeatureChangeOrders.Properties.brokenLines); EditingUtils.setEEFtype(brokenLines, "eef::Text"); //$NON-NLS-1$ SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(ScoViewsRepository.NewFeatureChangeOrders.Properties.brokenLines, ScoViewsRepository.SWT_KIND), null); //$NON-NLS-1$ // Start of user code for createBrokenLinesText // End of user code return parent; } protected Composite createFixedLinesText(Composite parent) { createDescription(parent, ScoViewsRepository.NewFeatureChangeOrders.Properties.fixedLines, ScoMessages.NewFeatureChangeOrdersPropertiesEditionPart_FixedLinesLabel); fixedLines = SWTUtils.createScrollableText(parent, SWT.BORDER); GridData fixedLinesData = new GridData(GridData.FILL_HORIZONTAL); fixedLines.setLayoutData(fixedLinesData); fixedLines.addFocusListener(new FocusAdapter() { /** * {@inheritDoc} * * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent) * */ @Override @SuppressWarnings("synthetic-access") public void focusLost(FocusEvent e) { if (propertiesEditionComponent != null) propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(NewFeatureChangeOrdersPropertiesEditionPartImpl.this, ScoViewsRepository.NewFeatureChangeOrders.Properties.fixedLines, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, fixedLines.getText())); } }); fixedLines.addKeyListener(new KeyAdapter() { /** * {@inheritDoc} * * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent) * */ @Override @SuppressWarnings("synthetic-access") public void keyPressed(KeyEvent e) { if (e.character == SWT.CR) { if (propertiesEditionComponent != null) propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(NewFeatureChangeOrdersPropertiesEditionPartImpl.this, ScoViewsRepository.NewFeatureChangeOrders.Properties.fixedLines, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, fixedLines.getText())); } } }); EditingUtils.setID(fixedLines, ScoViewsRepository.NewFeatureChangeOrders.Properties.fixedLines); EditingUtils.setEEFtype(fixedLines, "eef::Text"); //$NON-NLS-1$ SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(ScoViewsRepository.NewFeatureChangeOrders.Properties.fixedLines, ScoViewsRepository.SWT_KIND), null); //$NON-NLS-1$ // Start of user code for createFixedLinesText // End of user code return parent; } protected Composite createRepairEffortText(Composite parent) { createDescription(parent, ScoViewsRepository.NewFeatureChangeOrders.Properties.repairEffort, ScoMessages.NewFeatureChangeOrdersPropertiesEditionPart_RepairEffortLabel); repairEffort = SWTUtils.createScrollableText(parent, SWT.BORDER); GridData repairEffortData = new GridData(GridData.FILL_HORIZONTAL); repairEffort.setLayoutData(repairEffortData); repairEffort.addFocusListener(new FocusAdapter() { /** * {@inheritDoc} * * @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent) * */ @Override @SuppressWarnings("synthetic-access") public void focusLost(FocusEvent e) { if (propertiesEditionComponent != null) propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(NewFeatureChangeOrdersPropertiesEditionPartImpl.this, ScoViewsRepository.NewFeatureChangeOrders.Properties.repairEffort, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, repairEffort.getText())); } }); repairEffort.addKeyListener(new KeyAdapter() { /** * {@inheritDoc} * * @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent) * */ @Override @SuppressWarnings("synthetic-access") public void keyPressed(KeyEvent e) { if (e.character == SWT.CR) { if (propertiesEditionComponent != null) propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(NewFeatureChangeOrdersPropertiesEditionPartImpl.this, ScoViewsRepository.NewFeatureChangeOrders.Properties.repairEffort, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, repairEffort.getText())); } } }); EditingUtils.setID(repairEffort, ScoViewsRepository.NewFeatureChangeOrders.Properties.repairEffort); EditingUtils.setEEFtype(repairEffort, "eef::Text"); //$NON-NLS-1$ SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(ScoViewsRepository.NewFeatureChangeOrders.Properties.repairEffort, ScoViewsRepository.SWT_KIND), null); //$NON-NLS-1$ // Start of user code for createRepairEffortText // End of user code return parent; } /** * {@inheritDoc} * * @see org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionListener#firePropertiesChanged(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent) * */ public void firePropertiesChanged(IPropertiesEditionEvent event) { // Start of user code for tab synchronization // End of user code } /** * {@inheritDoc} * * @see net.certware.measurement.sco.parts.NewFeatureChangeOrdersPropertiesEditionPart#getName() * */ public String getName() { return name.getText(); } /** * {@inheritDoc} * * @see net.certware.measurement.sco.parts.NewFeatureChangeOrdersPropertiesEditionPart#setName(String newValue) * */ public void setName(String newValue) { if (newValue != null) { name.setText(newValue); } else { name.setText(""); //$NON-NLS-1$ } boolean eefElementEditorReadOnlyState = isReadOnly(ScoViewsRepository.NewFeatureChangeOrders.Properties.name); if (eefElementEditorReadOnlyState && name.isEnabled()) { name.setEnabled(false); name.setToolTipText(ScoMessages.NewFeatureChangeOrders_ReadOnly); } else if (!eefElementEditorReadOnlyState && !name.isEnabled()) { name.setEnabled(true); } } /** * {@inheritDoc} * * @see net.certware.measurement.sco.parts.NewFeatureChangeOrdersPropertiesEditionPart#getValue() * */ public String getValue() { return value.getText(); } /** * {@inheritDoc} * * @see net.certware.measurement.sco.parts.NewFeatureChangeOrdersPropertiesEditionPart#setValue(String newValue) * */ public void setValue(String newValue) { if (newValue != null) { value.setText(newValue); } else { value.setText(""); //$NON-NLS-1$ } boolean eefElementEditorReadOnlyState = isReadOnly(ScoViewsRepository.NewFeatureChangeOrders.Properties.value); if (eefElementEditorReadOnlyState && value.isEnabled()) { value.setEnabled(false); value.setToolTipText(ScoMessages.NewFeatureChangeOrders_ReadOnly); } else if (!eefElementEditorReadOnlyState && !value.isEnabled()) { value.setEnabled(true); } } /** * {@inheritDoc} * * @see net.certware.measurement.sco.parts.NewFeatureChangeOrdersPropertiesEditionPart#getType() * */ public Enumerator getType() { Enumerator selection = (Enumerator) ((StructuredSelection) type.getSelection()).getFirstElement(); return selection; } /** * {@inheritDoc} * * @see net.certware.measurement.sco.parts.NewFeatureChangeOrdersPropertiesEditionPart#initType(Object input, Enumerator current) */ public void initType(Object input, Enumerator current) { type.setInput(input); type.modelUpdating(new StructuredSelection(current)); boolean eefElementEditorReadOnlyState = isReadOnly(ScoViewsRepository.NewFeatureChangeOrders.Properties.type); if (eefElementEditorReadOnlyState && type.isEnabled()) { type.setEnabled(false); type.setToolTipText(ScoMessages.NewFeatureChangeOrders_ReadOnly); } else if (!eefElementEditorReadOnlyState && !type.isEnabled()) { type.setEnabled(true); } } /** * {@inheritDoc} * * @see net.certware.measurement.sco.parts.NewFeatureChangeOrdersPropertiesEditionPart#setType(Enumerator newValue) * */ public void setType(Enumerator newValue) { type.modelUpdating(new StructuredSelection(newValue)); boolean eefElementEditorReadOnlyState = isReadOnly(ScoViewsRepository.NewFeatureChangeOrders.Properties.type); if (eefElementEditorReadOnlyState && type.isEnabled()) { type.setEnabled(false); type.setToolTipText(ScoMessages.NewFeatureChangeOrders_ReadOnly); } else if (!eefElementEditorReadOnlyState && !type.isEnabled()) { type.setEnabled(true); } } /** * {@inheritDoc} * * @see net.certware.measurement.sco.parts.NewFeatureChangeOrdersPropertiesEditionPart#getBrokenLines() * */ public String getBrokenLines() { return brokenLines.getText(); } /** * {@inheritDoc} * * @see net.certware.measurement.sco.parts.NewFeatureChangeOrdersPropertiesEditionPart#setBrokenLines(String newValue) * */ public void setBrokenLines(String newValue) { if (newValue != null) { brokenLines.setText(newValue); } else { brokenLines.setText(""); //$NON-NLS-1$ } boolean eefElementEditorReadOnlyState = isReadOnly(ScoViewsRepository.NewFeatureChangeOrders.Properties.brokenLines); if (eefElementEditorReadOnlyState && brokenLines.isEnabled()) { brokenLines.setEnabled(false); brokenLines.setToolTipText(ScoMessages.NewFeatureChangeOrders_ReadOnly); } else if (!eefElementEditorReadOnlyState && !brokenLines.isEnabled()) { brokenLines.setEnabled(true); } } /** * {@inheritDoc} * * @see net.certware.measurement.sco.parts.NewFeatureChangeOrdersPropertiesEditionPart#getFixedLines() * */ public String getFixedLines() { return fixedLines.getText(); } /** * {@inheritDoc} * * @see net.certware.measurement.sco.parts.NewFeatureChangeOrdersPropertiesEditionPart#setFixedLines(String newValue) * */ public void setFixedLines(String newValue) { if (newValue != null) { fixedLines.setText(newValue); } else { fixedLines.setText(""); //$NON-NLS-1$ } boolean eefElementEditorReadOnlyState = isReadOnly(ScoViewsRepository.NewFeatureChangeOrders.Properties.fixedLines); if (eefElementEditorReadOnlyState && fixedLines.isEnabled()) { fixedLines.setEnabled(false); fixedLines.setToolTipText(ScoMessages.NewFeatureChangeOrders_ReadOnly); } else if (!eefElementEditorReadOnlyState && !fixedLines.isEnabled()) { fixedLines.setEnabled(true); } } /** * {@inheritDoc} * * @see net.certware.measurement.sco.parts.NewFeatureChangeOrdersPropertiesEditionPart#getRepairEffort() * */ public String getRepairEffort() { return repairEffort.getText(); } /** * {@inheritDoc} * * @see net.certware.measurement.sco.parts.NewFeatureChangeOrdersPropertiesEditionPart#setRepairEffort(String newValue) * */ public void setRepairEffort(String newValue) { if (newValue != null) { repairEffort.setText(newValue); } else { repairEffort.setText(""); //$NON-NLS-1$ } boolean eefElementEditorReadOnlyState = isReadOnly(ScoViewsRepository.NewFeatureChangeOrders.Properties.repairEffort); if (eefElementEditorReadOnlyState && repairEffort.isEnabled()) { repairEffort.setEnabled(false); repairEffort.setToolTipText(ScoMessages.NewFeatureChangeOrders_ReadOnly); } else if (!eefElementEditorReadOnlyState && !repairEffort.isEnabled()) { repairEffort.setEnabled(true); } } /** * {@inheritDoc} * * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle() * */ public String getTitle() { return ScoMessages.NewFeatureChangeOrders_Part_Title; } // Start of user code additional methods // End of user code }