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

The following examples show how to use org.eclipse.emf.edit.ui.provider.AdapterFactoryContentProvider. 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: ContractConstraintExpressionDialogCellEditorTest.java    From bonita-studio with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @throws java.lang.Exception
 */
@Before
public void setUp() throws Exception {
    composite = realm.createComposite();
    final Contract contract = ProcessFactory.eINSTANCE.createContract();
    constraint = ProcessFactory.eINSTANCE.createContractConstraint();
    contract.getConstraints().add(constraint);
    adapterFactoryContentProvider = new AdapterFactoryContentProvider(
            new ProcessItemProviderAdapterFactory());
    when(constraintEditorFactory.openConstraintEditor(any(Shell.class),
            eq(constraint),
            eq(adapterFactoryContentProvider))).thenReturn(Dialog.OK);
    cellEditor = new ContractConstraintExpressionDialogCellEditor(composite,
            constraint,
            adapterFactoryContentProvider,
            constraintEditorFactory);

}
 
Example #2
Source File: ProfileEditor.java    From neoscada with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage ()
{
    PropertySheetPage propertySheetPage = new ExtendedPropertySheetPage ( editingDomain, ExtendedPropertySheetPage.Decoration.MANUAL) {
        @Override
        public void setSelectionToViewer ( List<?> selection )
        {
            ProfileEditor.this.setSelectionToViewer ( selection );
            ProfileEditor.this.setFocus ();
        }

        @Override
        public void setActionBars ( IActionBars actionBars )
        {
            super.setActionBars ( actionBars );
            getActionBarContributor ().shareGlobalActions ( this, actionBars );
        }
    };
    propertySheetPage.setPropertySourceProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
    propertySheetPages.add ( propertySheetPage );

    return propertySheetPage;
}
 
Example #3
Source File: SetupEditor.java    From neoscada with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage ()
{
    PropertySheetPage propertySheetPage = new ExtendedPropertySheetPage ( editingDomain, ExtendedPropertySheetPage.Decoration.MANUAL) {
        @Override
        public void setSelectionToViewer ( List<?> selection )
        {
            SetupEditor.this.setSelectionToViewer ( selection );
            SetupEditor.this.setFocus ();
        }

        @Override
        public void setActionBars ( IActionBars actionBars )
        {
            super.setActionBars ( actionBars );
            getActionBarContributor ().shareGlobalActions ( this, actionBars );
        }
    };
    propertySheetPage.setPropertySourceProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
    propertySheetPages.add ( propertySheetPage );

    return propertySheetPage;
}
 
Example #4
Source File: DetailViewEditor.java    From neoscada with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage ()
{
    PropertySheetPage propertySheetPage =
            new ExtendedPropertySheetPage ( editingDomain )
            {
                @Override
                public void setSelectionToViewer ( List<?> selection )
                {
                    DetailViewEditor.this.setSelectionToViewer ( selection );
                    DetailViewEditor.this.setFocus ();
                }

                @Override
                public void setActionBars ( IActionBars actionBars )
                {
                    super.setActionBars ( actionBars );
                    getActionBarContributor ().shareGlobalActions ( this, actionBars );
                }
            };
    propertySheetPage.setPropertySourceProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
    propertySheetPages.add ( propertySheetPage );

    return propertySheetPage;
}
 
Example #5
Source File: DeploymentEditor.java    From neoscada with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage ()
{
    PropertySheetPage propertySheetPage = new ExtendedPropertySheetPage ( editingDomain, ExtendedPropertySheetPage.Decoration.MANUAL) {
        @Override
        public void setSelectionToViewer ( List<?> selection )
        {
            DeploymentEditor.this.setSelectionToViewer ( selection );
            DeploymentEditor.this.setFocus ();
        }

        @Override
        public void setActionBars ( IActionBars actionBars )
        {
            super.setActionBars ( actionBars );
            getActionBarContributor ().shareGlobalActions ( this, actionBars );
        }
    };
    propertySheetPage.setPropertySourceProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
    propertySheetPages.add ( propertySheetPage );

    return propertySheetPage;
}
 
