From d093941722345946c49622b77811b9473fc94370 Mon Sep 17 00:00:00 2001 From: Dave McKnight Date: Wed, 8 Jan 2014 12:02:25 -0500 Subject: [PATCH] [425113] Improve performance of RSE table views by using SWT.VIRTUAL --- .../eclipse/rse/internal/ui/view/SystemTableViewPart.java | 5 +++-- .../rse/internal/ui/view/monitor/MonitorViewPage.java | 5 +++-- .../rse/internal/ui/view/search/SystemSearchViewPart.java | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableViewPart.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableViewPart.java index 1efc724e23c..c81daccdc07 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableViewPart.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemTableViewPart.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2002, 2012 IBM Corporation and others. All rights reserved. + * Copyright (c) 2002, 2014 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -49,6 +49,7 @@ * David McKnight (IBM) - [363829] Closing Eclipse with a populated Remote System Details view forces a remote system connection * David McKnight (IBM) - [372674] Enhancement - Preserve state of Remote Monitor view * David McKnight (IBM) - [373673] Remote Systems Details view calling wrong method for setting action tooltips + * David McKnight (IBM) - [425113] Improve performance of RSE table views by using SWT.VIRTUAL *******************************************************/ package org.eclipse.rse.internal.ui.view; @@ -1287,7 +1288,7 @@ public class SystemTableViewPart extends ViewPart registry.addSystemResourceChangeListener(this); registry.addSystemRemoteChangeListener(this); - Table table = new Table(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.FULL_SELECTION | SWT.HIDE_SELECTION); + Table table = new Table(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.FULL_SELECTION | SWT.HIDE_SELECTION | SWT.VIRTUAL); _viewer = new SystemTableView(table, this); table.setLinesVisible(true); diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/MonitorViewPage.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/MonitorViewPage.java index 85844402984..56789af0a02 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/MonitorViewPage.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/monitor/MonitorViewPage.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2002, 2012 IBM Corporation and others. All rights reserved. + * Copyright (c) 2002, 2014 IBM Corporation and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html @@ -20,6 +20,7 @@ * David McKnight (IBM) - [225506] [api][breaking] RSE UI leaks non-API types * David McKnight (IBM) - [330398] RSE leaks SWT resources * David McKnight (IBM) - [372674] Enhancement - Preserve state of Remote Monitor view + * David McKnight (IBM) - [425113] Improve performance of RSE table views by using SWT.VIRTUAL ********************************************************************************/ package org.eclipse.rse.internal.ui.view.monitor; @@ -438,7 +439,7 @@ FocusListener parent.setLayout(gridLayout); // create table portion - Table table = new Table(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION | SWT.HIDE_SELECTION); + Table table = new Table(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION | SWT.HIDE_SELECTION | SWT.VIRTUAL); _viewer = new SystemTableView(table, _viewPart); //Tree tree = new Tree(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION | SWT.HIDE_SELECTION); diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchViewPart.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchViewPart.java index d846b098389..6c36deb7ac3 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchViewPart.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/search/SystemSearchViewPart.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2003, 2011 IBM Corporation and others. + * Copyright (c) 2003, 2014 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -20,6 +20,7 @@ * David McKnight (IBM) - [190015] [performance] Remove All Match's from Search Results Takes a while * David McKnight (IBM) - [296877] Allow user to choose the attributes for remote search result * David McKnight (IBM) - [330398] RSE leaks SWT resources + * David McKnight (IBM) - [425113] Improve performance of RSE table views by using SWT.VIRTUAL *******************************************************************************/ package org.eclipse.rse.internal.ui.view.search; @@ -946,7 +947,7 @@ public class SystemSearchViewPart extends ViewPart // create table portion // TODO change to tabletree when eclipse fixes the swt widget //TableTree table = new TableTree(pageBook, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION | SWT.HIDE_SELECTION); - Tree tabletree = new Tree(pageBook, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION | SWT.HIDE_SELECTION); + Tree tabletree = new Tree(pageBook, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.BORDER | SWT.FULL_SELECTION | SWT.HIDE_SELECTION | SWT.VIRTUAL); SystemSearchTableView viewer = new SystemSearchTableView(tabletree, resultSet, this); getSite().registerContextMenu(viewer.getContextMenuManager(), viewer);