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


Java IPostSelectionProvider.addPostSelectionChangedListener方法代码示例

本文整理汇总了Java中org.eclipse.jface.viewers.IPostSelectionProvider.addPostSelectionChangedListener方法的典型用法代码示例。如果您正苦于以下问题:Java IPostSelectionProvider.addPostSelectionChangedListener方法的具体用法?Java IPostSelectionProvider.addPostSelectionChangedListener怎么用?Java IPostSelectionProvider.addPostSelectionChangedListener使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.jface.viewers.IPostSelectionProvider的用法示例。


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

示例1: install

import org.eclipse.jface.viewers.IPostSelectionProvider; //导入方法依赖的package包/类
/**
 * Installs this selection changed listener with the given selection
 * provider. If the selection provider is a post selection provider,
 * post selection changed events are the preferred choice, otherwise
 * normal selection changed events are requested.
 *
 * @param selectionProvider
 */
public void install(ISelectionProvider selectionProvider) {
	if (selectionProvider == null)
		return;

	if (selectionProvider instanceof IPostSelectionProvider) {
		IPostSelectionProvider provider = (IPostSelectionProvider) selectionProvider;
		provider.addPostSelectionChangedListener(this);
	} else {
		selectionProvider.addSelectionChangedListener(this);
	}
}
 
开发者ID:angelozerr,项目名称:typescript.java,代码行数:20,代码来源:JavaScriptLightWeightEditor.java

示例2: installSelectionChangedListener

import org.eclipse.jface.viewers.IPostSelectionProvider; //导入方法依赖的package包/类
private void installSelectionChangedListener() {
	selectionChangedListener = new ISelectionChangedListener() {
		public void selectionChanged(final SelectionChangedEvent event) {
			updateStatusLine();
		}
	};
	final ISelectionProvider selectionProvider = getSelectionProvider();
	if (selectionProvider instanceof IPostSelectionProvider) {
		final IPostSelectionProvider postSelectionProvider = (IPostSelectionProvider) selectionProvider;
		postSelectionProvider.addPostSelectionChangedListener(selectionChangedListener);
	} else {
		getSelectionProvider().addSelectionChangedListener(selectionChangedListener);
	}
}
 
开发者ID:cplutte,项目名称:bts,代码行数:15,代码来源:XtextEditor.java

示例3: setupSelectionListener

import org.eclipse.jface.viewers.IPostSelectionProvider; //导入方法依赖的package包/类
private void setupSelectionListener(final IPostSelectionProvider postSelectionProvider) {
	final ISelectionChangedListener listener = new ISelectionChangedListener() {
		@Override
		public void selectionChanged(SelectionChangedEvent event) {
			setSelection(event.getSelection());
		}
	};
	postSelectionProvider.addPostSelectionChangedListener(listener);
	totalComposite.addDisposeListener(new DisposeListener() {
		@Override
		public void widgetDisposed(DisposeEvent e) {
			postSelectionProvider.removePostSelectionChangedListener(listener);
		}
	});
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:16,代码来源:MergeTotalViewer.java

示例4: follow

import org.eclipse.jface.viewers.IPostSelectionProvider; //导入方法依赖的package包/类
/**
    * Make this EnsembleSelectionProvider to listen to the
    * provided ISelectionProvider for changes. 
    * 
    * @see leave
    * @param provider
    */
public void follow(ISelectionProvider provider) {
   	if (provider instanceof IPostSelectionProvider) {
		IPostSelectionProvider postProvider = (IPostSelectionProvider) provider;
		postProvider.addPostSelectionChangedListener(selectionChangedListener);
   	} else {
   		provider.addSelectionChangedListener(selectionChangedListener);
   	}
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:16,代码来源:EnsembleSelectionProvider.java

示例5: install

import org.eclipse.jface.viewers.IPostSelectionProvider; //导入方法依赖的package包/类
/**
 * Installs this selection changed listener with the given selection provider. If
 * the selection provider is a post selection provider, post selection changed
 * events are the preferred choice, otherwise normal selection changed events
 * are requested.
 *
 * @param selectionProvider the selection provider
 */
public void install(ISelectionProvider selectionProvider) {
	if (selectionProvider == null)
		return;

	if (selectionProvider instanceof IPostSelectionProvider)  {
		IPostSelectionProvider provider= (IPostSelectionProvider) selectionProvider;
		provider.addPostSelectionChangedListener(this);
	} else  {
		selectionProvider.addSelectionChangedListener(this);
	}
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:20,代码来源:JavaEditor.java

示例6: addListener

import org.eclipse.jface.viewers.IPostSelectionProvider; //导入方法依赖的package包/类
/**
 * Add the selection changed listener
 *  
 * @param selectionProvider
 */
private void addListener(ISelectionProvider selectionProvider, ISelectionChangedListener listener) {
	if (selectionProvider instanceof IPostSelectionProvider)  {
		IPostSelectionProvider provider= (IPostSelectionProvider) selectionProvider;
		provider.addPostSelectionChangedListener(listener);
	} else  {
		selectionProvider.addSelectionChangedListener(listener);
	}
}
 
开发者ID:MulgaSoft,项目名称:e4macs,代码行数:14,代码来源:ExecuteCommandHandler.java


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