org.eclipse.ui.views.properties.IPropertySheetPage Java Examples

The following examples show how to use org.eclipse.ui.views.properties.IPropertySheetPage. 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: ERDiagramEditor.java    From ermaster-b with Apache License 2.0 6 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public Object getAdapter(Class type) {
	if (type == ZoomManager.class) {
		return ((ScalableFreeformRootEditPart) getGraphicalViewer()
				.getRootEditPart()).getZoomManager();
	}

	if (type == IContentOutlinePage.class) {
		return this.outlinePage;
	}

	if (type == IGotoMarker.class) {
		return this.gotoMaker;
	}

	if (type == IPropertySheetPage.class) {
		return this.propertySheetPage;
	}

	return super.getAdapter(type);
}
 
Example #2
Source File: VisualInterfaceEditor.java    From neoscada with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * This is how the framework determines which interfaces we implement.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@SuppressWarnings ( "rawtypes" )
@Override
public Object getAdapter ( Class key )
{
    if ( key.equals ( IContentOutlinePage.class ) )
    {
        return showOutlineView () ? getContentOutlinePage () : null;
    }
    else if ( key.equals ( IPropertySheetPage.class ) )
    {
        return getPropertySheetPage ();
    }
    else if ( key.equals ( IGotoMarker.class ) )
    {
        return this;
    }
    else
    {
        return super.getAdapter ( key );
    }
}
 
Example #3
Source File: SetupEditor.java    From neoscada with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * This is how the framework determines which interfaces we implement.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@SuppressWarnings ( "rawtypes" )
@Override
public Object getAdapter ( Class key )
{
    if ( key.equals ( IContentOutlinePage.class ) )
    {
        return showOutlineView () ? getContentOutlinePage () : null;
    }
    else if ( key.equals ( IPropertySheetPage.class ) )
    {
        return getPropertySheetPage ();
    }
    else if ( key.equals ( IGotoMarker.class ) )
    {
        return this;
    }
    else
    {
        return super.getAdapter ( key );
    }
}
 
Example #4
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 #5
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 #6
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 #7
Source File: GlobalizeEditor.java    From neoscada with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * This is how the framework determines which interfaces we implement.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@SuppressWarnings ( "rawtypes" )
@Override
public Object getAdapter ( Class key )
{
    if ( key.equals ( IContentOutlinePage.class ) )
    {
        return showOutlineView () ? getContentOutlinePage () : null;
    }
    else if ( key.equals ( IPropertySheetPage.class ) )
    {
        return getPropertySheetPage ();
    }
    else if ( key.equals ( IGotoMarker.class ) )
    {
        return this;
    }
    else
    {
        return super.getAdapter ( key );
    }
}
 
Example #8
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 #9
Source File: ComponentEditor.java    From neoscada with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * This is how the framework determines which interfaces we implement.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@SuppressWarnings ( "rawtypes" )
@Override
public Object getAdapter ( Class key )
{
    if ( key.equals ( IContentOutlinePage.class ) )
    {
        return showOutlineView () ? getContentOutlinePage () : null;
    }
    else if ( key.equals ( IPropertySheetPage.class ) )
    {
        return getPropertySheetPage ();
    }
    else if ( key.equals ( IGotoMarker.class ) )
    {
        return this;
    }
    else
    {
        return super.getAdapter ( key );
    }
}
 
Example #10
Source File: ComponentEditor.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 NOT
 */
