org.eclipse.swt.widgets.Tree.showSelection()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(117)

本文整理了Java中org.eclipse.swt.widgets.Tree.showSelection()方法的一些代码示例,展示了Tree.showSelection()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Tree.showSelection()方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Tree
类名称:Tree
方法名:showSelection

Tree.showSelection介绍

[英]Shows the selection. If the selection is already showing in the receiver, this method simply returns. Otherwise, the items are scrolled until the selection is visible.
[中]显示所选内容。如果所选内容已经显示在接收器中,则此方法只返回。否则,将滚动项目,直到所选内容可见。

代码示例

代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui

/**
 * An editor has been activated.  Set the selection in this Packages Viewer
 * to be the editor's input, if linking is enabled.
 * @param editor the activated editor
 */
void editorActivated(IEditorPart editor) {
  IEditorInput editorInput= editor.getEditorInput();
  if (editorInput == null)
    return;
  Object input= getInputFromEditor(editorInput);
  if (input == null) 
    return;
  if (!inputIsSelected(editorInput))
    showInput(input);
  else
    getTreeViewer().getTree().showSelection();
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

/**
 * An editor has been activated.  Set the selection in this Packages Viewer
 * to be the editor's input, if linking is enabled.
 * @param editor the activated editor
 */
void editorActivated(IEditorPart editor) {
  IEditorInput editorInput= editor.getEditorInput();
  if (editorInput == null)
    return;
  Object input= getInputFromEditor(editorInput);
  if (input == null)
    return;
  if (!inputIsSelected(editorInput))
    showInput(input);
  else
    getTreeViewer().getTree().showSelection();
}

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui

/**
 * An editor has been activated.  Set the selection in this Packages Viewer
 * to be the editor's input, if linking is enabled.
 * @param editor the activated editor
 */
void editorActivated(IEditorPart editor) {
  IEditorInput editorInput= editor.getEditorInput();
  if (editorInput == null)
    return;
  Object input= getInputFromEditor(editorInput);
  if (input == null)
    return;
  if (!inputIsSelected(editorInput))
    showInput(input);
  else
    getTreeViewer().getTree().showSelection();
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.team.ui

/**
 * An editor has been activated. Set the selection in the Sync View
 * to be the editor's input, if linking is enabled.
 * @param editor the activated editor
 */
private void editorActivated(IEditorPart editor) {
  if (!isLinkingEnabled())
    return;
  IEditorInput editorInput= editor.getEditorInput();
  if (editorInput == null)
    return;
  Object input= getInputFromEditor(editorInput);
  if (input == null)
    return;
  if (!inputIsSelected(editorInput))
    showInput(input);
  else
    getViewer().getTree().showSelection();
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.ide

/**
 * An editor has been activated.  Sets the selection in this navigator
 * to be the editor's input, if linking is enabled.
 *
 * @param editor the active editor
 * @since 2.0
 */
protected void editorActivated(IEditorPart editor) {
  if (!isLinkingEnabled()) {
    return;
  }
  IFile file = ResourceUtil.getFile(editor.getEditorInput());
  if (file != null) {
    ISelection newSelection = new StructuredSelection(file);
    if (getTreeViewer().getSelection().equals(newSelection)) {
      getTreeViewer().getTree().showSelection();
    } else {
      getTreeViewer().setSelection(newSelection, true);
    }
  }
}

代码示例来源:origin: org.eclipse/org.eclipse.ajdt.ui

if (i < items.length) {
  fInputGroup.getTree().setSelection(new TreeItem[] {items[i]});
  fInputGroup.getTree().showSelection();
  fInputGroup.populateListViewer(items[i].getData());

代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui

if (i < items.length) {
  fInputGroup.getTree().setSelection(new TreeItem[] {items[i]});
  fInputGroup.getTree().showSelection();
  fInputGroup.populateListViewer(items[i].getData());

代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench

filteredTree.getViewer().getTree().showSelection();

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui

if (i < items.length) {
  fInputGroup.getTree().setSelection(new TreeItem[] {items[i]});
  fInputGroup.getTree().showSelection();
  fInputGroup.populateListViewer(items[i].getData());

代码示例来源:origin: org.eclipse.mylyn.commons.repositories/ui

filteredTree.getViewer().getTree().showSelection();

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

if (i < items.length) {
  fInputGroup.getTree().setSelection(new TreeItem[] {items[i]});
  fInputGroup.getTree().showSelection();
  fInputGroup.populateListViewer(items[i].getData());

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.views

tree.showSelection();

代码示例来源:origin: org.eclipse/org.eclipse.ui.views

tree.showSelection();

代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.views

tree.showSelection();

代码示例来源:origin: org.eclipse/org.eclipse.datatools.connectivity.ui.dse

mViewer.getTree().showSelection();
if (mViewer.getTree().getItemCount() == 1 && this.mShowConnect) {
  handleConnect();

相关文章

Tree类方法