本文整理匯總了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);
}