本文整理汇总了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 () );
}
}
示例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);
}
示例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);
}
示例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();
}
示例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;
}
示例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();
}
示例7: init
import org.eclipse.ui.navigator.ICommonContentExtensionSite; //导入依赖的package包/类
@Override
public void init(ICommonContentExtensionSite aConfig) {
// Nothing to initialize here.
}
示例8: init
import org.eclipse.ui.navigator.ICommonContentExtensionSite; //导入依赖的package包/类
@Override
public void init(ICommonContentExtensionSite aConfig) {
}
示例9: init
import org.eclipse.ui.navigator.ICommonContentExtensionSite; //导入依赖的package包/类
@Override
public void init(ICommonContentExtensionSite aConfig) {
// TODO Auto-generated method stub
}
示例10: init
import org.eclipse.ui.navigator.ICommonContentExtensionSite; //导入依赖的package包/类
@Override
public void init(ICommonContentExtensionSite site) {
}
示例11: init
import org.eclipse.ui.navigator.ICommonContentExtensionSite; //导入依赖的package包/类
@Override
public void init(
ICommonContentExtensionSite paramICommonContentExtensionSite) {
}
示例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);
}
}
示例13: init
import org.eclipse.ui.navigator.ICommonContentExtensionSite; //导入依赖的package包/类
public void init(ICommonContentExtensionSite aConfig) {
}
示例14: init
import org.eclipse.ui.navigator.ICommonContentExtensionSite; //导入依赖的package包/类
public void init(ICommonContentExtensionSite aConfig) {
//init
}
示例15: init
import org.eclipse.ui.navigator.ICommonContentExtensionSite; //导入依赖的package包/类
public void init(ICommonContentExtensionSite config) {
this.site = config;
}