public IPropertySheetPage getPropertySheetPage ()
{
    final ExtendedSortedPropertySheetPage propertySheetPage = new ExtendedSortedPropertySheetPage ( this.editingDomain, ExtendedPropertySheetPage.Decoration.MANUAL, ComponentEditorPlugin.getPlugin ().getDialogSettings ()) {
        @Override
        public void setSelectionToViewer ( final List<?> selection )
        {
            ComponentEditor.this.setSelectionToViewer ( selection );
            ComponentEditor.this.setFocus ();
        }

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

    return propertySheetPage;
}
 
Example #11
Source File: ItemEditor.java    From neoscada with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * This is how the framework determines which interfaces we implement.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@SuppressWarnings ( "rawtypes" )
@Override
public Object getAdapter ( Class key )
{
    if ( key.equals ( IContentOutlinePage.class ) )
    {
        return showOutlineView () ? getContentOutlinePage () : null;
    }
    else if ( key.equals ( IPropertySheetPage.class ) )
    {
        return getPropertySheetPage ();
    }
    else if ( key.equals ( IGotoMarker.class ) )
    {
        return this;
    }
    else
    {
        return super.getAdapter ( key );
    }
}
 
Example #12
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 #13
Source File: ConfigurationEditor.java    From neoscada with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * This is how the framework determines which interfaces we implement.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@SuppressWarnings ( "rawtypes" )
@Override
public Object getAdapter ( Class key )
{
    if ( key.equals ( IContentOutlinePage.class ) )
    {
        return showOutlineView () ? getContentOutlinePage () : null;
    }
    else if ( key.equals ( IPropertySheetPage.class ) )
    {
        return getPropertySheetPage ();
    }
    else if ( key.equals ( IGotoMarker.class ) )
    {
        return this;
    }
    else
    {
        return super.getAdapter ( key );
    }
}
 
Example #14
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 #15
Source File: CrossflowEditor.java    From scava with Eclipse Public License 2.0 6 votes vote down vote up
/**
 * This is how the framework determines which interfaces we implement.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public <T> T getAdapter(Class<T> key) {
	if (key.equals(IContentOutlinePage.class)) {
		return showOutlineView() ? key.cast(getContentOutlinePage()) : null;
	}
	else if (key.equals(IPropertySheetPage.class)) {
		return key.cast(getPropertySheetPage());
	}
	else if (key.equals(IGotoMarker.class)) {
		return key.cast(this);
	}
	else {
		return super.getAdapter(key);
	}
}
 
Example #16
Source File: BeansEditor.java    From hybris-commerce-eclipse-plugin with Apache License 2.0 6 votes vote down vote up
/**
 * This is how the framework determines which interfaces we implement.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@SuppressWarnings("rawtypes")
@Override
public Object getAdapter(Class key) {
	if (key.equals(IContentOutlinePage.class)) {
		return showOutlineView() ? getContentOutlinePage() : null;
	}
	else if (key.equals(IPropertySheetPage.class)) {
		return getPropertySheetPage();
	}
	else if (key.equals(IGotoMarker.class)) {
		return this;
	}
	else {
		return super.getAdapter(key);
	}
}
 
Example #17
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 #18
Source File: ProtocolEditor.java    From neoscada with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * This is how the framework determines which interfaces we implement.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@SuppressWarnings ( "rawtypes" )
@Override
public Object getAdapter ( Class key )
{
    if ( key.equals ( IContentOutlinePage.class ) )
    {
        return showOutlineView () ? getContentOutlinePage () : null;
    }
    else if ( key.equals ( IPropertySheetPage.class ) )
    {
        return getPropertySheetPage ();
    }
    else if ( key.equals ( IGotoMarker.class ) )
    {
        return this;
    }
    else
    {
        return super.getAdapter ( key );
    }
}
 
Example #19
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 #20
Source File: ERDiagramMultiPageEditor.java    From ermasterr with Apache License 2.0 6 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public Object getAdapter(final Class type) {
    if (type == ERDiagram.class) {
        return diagram;

    } else if (type == IGotoMarker.class) {
        return gotoMaker;
    }

    else if (type == IPropertySheetPage.class) {
        return propertySheetPage;
    }

    return super.getAdapter(type);
}
 
Example #21
Source File: PropertyPageAdapterFactory.java    From spotbugs with GNU Lesser General Public License v2.1 6 votes vote down vote up
@Override
@SuppressWarnings("rawtypes")
public Object getAdapter(Object adaptableObject, Class adapterType) {
    if (adapterType == IPropertySheetPage.class) {
        if (adaptableObject instanceof BugExplorerView || adaptableObject instanceof AbstractFindbugsView) {
            return new BugPropertySheetPage();
        }
    }
    if (adapterType == IPropertySource.class) {
        if (adaptableObject instanceof BugPattern || adaptableObject instanceof BugInstance
                || adaptableObject instanceof DetectorFactory || adaptableObject instanceof Plugin
                || adaptableObject instanceof BugGroup
                || adaptableObject instanceof BugAnnotation) {
            return new PropertySource(adaptableObject);
        }
        IMarker marker = Util.getAdapter(IMarker.class, adaptableObject);
        if (!MarkerUtil.isFindBugsMarker(marker)) {
            return null;
        }
        return new MarkerPropertySource(marker);
    }
    return null;
}
 
Example #22
Source File: EipEditor.java    From eip-designer with Apache License 2.0 6 votes vote down vote up
/**
   * This is how the framework determines which interfaces we implement.
   * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
   * @generated
   */
@SuppressWarnings("rawtypes")
@Override
public Object getAdapter(Class key) {
     if (key.equals(IContentOutlinePage.class)) {
        return showOutlineView() ? getContentOutlinePage() : null;
     }
     else if (key.equals(IPropertySheetPage.class)) {
        return getPropertySheetPage();
     }
     else if (key.equals(IGotoMarker.class)) {
        return this;
     }
     else {
        return super.getAdapter(key);
     }
  }
 
Example #23
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 #24
Source File: MainDiagramEditor.java    From erflute with Apache License 2.0 6 votes vote down vote up
@Override
public Object getAdapter(@SuppressWarnings("rawtypes") Class type) {
    if (type == ZoomManager.class) {
        return ((ScalableFreeformRootEditPart) getGraphicalViewer().getRootEditPart()).getZoomManager();
    }
    if (type == IContentOutlinePage.class) {
        return outlinePage;
    }
    if (type == IGotoMarker.class) {
        return gotoMaker;
    }
    if (type == IPropertySheetPage.class) {
        return propertySheetPage;
    }
    return super.getAdapter(type);
}
 
Example #25
Source File: BibtexEditor.java    From slr-toolkit 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) {
			BibtexEditor.this.setFocus();
		}

		@Override
		public void setActionBars(IActionBars actionBars) {
			super.setActionBars(actionBars);
		}
	};
	propertySheetPage.setPropertySourceProvider(contentProvider);
	propertySheetPages.add(propertySheetPage);
	propertySheetPage.handleEntrySelection(getSelection());
	propertySheetPage.setRootEntry(null);
	return propertySheetPage;
}
 