Example #6
Source File: ChartEditor.java    From neoscada with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * 
 * @generated
 */
public IPropertySheetPage getPropertySheetPage ()
{
    final PropertySheetPage propertySheetPage = new ExtendedPropertySheetPage (
            this.editingDomain ) {
        @Override
        public void setSelectionToViewer ( final List<?> selection )
        {
            ChartEditor.this.setSelectionToViewer ( selection );
            ChartEditor.this.setFocus ();
        }

        @Override
        public void setActionBars ( final IActionBars actionBars )
        {
            super.setActionBars ( actionBars );
            getActionBarContributor ().shareGlobalActions ( this, actionBars );
        }
    };
    propertySheetPage
            .setPropertySourceProvider ( new AdapterFactoryContentProvider (
                    this.adapterFactory ) );
    this.propertySheetPages.add ( propertySheetPage );

    return propertySheetPage;
}
 
Example #7
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 #8
Source File: VisualInterfaceEditor.java    From neoscada with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage ()
{
    PropertySheetPage propertySheetPage = new ExtendedPropertySheetPage ( editingDomain ) {
        @Override
        public void setSelectionToViewer ( List<?> selection )
        {
            VisualInterfaceEditor.this.setSelectionToViewer ( selection );
            VisualInterfaceEditor.this.setFocus ();
        }

        @Override
        public void setActionBars ( IActionBars actionBars )
        {
            super.setActionBars ( actionBars );
            getActionBarContributor ().shareGlobalActions ( this, actionBars );
        }
    };
    propertySheetPage.setPropertySourceProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
    propertySheetPages.add ( propertySheetPage );

    return propertySheetPage;
}
 
Example #9
Source File: ChartConfiguratorView.java    From neoscada with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * This accesses a cached version of the property sheet. <!-- begin-user-doc
 * --> <!-- end-user-doc -->
 *
 * @generated
 */
public IPropertySheetPage getPropertySheetPage ()
{
    if ( this.propertySheetPage == null )
    {
        this.propertySheetPage = new ExtendedPropertySheetPage ( this.editingDomain ) {
            @Override
            public void setSelectionToViewer ( final List<?> selection )
            {
                ChartConfiguratorView.this.setSelectionToViewer ( selection );
                ChartConfiguratorView.this.setFocus ();
            }

            @Override
            public void setActionBars ( final IActionBars actionBars )
            {
                super.setActionBars ( actionBars );
                // getActionBarContributor ().shareGlobalActions ( this, actionBars );
            }
        };
        this.propertySheetPage.setPropertySourceProvider ( new AdapterFactoryContentProvider ( this.factory ) );
    }

    return this.propertySheetPage;
}
 
Example #10
Source File: OsgiEditor.java    From neoscada with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage ()
{
    PropertySheetPage propertySheetPage = new ExtendedPropertySheetPage ( editingDomain, ExtendedPropertySheetPage.Decoration.MANUAL) {
        @Override
        public void setSelectionToViewer ( List<?> selection )
        {
            OsgiEditor.this.setSelectionToViewer ( selection );
            OsgiEditor.this.setFocus ();
        }

        @Override
        public void setActionBars ( IActionBars actionBars )
        {
            super.setActionBars ( actionBars );
            getActionBarContributor ().shareGlobalActions ( this, actionBars );
        }
    };
    propertySheetPage.setPropertySourceProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
    propertySheetPages.add ( propertySheetPage );

    return propertySheetPage;
}
 
Example #11
Source File: WorldEditor.java    From neoscada with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage ()
{
    PropertySheetPage propertySheetPage = new ExtendedPropertySheetPage ( editingDomain, ExtendedPropertySheetPage.Decoration.MANUAL) {
        @Override
        public void setSelectionToViewer ( List<?> selection )
        {
            WorldEditor.this.setSelectionToViewer ( selection );
            WorldEditor.this.setFocus ();
        }

        @Override
        public void setActionBars ( IActionBars actionBars )
        {
            super.setActionBars ( actionBars );
            getActionBarContributor ().shareGlobalActions ( this, actionBars );
        }
    };
    propertySheetPage.setPropertySourceProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
    propertySheetPages.add ( propertySheetPage );

    return propertySheetPage;
}
 
