org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider Java Examples

The following examples show how to use org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ConditionalRoutePropertiesEditionPartImpl.java    From eip-designer with Apache License 2.0 6 votes vote down vote up
/**
 * @param parent the parent composite
 * 
 */
protected Composite createChannelFlatComboViewer(Composite parent) {
	createDescription(parent, EipViewsRepository.ConditionalRoute.Properties.channel, EipMessages.ConditionalRoutePropertiesEditionPart_ChannelLabel);
	channel = new EObjectFlatComboViewer(parent, !propertiesEditionComponent.isRequired(EipViewsRepository.ConditionalRoute.Properties.channel, EipViewsRepository.SWT_KIND));
	channel.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

	channel.addSelectionChangedListener(new ISelectionChangedListener() {

		public void selectionChanged(SelectionChangedEvent event) {
			propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ConditionalRoutePropertiesEditionPartImpl.this, EipViewsRepository.ConditionalRoute.Properties.channel, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, null, getChannel()));
		}

	});
	GridData channelData = new GridData(GridData.FILL_HORIZONTAL);
	channel.setLayoutData(channelData);
	channel.setID(EipViewsRepository.ConditionalRoute.Properties.channel);
	SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(EipViewsRepository.ConditionalRoute.Properties.channel, EipViewsRepository.SWT_KIND), null); //$NON-NLS-1$
	// Start of user code for createChannelFlatComboViewer

	// End of user code
	return parent;
}
 
Example #2
Source File: ChartConfiguratorView.java    From neoscada with Eclipse Public License 1.0 6 votes vote down vote up
@Override
public void createPartControl ( final Composite parent )
{
    this.container = parent;
    createEditingDomain ();

    parent.setLayout ( new FillLayout () );
    this.viewer = new TreeViewer ( parent );
    this.viewer.setAutoExpandLevel ( 2 );

    this.viewer.setContentProvider ( new AdapterFactoryContentProvider ( this.factory ) );
    this.viewer.setLabelProvider ( new AdapterFactoryLabelProvider ( this.factory ) );

    createContextMenuFor ( this.viewer );

    new AdapterFactoryTreeEditor ( this.viewer.getTree (), this.factory );
    getViewSite ().setSelectionProvider ( this.viewer );

    attachSelectionService ();

    getViewSite ().getActionBars ().getMenuManager ().add ( new Separator ( "additions" ) );

    this.actionBarContributor.init ( getViewSite ().getActionBars () );
    this.actionBarContributor.setViewPart ( this );
}
 
Example #3
Source File: ChannelPropertiesEditionPartImpl.java    From eip-designer with Apache License 2.0 6 votes vote down vote up
/**
 * @param parent the parent composite
 * 
 */
protected Composite createToEndpointFlatComboViewer(Composite parent) {
	createDescription(parent, EipViewsRepository.Channel.Properties.toEndpoint, EipMessages.ChannelPropertiesEditionPart_ToEndpointLabel);
	toEndpoint = new EObjectFlatComboViewer(parent, !propertiesEditionComponent.isRequired(EipViewsRepository.Channel.Properties.toEndpoint, EipViewsRepository.SWT_KIND));
	toEndpoint.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

	toEndpoint.addSelectionChangedListener(new ISelectionChangedListener() {

		public void selectionChanged(SelectionChangedEvent event) {
			propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ChannelPropertiesEditionPartImpl.this, EipViewsRepository.Channel.Properties.toEndpoint, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, null, getToEndpoint()));
		}

	});
	GridData toEndpointData = new GridData(GridData.FILL_HORIZONTAL);
	toEndpoint.setLayoutData(toEndpointData);
	toEndpoint.setID(EipViewsRepository.Channel.Properties.toEndpoint);
	SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(EipViewsRepository.Channel.Properties.toEndpoint, EipViewsRepository.SWT_KIND), null); //$NON-NLS-1$
	// Start of user code for createToEndpointFlatComboViewer

	// End of user code
	return parent;
}
 
Example #4
Source File: ServiceInvocationPropertiesEditionPartImpl.java    From eip-designer with Apache License 2.0 6 votes vote down vote up
/**
 * @param parent the parent composite
 * 
 */