Example #26
Source File: CoreEditor.java    From ifml-editor with MIT License 6 votes vote down vote up
/**
 * This is how the framework determines which interfaces we implement.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@SuppressWarnings("rawtypes")
	@Override
public Object getAdapter(Class key) {
	if (key.equals(IContentOutlinePage.class)) {
		return showOutlineView() ? getContentOutlinePage() : null;
	}
	else if (key.equals(IPropertySheetPage.class)) {
		return getPropertySheetPage();
	}
	else if (key.equals(IGotoMarker.class)) {
		return this;
	}
	else {
		return super.getAdapter(key);
	}
}
 
Example #27
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 #28
Source File: ExtensionsEditor.java    From ifml-editor with MIT License 6 votes vote down vote up
/**
 * This is how the framework determines which interfaces we implement.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@SuppressWarnings("rawtypes")
	@Override
public Object getAdapter(Class key) {
	if (key.equals(IContentOutlinePage.class)) {
		return showOutlineView() ? getContentOutlinePage() : null;
	}
	else if (key.equals(IPropertySheetPage.class)) {
		return getPropertySheetPage();
	}
	else if (key.equals(IGotoMarker.class)) {
		return this;
	}
	else {
		return super.getAdapter(key);
	}
}
 
Example #29
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 #30
Source File: MigrationStatusView.java    From bonita-studio with GNU General Public License v2.0 6 votes vote down vote up
@SuppressWarnings("rawtypes")
@Override
public Object getAdapter(final Class adapter) {
    if (adapter == IPropertySheetPage.class) {
        return getSite().getPage().getActiveEditor().getAdapter(adapter);
    } else if (adapter == IEditingDomainProvider.class) {
        return new IEditingDomainProvider() {

            @Override
            public EditingDomain getEditingDomain() {
                final IEditorPart part = getSite().getPage().getActiveEditor();
                if (part instanceof DiagramEditor) {
                    return ((DiagramEditor) part).getEditingDomain();
                }
                return null;
            }
        };
    }
    return super.getAdapter(adapter);
}