當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。