protected Composite createServiceRefFlatComboViewer(Composite parent) {
	createDescription(parent, EipViewsRepository.ServiceInvocation.Properties.serviceRef, EipMessages.ServiceInvocationPropertiesEditionPart_ServiceRefLabel);
	serviceRef = new EObjectFlatComboViewer(parent, !propertiesEditionComponent.isRequired(EipViewsRepository.ServiceInvocation.Properties.serviceRef, EipViewsRepository.SWT_KIND));
	serviceRef.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

	serviceRef.addSelectionChangedListener(new ISelectionChangedListener() {

		public void selectionChanged(SelectionChangedEvent event) {
			propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ServiceInvocationPropertiesEditionPartImpl.this, EipViewsRepository.ServiceInvocation.Properties.serviceRef, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, null, getServiceRef()));
		}

	});
	GridData serviceRefData = new GridData(GridData.FILL_HORIZONTAL);
	serviceRef.setLayoutData(serviceRefData);
	serviceRef.setID(EipViewsRepository.ServiceInvocation.Properties.serviceRef);
	SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(EipViewsRepository.ServiceInvocation.Properties.serviceRef, EipViewsRepository.SWT_KIND), null); //$NON-NLS-1$
	// Start of user code for createServiceRefFlatComboViewer

	// End of user code
	return parent;
}
 
Example #5
Source File: ChannelPropertiesEditionPartImpl.java    From eip-designer with Apache License 2.0 6 votes vote down vote up
/**
 * @param parent the parent composite
 * 
 */
protected Composite createFromEndpointFlatComboViewer(Composite parent) {
	createDescription(parent, EipViewsRepository.Channel.Properties.fromEndpoint, EipMessages.ChannelPropertiesEditionPart_FromEndpointLabel);
	fromEndpoint = new EObjectFlatComboViewer(parent, !propertiesEditionComponent.isRequired(EipViewsRepository.Channel.Properties.fromEndpoint, EipViewsRepository.SWT_KIND));
	fromEndpoint.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));

	fromEndpoint.addSelectionChangedListener(new ISelectionChangedListener() {

		public void selectionChanged(SelectionChangedEvent event) {
			propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ChannelPropertiesEditionPartImpl.this, EipViewsRepository.Channel.Properties.fromEndpoint, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, null, getFromEndpoint()));
		}

	});
	GridData fromEndpointData = new GridData(GridData.FILL_HORIZONTAL);
	fromEndpoint.setLayoutData(fromEndpointData);
	fromEndpoint.setID(EipViewsRepository.Channel.Properties.fromEndpoint);
	SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(EipViewsRepository.Channel.Properties.fromEndpoint, EipViewsRepository.SWT_KIND), null); //$NON-NLS-1$
	// Start of user code for createFromEndpointFlatComboViewer

	// End of user code
	return parent;
}
 
Example #6
Source File: OrderElementControl.java    From statecharts with Eclipse Public License 1.0 6 votes vote down vote up
private void init() {
	this.setLayout(new GridLayout(2, false));
	viewer = new TableViewer(this, SWT.SINGLE | SWT.BORDER);
	viewer.setContentProvider(new ArrayContentProvider());
	viewer.setLabelProvider(new AdapterFactoryLabelProvider(new SGraphItemProviderAdapterFactory()));
	Composite buttonComposite = getToolkit().createComposite(this);
	buttonComposite.setLayout(new FillLayout(SWT.VERTICAL));
	btnUp = getToolkit().createButton(buttonComposite, "up", SWT.PUSH);
	btnDown = getToolkit().createButton(buttonComposite, "down", SWT.PUSH);
	viewer.addSelectionChangedListener(enableButtonListener);
	viewer.addSelectionChangedListener(editPartSelectionListener);
	btnUp.addSelectionListener(upButtonListener);
	btnDown.addSelectionListener(downButtonListener);
	GridDataFactory.fillDefaults().applyTo(viewer.getControl());
	GridDataFactory.fillDefaults().applyTo(buttonComposite);
	GridDataFactory.fillDefaults().grab(true, false).applyTo(viewer.getControl());
	GridDataFactory.fillDefaults().grab(true, false).applyTo(this);
}
 