Example #12
Source File: MemoryEditor.java    From neoscada with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage ()
{
    PropertySheetPage propertySheetPage = new ExtendedPropertySheetPage ( editingDomain) {
        @Override
        public void setSelectionToViewer ( List<?> selection )
        {
            MemoryEditor.this.setSelectionToViewer ( selection );
            MemoryEditor.this.setFocus ();
        }

        @Override
        public void setActionBars ( IActionBars actionBars )
        {
            super.setActionBars ( actionBars );
            getActionBarContributor ().shareGlobalActions ( this, actionBars );
        }
    };
    propertySheetPage.setPropertySourceProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
    propertySheetPages.add ( propertySheetPage );

    return propertySheetPage;
}
 
Example #13
Source File: RecipeEditor.java    From neoscada with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage ()
{
    PropertySheetPage propertySheetPage = new ExtendedPropertySheetPage ( editingDomain, ExtendedPropertySheetPage.Decoration.MANUAL) {
        @Override
        public void setSelectionToViewer ( List<?> selection )
        {
            RecipeEditor.this.setSelectionToViewer ( selection );
            RecipeEditor.this.setFocus ();
        }

        @Override
        public void setActionBars ( IActionBars actionBars )
        {
            super.setActionBars ( actionBars );
            getActionBarContributor ().shareGlobalActions ( this, actionBars );
        }
    };
    propertySheetPage.setPropertySourceProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
    propertySheetPages.add ( propertySheetPage );

    return propertySheetPage;
}
 
Example #14
Source File: GlobalizeEditor.java    From neoscada with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage ()
{
    PropertySheetPage propertySheetPage = new ExtendedPropertySheetPage ( editingDomain ) {
        @Override
        public void setSelectionToViewer ( List<?> selection )
        {
            GlobalizeEditor.this.setSelectionToViewer ( selection );
            GlobalizeEditor.this.setFocus ();
        }

        @Override
        public void setActionBars ( IActionBars actionBars )
        {
            super.setActionBars ( actionBars );
            getActionBarContributor ().shareGlobalActions ( this, actionBars );
        }
    };
    propertySheetPage.setPropertySourceProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
    propertySheetPages.add ( propertySheetPage );

    return propertySheetPage;
}
 
Example #15
Source File: ProtocolEditor.java    From neoscada with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage ()
{
    PropertySheetPage propertySheetPage =
            new ExtendedPropertySheetPage ( editingDomain )
            {
                @Override
                public void setSelectionToViewer ( List<?> selection )
                {
                    ProtocolEditor.this.setSelectionToViewer ( selection );
                    ProtocolEditor.this.setFocus ();
                }

                @Override
                public void setActionBars ( IActionBars actionBars )
                {
                    super.setActionBars ( actionBars );
                    getActionBarContributor ().shareGlobalActions ( this, actionBars );
                }
            };
    propertySheetPage.setPropertySourceProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
    propertySheetPages.add ( propertySheetPage );

    return propertySheetPage;
}
 
