当前位置: 首页>>代码示例>>Java>>正文


Java ICommonContentExtensionSite类代码示例

本文整理汇总了Java中org.eclipse.ui.navigator.ICommonContentExtensionSite的典型用法代码示例。如果您正苦于以下问题:Java ICommonContentExtensionSite类的具体用法?Java ICommonContentExtensionSite怎么用?Java ICommonContentExtensionSite使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ICommonContentExtensionSite类属于org.eclipse.ui.navigator包,在下文中一共展示了ICommonContentExtensionSite类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import org.eclipse.ui.navigator.ICommonContentExtensionSite; //导入依赖的package包/类
@Override
public void init ( final ICommonContentExtensionSite config )
{
    final ITreeContentProvider contentProvider = config.getService ().getContentExtensionById ( this.contentExtensionId ).getContentProvider ();
    if ( contentProvider instanceof ObservableSetTreeContentProvider )
    {
        addSource ( ( (ObservableSetTreeContentProvider)contentProvider ).getKnownElements () );
    }
    else if ( contentProvider instanceof ObservableSetContentProvider )
    {
        addSource ( ( (ObservableSetContentProvider)contentProvider ).getKnownElements () );
    }
    else if ( contentProvider instanceof ObservableListContentProvider )
    {
        addSource ( ( (ObservableListContentProvider)contentProvider ).getKnownElements () );
    }
    else if ( contentProvider instanceof ObservableListTreeContentProvider )
    {
        addSource ( ( (ObservableListTreeContentProvider)contentProvider ).getKnownElements () );
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:22,代码来源:CommonListeningLabelProvider.java

示例2: init

import org.eclipse.ui.navigator.ICommonContentExtensionSite; //导入依赖的package包/类
public void init(ICommonContentExtensionSite commonContentExtensionSite) {
	IExtensionStateModel stateModel = commonContentExtensionSite
			.getExtensionStateModel();
	IMemento memento = commonContentExtensionSite.getMemento();

	fStateModel = stateModel;
	restoreState(memento);
	fLayoutPropertyListener = new IPropertyChangeListener() {
		public void propertyChange(PropertyChangeEvent event) {
			if (Values.IS_LAYOUT_FLAT.equals(event.getProperty())) {
				if (event.getNewValue() != null) {
					boolean newValue = ((Boolean) event.getNewValue())
							.booleanValue() ? true : false;
					setIsFlatLayout(newValue);
				}
			}

		}
	};
	fStateModel.addPropertyChangeListener(fLayoutPropertyListener);

	IPreferenceStore store = PreferenceConstants.getPreferenceStore();
	boolean showCUChildren = store
			.getBoolean(PreferenceConstants.SHOW_CU_CHILDREN);
	setProvideMembers(showCUChildren);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:27,代码来源:JavaNavigatorContentProvider.java

示例3: init

import org.eclipse.ui.navigator.ICommonContentExtensionSite; //导入依赖的package包/类
public void init(ICommonContentExtensionSite commonContentExtensionSite) {
	fStateModel = commonContentExtensionSite.getExtensionStateModel();
	fContentProvider = (PackageExplorerContentProvider) commonContentExtensionSite.getExtension().getContentProvider();
	delegeteLabelProvider = createLabelProvider();

	delegeteLabelProvider.setIsFlatLayout(fStateModel
			.getBooleanProperty(Values.IS_LAYOUT_FLAT));
	fLayoutPropertyListener = new IPropertyChangeListener() {
		public void propertyChange(PropertyChangeEvent event) {
			if (Values.IS_LAYOUT_FLAT.equals(event.getProperty())) {
				if (event.getNewValue() != null) {
					boolean newValue = ((Boolean) event.getNewValue())
							.booleanValue() ? true : false;
					delegeteLabelProvider.setIsFlatLayout(newValue);
				}
			}

		}
	};
	fStateModel.addPropertyChangeListener(fLayoutPropertyListener);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:22,代码来源:JavaNavigatorLabelProvider.java

示例4: init

import org.eclipse.ui.navigator.ICommonContentExtensionSite; //导入依赖的package包/类
public void init(ICommonContentExtensionSite aConfig) {
	NavigatorContentService cs = (NavigatorContentService) aConfig.getService();
	viewer = (CommonViewer) cs.getViewer();
	projectExplorer = viewer.getCommonNavigator();
	
	extensionStateModel = aConfig.getExtensionStateModel();
	extensionStateModel.addPropertyChangeListener(rootModeListener);
	updateRootMode();
	
}
 
开发者ID:heartsome,项目名称:translationstudio8,代码行数:11,代码来源:WorkingSetsContentProvider.java

示例5: isBugFilterActive

import org.eclipse.ui.navigator.ICommonContentExtensionSite; //导入依赖的package包/类
public static boolean isBugFilterActive(ICommonContentExtensionSite site) {
    ViewerFilter[] visibleFilters = site.getService().getFilterService().getVisibleFilters(true);
    for (ViewerFilter filter : visibleFilters) {
        if (filter instanceof BugByIdFilter) {
            return true;
        }
    }
    return false;
}
 
开发者ID:OpenNTF,项目名称:FindBug-for-Domino-Designer,代码行数:10,代码来源:BugContentProvider.java

示例6: init

import org.eclipse.ui.navigator.ICommonContentExtensionSite; //导入依赖的package包/类
/**
 * Starts listening to property changes related to which should be the top-level elements to be shown.
 */
public void init(ICommonContentExtensionSite aConfig, CommonViewer viewer) {
    //if it had something, dispose of its association!
    this.dispose();
    try {
        extensionStateModel = viewer.getNavigatorContentService().findStateModel(
                WorkingSetsContentProvider.EXTENSION_ID);

        extensionStateModel.addPropertyChangeListener(rootModeListener);
    } catch (Exception e) {
        Log.log(e);
    }
    updateRootMode();
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:17,代码来源:TopLevelProjectsOrWorkingSetChoice.java

示例7: init

import org.eclipse.ui.navigator.ICommonContentExtensionSite; //导入依赖的package包/类
@Override
public void init(ICommonContentExtensionSite aConfig) {
	// Nothing to initialize here.
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:5,代码来源:N4JSProjectExplorerContentProvider.java

示例8: init

import org.eclipse.ui.navigator.ICommonContentExtensionSite; //导入依赖的package包/类
@Override
public void init(ICommonContentExtensionSite aConfig) {
}
 
开发者ID:angelozerr,项目名称:ec4e,代码行数:4,代码来源:EditorConfigContentProvider.java

示例9: init

import org.eclipse.ui.navigator.ICommonContentExtensionSite; //导入依赖的package包/类
@Override
public void init(ICommonContentExtensionSite aConfig) {
	// TODO Auto-generated method stub

}
 
开发者ID:angelozerr,项目名称:ec4e,代码行数:6,代码来源:EditorConfigLabelProvider.java

示例10: init

import org.eclipse.ui.navigator.ICommonContentExtensionSite; //导入依赖的package包/类
@Override
public void init(ICommonContentExtensionSite site) {
}
 
开发者ID:angelozerr,项目名称:jsbuild-eclipse,代码行数:4,代码来源:NavigatorJSBuildFileLabelProvider.java

示例11: init

import org.eclipse.ui.navigator.ICommonContentExtensionSite; //导入依赖的package包/类
@Override
public void init(
		ICommonContentExtensionSite paramICommonContentExtensionSite) {

}
 
开发者ID:angelozerr,项目名称:jsbuild-eclipse,代码行数:6,代码来源:NavigatorJSBuildFileContentProvider.java

示例12: init

import org.eclipse.ui.navigator.ICommonContentExtensionSite; //导入依赖的package包/类
/**
     * @see org.eclipse.ui.navigator.ICommonContentProvider#init(org.eclipse.ui.navigator.ICommonContentExtensionSite)
     */
	public void init(ICommonContentExtensionSite config) {
		if (loginListener == null) {
			loginListener = new UMLNexcoreLoginListener() {
				/**
				 * 
				 * @see nexcore.tool.uml.core.util.UMLNexcoreLoginListener#changed(nexcore.tool.uml.core.util.UMLNexcoreLoginEvent)
				 */
				public void changed(UMLNexcoreLoginEvent arg0) {
					// 2011-05-16 modified by nspark
					// 프로젝트 탐색기 새로고침 처리는 ResourcManager#addLoginListener 에서
					// 처리한다.
					// ViewerRegistry.getViewer().refresh();
				    
				    for (final IWorkbenchWindow window : PlatformUI.getWorkbench().getWorkbenchWindows()) {
			            IEditorReference[] editorRefs = window.getActivePage().getEditorReferences();

			            for (IEditorReference ref : editorRefs) {
                            final IEditorPart editor = ref.getEditor(false);
                            if (editor instanceof AbstractDiagramEditor) {
                                ((AbstractDiagramEditor) editor).closeEditor(true);

                            } else if (editor instanceof ModelMultiPageEditor) {
                                ((ModelMultiPageEditor) editor).close(true);
                            }
                        }
				    }
//					IEditorPart[] editors = getActivePage().getEditors();
//					for (int i = 0; i < editors.length; i++) {
//
//						if (editors[i] instanceof AbstractDiagramEditor) {
//							((AbstractDiagramEditor) editors[i])
//									.closeEditor(true);
//						} else if (editors[i] instanceof ModelMultiPageEditor) {
//							((ModelMultiPageEditor) editors[i]).close(true);
//						}
//					}

					if (UMLLoginController.getInstance().getLoginState() != UMLNexcoreLoginEvent.LOG_IN) {
						ResourceManager.setChecked(true);
					} else {
						ResourceManager.setChecked(false);
					}
				}
			};

			UMLLoginController.addLoginListener(loginListener);
		}
	}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:52,代码来源:UMLContentProvider.java

示例13: init

import org.eclipse.ui.navigator.ICommonContentExtensionSite; //导入依赖的package包/类
public void init(ICommonContentExtensionSite aConfig) {
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:3,代码来源:StatechartNavigatorContentProvider.java

示例14: init

import org.eclipse.ui.navigator.ICommonContentExtensionSite; //导入依赖的package包/类
public void init(ICommonContentExtensionSite aConfig) {
	//init
}
 
开发者ID:heartsome,项目名称:translationstudio8,代码行数:4,代码来源:ResourceExtensionLabelProvider.java

示例15: init

import org.eclipse.ui.navigator.ICommonContentExtensionSite; //导入依赖的package包/类
public void init(ICommonContentExtensionSite config) {
    this.site = config;
}
 
开发者ID:OpenNTF,项目名称:FindBug-for-Domino-Designer,代码行数:4,代码来源:BugContentProvider.java


注:本文中的org.eclipse.ui.navigator.ICommonContentExtensionSite类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。