Example #7
Source File: ChannelPropertiesEditionPartForm.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
/**
 * @param parent the parent composite
 * @param widgetFactory factory to use to instanciante widget of the form
 * 
 */
protected Composite createFromEndpointFlatComboViewer(Composite parent, FormToolkit widgetFactory) {
	createDescription(parent, EipViewsRepository.Channel.Properties.fromEndpoint, EipMessages.ChannelPropertiesEditionPart_FromEndpointLabel);
	fromEndpoint = new EObjectFlatComboViewer(parent, !propertiesEditionComponent.isRequired(EipViewsRepository.Channel.Properties.fromEndpoint, EipViewsRepository.FORM_KIND));
	widgetFactory.adapt(fromEndpoint);
	fromEndpoint.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
	GridData fromEndpointData = new GridData(GridData.FILL_HORIZONTAL);
	fromEndpoint.setLayoutData(fromEndpointData);
	fromEndpoint.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(ChannelPropertiesEditionPartForm.this, EipViewsRepository.Channel.Properties.fromEndpoint, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getFromEndpoint()));
		}

	});
	fromEndpoint.setID(EipViewsRepository.Channel.Properties.fromEndpoint);
	FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(EipViewsRepository.Channel.Properties.fromEndpoint, EipViewsRepository.FORM_KIND), null); //$NON-NLS-1$
	// Start of user code for createFromEndpointFlatComboViewer

	// End of user code
	return parent;
}
 
Example #8
Source File: RouterPropertiesEditionPartImpl.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
protected Composite createTypeEMFComboViewer(Composite parent) {
	createDescription(parent, EipViewsRepository.Router.Properties.type, EipMessages.RouterPropertiesEditionPart_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(RouterPropertiesEditionPartImpl.this, EipViewsRepository.Router.Properties.type, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getType()));
		}

	});
	type.setID(EipViewsRepository.Router.Properties.type);
	SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(EipViewsRepository.Router.Properties.type, EipViewsRepository.SWT_KIND), null); //$NON-NLS-1$
	// Start of user code for createTypeEMFComboViewer

	// End of user code
	return parent;
}
 
Example #9
Source File: ChannelPropertiesEditionPartForm.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
/**
 * @param parent the parent composite
 * @param widgetFactory factory to use to instanciante widget of the form
 * 
 */
protected Composite createToEndpointFlatComboViewer(Composite parent, FormToolkit widgetFactory) {
	createDescription(parent, EipViewsRepository.Channel.Properties.toEndpoint, EipMessages.ChannelPropertiesEditionPart_ToEndpointLabel);
	toEndpoint = new EObjectFlatComboViewer(parent, !propertiesEditionComponent.isRequired(EipViewsRepository.Channel.Properties.toEndpoint, EipViewsRepository.FORM_KIND));
	widgetFactory.adapt(toEndpoint);
	toEndpoint.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
	GridData toEndpointData = new GridData(GridData.FILL_HORIZONTAL);
	toEndpoint.setLayoutData(toEndpointData);
	toEndpoint.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(ChannelPropertiesEditionPartForm.this, EipViewsRepository.Channel.Properties.toEndpoint, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getToEndpoint()));
		}

	});
	toEndpoint.setID(EipViewsRepository.Channel.Properties.toEndpoint);
	FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(EipViewsRepository.Channel.Properties.toEndpoint, EipViewsRepository.FORM_KIND), null); //$NON-NLS-1$
	// Start of user code for createToEndpointFlatComboViewer

	// End of user code
	return parent;
}
 
Example #10
Source File: RouterPropertiesEditionPartForm.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
protected Composite createTypeEMFComboViewer(FormToolkit widgetFactory, Composite parent) {
	createDescription(parent, EipViewsRepository.Router.Properties.type, EipMessages.RouterPropertiesEditionPart_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(RouterPropertiesEditionPartForm.this, EipViewsRepository.Router.Properties.type, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getType()));
		}

	});
	type.setID(EipViewsRepository.Router.Properties.type);
	FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(EipViewsRepository.Router.Properties.type, EipViewsRepository.FORM_KIND), null); //$NON-NLS-1$
	// Start of user code for createTypeEMFComboViewer

	// End of user code
	return parent;
}
 