Example #16
Source File: ContractConstraintsTableViewer.java    From bonita-studio with GNU General Public License v2.0 6 votes vote down vote up
public void initialize(final IViewerController constraintController, final IMessageManager messageManager,
        final EMFDataBindingContext emfDataBindingContext) {
    this.messageManager = messageManager;
    this.constraintController = constraintController;
    this.emfDataBindingContext = emfDataBindingContext;
    final ProcessItemProviderAdapterFactory adapterFactory = new ProcessItemProviderAdapterFactory();
    propertySourceProvider = new AdapterFactoryContentProvider(adapterFactory);
    adapterFactoryLabelProvider = new AdapterFactoryLabelProvider(adapterFactory);
    getTable().setHeaderVisible(true);
    getTable().setLinesVisible(true);
    setContentProvider(new ObservableListContentProvider());

    final CellNavigationStrategy cellNavigationStrategy = new AddRowOnEnterCellNavigationStrategy(this, constraintController);
    final TableViewerFocusCellManager focusCellManager = new TableViewerFocusCellManager(this, new FocusCellOwnerDrawHighlighter(
            this), cellNavigationStrategy);

    TableViewerEditor.create(this, focusCellManager, new CharriageColumnViewerEditorActivationStrategy(this), ColumnViewerEditor.TABBING_HORIZONTAL |
            ColumnViewerEditor.TABBING_MOVE_TO_ROW_NEIGHBOR |
            ColumnViewerEditor.TABBING_VERTICAL |
            ColumnViewerEditor.KEYBOARD_ACTIVATION);

    ColumnViewerToolTipSupport.enableFor(this);
    createColumns();
    configureTableLayout();
}
 
Example #17
Source File: ActorMappingConfigurationWizardPage.java    From bonita-studio with GNU General Public License v2.0 6 votes vote down vote up
protected void createMappingTree(final Composite listComposite) {
    mappingTree = new TreeViewer(listComposite, SWT.BORDER | SWT.FULL_SELECTION | SWT.SINGLE | SWT.V_SCROLL);
    mappingTree.getTree().setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create());
    mappingTree.setContentProvider(new AdapterFactoryContentProvider(adapterFactory) {

        @Override
        public Object[] getElements(final Object object) {
            if (object instanceof Collection) {
                return ((Collection) object).toArray();
            }
            return super.getElements(object);
        }
    });
    mappingTree.setLabelProvider(new ActorMappingStyledTreeLabelProvider(adapterFactory, deployedOrganization));
    mappingTree.addSelectionChangedListener(this);
    mappingTree.addDoubleClickListener(this);
    mappingTree.addFilter(new ViewerFilter() {

        @Override
        public boolean select(final Viewer viewer, final Object parentElement, final Object element) {
            return (element instanceof String || element instanceof MembershipType)
                    || ((ITreeContentProvider) mappingTree.getContentProvider()).hasChildren(element);
        }
    });
}
 
Example #18
Source File: ExtensionsEditor.java    From ifml-editor with MIT License 6 votes vote down vote up
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage() {
	PropertySheetPage propertySheetPage =
		new ExtendedPropertySheetPage(editingDomain) {
			@Override
			public void setSelectionToViewer(List<?> selection) {
				ExtensionsEditor.this.setSelectionToViewer(selection);
				ExtensionsEditor.this.setFocus();
			}

			@Override
			public void setActionBars(IActionBars actionBars) {
				super.setActionBars(actionBars);
				getActionBarContributor().shareGlobalActions(this, actionBars);
			}
		};
	propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
	propertySheetPages.add(propertySheetPage);

	return propertySheetPage;
}
 
Example #19
Source File: CoreEditor.java    From ifml-editor with MIT License 6 votes vote down vote up
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage() {
	PropertySheetPage propertySheetPage =
		new ExtendedPropertySheetPage(editingDomain) {
			@Override
			public void setSelectionToViewer(List<?> selection) {
				CoreEditor.this.setSelectionToViewer(selection);
				CoreEditor.this.setFocus();
			}

			@Override
			public void setActionBars(IActionBars actionBars) {
				super.setActionBars(actionBars);
				getActionBarContributor().shareGlobalActions(this, actionBars);
			}
		};
	propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
	propertySheetPages.add(propertySheetPage);

	return propertySheetPage;
}
 
Example #20
Source File: EipEditor.java    From eip-designer with Apache License 2.0 6 votes vote down vote up
/**
   * This accesses a cached version of the property sheet.
   * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
   * @generated
   */
