| /******************************************************************************* |
| * Copyright (c) 2016 Fundación Tecnalia Research & Innovation. |
| * |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v2.0 |
| * which accompanies this distribution, and is available at |
| * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Contributors: |
| * Huascar Espinoza - initial API and implementation |
| * Alejandra Ruíz - initial API and implementation |
| * Idoya Del Río - initial API and implementation |
| * Mari Carmen Palacios - initial API and implementation |
| * Angel López - initial API and implementation |
| *******************************************************************************/ |
| /** |
| * Generated with Acceleo |
| */ |
| package org.eclipse.opencert.sam.arg.arg.parts.impl; |
| |
| // Start of user code for imports |
| import java.util.ArrayList;
|
| import java.util.List;
|
|
|
| import org.eclipse.emf.ecore.EObject;
|
|
|
| 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.ReferencesTable;
|
|
|
| import org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.ReferencesTableListener;
|
|
|
| import org.eclipse.emf.eef.runtime.ui.widgets.SWTUtils;
|
|
|
| import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableContentProvider;
|
| import org.eclipse.emf.eef.runtime.ui.widgets.referencestable.ReferencesTableSettings;
|
|
|
| import org.eclipse.jface.viewers.ViewerFilter;
|
|
|
| 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.events.SelectionAdapter;
|
| import org.eclipse.swt.events.SelectionEvent;
|
|
|
| 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;
|
|
|
| import org.eclipse.opencert.sam.arg.arg.parts.ArgViewsRepository;
|
| import org.eclipse.opencert.sam.arg.arg.parts.ClaimPropertiesEditionPart;
|
|
|
| import org.eclipse.opencert.sam.arg.arg.providers.ArgMessages; |
| |
| // End of user code |
| |
| /** |
| * |
| * |
| */ |
| public class ClaimPropertiesEditionPartImpl extends CompositePropertiesEditionPart implements ISWTPropertiesEditionPart, ClaimPropertiesEditionPart { |
| |
| protected Text id; |
| protected Text name; |
| protected Text description; |
| protected Text content; |
| protected ReferencesTable evaluation; |
| protected List<ViewerFilter> evaluationBusinessFilters = new ArrayList<ViewerFilter>(); |
| protected List<ViewerFilter> evaluationFilters = new ArrayList<ViewerFilter>(); |
| protected ReferencesTable lifecycleEvent; |
| protected List<ViewerFilter> lifecycleEventBusinessFilters = new ArrayList<ViewerFilter>(); |
| protected List<ViewerFilter> lifecycleEventFilters = new ArrayList<ViewerFilter>(); |
| protected Text public_; |
| protected Text assumed; |
| protected Text toBeSupported; |
| protected Text toBeInstantiated; |
| |
| |
| |
| /** |
| * Default constructor |
| * @param editionComponent the {@link IPropertiesEditionComponent} that manage this part |
| * |
| */ |
| public ClaimPropertiesEditionPartImpl(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 claimStep = new BindingCompositionSequence(propertiesEditionComponent); |
| CompositionStep propertiesStep = claimStep.addStep(ArgViewsRepository.Claim.Properties.class); |
| propertiesStep.addStep(ArgViewsRepository.Claim.Properties.id); |
| /** |
| * ARL changes. |
| * some properties are not necessary for graphical visualization |
| */ |
| propertiesStep.addStep(ArgViewsRepository.Claim.Properties.name); |
| propertiesStep.addStep(ArgViewsRepository.Claim.Properties.description); |
| // propertiesStep.addStep(ArgViewsRepository.Claim.Properties.content); |
| propertiesStep.addStep(ArgViewsRepository.Claim.Properties.evaluation); |
| propertiesStep.addStep(ArgViewsRepository.Claim.Properties.lifecycleEvent); |
| propertiesStep.addStep(ArgViewsRepository.Claim.Properties.public_); |
| propertiesStep.addStep(ArgViewsRepository.Claim.Properties.assumed); |
| propertiesStep.addStep(ArgViewsRepository.Claim.Properties.toBeSupported); |
| propertiesStep.addStep(ArgViewsRepository.Claim.Properties.toBeInstantiated); |
| |
| |
| composer = new PartComposer(claimStep) { |
| |
| @Override |
| public Composite addToPart(Composite parent, Object key) { |
| if (key == ArgViewsRepository.Claim.Properties.class) { |
| return createPropertiesGroup(parent); |
| } |
| if (key == ArgViewsRepository.Claim.Properties.id) { |
| return createIdText(parent); |
| } |
| if (key == ArgViewsRepository.Claim.Properties.name) { |
| return createNameText(parent); |
| } |
| if (key == ArgViewsRepository.Claim.Properties.description) { |
| return createDescriptionText(parent); |
| } |
| if (key == ArgViewsRepository.Claim.Properties.content) { |
| return createContentText(parent); |
| } |
| if (key == ArgViewsRepository.Claim.Properties.evaluation) { |
| return createEvaluationAdvancedTableComposition(parent); |
| } |
| if (key == ArgViewsRepository.Claim.Properties.lifecycleEvent) { |
| return createLifecycleEventAdvancedTableComposition(parent); |
| } |
| if (key == ArgViewsRepository.Claim.Properties.public_) { |
| return createPublic_Text(parent); |
| } |
| if (key == ArgViewsRepository.Claim.Properties.assumed) { |
| return createAssumedText(parent); |
| } |
| if (key == ArgViewsRepository.Claim.Properties.toBeSupported) { |
| return createToBeSupportedText(parent); |
| } |
| if (key == ArgViewsRepository.Claim.Properties.toBeInstantiated) { |
| return createToBeInstantiatedText(parent); |
| } |
| return parent; |
| } |
| }; |
| composer.compose(view); |
| } |
| |
| /** |
| * |
| */ |
| protected Composite createPropertiesGroup(Composite parent) { |
| Group propertiesGroup = new Group(parent, SWT.NONE); |
| propertiesGroup.setText(ArgMessages.ClaimPropertiesEditionPart_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 createIdText(Composite parent) { |
| createDescription(parent, ArgViewsRepository.Claim.Properties.id, ArgMessages.ClaimPropertiesEditionPart_IdLabel); |
| id = SWTUtils.createScrollableText(parent, SWT.BORDER); |
| GridData idData = new GridData(GridData.FILL_HORIZONTAL); |
| id.setLayoutData(idData); |
| id.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(ClaimPropertiesEditionPartImpl.this, ArgViewsRepository.Claim.Properties.id, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, id.getText())); |
| } |
| |
| }); |
| id.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(ClaimPropertiesEditionPartImpl.this, ArgViewsRepository.Claim.Properties.id, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, id.getText())); |
| } |
| } |
| |
| }); |
| EditingUtils.setID(id, ArgViewsRepository.Claim.Properties.id); |
| EditingUtils.setEEFtype(id, "eef::Text"); //$NON-NLS-1$ |
| SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(ArgViewsRepository.Claim.Properties.id, ArgViewsRepository.SWT_KIND), null); //$NON-NLS-1$ |
| // Start of user code for createIdText |
| |
| // End of user code |
| return parent; |
| } |
| |
| |
| protected Composite createNameText(Composite parent) { |
| createDescription(parent, ArgViewsRepository.Claim.Properties.name, ArgMessages.ClaimPropertiesEditionPart_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(ClaimPropertiesEditionPartImpl.this, ArgViewsRepository.Claim.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(ClaimPropertiesEditionPartImpl.this, ArgViewsRepository.Claim.Properties.name, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, name.getText())); |
| } |
| } |
| |
| }); |
| EditingUtils.setID(name, ArgViewsRepository.Claim.Properties.name); |
| EditingUtils.setEEFtype(name, "eef::Text"); //$NON-NLS-1$ |
| SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(ArgViewsRepository.Claim.Properties.name, ArgViewsRepository.SWT_KIND), null); //$NON-NLS-1$ |
| // Start of user code for createNameText |
| |
| // End of user code |
| return parent; |
| } |
| |
| |
| protected Composite createDescriptionText(Composite parent) { |
| createDescription(parent, ArgViewsRepository.Claim.Properties.description, ArgMessages.ClaimPropertiesEditionPart_DescriptionLabel); |
| description = SWTUtils.createScrollableText(parent, SWT.BORDER); |
| GridData descriptionData = new GridData(GridData.FILL_HORIZONTAL); |
| description.setLayoutData(descriptionData); |
| description.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(ClaimPropertiesEditionPartImpl.this, ArgViewsRepository.Claim.Properties.description, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, description.getText())); |
| } |
| |
| }); |
| description.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(ClaimPropertiesEditionPartImpl.this, ArgViewsRepository.Claim.Properties.description, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, description.getText())); |
| } |
| } |
| |
| }); |
| EditingUtils.setID(description, ArgViewsRepository.Claim.Properties.description); |
| EditingUtils.setEEFtype(description, "eef::Text"); //$NON-NLS-1$ |
| SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(ArgViewsRepository.Claim.Properties.description, ArgViewsRepository.SWT_KIND), null); //$NON-NLS-1$ |
| // Start of user code for createDescriptionText |
| |
| // End of user code |
| return parent; |
| } |
| |
| |
| protected Composite createContentText(Composite parent) { |
| createDescription(parent, ArgViewsRepository.Claim.Properties.content, ArgMessages.ClaimPropertiesEditionPart_ContentLabel); |
| content = SWTUtils.createScrollableText(parent, SWT.BORDER); |
| GridData contentData = new GridData(GridData.FILL_HORIZONTAL); |
| content.setLayoutData(contentData); |
| content.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(ClaimPropertiesEditionPartImpl.this, ArgViewsRepository.Claim.Properties.content, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, content.getText())); |
| } |
| |
| }); |
| content.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(ClaimPropertiesEditionPartImpl.this, ArgViewsRepository.Claim.Properties.content, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, content.getText())); |
| } |
| } |
| |
| }); |
| EditingUtils.setID(content, ArgViewsRepository.Claim.Properties.content); |
| EditingUtils.setEEFtype(content, "eef::Text"); //$NON-NLS-1$ |
| SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(ArgViewsRepository.Claim.Properties.content, ArgViewsRepository.SWT_KIND), null); //$NON-NLS-1$ |
| // Start of user code for createContentText |
| |
| // End of user code |
| return parent; |
| } |
| |
| /** |
| * @param container |
| * |
| */ |
| protected Composite createEvaluationAdvancedTableComposition(Composite parent) { |
| this.evaluation = new ReferencesTable(getDescription(ArgViewsRepository.Claim.Properties.evaluation, ArgMessages.ClaimPropertiesEditionPart_EvaluationLabel), new ReferencesTableListener() { |
| public void handleAdd() { |
| propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ClaimPropertiesEditionPartImpl.this, ArgViewsRepository.Claim.Properties.evaluation, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null)); |
| evaluation.refresh(); |
| } |
| public void handleEdit(EObject element) { |
| propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ClaimPropertiesEditionPartImpl.this, ArgViewsRepository.Claim.Properties.evaluation, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element)); |
| evaluation.refresh(); |
| } |
| public void handleMove(EObject element, int oldIndex, int newIndex) { |
| propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ClaimPropertiesEditionPartImpl.this, ArgViewsRepository.Claim.Properties.evaluation, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex)); |
| evaluation.refresh(); |
| } |
| public void handleRemove(EObject element) { |
| propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ClaimPropertiesEditionPartImpl.this, ArgViewsRepository.Claim.Properties.evaluation, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element)); |
| evaluation.refresh(); |
| } |
| public void navigateTo(EObject element) { } |
| }); |
| for (ViewerFilter filter : this.evaluationFilters) { |
| this.evaluation.addFilter(filter); |
| } |
| this.evaluation.setHelpText(propertiesEditionComponent.getHelpContent(ArgViewsRepository.Claim.Properties.evaluation, ArgViewsRepository.SWT_KIND)); |
| this.evaluation.createControls(parent); |
| this.evaluation.addSelectionListener(new SelectionAdapter() { |
| |
| public void widgetSelected(SelectionEvent e) { |
| if (e.item != null && e.item.getData() instanceof EObject) { |
| propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ClaimPropertiesEditionPartImpl.this, ArgViewsRepository.Claim.Properties.evaluation, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData())); |
| } |
| } |
| |
| }); |
| GridData evaluationData = new GridData(GridData.FILL_HORIZONTAL); |
| evaluationData.horizontalSpan = 3; |
| this.evaluation.setLayoutData(evaluationData); |
| this.evaluation.setLowerBound(0); |
| this.evaluation.setUpperBound(-1); |
| evaluation.setID(ArgViewsRepository.Claim.Properties.evaluation); |
| evaluation.setEEFType("eef::AdvancedTableComposition"); //$NON-NLS-1$ |
| // Start of user code for createEvaluationAdvancedTableComposition |
| |
| // End of user code |
| return parent; |
| } |
| |
| /** |
| * @param container |
| * |
| */ |
| protected Composite createLifecycleEventAdvancedTableComposition(Composite parent) { |
| this.lifecycleEvent = new ReferencesTable(getDescription(ArgViewsRepository.Claim.Properties.lifecycleEvent, ArgMessages.ClaimPropertiesEditionPart_LifecycleEventLabel), new ReferencesTableListener() { |
| public void handleAdd() { |
| propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ClaimPropertiesEditionPartImpl.this, ArgViewsRepository.Claim.Properties.lifecycleEvent, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null)); |
| lifecycleEvent.refresh(); |
| } |
| public void handleEdit(EObject element) { |
| propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ClaimPropertiesEditionPartImpl.this, ArgViewsRepository.Claim.Properties.lifecycleEvent, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element)); |
| lifecycleEvent.refresh(); |
| } |
| public void handleMove(EObject element, int oldIndex, int newIndex) { |
| propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ClaimPropertiesEditionPartImpl.this, ArgViewsRepository.Claim.Properties.lifecycleEvent, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex)); |
| lifecycleEvent.refresh(); |
| } |
| public void handleRemove(EObject element) { |
| propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ClaimPropertiesEditionPartImpl.this, ArgViewsRepository.Claim.Properties.lifecycleEvent, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element)); |
| lifecycleEvent.refresh(); |
| } |
| public void navigateTo(EObject element) { } |
| }); |
| for (ViewerFilter filter : this.lifecycleEventFilters) { |
| this.lifecycleEvent.addFilter(filter); |
| } |
| this.lifecycleEvent.setHelpText(propertiesEditionComponent.getHelpContent(ArgViewsRepository.Claim.Properties.lifecycleEvent, ArgViewsRepository.SWT_KIND)); |
| this.lifecycleEvent.createControls(parent); |
| this.lifecycleEvent.addSelectionListener(new SelectionAdapter() { |
| |
| public void widgetSelected(SelectionEvent e) { |
| if (e.item != null && e.item.getData() instanceof EObject) { |
| propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ClaimPropertiesEditionPartImpl.this, ArgViewsRepository.Claim.Properties.lifecycleEvent, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData())); |
| } |
| } |
| |
| }); |
| GridData lifecycleEventData = new GridData(GridData.FILL_HORIZONTAL); |
| lifecycleEventData.horizontalSpan = 3; |
| this.lifecycleEvent.setLayoutData(lifecycleEventData); |
| this.lifecycleEvent.setLowerBound(0); |
| this.lifecycleEvent.setUpperBound(-1); |
| lifecycleEvent.setID(ArgViewsRepository.Claim.Properties.lifecycleEvent); |
| lifecycleEvent.setEEFType("eef::AdvancedTableComposition"); //$NON-NLS-1$ |
| // Start of user code for createLifecycleEventAdvancedTableComposition |
| |
| // End of user code |
| return parent; |
| } |
| |
| |
| protected Composite createPublic_Text(Composite parent) { |
| createDescription(parent, ArgViewsRepository.Claim.Properties.public_, ArgMessages.ClaimPropertiesEditionPart_Public_Label); |
| public_ = SWTUtils.createScrollableText(parent, SWT.BORDER); |
| GridData public_Data = new GridData(GridData.FILL_HORIZONTAL); |
| public_.setLayoutData(public_Data); |
| public_.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(ClaimPropertiesEditionPartImpl.this, ArgViewsRepository.Claim.Properties.public_, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, public_.getText())); |
| } |
| |
| }); |
| public_.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(ClaimPropertiesEditionPartImpl.this, ArgViewsRepository.Claim.Properties.public_, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, public_.getText())); |
| } |
| } |
| |
| }); |
| EditingUtils.setID(public_, ArgViewsRepository.Claim.Properties.public_); |
| EditingUtils.setEEFtype(public_, "eef::Text"); //$NON-NLS-1$ |
| SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(ArgViewsRepository.Claim.Properties.public_, ArgViewsRepository.SWT_KIND), null); //$NON-NLS-1$ |
| // Start of user code for createPublic_Text |
| |
| // End of user code |
| return parent; |
| } |
| |
| |
| protected Composite createAssumedText(Composite parent) { |
| createDescription(parent, ArgViewsRepository.Claim.Properties.assumed, ArgMessages.ClaimPropertiesEditionPart_AssumedLabel); |
| assumed = SWTUtils.createScrollableText(parent, SWT.BORDER); |
| GridData assumedData = new GridData(GridData.FILL_HORIZONTAL); |
| assumed.setLayoutData(assumedData); |
| assumed.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(ClaimPropertiesEditionPartImpl.this, ArgViewsRepository.Claim.Properties.assumed, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, assumed.getText())); |
| } |
| |
| }); |
| assumed.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(ClaimPropertiesEditionPartImpl.this, ArgViewsRepository.Claim.Properties.assumed, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, assumed.getText())); |
| } |
| } |
| |
| }); |
| EditingUtils.setID(assumed, ArgViewsRepository.Claim.Properties.assumed); |
| EditingUtils.setEEFtype(assumed, "eef::Text"); //$NON-NLS-1$ |
| SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(ArgViewsRepository.Claim.Properties.assumed, ArgViewsRepository.SWT_KIND), null); //$NON-NLS-1$ |
| // Start of user code for createAssumedText |
| |
| // End of user code |
| return parent; |
| } |
| |
| |
| protected Composite createToBeSupportedText(Composite parent) { |
| createDescription(parent, ArgViewsRepository.Claim.Properties.toBeSupported, ArgMessages.ClaimPropertiesEditionPart_ToBeSupportedLabel); |
| toBeSupported = SWTUtils.createScrollableText(parent, SWT.BORDER); |
| GridData toBeSupportedData = new GridData(GridData.FILL_HORIZONTAL); |
| toBeSupported.setLayoutData(toBeSupportedData); |
| toBeSupported.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(ClaimPropertiesEditionPartImpl.this, ArgViewsRepository.Claim.Properties.toBeSupported, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, toBeSupported.getText())); |
| } |
| |
| }); |
| toBeSupported.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(ClaimPropertiesEditionPartImpl.this, ArgViewsRepository.Claim.Properties.toBeSupported, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, toBeSupported.getText())); |
| } |
| } |
| |
| }); |
| EditingUtils.setID(toBeSupported, ArgViewsRepository.Claim.Properties.toBeSupported); |
| EditingUtils.setEEFtype(toBeSupported, "eef::Text"); //$NON-NLS-1$ |
| SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(ArgViewsRepository.Claim.Properties.toBeSupported, ArgViewsRepository.SWT_KIND), null); //$NON-NLS-1$ |
| // Start of user code for createToBeSupportedText |
| |
| // End of user code |
| return parent; |
| } |
| |
| |
| protected Composite createToBeInstantiatedText(Composite parent) { |
| createDescription(parent, ArgViewsRepository.Claim.Properties.toBeInstantiated, ArgMessages.ClaimPropertiesEditionPart_ToBeInstantiatedLabel); |
| toBeInstantiated = SWTUtils.createScrollableText(parent, SWT.BORDER); |
| GridData toBeInstantiatedData = new GridData(GridData.FILL_HORIZONTAL); |
| toBeInstantiated.setLayoutData(toBeInstantiatedData); |
| toBeInstantiated.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(ClaimPropertiesEditionPartImpl.this, ArgViewsRepository.Claim.Properties.toBeInstantiated, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, toBeInstantiated.getText())); |
| } |
| |
| }); |
| toBeInstantiated.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(ClaimPropertiesEditionPartImpl.this, ArgViewsRepository.Claim.Properties.toBeInstantiated, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, toBeInstantiated.getText())); |
| } |
| } |
| |
| }); |
| EditingUtils.setID(toBeInstantiated, ArgViewsRepository.Claim.Properties.toBeInstantiated); |
| EditingUtils.setEEFtype(toBeInstantiated, "eef::Text"); //$NON-NLS-1$ |
| SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(ArgViewsRepository.Claim.Properties.toBeInstantiated, ArgViewsRepository.SWT_KIND), null); //$NON-NLS-1$ |
| // Start of user code for createToBeInstantiatedText |
| |
| // 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 org.eclipse.opencert.sam.arg.arg.parts.ClaimPropertiesEditionPart#getId() |
| * |
| */ |
| public String getId() { |
| return id.getText(); |
| } |
| |
| /** |
| * {@inheritDoc} |
| * |
| * @see org.eclipse.opencert.sam.arg.arg.parts.ClaimPropertiesEditionPart#setId(String newValue) |
| * |
| */ |
| public void setId(String newValue) { |
| if (newValue != null) { |
| id.setText(newValue); |
| } else { |
| id.setText(""); //$NON-NLS-1$ |
| } |
| boolean eefElementEditorReadOnlyState = isReadOnly(ArgViewsRepository.Claim.Properties.id); |
| if (eefElementEditorReadOnlyState && id.isEnabled()) { |
| id.setEnabled(false); |
| id.setToolTipText(ArgMessages.Claim_ReadOnly); |
| } else if (!eefElementEditorReadOnlyState && !id.isEnabled()) { |
| id.setEnabled(true); |
| } |
| |
| } |
| |
| /** |
| * {@inheritDoc} |
| * |
| * @see org.eclipse.opencert.sam.arg.arg.parts.ClaimPropertiesEditionPart#getName() |
| * |
| */ |
| public String getName() { |
| return name.getText(); |
| } |
| |
| /** |
| * {@inheritDoc} |
| * |
| * @see org.eclipse.opencert.sam.arg.arg.parts.ClaimPropertiesEditionPart#setName(String newValue) |
| * |
| */ |
| public void setName(String newValue) { |
| if (newValue != null) { |
| name.setText(newValue); |
| } else { |
| name.setText(""); //$NON-NLS-1$ |
| } |
| boolean eefElementEditorReadOnlyState = isReadOnly(ArgViewsRepository.Claim.Properties.name); |
| if (eefElementEditorReadOnlyState && name.isEnabled()) { |
| name.setEnabled(false); |
| name.setToolTipText(ArgMessages.Claim_ReadOnly); |
| } else if (!eefElementEditorReadOnlyState && !name.isEnabled()) { |
| name.setEnabled(true); |
| } |
| |
| } |
| |
| /** |
| * {@inheritDoc} |
| * |
| * @see org.eclipse.opencert.sam.arg.arg.parts.ClaimPropertiesEditionPart#getDescription() |
| * |
| */ |
| public String getDescription() { |
| return description.getText(); |
| } |
| |
| /** |
| * {@inheritDoc} |
| * |
| * @see org.eclipse.opencert.sam.arg.arg.parts.ClaimPropertiesEditionPart#setDescription(String newValue) |
| * |
| */ |
| public void setDescription(String newValue) { |
| if (newValue != null) { |
| description.setText(newValue); |
| } else { |
| description.setText(""); //$NON-NLS-1$ |
| } |
| boolean eefElementEditorReadOnlyState = isReadOnly(ArgViewsRepository.Claim.Properties.description); |
| if (eefElementEditorReadOnlyState && description.isEnabled()) { |
| description.setEnabled(false); |
| description.setToolTipText(ArgMessages.Claim_ReadOnly); |
| } else if (!eefElementEditorReadOnlyState && !description.isEnabled()) { |
| description.setEnabled(true); |
| } |
| |
| } |
| |
| /** |
| * {@inheritDoc} |
| * |
| * @see org.eclipse.opencert.sam.arg.arg.parts.ClaimPropertiesEditionPart#getContent() |
| * |
| */ |
| public String getContent() { |
| return content.getText(); |
| } |
| |
| /** |
| * {@inheritDoc} |
| * |
| * @see org.eclipse.opencert.sam.arg.arg.parts.ClaimPropertiesEditionPart#setContent(String newValue) |
| * |
| */ |
| public void setContent(String newValue) { |
| if (newValue != null) { |
| content.setText(newValue); |
| } else { |
| content.setText(""); //$NON-NLS-1$ |
| } |
| boolean eefElementEditorReadOnlyState = isReadOnly(ArgViewsRepository.Claim.Properties.content); |
| if (eefElementEditorReadOnlyState && content.isEnabled()) { |
| content.setEnabled(false); |
| content.setToolTipText(ArgMessages.Claim_ReadOnly); |
| } else if (!eefElementEditorReadOnlyState && !content.isEnabled()) { |
| content.setEnabled(true); |
| } |
| |
| } |
| |
| |
| |
| /** |
| * {@inheritDoc} |
| * |
| * @see org.eclipse.opencert.sam.arg.arg.parts.ClaimPropertiesEditionPart#initEvaluation(EObject current, EReference containingFeature, EReference feature) |
| */ |
| public void initEvaluation(ReferencesTableSettings settings) { |
| if (current.eResource() != null && current.eResource().getResourceSet() != null) |
| this.resourceSet = current.eResource().getResourceSet(); |
| ReferencesTableContentProvider contentProvider = new ReferencesTableContentProvider(); |
| evaluation.setContentProvider(contentProvider); |
| evaluation.setInput(settings); |
| boolean eefElementEditorReadOnlyState = isReadOnly(ArgViewsRepository.Claim.Properties.evaluation); |
| if (eefElementEditorReadOnlyState && evaluation.isEnabled()) { |
| evaluation.setEnabled(false); |
| evaluation.setToolTipText(ArgMessages.Claim_ReadOnly); |
| } else if (!eefElementEditorReadOnlyState && !evaluation.isEnabled()) { |
| evaluation.setEnabled(true); |
| } |
| |
| } |
| |
| /** |
| * {@inheritDoc} |
| * |
| * @see org.eclipse.opencert.sam.arg.arg.parts.ClaimPropertiesEditionPart#updateEvaluation() |
| * |
| */ |
| public void updateEvaluation() { |
| evaluation.refresh(); |
| } |
| |
| /** |
| * {@inheritDoc} |
| * |
| * @see org.eclipse.opencert.sam.arg.arg.parts.ClaimPropertiesEditionPart#addFilterEvaluation(ViewerFilter filter) |
| * |
| */ |
| public void addFilterToEvaluation(ViewerFilter filter) { |
| evaluationFilters.add(filter); |
| if (this.evaluation != null) { |
| this.evaluation.addFilter(filter); |
| } |
| } |
| |
| /** |
| * {@inheritDoc} |
| * |
| * @see org.eclipse.opencert.sam.arg.arg.parts.ClaimPropertiesEditionPart#addBusinessFilterEvaluation(ViewerFilter filter) |
| * |
| */ |
| public void addBusinessFilterToEvaluation(ViewerFilter filter) { |
| evaluationBusinessFilters.add(filter); |
| } |
| |
| /** |
| * {@inheritDoc} |
| * |
| * @see org.eclipse.opencert.sam.arg.arg.parts.ClaimPropertiesEditionPart#isContainedInEvaluationTable(EObject element) |
| * |
| */ |
| public boolean isContainedInEvaluationTable(EObject element) { |
| return ((ReferencesTableSettings)evaluation.getInput()).contains(element); |
| } |
| |
| |
| |
| /** |
| * {@inheritDoc} |
| * |
| * @see org.eclipse.opencert.sam.arg.arg.parts.ClaimPropertiesEditionPart#initLifecycleEvent(EObject current, EReference containingFeature, EReference feature) |
| */ |
| public void initLifecycleEvent(ReferencesTableSettings settings) { |
| if (current.eResource() != null && current.eResource().getResourceSet() != null) |
| this.resourceSet = current.eResource().getResourceSet(); |
| ReferencesTableContentProvider contentProvider = new ReferencesTableContentProvider(); |
| lifecycleEvent.setContentProvider(contentProvider); |
| lifecycleEvent.setInput(settings); |
| boolean eefElementEditorReadOnlyState = isReadOnly(ArgViewsRepository.Claim.Properties.lifecycleEvent); |
| if (eefElementEditorReadOnlyState && lifecycleEvent.isEnabled()) { |
| lifecycleEvent.setEnabled(false); |
| lifecycleEvent.setToolTipText(ArgMessages.Claim_ReadOnly); |
| } else if (!eefElementEditorReadOnlyState && !lifecycleEvent.isEnabled()) { |
| lifecycleEvent.setEnabled(true); |
| } |
| |
| } |
| |
| /** |
| * {@inheritDoc} |
| * |
| * @see org.eclipse.opencert.sam.arg.arg.parts.ClaimPropertiesEditionPart#updateLifecycleEvent() |
| * |
| */ |
| public void updateLifecycleEvent() { |
| lifecycleEvent.refresh(); |
| } |
| |
| /** |
| * {@inheritDoc} |
| * |
| * @see org.eclipse.opencert.sam.arg.arg.parts.ClaimPropertiesEditionPart#addFilterLifecycleEvent(ViewerFilter filter) |
| * |
| */ |
| public void addFilterToLifecycleEvent(ViewerFilter filter) { |
| lifecycleEventFilters.add(filter); |
| if (this.lifecycleEvent != null) { |
| this.lifecycleEvent.addFilter(filter); |
| } |
| } |
| |
| /** |
| * {@inheritDoc} |
| * |
| * @see org.eclipse.opencert.sam.arg.arg.parts.ClaimPropertiesEditionPart#addBusinessFilterLifecycleEvent(ViewerFilter filter) |
| * |
| */ |
| public void addBusinessFilterToLifecycleEvent(ViewerFilter filter) { |
| lifecycleEventBusinessFilters.add(filter); |
| } |
| |
| /** |
| * {@inheritDoc} |
| * |
| * @see org.eclipse.opencert.sam.arg.arg.parts.ClaimPropertiesEditionPart#isContainedInLifecycleEventTable(EObject element) |
| * |
| */ |
| public boolean isContainedInLifecycleEventTable(EObject element) { |
| return ((ReferencesTableSettings)lifecycleEvent.getInput()).contains(element); |
| } |
| |
| /** |
| * {@inheritDoc} |
| * |
| * @see org.eclipse.opencert.sam.arg.arg.parts.ClaimPropertiesEditionPart#getPublic_() |
| * |
| */ |
| public String getPublic_() { |
| return public_.getText(); |
| } |
| |
| /** |
| * {@inheritDoc} |
| * |
| * @see org.eclipse.opencert.sam.arg.arg.parts.ClaimPropertiesEditionPart#setPublic_(String newValue) |
| * |
| */ |
| public void setPublic_(String newValue) { |
| if (newValue != null) { |
| public_.setText(newValue); |
| } else { |
| public_.setText(""); //$NON-NLS-1$ |
| } |
| boolean eefElementEditorReadOnlyState = isReadOnly(ArgViewsRepository.Claim.Properties.public_); |
| if (eefElementEditorReadOnlyState && public_.isEnabled()) { |
| public_.setEnabled(false); |
| public_.setToolTipText(ArgMessages.Claim_ReadOnly); |
| } else if (!eefElementEditorReadOnlyState && !public_.isEnabled()) { |
| public_.setEnabled(true); |
| } |
| |
| } |
| |
| /** |
| * {@inheritDoc} |
| * |
| * @see org.eclipse.opencert.sam.arg.arg.parts.ClaimPropertiesEditionPart#getAssumed() |
| * |
| */ |
| public String getAssumed() { |
| return assumed.getText(); |
| } |
| |
| /** |
| * {@inheritDoc} |
| * |
| * @see org.eclipse.opencert.sam.arg.arg.parts.ClaimPropertiesEditionPart#setAssumed(String newValue) |
| * |
| */ |
| public void setAssumed(String newValue) { |
| if (newValue != null) { |
| assumed.setText(newValue); |
| } else { |
| assumed.setText(""); //$NON-NLS-1$ |
| } |
| boolean eefElementEditorReadOnlyState = isReadOnly(ArgViewsRepository.Claim.Properties.assumed); |
| if (eefElementEditorReadOnlyState && assumed.isEnabled()) { |
| assumed.setEnabled(false); |
| assumed.setToolTipText(ArgMessages.Claim_ReadOnly); |
| } else if (!eefElementEditorReadOnlyState && !assumed.isEnabled()) { |
| assumed.setEnabled(true); |
| } |
| |
| } |
| |
| /** |
| * {@inheritDoc} |
| * |
| * @see org.eclipse.opencert.sam.arg.arg.parts.ClaimPropertiesEditionPart#getToBeSupported() |
| * |
| */ |
| public String getToBeSupported() { |
| return toBeSupported.getText(); |
| } |
| |
| /** |
| * {@inheritDoc} |
| * |
| * @see org.eclipse.opencert.sam.arg.arg.parts.ClaimPropertiesEditionPart#setToBeSupported(String newValue) |
| * |
| */ |
| public void setToBeSupported(String newValue) { |
| if (newValue != null) { |
| toBeSupported.setText(newValue); |
| } else { |
| toBeSupported.setText(""); //$NON-NLS-1$ |
| } |
| boolean eefElementEditorReadOnlyState = isReadOnly(ArgViewsRepository.Claim.Properties.toBeSupported); |
| if (eefElementEditorReadOnlyState && toBeSupported.isEnabled()) { |
| toBeSupported.setEnabled(false); |
| toBeSupported.setToolTipText(ArgMessages.Claim_ReadOnly); |
| } else if (!eefElementEditorReadOnlyState && !toBeSupported.isEnabled()) { |
| toBeSupported.setEnabled(true); |
| } |
| |
| } |
| |
| /** |
| * {@inheritDoc} |
| * |
| * @see org.eclipse.opencert.sam.arg.arg.parts.ClaimPropertiesEditionPart#getToBeInstantiated() |
| * |
| */ |
| public String getToBeInstantiated() { |
| return toBeInstantiated.getText(); |
| } |
| |
| /** |
| * {@inheritDoc} |
| * |
| * @see org.eclipse.opencert.sam.arg.arg.parts.ClaimPropertiesEditionPart#setToBeInstantiated(String newValue) |
| * |
| */ |
| public void setToBeInstantiated(String newValue) { |
| if (newValue != null) { |
| toBeInstantiated.setText(newValue); |
| } else { |
| toBeInstantiated.setText(""); //$NON-NLS-1$ |
| } |
| boolean eefElementEditorReadOnlyState = isReadOnly(ArgViewsRepository.Claim.Properties.toBeInstantiated); |
| if (eefElementEditorReadOnlyState && toBeInstantiated.isEnabled()) { |
| toBeInstantiated.setEnabled(false); |
| toBeInstantiated.setToolTipText(ArgMessages.Claim_ReadOnly); |
| } else if (!eefElementEditorReadOnlyState && !toBeInstantiated.isEnabled()) { |
| toBeInstantiated.setEnabled(true); |
| } |
| |
| } |
| |
| |
| |
| |
| |
| |
| /** |
| * {@inheritDoc} |
| * |
| * @see org.eclipse.emf.eef.runtime.api.parts.IPropertiesEditionPart#getTitle() |
| * |
| */ |
| public String getTitle() { |
| return ArgMessages.Claim_Part_Title; |
| } |
| |
| // Start of user code additional methods |
| |
| // End of user code |
| |
| |
| } |