Example #11
Source File: ServiceInvocationPropertiesEditionPartForm.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
/**
 * @param parent the parent composite
 * @param widgetFactory factory to use to instanciante widget of the form
 * 
 */
protected Composite createServiceRefFlatComboViewer(Composite parent, FormToolkit widgetFactory) {
	createDescription(parent, EipViewsRepository.ServiceInvocation.Properties.serviceRef, EipMessages.ServiceInvocationPropertiesEditionPart_ServiceRefLabel);
	serviceRef = new EObjectFlatComboViewer(parent, !propertiesEditionComponent.isRequired(EipViewsRepository.ServiceInvocation.Properties.serviceRef, EipViewsRepository.FORM_KIND));
	widgetFactory.adapt(serviceRef);
	serviceRef.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
	GridData serviceRefData = new GridData(GridData.FILL_HORIZONTAL);
	serviceRef.setLayoutData(serviceRefData);
	serviceRef.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(ServiceInvocationPropertiesEditionPartForm.this, EipViewsRepository.ServiceInvocation.Properties.serviceRef, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getServiceRef()));
		}

	});
	serviceRef.setID(EipViewsRepository.ServiceInvocation.Properties.serviceRef);
	FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(EipViewsRepository.ServiceInvocation.Properties.serviceRef, EipViewsRepository.FORM_KIND), null); //$NON-NLS-1$
	// Start of user code for createServiceRefFlatComboViewer

	// End of user code
	return parent;
}
 
Example #12
Source File: ResequencerPropertiesEditionPartForm.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
protected Composite createPartEMFComboViewer(FormToolkit widgetFactory, Composite parent) {
	createDescription(parent, EipViewsRepository.Resequencer.Properties.part, EipMessages.ResequencerPropertiesEditionPart_PartLabel);
	part = new EMFComboViewer(parent);
	part.setContentProvider(new ArrayContentProvider());
	part.setLabelProvider(new AdapterFactoryLabelProvider(EEFRuntimePlugin.getDefault().getAdapterFactory()));
	GridData partData = new GridData(GridData.FILL_HORIZONTAL);
	part.getCombo().setLayoutData(partData);
	part.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(ResequencerPropertiesEditionPartForm.this, EipViewsRepository.Resequencer.Properties.part, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getPart()));
		}

	});
	part.setID(EipViewsRepository.Resequencer.Properties.part);
	FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(EipViewsRepository.Resequencer.Properties.part, EipViewsRepository.FORM_KIND), null); //$NON-NLS-1$
	// Start of user code for createPartEMFComboViewer

	// End of user code
	return parent;
}
 
Example #13
Source File: ConditionalRoutePropertiesEditionPartForm.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
/**
 * @param parent the parent composite
 * @param widgetFactory factory to use to instanciante widget of the form
 * 
 */
protected Composite createChannelFlatComboViewer(Composite parent, FormToolkit widgetFactory) {
	createDescription(parent, EipViewsRepository.ConditionalRoute.Properties.channel, EipMessages.ConditionalRoutePropertiesEditionPart_ChannelLabel);
	channel = new EObjectFlatComboViewer(parent, !propertiesEditionComponent.isRequired(EipViewsRepository.ConditionalRoute.Properties.channel, EipViewsRepository.FORM_KIND));
	widgetFactory.adapt(channel);
	channel.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
	GridData channelData = new GridData(GridData.FILL_HORIZONTAL);
	channel.setLayoutData(channelData);
	channel.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(ConditionalRoutePropertiesEditionPartForm.this, EipViewsRepository.ConditionalRoute.Properties.channel, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getChannel()));
		}

	});
	channel.setID(EipViewsRepository.ConditionalRoute.Properties.channel);
	FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(EipViewsRepository.ConditionalRoute.Properties.channel, EipViewsRepository.FORM_KIND), null); //$NON-NLS-1$
	// Start of user code for createChannelFlatComboViewer

	// End of user code
	return parent;
}
 
