mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-03 23:25:26 +02:00
[167620] speeding up larg multiple selections
This commit is contained in:
parent
911aa6d674
commit
726f28992e
2 changed files with 20 additions and 28 deletions
|
@ -1417,34 +1417,29 @@ public class SystemView extends TreeViewer implements ISystemTree, ISystemResour
|
|||
|
||||
}
|
||||
|
||||
protected Item removeFirstItem(Item[] items, Item[] children) {
|
||||
|
||||
protected Item removeFirstItem(Item[] items, Item[] children)
|
||||
{
|
||||
int firstIndex = 0;
|
||||
Item firstItem = null;
|
||||
int firstItemPosition = 0;
|
||||
|
||||
|
||||
if (items != null)
|
||||
{
|
||||
for (int i = 0; i < items.length; i++) {
|
||||
for (int i = 0; i < items.length; i++)
|
||||
{
|
||||
if (items[i] != null)
|
||||
{
|
||||
Item current = items[i];
|
||||
int position = getTreeItemPosition(current, children);
|
||||
|
||||
if (firstItem == null || position < firstItemPosition) {
|
||||
firstItem = current;
|
||||
firstItemPosition = position;
|
||||
firstIndex = i;
|
||||
}
|
||||
items[i] = null;
|
||||
return current;
|
||||
}
|
||||
}
|
||||
|
||||
items[firstIndex] = null;
|
||||
}
|
||||
return firstItem;
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Move one tree item to a new location
|
||||
*/
|
||||
|
@ -1534,6 +1529,7 @@ public class SystemView extends TreeViewer implements ISystemTree, ISystemResour
|
|||
}
|
||||
return pos;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Expand a given filter, given a subsystem that contains a reference to the filter's pool.
|
||||
|
|
|
@ -1417,34 +1417,29 @@ public class SystemView extends TreeViewer implements ISystemTree, ISystemResour
|
|||
|
||||
}
|
||||
|
||||
protected Item removeFirstItem(Item[] items, Item[] children) {
|
||||
|
||||
protected Item removeFirstItem(Item[] items, Item[] children)
|
||||
{
|
||||
int firstIndex = 0;
|
||||
Item firstItem = null;
|
||||
int firstItemPosition = 0;
|
||||
|
||||
|
||||
if (items != null)
|
||||
{
|
||||
for (int i = 0; i < items.length; i++) {
|
||||
for (int i = 0; i < items.length; i++)
|
||||
{
|
||||
if (items[i] != null)
|
||||
{
|
||||
Item current = items[i];
|
||||
int position = getTreeItemPosition(current, children);
|
||||
|
||||
if (firstItem == null || position < firstItemPosition) {
|
||||
firstItem = current;
|
||||
firstItemPosition = position;
|
||||
firstIndex = i;
|
||||
}
|
||||
items[i] = null;
|
||||
return current;
|
||||
}
|
||||
}
|
||||
|
||||
items[firstIndex] = null;
|
||||
}
|
||||
return firstItem;
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Move one tree item to a new location
|
||||
*/
|
||||
|
@ -1534,6 +1529,7 @@ public class SystemView extends TreeViewer implements ISystemTree, ISystemResour
|
|||
}
|
||||
return pos;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Expand a given filter, given a subsystem that contains a reference to the filter's pool.
|
||||
|
|
Loading…
Add table
Reference in a new issue