|
Lines 11-16
Link Here
|
| 11 |
*******************************************************************************/ |
11 |
*******************************************************************************/ |
| 12 |
package org.eclipse.pde.internal.runtime.registry; |
12 |
package org.eclipse.pde.internal.runtime.registry; |
| 13 |
|
13 |
|
|
|
14 |
import java.net.URI; |
| 15 |
import java.net.URISyntaxException; |
| 14 |
import java.util.*; |
16 |
import java.util.*; |
| 15 |
import java.util.List; |
17 |
import java.util.List; |
| 16 |
import org.eclipse.core.runtime.*; |
18 |
import org.eclipse.core.runtime.*; |
|
Lines 18-26
Link Here
|
| 18 |
import org.eclipse.jface.dialogs.Dialog; |
20 |
import org.eclipse.jface.dialogs.Dialog; |
| 19 |
import org.eclipse.jface.dialogs.MessageDialog; |
21 |
import org.eclipse.jface.dialogs.MessageDialog; |
| 20 |
import org.eclipse.jface.viewers.*; |
22 |
import org.eclipse.jface.viewers.*; |
| 21 |
import org.eclipse.osgi.service.resolver.*; |
|
|
| 22 |
import org.eclipse.osgi.util.NLS; |
23 |
import org.eclipse.osgi.util.NLS; |
| 23 |
import org.eclipse.pde.internal.runtime.*; |
24 |
import org.eclipse.pde.internal.runtime.*; |
|
|
25 |
import org.eclipse.pde.internal.runtime.registry.model.*; |
| 26 |
import org.eclipse.pde.internal.runtime.registry.model.impl.generic.PluginObjectAdapter; |
| 27 |
import org.eclipse.pde.internal.runtime.registry.model.impl.local.RegistryBrowserListener; |
| 24 |
import org.eclipse.swt.SWT; |
28 |
import org.eclipse.swt.SWT; |
| 25 |
import org.eclipse.swt.custom.BusyIndicator; |
29 |
import org.eclipse.swt.custom.BusyIndicator; |
| 26 |
import org.eclipse.swt.dnd.*; |
30 |
import org.eclipse.swt.dnd.*; |
|
Lines 33-39
Link Here
|
| 33 |
import org.eclipse.ui.dialogs.PatternFilter; |
37 |
import org.eclipse.ui.dialogs.PatternFilter; |
| 34 |
import org.eclipse.ui.part.DrillDownAdapter; |
38 |
import org.eclipse.ui.part.DrillDownAdapter; |
| 35 |
import org.eclipse.ui.part.ViewPart; |
39 |
import org.eclipse.ui.part.ViewPart; |
| 36 |
import org.osgi.framework.*; |
40 |
import org.osgi.framework.Bundle; |
|
|
41 |
import org.osgi.framework.BundleException; |
| 37 |
import org.osgi.service.packageadmin.PackageAdmin; |
42 |
import org.osgi.service.packageadmin.PackageAdmin; |
| 38 |
|
43 |
|
| 39 |
public class RegistryBrowser extends ViewPart { |
44 |
public class RegistryBrowser extends ViewPart { |
|
Lines 49-54
Link Here
|
| 49 |
private IMemento fMemento; |
54 |
private IMemento fMemento; |
| 50 |
private int fTotalItems = 0; |
55 |
private int fTotalItems = 0; |
| 51 |
|
56 |
|
|
|
57 |
private IRegistryModel model; |
| 58 |
|
| 52 |
// menus and action items |
59 |
// menus and action items |
| 53 |
private Action fRefreshAction; |
60 |
private Action fRefreshAction; |
| 54 |
private Action fShowPluginsAction; |
61 |
private Action fShowPluginsAction; |
|
Lines 70-99
Link Here
|
| 70 |
private DrillDownAdapter fDrillDownAdapter; |
77 |
private DrillDownAdapter fDrillDownAdapter; |
| 71 |
private ViewerFilter fActiveFilter = new ViewerFilter() { |
78 |
private ViewerFilter fActiveFilter = new ViewerFilter() { |
| 72 |
public boolean select(Viewer viewer, Object parentElement, Object element) { |
79 |
public boolean select(Viewer viewer, Object parentElement, Object element) { |
| 73 |
if (element instanceof PluginObjectAdapter) |
80 |
if (element instanceof IExtensionPointAdapter) |
| 74 |
element = ((PluginObjectAdapter) element).getObject(); |
81 |
element = Platform.getBundle(((IExtensionPointAdapter) element).getNamespaceIdentifier()); |
| 75 |
if (element instanceof IExtensionPoint) |
82 |
else if (element instanceof IExtensionAdapter) |
| 76 |
element = Platform.getBundle(((IExtensionPoint) element).getNamespaceIdentifier()); |
83 |
element = Platform.getBundle(((IExtensionAdapter) element).getNamespaceIdentifier()); |
| 77 |
else if (element instanceof IExtension) |
84 |
if (element instanceof IBundle) |
| 78 |
element = Platform.getBundle(((IExtension) element).getNamespaceIdentifier()); |
85 |
return ((IBundle) element).getState() == Bundle.ACTIVE; |
| 79 |
if (element instanceof Bundle) |
|
|
| 80 |
return ((Bundle) element).getState() == Bundle.ACTIVE; |
| 81 |
return true; |
86 |
return true; |
| 82 |
} |
87 |
} |
| 83 |
}; |
88 |
}; |
| 84 |
|
89 |
|
| 85 |
private ViewerFilter fDisabledFilter = new ViewerFilter() { |
90 |
private ViewerFilter fDisabledFilter = new ViewerFilter() { |
| 86 |
PlatformAdmin plaformAdmin = PDERuntimePlugin.getDefault().getPlatformAdmin(); |
|
|
| 87 |
State state = plaformAdmin.getState(false); |
| 88 |
|
| 89 |
public boolean select(Viewer viewer, Object parentElement, Object element) { |
91 |
public boolean select(Viewer viewer, Object parentElement, Object element) { |
| 90 |
if (element instanceof PluginObjectAdapter) |
92 |
if (element instanceof IBundle) { |
| 91 |
element = ((PluginObjectAdapter) element).getObject(); |
93 |
return !((IBundle) element).isEnabled(); |
| 92 |
|
|
|
| 93 |
if (element instanceof Bundle) { |
| 94 |
Bundle bundle = (Bundle) element; |
| 95 |
BundleDescription description = state.getBundle(bundle.getBundleId()); |
| 96 |
return ((state.getDisabledInfos(description)).length > 0); |
| 97 |
} |
94 |
} |
| 98 |
return false; |
95 |
return false; |
| 99 |
} |
96 |
} |
|
Lines 133-138
Link Here
|
| 133 |
} |
130 |
} |
| 134 |
} |
131 |
} |
| 135 |
|
132 |
|
|
|
133 |
public RegistryBrowser() { |
| 134 |
try { |
| 135 |
model = RegistryModelFactory.getRegistryModel(new URI("local")); |
| 136 |
} catch (URISyntaxException e) { |
| 137 |
PDERuntimePlugin.log(e); |
| 138 |
} |
| 139 |
} |
| 140 |
|
| 136 |
public void init(IViewSite site, IMemento memento) throws PartInitException { |
141 |
public void init(IViewSite site, IMemento memento) throws PartInitException { |
| 137 |
super.init(site, memento); |
142 |
super.init(site, memento); |
| 138 |
if (memento == null) |
143 |
if (memento == null) |
|
Lines 203-217
Link Here
|
| 203 |
fTreeViewer.setUseHashlookup(true); |
208 |
fTreeViewer.setUseHashlookup(true); |
| 204 |
fTreeViewer.setComparator(new ViewerComparator() { |
209 |
fTreeViewer.setComparator(new ViewerComparator() { |
| 205 |
public int compare(Viewer viewer, Object e1, Object e2) { |
210 |
public int compare(Viewer viewer, Object e1, Object e2) { |
| 206 |
if (e1 instanceof PluginObjectAdapter) |
|
|
| 207 |
e1 = ((PluginObjectAdapter) e1).getObject(); |
| 208 |
if (e2 instanceof PluginObjectAdapter) |
| 209 |
e2 = ((PluginObjectAdapter) e2).getObject(); |
| 210 |
if (e1 instanceof IBundleFolder && e2 instanceof IBundleFolder) |
211 |
if (e1 instanceof IBundleFolder && e2 instanceof IBundleFolder) |
| 211 |
return ((IBundleFolder) e1).getFolderId() - ((IBundleFolder) e2).getFolderId(); |
212 |
return ((IBundleFolder) e1).getFolderId() - ((IBundleFolder) e2).getFolderId(); |
| 212 |
if (e1 instanceof Bundle && e2 instanceof Bundle) { |
213 |
if (e1 instanceof IBundle && e2 instanceof IBundle) { |
| 213 |
e1 = ((Bundle) e1).getSymbolicName(); |
214 |
e1 = ((IBundle) e1).getSymbolicName(); |
| 214 |
e2 = ((Bundle) e2).getSymbolicName(); |
215 |
e2 = ((IBundle) e2).getSymbolicName(); |
| 215 |
} |
216 |
} |
| 216 |
return super.compare(viewer, e1, e2); |
217 |
return super.compare(viewer, e1, e2); |
| 217 |
} |
218 |
} |
|
Lines 240-254
Link Here
|
| 240 |
tree.setMenu(menu); |
241 |
tree.setMenu(menu); |
| 241 |
} |
242 |
} |
| 242 |
|
243 |
|
| 243 |
private PluginObjectAdapter[] getBundles() { |
|
|
| 244 |
Bundle[] bundles = PDERuntimePlugin.getDefault().getBundleContext().getBundles(); |
| 245 |
ArrayList list = new ArrayList(); |
| 246 |
for (int i = 0; i < bundles.length; i++) |
| 247 |
if (bundles[i].getHeaders().get(Constants.FRAGMENT_HOST) == null) |
| 248 |
list.add(new PluginAdapter(bundles[i])); |
| 249 |
return (PluginObjectAdapter[]) list.toArray(new PluginObjectAdapter[list.size()]); |
| 250 |
} |
| 251 |
|
| 252 |
private void fillToolBar() { |
244 |
private void fillToolBar() { |
| 253 |
fDrillDownAdapter = new RegistryDrillDownAdapter(fTreeViewer); |
245 |
fDrillDownAdapter = new RegistryDrillDownAdapter(fTreeViewer); |
| 254 |
IActionBars bars = getViewSite().getActionBars(); |
246 |
IActionBars bars = getViewSite().getActionBars(); |
|
Lines 398-404
Link Here
|
| 398 |
try { |
390 |
try { |
| 399 |
List bundles = getSelectedBundles(); |
391 |
List bundles = getSelectedBundles(); |
| 400 |
for (Iterator it = bundles.iterator(); it.hasNext();) { |
392 |
for (Iterator it = bundles.iterator(); it.hasNext();) { |
| 401 |
Bundle bundle = (Bundle) it.next(); |
393 |
IBundle bundle = (IBundle) it.next(); |
| 402 |
bundle.start(); |
394 |
bundle.start(); |
| 403 |
} |
395 |
} |
| 404 |
} catch (BundleException e) { |
396 |
} catch (BundleException e) { |
|
Lines 412-418
Link Here
|
| 412 |
try { |
404 |
try { |
| 413 |
List bundles = getSelectedBundles(); |
405 |
List bundles = getSelectedBundles(); |
| 414 |
for (Iterator it = bundles.iterator(); it.hasNext();) { |
406 |
for (Iterator it = bundles.iterator(); it.hasNext();) { |
| 415 |
Bundle bundle = (Bundle) it.next(); |
407 |
IBundle bundle = (IBundle) it.next(); |
| 416 |
bundle.stop(); |
408 |
bundle.stop(); |
| 417 |
} |
409 |
} |
| 418 |
} catch (BundleException e) { |
410 |
} catch (BundleException e) { |
|
Lines 424-438
Link Here
|
| 424 |
fEnableAction = new Action(PDERuntimeMessages.RegistryView_enableAction_label) { |
416 |
fEnableAction = new Action(PDERuntimeMessages.RegistryView_enableAction_label) { |
| 425 |
public void run() { |
417 |
public void run() { |
| 426 |
List bundles = getSelectedBundles(); |
418 |
List bundles = getSelectedBundles(); |
| 427 |
State state = PDERuntimePlugin.getDefault().getState(); |
|
|
| 428 |
for (Iterator it = bundles.iterator(); it.hasNext();) { |
419 |
for (Iterator it = bundles.iterator(); it.hasNext();) { |
| 429 |
Bundle bundle = (Bundle) it.next(); |
420 |
IBundle bundle = (IBundle) it.next(); |
| 430 |
BundleDescription desc = state.getBundle(bundle.getBundleId()); |
421 |
bundle.setEnabled(true); |
| 431 |
DisabledInfo[] infos = state.getDisabledInfos(desc); |
|
|
| 432 |
for (int i = 0; i < infos.length; i++) { |
| 433 |
PlatformAdmin platformAdmin = PDERuntimePlugin.getDefault().getPlatformAdmin(); |
| 434 |
platformAdmin.removeDisabledInfo(infos[i]); |
| 435 |
} |
| 436 |
} |
422 |
} |
| 437 |
PackageAdmin packageAdmin = PDERuntimePlugin.getDefault().getPackageAdmin(); |
423 |
PackageAdmin packageAdmin = PDERuntimePlugin.getDefault().getPackageAdmin(); |
| 438 |
packageAdmin.refreshPackages((Bundle[]) bundles.toArray(new Bundle[bundles.size()])); |
424 |
packageAdmin.refreshPackages((Bundle[]) bundles.toArray(new Bundle[bundles.size()])); |
|
Lines 442-454
Link Here
|
| 442 |
fDisableAction = new Action(PDERuntimeMessages.RegistryView_disableAction_label) { |
428 |
fDisableAction = new Action(PDERuntimeMessages.RegistryView_disableAction_label) { |
| 443 |
public void run() { |
429 |
public void run() { |
| 444 |
List bundles = getSelectedBundles(); |
430 |
List bundles = getSelectedBundles(); |
| 445 |
State state = PDERuntimePlugin.getDefault().getState(); |
|
|
| 446 |
for (Iterator it = bundles.iterator(); it.hasNext();) { |
431 |
for (Iterator it = bundles.iterator(); it.hasNext();) { |
| 447 |
Bundle bundle = (Bundle) it.next(); |
432 |
IBundle bundle = (IBundle) it.next(); |
| 448 |
BundleDescription desc = state.getBundle(bundle.getBundleId()); |
433 |
bundle.setEnabled(false); |
| 449 |
DisabledInfo info = new DisabledInfo("org.eclipse.pde.ui", "Disabled via PDE", desc); //$NON-NLS-1$ //$NON-NLS-2$ |
|
|
| 450 |
PlatformAdmin platformAdmin = PDERuntimePlugin.getDefault().getPlatformAdmin(); |
| 451 |
platformAdmin.addDisabledInfo(info); |
| 452 |
} |
434 |
} |
| 453 |
PackageAdmin packageAdmin = PDERuntimePlugin.getDefault().getPackageAdmin(); |
435 |
PackageAdmin packageAdmin = PDERuntimePlugin.getDefault().getPackageAdmin(); |
| 454 |
packageAdmin.refreshPackages((Bundle[]) bundles.toArray(new Bundle[bundles.size()])); |
436 |
packageAdmin.refreshPackages((Bundle[]) bundles.toArray(new Bundle[bundles.size()])); |
|
Lines 458-484
Link Here
|
| 458 |
fDiagnoseAction = new Action(PDERuntimeMessages.RegistryView_diagnoseAction_label) { |
440 |
fDiagnoseAction = new Action(PDERuntimeMessages.RegistryView_diagnoseAction_label) { |
| 459 |
public void run() { |
441 |
public void run() { |
| 460 |
List bundles = getSelectedBundles(); |
442 |
List bundles = getSelectedBundles(); |
| 461 |
State state = PDERuntimePlugin.getDefault().getState(); |
|
|
| 462 |
for (Iterator it = bundles.iterator(); it.hasNext();) { |
443 |
for (Iterator it = bundles.iterator(); it.hasNext();) { |
| 463 |
Bundle bundle = (Bundle) it.next(); |
444 |
IBundle bundle = (IBundle) it.next(); |
| 464 |
BundleDescription desc = state.getBundle(bundle.getBundleId()); |
445 |
MultiStatus problems = bundle.diagnose(); |
| 465 |
PlatformAdmin platformAdmin = PDERuntimePlugin.getDefault().getPlatformAdmin(); |
|
|
| 466 |
VersionConstraint[] unsatisfied = platformAdmin.getStateHelper().getUnsatisfiedConstraints(desc); |
| 467 |
ResolverError[] resolverErrors = platformAdmin.getState(false).getResolverErrors(desc); |
| 468 |
MultiStatus problems = new MultiStatus(PDERuntimePlugin.ID, IStatus.INFO, PDERuntimeMessages.RegistryView_found_problems, null); |
| 469 |
for (int i = 0; i < resolverErrors.length; i++) { |
| 470 |
if ((resolverErrors[i].getType() & (ResolverError.MISSING_FRAGMENT_HOST | ResolverError.MISSING_GENERIC_CAPABILITY | ResolverError.MISSING_IMPORT_PACKAGE | ResolverError.MISSING_REQUIRE_BUNDLE)) != 0) |
| 471 |
continue; |
| 472 |
IStatus status = new Status(IStatus.WARNING, PDERuntimePlugin.ID, resolverErrors[i].toString()); |
| 473 |
problems.add(status); |
| 474 |
} |
| 475 |
|
446 |
|
| 476 |
for (int i = 0; i < unsatisfied.length; i++) { |
|
|
| 477 |
IStatus status = new Status(IStatus.WARNING, PDERuntimePlugin.ID, MessageHelper.getResolutionFailureMessage(unsatisfied[i])); |
| 478 |
problems.add(status); |
| 479 |
} |
| 480 |
Dialog dialog; |
447 |
Dialog dialog; |
| 481 |
if (unsatisfied.length != 0 || resolverErrors.length != 0) { |
448 |
if (problems.getChildren().length > 0) { |
| 482 |
dialog = new DiagnosticsDialog(getSite().getShell(), PDERuntimeMessages.RegistryView_diag_dialog_title, null, problems, IStatus.WARNING); |
449 |
dialog = new DiagnosticsDialog(getSite().getShell(), PDERuntimeMessages.RegistryView_diag_dialog_title, null, problems, IStatus.WARNING); |
| 483 |
dialog.open(); |
450 |
dialog.open(); |
| 484 |
} else { |
451 |
} else { |
|
Lines 499-511
Link Here
|
| 499 |
fCollapseAllAction.setToolTipText(PDERuntimeMessages.RegistryView_collapseAll_tooltip); |
466 |
fCollapseAllAction.setToolTipText(PDERuntimeMessages.RegistryView_collapseAll_tooltip); |
| 500 |
} |
467 |
} |
| 501 |
|
468 |
|
| 502 |
protected void updateItems(boolean resetInput) { |
469 |
public/* was protected */void updateItems(boolean resetInput) { |
| 503 |
Object[] input = null; |
470 |
Object[] input = null; |
| 504 |
boolean extOnly = fShowExtensionsOnlyAction.isChecked(); |
471 |
boolean extOnly = fShowExtensionsOnlyAction.isChecked(); |
| 505 |
if (extOnly) |
472 |
if (extOnly) |
| 506 |
input = Platform.getExtensionRegistry().getExtensionPoints(); |
473 |
input = model.getExtensionPoints(); |
| 507 |
else |
474 |
else |
| 508 |
input = getBundles(); |
475 |
input = model.getBundles(); |
| 509 |
fListener.fExtOnly = extOnly; |
476 |
fListener.fExtOnly = extOnly; |
| 510 |
fTotalItems = input.length; |
477 |
fTotalItems = input.length; |
| 511 |
if (resetInput) |
478 |
if (resetInput) |
|
Lines 517-523
Link Here
|
| 517 |
setContentDescription(getTitleSummary()); |
484 |
setContentDescription(getTitleSummary()); |
| 518 |
} |
485 |
} |
| 519 |
|
486 |
|
| 520 |
protected Tree getUndisposedTree() { |
487 |
public/* was protected */Tree getUndisposedTree() { |
| 521 |
if (fTreeViewer == null || fTreeViewer.getTree() == null || fTreeViewer.getTree().isDisposed()) |
488 |
if (fTreeViewer == null || fTreeViewer.getTree() == null || fTreeViewer.getTree().isDisposed()) |
| 522 |
return null; |
489 |
return null; |
| 523 |
return fTreeViewer.getTree(); |
490 |
return fTreeViewer.getTree(); |
|
Lines 556-566
Link Here
|
| 556 |
if (selection != null) { |
523 |
if (selection != null) { |
| 557 |
Object[] elements = selection.toArray(); |
524 |
Object[] elements = selection.toArray(); |
| 558 |
for (int i = 0; i < elements.length; i++) { |
525 |
for (int i = 0; i < elements.length; i++) { |
| 559 |
if (elements[i] instanceof PluginObjectAdapter) { |
526 |
if (elements[i] instanceof IBundle) { |
| 560 |
PluginObjectAdapter adapter = (PluginObjectAdapter) elements[i]; |
527 |
bundles.add(elements[i]); |
| 561 |
Object object = adapter.getObject(); |
|
|
| 562 |
if (object instanceof Bundle) |
| 563 |
bundles.add(object); |
| 564 |
} |
528 |
} |
| 565 |
} |
529 |
} |
| 566 |
} |
530 |
} |
|
Lines 570-576
Link Here
|
| 570 |
private boolean selectedBundlesStarted() { |
534 |
private boolean selectedBundlesStarted() { |
| 571 |
List bundles = getSelectedBundles(); |
535 |
List bundles = getSelectedBundles(); |
| 572 |
for (Iterator it = bundles.iterator(); it.hasNext();) { |
536 |
for (Iterator it = bundles.iterator(); it.hasNext();) { |
| 573 |
Bundle bundle = (Bundle) it.next(); |
537 |
IBundle bundle = (IBundle) it.next(); |
| 574 |
if (bundle.getState() != Bundle.ACTIVE) |
538 |
if (bundle.getState() != Bundle.ACTIVE) |
| 575 |
return false; |
539 |
return false; |
| 576 |
} |
540 |
} |
|
Lines 580-586
Link Here
|
| 580 |
private boolean selectedBundlesStopped() { |
544 |
private boolean selectedBundlesStopped() { |
| 581 |
List bundles = getSelectedBundles(); |
545 |
List bundles = getSelectedBundles(); |
| 582 |
for (Iterator it = bundles.iterator(); it.hasNext();) { |
546 |
for (Iterator it = bundles.iterator(); it.hasNext();) { |
| 583 |
Bundle bundle = (Bundle) it.next(); |
547 |
IBundle bundle = (IBundle) it.next(); |
| 584 |
if (bundle.getState() == Bundle.ACTIVE) |
548 |
if (bundle.getState() == Bundle.ACTIVE) |
| 585 |
return false; |
549 |
return false; |
| 586 |
} |
550 |
} |
|
Lines 590-600
Link Here
|
| 590 |
private boolean selectedBundlesDisabled() { |
554 |
private boolean selectedBundlesDisabled() { |
| 591 |
List bundles = getSelectedBundles(); |
555 |
List bundles = getSelectedBundles(); |
| 592 |
for (Iterator it = bundles.iterator(); it.hasNext();) { |
556 |
for (Iterator it = bundles.iterator(); it.hasNext();) { |
| 593 |
Bundle bundle = (Bundle) it.next(); |
557 |
IBundle bundle = (IBundle) it.next(); |
| 594 |
State state = PDERuntimePlugin.getDefault().getState(); |
558 |
if (!bundle.isEnabled()) |
| 595 |
BundleDescription desc = state.getBundle(bundle.getBundleId()); |
|
|
| 596 |
DisabledInfo[] infos = state.getDisabledInfos(desc); |
| 597 |
if (infos.length == 0) |
| 598 |
return false; |
559 |
return false; |
| 599 |
} |
560 |
} |
| 600 |
return true; |
561 |
return true; |
|
Lines 603-623
Link Here
|
| 603 |
private boolean selectedBundlesEnabled() { |
564 |
private boolean selectedBundlesEnabled() { |
| 604 |
List bundles = getSelectedBundles(); |
565 |
List bundles = getSelectedBundles(); |
| 605 |
for (Iterator it = bundles.iterator(); it.hasNext();) { |
566 |
for (Iterator it = bundles.iterator(); it.hasNext();) { |
| 606 |
Bundle bundle = (Bundle) it.next(); |
567 |
IBundle bundle = (IBundle) it.next(); |
| 607 |
State state = PDERuntimePlugin.getDefault().getState(); |
568 |
if (bundle.isEnabled()) |
| 608 |
BundleDescription desc = state.getBundle(bundle.getBundleId()); |
569 |
return true; |
| 609 |
DisabledInfo[] infos = state.getDisabledInfos(desc); |
|
|
| 610 |
if (infos.length > 0) |
| 611 |
return false; |
| 612 |
} |
570 |
} |
| 613 |
return true; |
571 |
return true; |
| 614 |
} |
572 |
} |
| 615 |
|
573 |
|
| 616 |
protected void add(Object object) { |
574 |
public/* was protected */void add(Object object) { |
| 617 |
add(fTreeViewer.getInput(), object); |
575 |
add(fTreeViewer.getInput(), object); |
| 618 |
} |
576 |
} |
| 619 |
|
577 |
|
| 620 |
protected void add(Object parent, Object object) { |
578 |
public/* was protected */void add(Object parent, Object object) { |
| 621 |
if (fDrillDownAdapter.canGoHome()) |
579 |
if (fDrillDownAdapter.canGoHome()) |
| 622 |
return; |
580 |
return; |
| 623 |
fTotalItems += 1; |
581 |
fTotalItems += 1; |
|
Lines 625-631
Link Here
|
| 625 |
updateTitle(); |
583 |
updateTitle(); |
| 626 |
} |
584 |
} |
| 627 |
|
585 |
|
| 628 |
protected void remove(Object object) { |
586 |
public/* was protected */void remove(Object object) { |
| 629 |
if (fDrillDownAdapter.canGoHome()) |
587 |
if (fDrillDownAdapter.canGoHome()) |
| 630 |
return; |
588 |
return; |
| 631 |
fTotalItems -= 1; |
589 |
fTotalItems -= 1; |
|
Lines 633-647
Link Here
|
| 633 |
updateTitle(); |
591 |
updateTitle(); |
| 634 |
} |
592 |
} |
| 635 |
|
593 |
|
| 636 |
protected void update(Object object) { |
594 |
public/* was protected */void update(Object object) { |
| 637 |
fTreeViewer.update(object, null); |
595 |
fTreeViewer.update(object, null); |
| 638 |
} |
596 |
} |
| 639 |
|
597 |
|
| 640 |
protected void refresh(Object object) { |
598 |
public/* was protected */void refresh(Object object) { |
| 641 |
fTreeViewer.refresh(object); |
599 |
fTreeViewer.refresh(object); |
| 642 |
} |
600 |
} |
| 643 |
|
601 |
|
| 644 |
protected TreeItem[] getTreeItems() { |
602 |
public/* was protected */TreeItem[] getTreeItems() { |
| 645 |
return fTreeViewer.getTree().getItems(); |
603 |
return fTreeViewer.getTree().getItems(); |
| 646 |
} |
604 |
} |
| 647 |
} |
605 |
} |