Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUPatternFilter.java')
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUPatternFilter.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUPatternFilter.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUPatternFilter.java
index d663c37fb..5dcdeb64b 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUPatternFilter.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/dialogs/AvailableIUPatternFilter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2008, 2010 IBM Corporation and others.
+ * Copyright (c) 2008, 2016 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
@@ -26,7 +26,7 @@ import org.eclipse.ui.dialogs.PatternFilter;
*/
public class AvailableIUPatternFilter extends PatternFilter {
- boolean checkName, checkVersion, checkId = false;
+ boolean checkName, checkDescription, checkVersion, checkId = false;
String patternString;
/**
@@ -40,6 +40,8 @@ public class AvailableIUPatternFilter extends PatternFilter {
checkId = true;
else if (field == IUColumnConfig.COLUMN_NAME)
checkName = true;
+ else if (field == IUColumnConfig.COLUMN_DESCRIPTION)
+ checkDescription = true;
else if (field == IUColumnConfig.COLUMN_VERSION)
checkVersion = true;
}
@@ -93,6 +95,10 @@ public class AvailableIUPatternFilter extends PatternFilter {
text = iu.getProperty(IInstallableUnit.PROP_NAME, null);
if (text != null && wordMatches(text))
return true;
+ // Get the iu description in the default locale
+ text = iu.getProperty(IInstallableUnit.PROP_DESCRIPTION, null);
+ if (text != null && wordMatches(text))
+ return true;
}
if (checkId || (checkName && text == null)) {
text = iu.getId();
@@ -100,6 +106,12 @@ public class AvailableIUPatternFilter extends PatternFilter {
return true;
}
}
+ if (!checkName && checkDescription) {
+ // Get the iu description in the default locale
+ text = iu.getProperty(IInstallableUnit.PROP_DESCRIPTION, null);
+ if (text != null && wordMatches(text))
+ return true;
+ }
if (checkVersion) {
text = iu.getVersion().toString();
if (wordMatches(text))

Back to the top