use of org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider in project InformationSystem by ObeoNetwork.
the class CinematicEditor method getContentOutlinePage.
/**
* This accesses a cached version of the content outliner.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public IContentOutlinePage getContentOutlinePage() {
if (contentOutlinePage == null) {
//
class MyContentOutlinePage extends ContentOutlinePage {
@Override
public void createControl(Composite parent) {
super.createControl(parent);
contentOutlineViewer = getTreeViewer();
contentOutlineViewer.addSelectionChangedListener(this);
// Set up the tree viewer.
//
contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
contentOutlineViewer.setInput(editingDomain.getResourceSet());
// Make sure our popups work.
//
createContextMenuFor(contentOutlineViewer);
if (!editingDomain.getResourceSet().getResources().isEmpty()) {
// Select the root object in the view.
//
contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
}
}
@Override
public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) {
super.makeContributions(menuManager, toolBarManager, statusLineManager);
contentOutlineStatusLineManager = statusLineManager;
}
@Override
public void setActionBars(IActionBars actionBars) {
super.setActionBars(actionBars);
getActionBarContributor().shareGlobalActions(this, actionBars);
}
}
contentOutlinePage = new MyContentOutlinePage();
// Listen to selection so that we can handle it is a special way.
//
contentOutlinePage.addSelectionChangedListener(new ISelectionChangedListener() {
// This ensures that we handle selections correctly.
//
public void selectionChanged(SelectionChangedEvent event) {
handleContentOutlineSelection(event.getSelection());
}
});
}
return contentOutlinePage;
}
use of org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider in project InformationSystem by ObeoNetwork.
the class ViewContainerPropertiesEditionPartImpl method createWidgetFlatComboViewer.
/**
* @param parent the parent composite
*/
protected Composite createWidgetFlatComboViewer(Composite parent) {
createDescription(parent, ViewViewsRepository.ViewContainer.Properties.widget, ViewMessages.ViewContainerPropertiesEditionPart_WidgetLabel);
widget = new EObjectFlatComboViewer(parent, !propertiesEditionComponent.isRequired(ViewViewsRepository.ViewContainer.Properties.widget, ViewViewsRepository.SWT_KIND));
widget.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
widget.addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewContainerPropertiesEditionPartImpl.this, ViewViewsRepository.ViewContainer.Properties.widget, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, null, getWidget()));
}
});
GridData widgetData = new GridData(GridData.FILL_HORIZONTAL);
widget.setLayoutData(widgetData);
widget.setID(ViewViewsRepository.ViewContainer.Properties.widget);
// $NON-NLS-1$
SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(ViewViewsRepository.ViewContainer.Properties.widget, ViewViewsRepository.SWT_KIND), null);
// End of user code
return parent;
}
use of org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider in project InformationSystem by ObeoNetwork.
the class ViewContainerReferencePropertiesEditionPartImpl method createViewContainerFlatComboViewer.
/**
* @param parent the parent composite
*/
protected Composite createViewContainerFlatComboViewer(Composite parent) {
createDescription(parent, ViewViewsRepository.ViewContainerReference.Properties.viewContainer, ViewMessages.ViewContainerReferencePropertiesEditionPart_ViewContainerLabel);
viewContainer = new EObjectFlatComboViewer(parent, !propertiesEditionComponent.isRequired(ViewViewsRepository.ViewContainerReference.Properties.viewContainer, ViewViewsRepository.SWT_KIND));
viewContainer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
viewContainer.addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewContainerReferencePropertiesEditionPartImpl.this, ViewViewsRepository.ViewContainerReference.Properties.viewContainer, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, null, getViewContainer()));
}
});
GridData viewContainerData = new GridData(GridData.FILL_HORIZONTAL);
viewContainer.setLayoutData(viewContainerData);
viewContainer.setID(ViewViewsRepository.ViewContainerReference.Properties.viewContainer);
// $NON-NLS-1$
SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(ViewViewsRepository.ViewContainerReference.Properties.viewContainer, ViewViewsRepository.SWT_KIND), null);
// End of user code
return parent;
}
use of org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider in project InformationSystem by ObeoNetwork.
the class ViewContainerReferencePropertiesEditionPartImpl method createWidgetFlatComboViewer.
/**
* @param parent the parent composite
*/
protected Composite createWidgetFlatComboViewer(Composite parent) {
createDescription(parent, ViewViewsRepository.ViewContainerReference.Properties.widget, ViewMessages.ViewContainerReferencePropertiesEditionPart_WidgetLabel);
widget = new EObjectFlatComboViewer(parent, !propertiesEditionComponent.isRequired(ViewViewsRepository.ViewContainerReference.Properties.widget, ViewViewsRepository.SWT_KIND));
widget.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
widget.addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewContainerReferencePropertiesEditionPartImpl.this, ViewViewsRepository.ViewContainerReference.Properties.widget, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, null, getWidget()));
}
});
GridData widgetData = new GridData(GridData.FILL_HORIZONTAL);
widget.setLayoutData(widgetData);
widget.setID(ViewViewsRepository.ViewContainerReference.Properties.widget);
// $NON-NLS-1$
SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(ViewViewsRepository.ViewContainerReference.Properties.widget, ViewViewsRepository.SWT_KIND), null);
// End of user code
return parent;
}
use of org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider in project InformationSystem by ObeoNetwork.
the class ViewElementPropertiesEditionPartImpl method createTypeFlatComboViewer.
/**
* @param parent the parent composite
*/
protected Composite createTypeFlatComboViewer(Composite parent) {
createDescription(parent, ViewViewsRepository.ViewElement.Properties.type, ViewMessages.ViewElementPropertiesEditionPart_TypeLabel);
type = new EObjectFlatComboViewer(parent, !propertiesEditionComponent.isRequired(ViewViewsRepository.ViewElement.Properties.type, ViewViewsRepository.SWT_KIND));
type.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
type.addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewElementPropertiesEditionPartImpl.this, ViewViewsRepository.ViewElement.Properties.type, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, null, getType()));
}
});
GridData typeData = new GridData(GridData.FILL_HORIZONTAL);
type.setLayoutData(typeData);
type.setID(ViewViewsRepository.ViewElement.Properties.type);
// $NON-NLS-1$
SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(ViewViewsRepository.ViewElement.Properties.type, ViewViewsRepository.SWT_KIND), null);
// End of user code
return parent;
}
Aggregations