Example #14
Source File: AggregatorPropertiesEditionPartForm.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
protected Composite createPartEMFComboViewer(FormToolkit widgetFactory, Composite parent) {
	createDescription(parent, EipViewsRepository.Aggregator.Properties.part, EipMessages.AggregatorPropertiesEditionPart_PartLabel);
	part = new EMFComboViewer(parent);
	part.setContentProvider(new ArrayContentProvider());
	part.setLabelProvider(new AdapterFactoryLabelProvider(EEFRuntimePlugin.getDefault().getAdapterFactory()));
	GridData partData = new GridData(GridData.FILL_HORIZONTAL);
	part.getCombo().setLayoutData(partData);
	part.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(AggregatorPropertiesEditionPartForm.this, EipViewsRepository.Aggregator.Properties.part, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getPart()));
		}

	});
	part.setID(EipViewsRepository.Aggregator.Properties.part);
	FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(EipViewsRepository.Aggregator.Properties.part, EipViewsRepository.FORM_KIND), null); //$NON-NLS-1$
	// Start of user code for createPartEMFComboViewer

	// End of user code
	return parent;
}
 
Example #15
Source File: EnricherPropertiesEditionPartImpl.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
protected Composite createPartEMFComboViewer(Composite parent) {
	createDescription(parent, EipViewsRepository.Enricher.Properties.part, EipMessages.EnricherPropertiesEditionPart_PartLabel);
	part = new EMFComboViewer(parent);
	part.setContentProvider(new ArrayContentProvider());
	part.setLabelProvider(new AdapterFactoryLabelProvider(EEFRuntimePlugin.getDefault().getAdapterFactory()));
	GridData partData = new GridData(GridData.FILL_HORIZONTAL);
	part.getCombo().setLayoutData(partData);
	part.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(EnricherPropertiesEditionPartImpl.this, EipViewsRepository.Enricher.Properties.part, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getPart()));
		}

	});
	part.setID(EipViewsRepository.Enricher.Properties.part);
	SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(EipViewsRepository.Enricher.Properties.part, EipViewsRepository.SWT_KIND), null); //$NON-NLS-1$
	// Start of user code for createPartEMFComboViewer

	// End of user code
	return parent;
}
 
Example #16
Source File: RecipientListRouterPropertiesEditionPartImpl.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
protected Composite createTypeEMFComboViewer(Composite parent) {
	createDescription(parent, EipViewsRepository.RecipientListRouter.Properties.type, EipMessages.RecipientListRouterPropertiesEditionPart_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(RecipientListRouterPropertiesEditionPartImpl.this, EipViewsRepository.RecipientListRouter.Properties.type, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getType()));
		}

	});
	type.setID(EipViewsRepository.RecipientListRouter.Properties.type);
	SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(EipViewsRepository.RecipientListRouter.Properties.type, EipViewsRepository.SWT_KIND), null); //$NON-NLS-1$
	// Start of user code for createTypeEMFComboViewer

	// End of user code
	return parent;
}
 
Example #17
Source File: AggregatorPropertiesEditionPartImpl.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
protected Composite createPartEMFComboViewer(Composite parent) {
	createDescription(parent, EipViewsRepository.Aggregator.Properties.part, EipMessages.AggregatorPropertiesEditionPart_PartLabel);
	part = new EMFComboViewer(parent);
	part.setContentProvider(new ArrayContentProvider());
	part.setLabelProvider(new AdapterFactoryLabelProvider(EEFRuntimePlugin.getDefault().getAdapterFactory()));
	GridData partData = new GridData(GridData.FILL_HORIZONTAL);
	part.getCombo().setLayoutData(partData);
	part.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(AggregatorPropertiesEditionPartImpl.this, EipViewsRepository.Aggregator.Properties.part, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getPart()));
		}

	});
	part.setID(EipViewsRepository.Aggregator.Properties.part);
	SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(EipViewsRepository.Aggregator.Properties.part, EipViewsRepository.SWT_KIND), null); //$NON-NLS-1$
	// Start of user code for createPartEMFComboViewer

	// End of user code
	return parent;
}
 