public IPropertySheetPage getPropertySheetPage() {
     PropertySheetPage propertySheetPage =
        new ExtendedPropertySheetPage(editingDomain) {
           @Override
           public void setSelectionToViewer(List<?> selection) {
              EipEditor.this.setSelectionToViewer(selection);
              EipEditor.this.setFocus();
           }

           @Override
           public void setActionBars(IActionBars actionBars) {
              super.setActionBars(actionBars);
              getActionBarContributor().shareGlobalActions(this, actionBars);
           }
        };
     propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
     propertySheetPages.add(propertySheetPage);

     return propertySheetPage;
  }
 
Example #21
Source File: BeansEditor.java    From hybris-commerce-eclipse-plugin with Apache License 2.0 6 votes vote down vote up
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage() {
	PropertySheetPage propertySheetPage =
		new ExtendedPropertySheetPage(editingDomain) {
			@Override
			public void setSelectionToViewer(List<?> selection) {
				BeansEditor.this.setSelectionToViewer(selection);
				BeansEditor.this.setFocus();
			}

			@Override
			public void setActionBars(IActionBars actionBars) {
				super.setActionBars(actionBars);
				getActionBarContributor().shareGlobalActions(this, actionBars);
			}
		};
	propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
	propertySheetPages.add(propertySheetPage);

	return propertySheetPage;
}
 
Example #22
Source File: GenconfEditor.java    From M2Doc with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * 
 * @generated
 */
public IPropertySheetPage getPropertySheetPage() {
    PropertySheetPage propertySheetPage = new ExtendedPropertySheetPage(editingDomain) {
        @Override
        public void setSelectionToViewer(List<?> selection) {
            GenconfEditor.this.setSelectionToViewer(selection);
            GenconfEditor.this.setFocus();
        }

        @Override
        public void setActionBars(IActionBars actionBars) {
            super.setActionBars(actionBars);
            getActionBarContributor().shareGlobalActions(this, actionBars);
        }
    };
    propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
    propertySheetPages.add(propertySheetPage);

    return propertySheetPage;
}
 
Example #23
Source File: CrossflowEditor.java    From scava with Eclipse Public License 2.0 6 votes vote down vote up
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage() {
	PropertySheetPage propertySheetPage =
		new ExtendedPropertySheetPage(editingDomain, ExtendedPropertySheetPage.Decoration.NONE, null, 0, false) {
			@Override
			public void setSelectionToViewer(List<?> selection) {
				CrossflowEditor.this.setSelectionToViewer(selection);
				CrossflowEditor.this.setFocus();
			}

			@Override
			public void setActionBars(IActionBars actionBars) {
				super.setActionBars(actionBars);
				getActionBarContributor().shareGlobalActions(this, actionBars);
			}
		};
	propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
	propertySheetPages.add(propertySheetPage);

	return propertySheetPage;
}
 
Example #24
Source File: ConfigurationEditor.java    From neoscada with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage ()
{
    PropertySheetPage propertySheetPage =
            new ExtendedPropertySheetPage ( editingDomain )
            {
                @Override
                public void setSelectionToViewer ( List<?> selection )
                {
                    ConfigurationEditor.this.setSelectionToViewer ( selection );
                    ConfigurationEditor.this.setFocus ();
                }

                @Override
                public void setActionBars ( IActionBars actionBars )
                {
                    super.setActionBars ( actionBars );
                    getActionBarContributor ().shareGlobalActions ( this, actionBars );
                }
            };
    propertySheetPage.setPropertySourceProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
    propertySheetPages.add ( propertySheetPage );

    return propertySheetPage;
}
 
Example #25
Source File: ItemEditor.java    From neoscada with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage ()
{
    PropertySheetPage propertySheetPage =
            new ExtendedPropertySheetPage ( editingDomain )
            {
                @Override
                public void setSelectionToViewer ( List<?> selection )
                {
                    ItemEditor.this.setSelectionToViewer ( selection );
                    ItemEditor.this.setFocus ();
                }

                @Override
                public void setActionBars ( IActionBars actionBars )
                {
                    super.setActionBars ( actionBars );
                    getActionBarContributor ().shareGlobalActions ( this, actionBars );
                }
            };
    propertySheetPage.setPropertySourceProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
    propertySheetPages.add ( propertySheetPage );

    return propertySheetPage;
}
 
