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


Java ISelectionListener类代码示例

本文整理汇总了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);
}
 
开发者ID:debrief,项目名称:limpet,代码行数:20,代码来源:CoreAnalysisView.java

示例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
}
 
开发者ID:apicloudcom,项目名称:APICloud-Studio,代码行数:24,代码来源:IndexView.java

示例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);
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:20,代码来源:Map3View.java

示例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);
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:19,代码来源:TourEditor.java

示例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);
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:19,代码来源:ConconiView.java

示例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);
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:19,代码来源:TrainingView.java

示例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);
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:17,代码来源:TourSegmenterView.java

示例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);
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:17,代码来源:CollatedToursView.java

示例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);
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:21,代码来源:CalendarView.java

示例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);
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:21,代码来源:TourBookView.java

示例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);
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:20,代码来源:TaggingView.java

示例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);
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:20,代码来源:TourMarkerView.java

示例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);
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:19,代码来源:HeartRateVariabilityView.java

示例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);
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:20,代码来源:TourChartAnalyzerView.java

示例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);
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:19,代码来源:TourDataEditorView.java


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