Example #18
Source File: DiagramPartitioningEditor.java    From statecharts with Eclipse Public License 1.0 5 votes vote down vote up
public void updateLabel(ViewerLabel label, TreePath elementPath) {
	Diagram lastSegment = (Diagram) elementPath.getLastSegment();
	NamedElement element = (NamedElement) lastSegment.getElement();
	AdapterFactoryLabelProvider provider = new AdapterFactoryLabelProvider(
			new SGraphItemProviderAdapterFactory());
	label.setText(provider.getText(element));
	if (element instanceof Statechart)
		label.setImage(StatechartImages.LOGO.image());
	else
		label.setImage(provider.getImage(element));

}
 
Example #19
Source File: EnricherPropertiesEditionPartForm.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
protected Composite createPartEMFComboViewer(FormToolkit widgetFactory, Composite parent) {
	createDescription(parent, EipViewsRepository.Enricher.Properties.part, EipMessages.EnricherPropertiesEditionPart_PartLabel);
	part = new EMFComboViewer(parent);
	part.setContentProvider(new ArrayContentProvider());
	part.setLabelProvider(new AdapterFactoryLabelProvider(EEFRuntimePlugin.getDefault().getAdapterFactory()));
	GridData partData = new GridData(GridData.FILL_HORIZONTAL);
	part.getCombo().setLayoutData(partData);
	part.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(EnricherPropertiesEditionPartForm.this, EipViewsRepository.Enricher.Properties.part, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getPart()));
		}

	});
	part.setID(EipViewsRepository.Enricher.Properties.part);
	FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(EipViewsRepository.Enricher.Properties.part, EipViewsRepository.FORM_KIND), null); //$NON-NLS-1$
	// Start of user code for createPartEMFComboViewer

	// End of user code
	return parent;
}
 
Example #20
Source File: RecipientListRouterPropertiesEditionPartForm.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
protected Composite createTypeEMFComboViewer(FormToolkit widgetFactory, Composite parent) {
	createDescription(parent, EipViewsRepository.RecipientListRouter.Properties.type, EipMessages.RecipientListRouterPropertiesEditionPart_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(RecipientListRouterPropertiesEditionPartForm.this, EipViewsRepository.RecipientListRouter.Properties.type, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getType()));
		}

	});
	type.setID(EipViewsRepository.RecipientListRouter.Properties.type);
	FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(EipViewsRepository.RecipientListRouter.Properties.type, EipViewsRepository.FORM_KIND), null); //$NON-NLS-1$
	// Start of user code for createTypeEMFComboViewer

	// End of user code
	return parent;
}
 
Example #21
Source File: RoutePropertiesEditionPartForm.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
protected Composite createExchangeTypeEMFComboViewer(FormToolkit widgetFactory, Composite parent) {
	createDescription(parent, EipViewsRepository.Route.Properties.exchangeType, EipMessages.RoutePropertiesEditionPart_ExchangeTypeLabel);
	exchangeType = new EMFComboViewer(parent);
	exchangeType.setContentProvider(new ArrayContentProvider());
	exchangeType.setLabelProvider(new AdapterFactoryLabelProvider(EEFRuntimePlugin.getDefault().getAdapterFactory()));
	GridData exchangeTypeData = new GridData(GridData.FILL_HORIZONTAL);
	exchangeType.getCombo().setLayoutData(exchangeTypeData);
	exchangeType.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(RoutePropertiesEditionPartForm.this, EipViewsRepository.Route.Properties.exchangeType, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getExchangeType()));
		}

	});
	exchangeType.setID(EipViewsRepository.Route.Properties.exchangeType);
	FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(EipViewsRepository.Route.Properties.exchangeType, EipViewsRepository.FORM_KIND), null); //$NON-NLS-1$
	// Start of user code for createExchangeTypeEMFComboViewer

	// End of user code
	return parent;
}
 
Example #22
Source File: DiagramPartitioningEditor.java    From statecharts with Eclipse Public License 1.0 5 votes vote down vote up
protected void initializeTitle(Diagram diagram) {
	EObject element = diagram.getElement();
	AdapterFactoryLabelProvider labelProvider = new AdapterFactoryLabelProvider(
			new SGraphItemProviderAdapterFactory());
	setTitleImage(labelProvider.getImage(element));
	setPartName(labelProvider.getText(element));
}
 
