下面列出了怎么用org.eclipse.ui.views.properties.PropertySheet的API类实例代码及写法,或者点击链接到github查看源代码。
public void partActivated ( IWorkbenchPart p )
{
if ( p instanceof ContentOutline )
{
if ( ( (ContentOutline)p ).getCurrentPage () == contentOutlinePage )
{
getActionBarContributor ().setActiveEditor ( ProtocolEditor.this );
setCurrentViewer ( contentOutlineViewer );
}
}
else if ( p instanceof PropertySheet )
{
if ( propertySheetPages.contains ( ( (PropertySheet)p ).getCurrentPage () ) )
{
getActionBarContributor ().setActiveEditor ( ProtocolEditor.this );
handleActivate ();
}
}
else if ( p == ProtocolEditor.this )
{
handleActivate ();
}
}
@Override
public void partActivated ( final IWorkbenchPart p )
{
if ( p instanceof ContentOutline )
{
if ( ( (ContentOutline)p ).getCurrentPage () == ChartEditor.this.contentOutlinePage )
{
getActionBarContributor ().setActiveEditor ( ChartEditor.this );
setCurrentViewer ( ChartEditor.this.contentOutlineViewer );
}
}
else if ( p instanceof PropertySheet )
{
if ( ChartEditor.this.propertySheetPages.contains ( ( (PropertySheet)p )
.getCurrentPage () ) )
{
getActionBarContributor ().setActiveEditor ( ChartEditor.this );
handleActivate ();
}
}
else if ( p == ChartEditor.this )
{
handleActivate ();
}
}
public void partActivated ( IWorkbenchPart p )
{
if ( p instanceof ContentOutline )
{
if ( ( (ContentOutline)p ).getCurrentPage () == contentOutlinePage )
{
getActionBarContributor ().setActiveEditor ( DetailViewEditor.this );
setCurrentViewer ( contentOutlineViewer );
}
}
else if ( p instanceof PropertySheet )
{
if ( propertySheetPages.contains ( ( (PropertySheet)p ).getCurrentPage () ) )
{
getActionBarContributor ().setActiveEditor ( DetailViewEditor.this );
handleActivate ();
}
}
else if ( p == DetailViewEditor.this )
{
handleActivate ();
}
}
public void partActivated ( IWorkbenchPart p )
{
if ( p instanceof ContentOutline )
{
if ( ( (ContentOutline)p ).getCurrentPage () == contentOutlinePage )
{
getActionBarContributor ().setActiveEditor ( VisualInterfaceEditor.this );
setCurrentViewer ( contentOutlineViewer );
}
}
else if ( p instanceof PropertySheet )
{
if ( propertySheetPages.contains ( ( (PropertySheet)p ).getCurrentPage () ) )
{
getActionBarContributor ().setActiveEditor ( VisualInterfaceEditor.this );
handleActivate ();
}
}
else if ( p == VisualInterfaceEditor.this )
{
handleActivate ();
}
}
public void partActivated ( IWorkbenchPart p )
{
if ( p instanceof ContentOutline )
{
if ( ( (ContentOutline)p ).getCurrentPage () == contentOutlinePage )
{
getActionBarContributor ().setActiveEditor ( DeploymentEditor.this );
setCurrentViewer ( contentOutlineViewer );
}
}
else if ( p instanceof PropertySheet )
{
if ( propertySheetPages.contains ( ( (PropertySheet)p ).getCurrentPage () ) )
{
getActionBarContributor ().setActiveEditor ( DeploymentEditor.this );
handleActivate ();
}
}
else if ( p == DeploymentEditor.this )
{
handleActivate ();
}
}
public void partActivated ( IWorkbenchPart p )
{
if ( p instanceof ContentOutline )
{
if ( ( (ContentOutline)p ).getCurrentPage () == contentOutlinePage )
{
getActionBarContributor ().setActiveEditor ( SetupEditor.this );
setCurrentViewer ( contentOutlineViewer );
}
}
else if ( p instanceof PropertySheet )
{
if ( propertySheetPages.contains ( ( (PropertySheet)p ).getCurrentPage () ) )
{
getActionBarContributor ().setActiveEditor ( SetupEditor.this );
handleActivate ();
}
}
else if ( p == SetupEditor.this )
{
handleActivate ();
}
}
public void partActivated ( IWorkbenchPart p )
{
if ( p instanceof ContentOutline )
{
if ( ( (ContentOutline)p ).getCurrentPage () == contentOutlinePage )
{
getActionBarContributor ().setActiveEditor ( ProfileEditor.this );
setCurrentViewer ( contentOutlineViewer );
}
}
else if ( p instanceof PropertySheet )
{
if ( propertySheetPages.contains ( ( (PropertySheet)p ).getCurrentPage () ) )
{
getActionBarContributor ().setActiveEditor ( ProfileEditor.this );
handleActivate ();
}
}
else if ( p == ProfileEditor.this )
{
handleActivate ();
}
}
public void partActivated ( IWorkbenchPart p )
{
if ( p instanceof ContentOutline )
{
if ( ( (ContentOutline)p ).getCurrentPage () == contentOutlinePage )
{
getActionBarContributor ().setActiveEditor ( OsgiEditor.this );
setCurrentViewer ( contentOutlineViewer );
}
}
else if ( p instanceof PropertySheet )
{
if ( propertySheetPages.contains ( ( (PropertySheet)p ).getCurrentPage () ) )
{
getActionBarContributor ().setActiveEditor ( OsgiEditor.this );
handleActivate ();
}
}
else if ( p == OsgiEditor.this )
{
handleActivate ();
}
}
public void partActivated ( IWorkbenchPart p )
{
if ( p instanceof ContentOutline )
{
if ( ( (ContentOutline)p ).getCurrentPage () == contentOutlinePage )
{
getActionBarContributor ().setActiveEditor ( WorldEditor.this );
setCurrentViewer ( contentOutlineViewer );
}
}
else if ( p instanceof PropertySheet )
{
if ( propertySheetPages.contains ( ( (PropertySheet)p ).getCurrentPage () ) )
{
getActionBarContributor ().setActiveEditor ( WorldEditor.this );
handleActivate ();
}
}
else if ( p == WorldEditor.this )
{
handleActivate ();
}
}
public void partActivated ( IWorkbenchPart p )
{
if ( p instanceof ContentOutline )
{
if ( ( (ContentOutline)p ).getCurrentPage () == contentOutlinePage )
{
getActionBarContributor ().setActiveEditor ( MemoryEditor.this );
setCurrentViewer ( contentOutlineViewer );
}
}
else if ( p instanceof PropertySheet )
{
if ( propertySheetPages.contains ( ( (PropertySheet)p ).getCurrentPage () ) )
{
getActionBarContributor ().setActiveEditor ( MemoryEditor.this );
handleActivate ();
}
}
else if ( p == MemoryEditor.this )
{
handleActivate ();
}
}
public void partActivated ( IWorkbenchPart p )
{
if ( p instanceof ContentOutline )
{
if ( ( (ContentOutline)p ).getCurrentPage () == contentOutlinePage )
{
getActionBarContributor ().setActiveEditor ( RecipeEditor.this );
setCurrentViewer ( contentOutlineViewer );
}
}
else if ( p instanceof PropertySheet )
{
if ( propertySheetPages.contains ( ( (PropertySheet)p ).getCurrentPage () ) )
{
getActionBarContributor ().setActiveEditor ( RecipeEditor.this );
handleActivate ();
}
}
else if ( p == RecipeEditor.this )
{
handleActivate ();
}
}
public void partActivated ( IWorkbenchPart p )
{
if ( p instanceof ContentOutline )
{
if ( ( (ContentOutline)p ).getCurrentPage () == contentOutlinePage )
{
getActionBarContributor ().setActiveEditor ( InfrastructureEditor.this );
setCurrentViewer ( contentOutlineViewer );
}
}
else if ( p instanceof PropertySheet )
{
if ( propertySheetPages.contains ( ( (PropertySheet)p ).getCurrentPage () ) )
{
getActionBarContributor ().setActiveEditor ( InfrastructureEditor.this );
handleActivate ();
}
}
else if ( p == InfrastructureEditor.this )
{
handleActivate ();
}
}
public void partActivated ( IWorkbenchPart p )
{
if ( p instanceof ContentOutline )
{
if ( ( (ContentOutline)p ).getCurrentPage () == contentOutlinePage )
{
getActionBarContributor ().setActiveEditor ( SecurityEditor.this );
setCurrentViewer ( contentOutlineViewer );
}
}
else if ( p instanceof PropertySheet )
{
if ( propertySheetPages.contains ( ( (PropertySheet)p ).getCurrentPage () ) )
{
getActionBarContributor ().setActiveEditor ( SecurityEditor.this );
handleActivate ();
}
}
else if ( p == SecurityEditor.this )
{
handleActivate ();
}
}
public void partActivated ( IWorkbenchPart p )
{
if ( p instanceof ContentOutline )
{
if ( ( (ContentOutline)p ).getCurrentPage () == contentOutlinePage )
{
getActionBarContributor ().setActiveEditor ( GlobalizeEditor.this );
setCurrentViewer ( contentOutlineViewer );
}
}
else if ( p instanceof PropertySheet )
{
if ( propertySheetPages.contains ( ( (PropertySheet)p ).getCurrentPage () ) )
{
getActionBarContributor ().setActiveEditor ( GlobalizeEditor.this );
handleActivate ();
}
}
else if ( p == GlobalizeEditor.this )
{
handleActivate ();
}
}
public void partActivated ( IWorkbenchPart p )
{
if ( p instanceof ContentOutline )
{
if ( ( (ContentOutline)p ).getCurrentPage () == contentOutlinePage )
{
getActionBarContributor ().setActiveEditor ( ComponentEditor.this );
setCurrentViewer ( contentOutlineViewer );
}
}
else if ( p instanceof PropertySheet )
{
if ( propertySheetPages.contains ( ( (PropertySheet)p ).getCurrentPage () ) )
{
getActionBarContributor ().setActiveEditor ( ComponentEditor.this );
handleActivate ();
}
}
else if ( p == ComponentEditor.this )
{
handleActivate ();
}
}
public void partActivated ( IWorkbenchPart p )
{
if ( p instanceof ContentOutline )
{
if ( ( (ContentOutline)p ).getCurrentPage () == contentOutlinePage )
{
getActionBarContributor ().setActiveEditor ( ItemEditor.this );
setCurrentViewer ( contentOutlineViewer );
}
}
else if ( p instanceof PropertySheet )
{
if ( propertySheetPages.contains ( ( (PropertySheet)p ).getCurrentPage () ) )
{
getActionBarContributor ().setActiveEditor ( ItemEditor.this );
handleActivate ();
}
}
else if ( p == ItemEditor.this )
{
handleActivate ();
}
}
public void partActivated ( IWorkbenchPart p )
{
if ( p instanceof ContentOutline )
{
if ( ( (ContentOutline)p ).getCurrentPage () == contentOutlinePage )
{
getActionBarContributor ().setActiveEditor ( ConfigurationEditor.this );
setCurrentViewer ( contentOutlineViewer );
}
}
else if ( p instanceof PropertySheet )
{
if ( propertySheetPages.contains ( ( (PropertySheet)p ).getCurrentPage () ) )
{
getActionBarContributor ().setActiveEditor ( ConfigurationEditor.this );
handleActivate ();
}
}
else if ( p == ConfigurationEditor.this )
{
handleActivate ();
}
}
public void partActivated(IWorkbenchPart p) {
if (p instanceof ContentOutline) {
if (((ContentOutline)p).getCurrentPage() == contentOutlinePage) {
getActionBarContributor().setActiveEditor(CrossflowEditor.this);
setCurrentViewer(contentOutlineViewer);
}
}
else if (p instanceof PropertySheet) {
if (propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) {
getActionBarContributor().setActiveEditor(CrossflowEditor.this);
handleActivate();
}
}
else if (p == CrossflowEditor.this) {
handleActivate();
}
}
public void partActivated(IWorkbenchPart p) {
if (p instanceof ContentOutline) {
if (((ContentOutline) p).getCurrentPage() == contentOutlinePage) {
getActionBarContributor().setActiveEditor(GenconfEditor.this);
setCurrentViewer(contentOutlineViewer);
}
} else if (p instanceof PropertySheet) {
if (propertySheetPages.contains(((PropertySheet) p).getCurrentPage())) {
getActionBarContributor().setActiveEditor(GenconfEditor.this);
handleActivate();
}
} else if (p == GenconfEditor.this) {
handleActivate();
}
}
public void partActivated(IWorkbenchPart p) {
if (p instanceof ContentOutline) {
if (((ContentOutline)p).getCurrentPage() == contentOutlinePage) {
getActionBarContributor().setActiveEditor(BeansEditor.this);
setCurrentViewer(contentOutlineViewer);
}
}
else if (p instanceof PropertySheet) {
if (propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) {
getActionBarContributor().setActiveEditor(BeansEditor.this);
handleActivate();
}
}
else if (p == BeansEditor.this) {
handleActivate();
}
}
public void partActivated(IWorkbenchPart p) {
if (p instanceof ContentOutline) {
if (((ContentOutline)p).getCurrentPage() == contentOutlinePage) {
getActionBarContributor().setActiveEditor(EipEditor.this);
setCurrentViewer(contentOutlineViewer);
}
}
else if (p instanceof PropertySheet) {
if (propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) {
getActionBarContributor().setActiveEditor(EipEditor.this);
handleActivate();
}
}
else if (p == EipEditor.this) {
handleActivate();
}
}
public void partActivated(IWorkbenchPart p) {
if (p instanceof ContentOutline) {
if (((ContentOutline)p).getCurrentPage() == contentOutlinePage) {
getActionBarContributor().setActiveEditor(CoreEditor.this);
setCurrentViewer(contentOutlineViewer);
}
}
else if (p instanceof PropertySheet) {
if (propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) {
getActionBarContributor().setActiveEditor(CoreEditor.this);
handleActivate();
}
}
else if (p == CoreEditor.this) {
handleActivate();
}
}
public void partActivated(IWorkbenchPart p) {
if (p instanceof ContentOutline) {
if (((ContentOutline)p).getCurrentPage() == contentOutlinePage) {
getActionBarContributor().setActiveEditor(ExtensionsEditor.this);
setCurrentViewer(contentOutlineViewer);
}
}
else if (p instanceof PropertySheet) {
if (propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) {
getActionBarContributor().setActiveEditor(ExtensionsEditor.this);
handleActivate();
}
}
else if (p == ExtensionsEditor.this) {
handleActivate();
}
}
@Override
public void partActivated(IWorkbenchPart part) {
if (part instanceof PropertySheet) {
if (propertySheetPages.contains(((PropertySheet) part).getCurrentPage())) {
getActionBarContributor().setActiveEditor(BibtexEditor.this);
setSelection(getSelection());
}
} else if (part == BibtexEditor.this) {
ModelRegistryPlugin.getModelRegistry().setActiveDocument(document);
}
}
/**
* Handle the part activated event.
*
* @param part
* the new activated part.
*/
protected void handlePartActivated(IWorkbenchPart part) {
/*
* The properties view has been activated and the current page is this
* instance of TabbedPropertySheetPage
*/
boolean thisActivated = part instanceof PropertySheet
&& ((PropertySheet) part).getCurrentPage() == this;
/*
* When the active part changes and the part does not provide a
* selection that affects this property sheet page, the PropertySheet
* does not send us a selectionChanged() event. We need to be informed
* of these events since we want to send aboutToBeHidden() and
* aboutToBeShown() when the property sheet is hidden or shown.
*/
if (!thisActivated && !part.equals(contributor)
&& !part.getSite().getId().equals(contributor.getContributorId())) {
/*
* Is the part is a IContributedContentsView for the contributor,
* for example, outline view.
*/
IContributedContentsView view = Adapters.adapt(part, IContributedContentsView.class);
if (view == null
|| (view.getContributingPart() != null && !view
.getContributingPart().equals(contributor))) {
if (activePropertySheet) {
if (currentTab != null) {
currentTab.aboutToBeHidden();
}
activePropertySheet = false;
}
return;
}
}
if (!activePropertySheet && currentTab != null) {
currentTab.aboutToBeShown();
currentTab.refresh();
}
activePropertySheet = true;
}
/**
* Verifies the properties view for a given view part
*
* @param vp
* a view part
*/
protected void testPropertyView(IViewPart vp) {
PropertySheet pv = (PropertySheet) vp;
assertNotNull(pv);
}