本文整理汇总了Java中org.eclipse.ui.ISelectionListener类的典型用法代码示例。如果您正苦于以下问题:Java ISelectionListener类的具体用法?Java ISelectionListener怎么用?Java ISelectionListener使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ISelectionListener类属于org.eclipse.ui包,在下文中一共展示了ISelectionListener类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setupListener
import org.eclipse.ui.ISelectionListener; //导入依赖的package包/类
protected void setupListener()
{
// register as selection listener
selListener = new ISelectionListener()
{
@Override
public void selectionChanged(final IWorkbenchPart part,
final ISelection selection)
{
// are we following the selection?
if (followSelection.isChecked())
{
newSelection(selection);
}
}
};
getSite().getWorkbenchWindow().getSelectionService().addSelectionListener(
selListener);
}
示例2: addListeners
import org.eclipse.ui.ISelectionListener; //导入依赖的package包/类
/**
* addListeners
*/
private void addListeners()
{
// this.listenForScriptChanges();
ISelectionService selectionService = getSite().getWorkbenchWindow().getSelectionService();
// @formatter:off
selectionService.addPostSelectionListener(
IPageLayout.ID_PROJECT_EXPLORER,
new ISelectionListener() {
public void selectionChanged(IWorkbenchPart part, ISelection selection)
{
if (part != IndexView.this && selection instanceof IStructuredSelection)
{
setInputFromSelection(selection);
}
}
}
);
// @formatter:on
}
示例3: addSelectionListener
import org.eclipse.ui.ISelectionListener; //导入依赖的package包/类
/**
* listen for events when a tour is selected
*/
private void addSelectionListener() {
_postSelectionListener = new ISelectionListener() {
@Override
public void selectionChanged(final IWorkbenchPart part, final ISelection selection) {
if (part == Map3View.this) {
// ignore own selections
return;
}
onSelectionChanged(selection);
}
};
getSite().getPage().addPostSelectionListener(_postSelectionListener);
}
示例4: addSelectionListener
import org.eclipse.ui.ISelectionListener; //导入依赖的package包/类
private void addSelectionListener() {
_postSelectionListener = new ISelectionListener() {
@Override
public void selectionChanged(final IWorkbenchPart part, final ISelection selection) {
if (part == TourEditor.this) {
return;
}
onSelectionChanged(selection);
}
};
// register selection listener in the page
getSite().getPage().addPostSelectionListener(_postSelectionListener);
}
示例5: addSelectionListener
import org.eclipse.ui.ISelectionListener; //导入依赖的package包/类
/**
* listen for events when a tour is selected
*/
private void addSelectionListener() {
_postSelectionListener = new ISelectionListener() {
@Override
public void selectionChanged(final IWorkbenchPart part, final ISelection selection) {
if (part == ConconiView.this) {
return;
}
onSelectionChanged(selection);
}
};
getSite().getPage().addPostSelectionListener(_postSelectionListener);
}
示例6: addSelectionListener
import org.eclipse.ui.ISelectionListener; //导入依赖的package包/类
/**
* listen for events when a tour is selected
*/
private void addSelectionListener() {
_postSelectionListener = new ISelectionListener() {
@Override
public void selectionChanged(final IWorkbenchPart part, final ISelection selection) {
if (part == TrainingView.this) {
return;
}
onSelectionChanged(selection);
}
};
getSite().getPage().addPostSelectionListener(_postSelectionListener);
}
示例7: addSelectionListener
import org.eclipse.ui.ISelectionListener; //导入依赖的package包/类
private void addSelectionListener() {
_postSelectionListener = new ISelectionListener() {
@Override
public void selectionChanged(final IWorkbenchPart part, final ISelection selection) {
if (part == TourSegmenterView.this) {
return;
}
onSelectionChanged(selection);
}
};
getSite().getPage().addPostSelectionListener(_postSelectionListener);
}
示例8: addSelectionListener
import org.eclipse.ui.ISelectionListener; //导入依赖的package包/类
private void addSelectionListener() {
// this view part is a selection listener
_postSelectionListener = new ISelectionListener() {
@Override
public void selectionChanged(final IWorkbenchPart part, final ISelection selection) {
if (selection instanceof SelectionDeletedTours) {
reloadViewer();
}
}
};
// register selection listener in the page
getSite().getPage().addPostSelectionListener(_postSelectionListener);
}
示例9: addSelectionListener
import org.eclipse.ui.ISelectionListener; //导入依赖的package包/类
private void addSelectionListener() {
_selectionListener = new ISelectionListener() {
@Override
public void selectionChanged(final IWorkbenchPart part, final ISelection selection) {
// prevent to listen to a selection which is originated by this year chart
if (part == CalendarView.this) {
return;
}
onSelectionChanged(selection);
}
};
// register selection listener in the page
getSite().getPage().addPostSelectionListener(_selectionListener);
}
示例10: addSelectionListener
import org.eclipse.ui.ISelectionListener; //导入依赖的package包/类
private void addSelectionListener() {
// this view part is a selection listener
_postSelectionListener = new ISelectionListener() {
@Override
public void selectionChanged(final IWorkbenchPart part, final ISelection selection) {
// prevent to listen to a selection which is originated by this year chart
if (part == TourBookView.this) {
return;
}
onSelectionChanged(selection);
}
};
// register selection listener in the page
getSite().getPage().addPostSelectionListener(_postSelectionListener);
}
示例11: addSelectionListener
import org.eclipse.ui.ISelectionListener; //导入依赖的package包/类
private void addSelectionListener() {
// this view part is a selection listener
_postSelectionListener = new ISelectionListener() {
@Override
public void selectionChanged(final IWorkbenchPart part, final ISelection selection) {
if (selection instanceof SelectionDeletedTours) {
final SelectionDeletedTours deletedTourSelection = (SelectionDeletedTours) selection;
updateViewerAfterTourIsDeleted(_rootItem, deletedTourSelection.removedTours);
}
}
};
// register selection listener in the page
getSite().getPage().addPostSelectionListener(_postSelectionListener);
}
示例12: addSelectionListener
import org.eclipse.ui.ISelectionListener; //导入依赖的package包/类
/**
* listen for events when a tour is selected
*/
private void addSelectionListener() {
_postSelectionListener = new ISelectionListener() {
@Override
public void selectionChanged(final IWorkbenchPart part, final ISelection selection) {
if (part == TourMarkerView.this) {
return;
}
onSelectionChanged(selection);
}
};
getSite().getPage().addPostSelectionListener(_postSelectionListener);
}
示例13: addSelectionListener
import org.eclipse.ui.ISelectionListener; //导入依赖的package包/类
/**
* listen for events when a tour is selected
*/
private void addSelectionListener() {
_postSelectionListener = new ISelectionListener() {
@Override
public void selectionChanged(final IWorkbenchPart part, final ISelection selection) {
if (part == HeartRateVariabilityView.this) {
return;
}
onSelectionChanged(selection);
}
};
getSite().getPage().addPostSelectionListener(_postSelectionListener);
}
示例14: addListeners
import org.eclipse.ui.ISelectionListener; //导入依赖的package包/类
private void addListeners() {
final IWorkbenchPage page = getSite().getPage();
_partContainer.addControlListener(new ControlAdapter() {
@Override
public void controlResized(final ControlEvent event) {
onResizeUI();
}
});
_postSelectionListener = new ISelectionListener() {
@Override
public void selectionChanged(final IWorkbenchPart part, final ISelection selection) {
onSelectionChanged(selection);
}
};
page.addPostSelectionListener(_postSelectionListener);
}
示例15: addSelectionListener
import org.eclipse.ui.ISelectionListener; //导入依赖的package包/类
/**
* listen for events when a tour is selected
*/
private void addSelectionListener() {
_postSelectionListener = new ISelectionListener() {
@Override
public void selectionChanged(final IWorkbenchPart part, final ISelection selection) {
if (part == TourDataEditorView.this) {
return;
}
onSelectionChanged(selection);
}
};
getSite().getPage().addPostSelectionListener(_postSelectionListener);
}