OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013, the Dart project authors. | 2 * Copyright (c) 2013, the Dart project authors. |
3 * | 3 * |
4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except | 4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except |
5 * in compliance with the License. You may obtain a copy of the License at | 5 * in compliance with the License. You may obtain a copy of the License at |
6 * | 6 * |
7 * http://www.eclipse.org/legal/epl-v10.html | 7 * http://www.eclipse.org/legal/epl-v10.html |
8 * | 8 * |
9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License | 9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License |
10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express | 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 return null; | 386 return null; |
387 } | 387 } |
388 | 388 |
389 /** | 389 /** |
390 * Opens selected {@link LightNodeElement} in the {@link #editor}. | 390 * Opens selected {@link LightNodeElement} in the {@link #editor}. |
391 */ | 391 */ |
392 private void gotoSelectedElement() { | 392 private void gotoSelectedElement() { |
393 if (viewer != null) { | 393 if (viewer != null) { |
394 IStructuredSelection selection = (IStructuredSelection) viewer.getSelectio
n(); | 394 IStructuredSelection selection = (IStructuredSelection) viewer.getSelectio
n(); |
395 LightNodeElement element = (LightNodeElement) selection.getFirstElement(); | 395 LightNodeElement element = (LightNodeElement) selection.getFirstElement(); |
396 editor.setSelection(element, true); | 396 editor.setSelection_OLD(element, true); |
397 dispose(); | 397 dispose(); |
398 } | 398 } |
399 } | 399 } |
400 | 400 |
401 /** | 401 /** |
402 * Attempts to find {@link LightNodeElement} corresponding to the selection in
{@link #editor} and | 402 * Attempts to find {@link LightNodeElement} corresponding to the selection in
{@link #editor} and |
403 * select it in {@link #viewer}. | 403 * select it in {@link #viewer}. |
404 */ | 404 */ |
405 private void selectElementEnclosingEditorSelection() { | 405 private void selectElementEnclosingEditorSelection() { |
406 // may be small unit, expand as possible | 406 // may be small unit, expand as possible |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 try { | 472 try { |
473 viewer.collapseAll(); | 473 viewer.collapseAll(); |
474 viewer.refresh(false); | 474 viewer.refresh(false); |
475 LightNodeElements.expandTreeItemsTimeBoxed(viewer, 75L * 1000000L); | 475 LightNodeElements.expandTreeItemsTimeBoxed(viewer, 75L * 1000000L); |
476 selectFirstMatch(); | 476 selectFirstMatch(); |
477 } finally { | 477 } finally { |
478 viewer.getControl().setRedraw(true); | 478 viewer.getControl().setRedraw(true); |
479 } | 479 } |
480 } | 480 } |
481 } | 481 } |
OLD | NEW |