类org.eclipse.ui.views.contentoutline.ContentOutline源码实例Demo

下面列出了怎么用org.eclipse.ui.views.contentoutline.ContentOutline的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: neoscada   文件: ProtocolEditor.java
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 ();
    }
}
 
源代码2 项目: neoscada   文件: ChartEditor.java
@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 ();
    }
}
 
源代码3 项目: neoscada   文件: DetailViewEditor.java
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 ();
    }
}
 
源代码4 项目: neoscada   文件: VisualInterfaceEditor.java
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 ();
    }
}
 
源代码5 项目: neoscada   文件: DeploymentEditor.java
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 ();
    }
}
 
源代码6 项目: neoscada   文件: SetupEditor.java
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 ();
    }
}
 
源代码7 项目: neoscada   文件: ProfileEditor.java
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 ();
    }
}
 
源代码8 项目: neoscada   文件: OsgiEditor.java
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 ();
    }
}
 
源代码9 项目: neoscada   文件: WorldEditor.java
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 ();
    }
}
 
源代码10 项目: neoscada   文件: MemoryEditor.java
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 ();
    }
}
 
源代码11 项目: neoscada   文件: RecipeEditor.java
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 ();
    }
}
 
源代码12 项目: neoscada   文件: InfrastructureEditor.java
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 ();
    }
}
 
源代码13 项目: neoscada   文件: SecurityEditor.java
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 ();
    }
}
 
源代码14 项目: neoscada   文件: GlobalizeEditor.java
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 ();
    }
}
 
源代码15 项目: neoscada   文件: ComponentEditor.java
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 ();
    }
}
 
源代码16 项目: neoscada   文件: ItemEditor.java
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 ();
    }
}
 
源代码17 项目: neoscada   文件: ConfigurationEditor.java
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 ();
    }
}
 
源代码18 项目: scava   文件: CrossflowEditor.java
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();
	}
}
 
源代码19 项目: M2Doc   文件: GenconfEditor.java
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();
	}
}
 
源代码21 项目: eip-designer   文件: EipEditor.java
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();
   }
}
 
源代码22 项目: APICloud-Studio   文件: ExpandLevelHandler.java
public Object execute(ExecutionEvent event) throws ExecutionException
{
	// assumes to expand to level 1 if not specified
	int level = 1;
	String levelStr = event.getParameter(LEVEL);
	if (levelStr != null)
	{
		level = Integer.parseInt(levelStr);
	}

	IWorkbenchPart part = HandlerUtil.getActivePart(event);
	if (part instanceof ContentOutline)
	{
		IPage page = ((ContentOutline) part).getCurrentPage();
		if (page instanceof CommonOutlinePage)
		{
			CommonOutlinePage outlinePage = (CommonOutlinePage) page;
			// we want to expand to the specified level and collapse everything below
			outlinePage.collapseAll();
			outlinePage.expandToLevel(level);
		}
	}
	return null;
}
 
源代码23 项目: ifml-editor   文件: CoreEditor.java
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();
	}
}
 
源代码24 项目: ifml-editor   文件: ExtensionsEditor.java
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();
	}
}
 
源代码25 项目: birt   文件: AddElementtoReport.java
public Object getTarget( )
{
	IViewPart viewPart = UIUtil.getView( IPageLayout.ID_OUTLINE );
	if ( !( viewPart instanceof ContentOutline ) )
	{
		return null;
	}
	ContentOutline outlineView = (ContentOutline) viewPart;

	ISelection selection = outlineView.getSelection( );
	if ( selection instanceof StructuredSelection )
	{
		StructuredSelection strSelection = (StructuredSelection) selection;
		if ( strSelection.size( ) == 1 )
		{
			return strSelection.getFirstElement( );
		}
	}
	return null;
}
 
源代码26 项目: xds-ide   文件: ModulaOutlinePage.java
@Override
public void partVisible(IWorkbenchPartReference partRef) {
    IWorkbenchPart part= partRef.getPart(false);
    if (part instanceof ContentOutline) {
        isViewVisible= true;
    }
}
 
源代码27 项目: xds-ide   文件: ModulaOutlinePage.java
@Override
public void partHidden(IWorkbenchPartReference partRef) {
    IWorkbenchPart part= partRef.getPart(false);
    if (part instanceof ContentOutline) {
        isViewVisible= false;
    }
}
 
源代码28 项目: xds-ide   文件: ModulaOutlinePage.java
@Override
public void partClosed(IWorkbenchPartReference partRef) {
    IWorkbenchPart part = partRef.getPart(false);
    if (part instanceof ContentOutline) {
    	isViewVisible = false;
    }
    if (part instanceof ITextEditor) {
        waitForControl();
    }
}
 
源代码29 项目: xtext-xtend   文件: FieldInitializerUtil.java
public IJavaElement getSelectedResource(IStructuredSelection selection) {
	IJavaElement elem = null;
	if(selection != null && !selection.isEmpty()){
		Object o = selection.getFirstElement();
		elem = Adapters.adapt(o, IJavaElement.class);
		if(elem == null){
			elem = getPackage(o);
		}
	}
	if (elem == null) {
		IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
		IWorkbenchPart part = activePage.getActivePart();
		if (part instanceof ContentOutline) {
			part= activePage.getActiveEditor();
		}
		if (part instanceof XtextEditor) {
			IXtextDocument doc = ((XtextEditor)part).getDocument();
			IFile file = Adapters.adapt(doc, IFile.class);
			elem = getPackage(file);
		}
	}
	if (elem == null || elem.getElementType() == IJavaElement.JAVA_MODEL) {
		try {
			IJavaProject[] projects= JavaCore.create(ResourcesPlugin.getWorkspace().getRoot()).getJavaProjects();
			if (projects.length == 1) {
				elem= projects[0];
			}
		} catch (JavaModelException e) {
			throw new RuntimeException(e.getMessage());
		}
	}
	return elem;
}
 
源代码30 项目: APICloud-Studio   文件: CollapseAllHandler.java
public Object execute(ExecutionEvent event) throws ExecutionException
{
	IWorkbenchPart part = HandlerUtil.getActivePart(event);
	if (part instanceof ContentOutline)
	{
		IPage page = ((ContentOutline) part).getCurrentPage();
		if (page instanceof CommonOutlinePage)
		{
			((CommonOutlinePage) page).collapseAll();
		}
	}
	return null;
}
 
 类所在包
 类方法
 同包方法