Example #26
Source File: SecurityEditor.java    From neoscada with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage ()
{
    PropertySheetPage propertySheetPage =
            new ExtendedPropertySheetPage ( editingDomain )
            {
                @Override
                public void setSelectionToViewer ( List<?> selection )
                {
                    SecurityEditor.this.setSelectionToViewer ( selection );
                    SecurityEditor.this.setFocus ();
                }

                @Override
                public void setActionBars ( IActionBars actionBars )
                {
                    super.setActionBars ( actionBars );
                    getActionBarContributor ().shareGlobalActions ( this, actionBars );
                }
            };
    propertySheetPage.setPropertySourceProvider ( new AdapterFactoryContentProvider ( adapterFactory ) );
    propertySheetPages.add ( propertySheetPage );

    return propertySheetPage;
}
 
Example #27
Source File: ContractInputTypeEditingSupportTest.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void should_initializeCellEditorValue_add_ICellEditorListener() throws Exception {
    viewer = new TableViewer(parent);
    contractInputTypeEditingSupport = new ContractInputTypeEditingSupport(viewer,
            new AdapterFactoryContentProvider(new ProcessItemProviderAdapterFactory()),
            new ContractInputController(new FakeProgressService()),
            refactorOperationFactory, new FakeProgressService(), transactionalEditingDomainFactory);

    when(cell.getElement()).thenReturn(ProcessFactory.eINSTANCE.createContractInput());
    contractInputTypeEditingSupport.initializeCellEditorValue(cellEditor, cell);
    verify(cellEditor).addListener(contractInputTypeEditingSupport);
}
 
Example #28
Source File: OutlineDialog.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
private void createOutline(final Composite viewersComposite) {
    outline = new TreeViewer(viewersComposite);
    outline.getTree().setLayoutData(GridDataFactory.fillDefaults().hint(300,200).create());
    outline.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
    outline.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
    final ViewerFilter[] filters = {new OutlineFilter()};
    outline.setFilters(filters);
    outline.setInput(ModelHelper.getParentProcess((EObject) elementToDisplay.get(0)));
}
 
Example #29
Source File: MoveConnectorWizardPage.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
private void createProcessTreeControl(final EMFDataBindingContext dbc, final Composite parent) {
    final Label label = new Label(parent, SWT.NONE);
    label.setLayoutData(GridDataFactory.swtDefaults().span(2, 1).create());
    label.setText(Messages.chooseTargetStepOrProcess);

    final TreeViewer processTreeViewer = new FilteredTree(parent, SWT.BORDER | SWT.SINGLE, new PatternFilter(), true).getViewer();
    processTreeViewer.getControl().getParent().setLayoutData(GridDataFactory.fillDefaults().grab(true, true).span(2, 1).hint(SWT.DEFAULT, 300).create());
    processTreeViewer.setLabelProvider(new ElementLabelProvider(adapterFactory));
    processTreeViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
    processTreeViewer.addFilter(new ConnectableElementViewerFilter(sourceProcess));
    processTreeViewer.setInput(ModelHelper.getMainProcess(sourceProcess));
    processTreeViewer.expandAll();
    dbc.bindValue(ViewersObservables.observeSingleSelection(processTreeViewer), targetLocationObservable,
            updateValueStrategy().withValidator(selectionValidator()).create(), null);
}
 
Example #30
Source File: InputNameCellLabelProviderTest.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
@Test
public void should_display_contract_input_name_as_text() throws Exception {
    final InputNameCellLabelProvider labelProvider = new InputNameCellLabelProvider(new AdapterFactoryContentProvider(
            new ProcessItemProviderAdapterFactory()), new WritableSet());

    assertThat(labelProvider.getText(aContractInput().withName("myInput").build())).isEqualTo("myInput");
}