use of org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent in project InformationSystem by ObeoNetwork.
the class FinalStatePropertiesEditionPartImpl method createOutcomingTransitionsAdvancedReferencesTable.
/**
*/
protected Composite createOutcomingTransitionsAdvancedReferencesTable(Composite parent) {
String label = getDescription(StatemachineViewsRepository.FinalState.Properties.outcomingTransitions, StatemachineMessages.FinalStatePropertiesEditionPart_OutcomingTransitionsLabel);
this.outcomingTransitions = new ReferencesTable(label, new ReferencesTableListener() {
public void handleAdd() {
addOutcomingTransitions();
}
public void handleEdit(EObject element) {
editOutcomingTransitions(element);
}
public void handleMove(EObject element, int oldIndex, int newIndex) {
moveOutcomingTransitions(element, oldIndex, newIndex);
}
public void handleRemove(EObject element) {
removeFromOutcomingTransitions(element);
}
public void navigateTo(EObject element) {
}
});
this.outcomingTransitions.setHelpText(propertiesEditionComponent.getHelpContent(StatemachineViewsRepository.FinalState.Properties.outcomingTransitions, StatemachineViewsRepository.SWT_KIND));
this.outcomingTransitions.createControls(parent);
this.outcomingTransitions.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
if (e.item != null && e.item.getData() instanceof EObject) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(FinalStatePropertiesEditionPartImpl.this, StatemachineViewsRepository.FinalState.Properties.outcomingTransitions, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
}
}
});
GridData outcomingTransitionsData = new GridData(GridData.FILL_HORIZONTAL);
outcomingTransitionsData.horizontalSpan = 3;
this.outcomingTransitions.setLayoutData(outcomingTransitionsData);
this.outcomingTransitions.disableMove();
outcomingTransitions.setID(StatemachineViewsRepository.FinalState.Properties.outcomingTransitions);
// $NON-NLS-1$
outcomingTransitions.setEEFType("eef::AdvancedReferencesTable");
return parent;
}
use of org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent in project InformationSystem by ObeoNetwork.
the class FinalStatePropertiesEditionPartImpl method addOutcomingTransitions.
/**
*/
protected void addOutcomingTransitions() {
TabElementTreeSelectionDialog dialog = new TabElementTreeSelectionDialog(outcomingTransitions.getInput(), outcomingTransitionsFilters, outcomingTransitionsBusinessFilters, "outcomingTransitions", propertiesEditionComponent.getEditingContext().getAdapterFactory(), current.eResource()) {
@Override
public void process(IStructuredSelection selection) {
for (Iterator<?> iter = selection.iterator(); iter.hasNext(); ) {
EObject elem = (EObject) iter.next();
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(FinalStatePropertiesEditionPartImpl.this, StatemachineViewsRepository.FinalState.Properties.outcomingTransitions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, elem));
}
outcomingTransitions.refresh();
}
};
dialog.open();
}
use of org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent in project InformationSystem by ObeoNetwork.
the class InitialStatePropertiesEditionPartImpl method addOutcomingTransitions.
/**
*/
protected void addOutcomingTransitions() {
TabElementTreeSelectionDialog dialog = new TabElementTreeSelectionDialog(outcomingTransitions.getInput(), outcomingTransitionsFilters, outcomingTransitionsBusinessFilters, "outcomingTransitions", propertiesEditionComponent.getEditingContext().getAdapterFactory(), current.eResource()) {
@Override
public void process(IStructuredSelection selection) {
for (Iterator<?> iter = selection.iterator(); iter.hasNext(); ) {
EObject elem = (EObject) iter.next();
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(InitialStatePropertiesEditionPartImpl.this, StatemachineViewsRepository.InitialState.Properties.outcomingTransitions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, elem));
}
outcomingTransitions.refresh();
}
};
dialog.open();
}
use of org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent in project InformationSystem by ObeoNetwork.
the class InitialStatePropertiesEditionPartImpl method moveOutcomingTransitions.
/**
*/
protected void moveOutcomingTransitions(EObject element, int oldIndex, int newIndex) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(InitialStatePropertiesEditionPartImpl.this, StatemachineViewsRepository.InitialState.Properties.outcomingTransitions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
outcomingTransitions.refresh();
}
use of org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent in project InformationSystem by ObeoNetwork.
the class InitialStatePropertiesEditionPartImpl method createIncomingTransitionsAdvancedReferencesTable.
/**
*/
protected Composite createIncomingTransitionsAdvancedReferencesTable(Composite parent) {
String label = getDescription(StatemachineViewsRepository.InitialState.Properties.incomingTransitions, StatemachineMessages.InitialStatePropertiesEditionPart_IncomingTransitionsLabel);
this.incomingTransitions = new ReferencesTable(label, new ReferencesTableListener() {
public void handleAdd() {
addIncomingTransitions();
}
public void handleEdit(EObject element) {
editIncomingTransitions(element);
}
public void handleMove(EObject element, int oldIndex, int newIndex) {
moveIncomingTransitions(element, oldIndex, newIndex);
}
public void handleRemove(EObject element) {
removeFromIncomingTransitions(element);
}
public void navigateTo(EObject element) {
}
});
this.incomingTransitions.setHelpText(propertiesEditionComponent.getHelpContent(StatemachineViewsRepository.InitialState.Properties.incomingTransitions, StatemachineViewsRepository.SWT_KIND));
this.incomingTransitions.createControls(parent);
this.incomingTransitions.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
if (e.item != null && e.item.getData() instanceof EObject) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(InitialStatePropertiesEditionPartImpl.this, StatemachineViewsRepository.InitialState.Properties.incomingTransitions, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
}
}
});
GridData incomingTransitionsData = new GridData(GridData.FILL_HORIZONTAL);
incomingTransitionsData.horizontalSpan = 3;
this.incomingTransitions.setLayoutData(incomingTransitionsData);
this.incomingTransitions.disableMove();
incomingTransitions.setID(StatemachineViewsRepository.InitialState.Properties.incomingTransitions);
// $NON-NLS-1$
incomingTransitions.setEEFType("eef::AdvancedReferencesTable");
return parent;
}
Aggregations