Example #23
Source File: DiagramPartitioningEditor.java    From statecharts with Eclipse Public License 1.0 5 votes vote down vote up
protected void initializeTitle(IDiagramEditorInput input) {
	Diagram diagram = input.getDiagram();
	EObject element = diagram.getElement();
	AdapterFactoryLabelProvider labelProvider = new AdapterFactoryLabelProvider(
			new SGraphItemProviderAdapterFactory());
	setTitleImage(labelProvider.getImage(element));
	setPartName(labelProvider.getText(element));
}
 
Example #24
Source File: DiagramPartitioningEditor.java    From statecharts with Eclipse Public License 1.0 5 votes vote down vote up
protected void initializeTitle(SubmachineEditorInput input) {
	Diagram diagram = input.getDiagram();
	EObject element = diagram.getElement();
	AdapterFactoryLabelProvider labelProvider = new AdapterFactoryLabelProvider(
			new SGraphItemProviderAdapterFactory());
	setTitleImage(labelProvider.getImage(element));
	initializeTitle(diagram);
	setPartName(((SubmachineEditorInput) input).getContext() + " : " + labelProvider.getText(element));

}
 
Example #25
Source File: DiagramPartitioningBreadcrumbViewer.java    From statecharts with Eclipse Public License 1.0 5 votes vote down vote up
protected TreeViewer createDiagramViewer(final Composite composite, Diagram diagram) {
	TreeViewer viewer = new TreeViewer(composite);
	viewer.setLabelProvider(new AdapterFactoryLabelProvider(new SGraphItemProviderAdapterFactory()));
	viewer.setContentProvider(new AdapterFactoryContentProvider(new BreadcrumbItemProviderAdapterFactory()));
	EObject element = diagram.getElement();
	viewer.setInput(element);
	viewer.addSelectionChangedListener(this);
	return viewer;
}
 
Example #26
Source File: ResequencerPropertiesEditionPartImpl.java    From eip-designer with Apache License 2.0 5 votes vote down vote up
protected Composite createPartEMFComboViewer(Composite parent) {
	createDescription(parent, EipViewsRepository.Resequencer.Properties.part, EipMessages.ResequencerPropertiesEditionPart_PartLabel);
	part = new EMFComboViewer(parent);
	part.setContentProvider(new ArrayContentProvider());
	part.setLabelProvider(new AdapterFactoryLabelProvider(EEFRuntimePlugin.getDefault().getAdapterFactory()));
	GridData partData = new GridData(GridData.FILL_HORIZONTAL);
	part.getCombo().setLayoutData(partData);
	part.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(ResequencerPropertiesEditionPartImpl.this, EipViewsRepository.Resequencer.Properties.part, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getPart()));
		}

	});
	part.setID(EipViewsRepository.Resequencer.Properties.part);
	SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(EipViewsRepository.Resequencer.Properties.part, EipViewsRepository.SWT_KIND), null); //$NON-NLS-1$
	// Start of user code for createPartEMFComboViewer

	// End of user code
	return parent;
}
 
Example #27
Source File: BeansEditor.java    From hybris-commerce-eclipse-plugin with Apache License 2.0 4 votes vote down vote up
/**
 * This accesses a cached version of the content outliner.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IContentOutlinePage getContentOutlinePage() {
	if (contentOutlinePage == null) {
		// The content outline is just a tree.
		//
		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;
}
 
Example #28
Source File: XtendJvmLabelProvider.java    From xtext-xtend with Eclipse Public License 2.0 4 votes vote down vote up
@Inject
public XtendJvmLabelProvider(final AdapterFactoryLabelProvider delegate) {
  super(delegate);
}
 
Example #29
Source File: PureXbaseLabelProvider.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
@Inject
public PureXbaseLabelProvider(AdapterFactoryLabelProvider delegate) {
	super(delegate);
}
 
Example #30
Source File: DefaultEObjectLabelProvider.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
@Inject
public DefaultEObjectLabelProvider(AdapterFactoryLabelProvider delegate) {
	super(delegate);
}