aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthieu Wipliez2014-01-16 06:36:01 (EST)
committerPaul Webster2014-01-28 14:26:37 (EST)
commitf6fadfe1c6ba9806e246ccf4efbd989bae866b78 (patch)
tree2764f4aa41ed90c05a880d3f2dcc3b8e34269168
parent0f8fed829c48f31862dcf26410fecf2d13a70f32 (diff)
downloadeclipse.platform.ui-f6fadfe1c6ba9806e246ccf4efbd989bae866b78.zip
eclipse.platform.ui-f6fadfe1c6ba9806e246ccf4efbd989bae866b78.tar.gz
eclipse.platform.ui-f6fadfe1c6ba9806e246ccf4efbd989bae866b78.tar.bz2
Bug 425867: CNF binding should check extension for exclusion firstrefs/changes/02/20702/4
Change-Id: I6c94334f2675e6632eb9b2882080844f9412ac0c Signed-off-by: Matthieu Wipliez <matthieu.wipliez@synflow.com>
-rw-r--r--bundles/org.eclipse.ui.navigator/META-INF/MANIFEST.MF2
-rw-r--r--bundles/org.eclipse.ui.navigator/pom.xml2
-rw-r--r--bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/Binding.java25
3 files changed, 14 insertions, 15 deletions
diff --git a/bundles/org.eclipse.ui.navigator/META-INF/MANIFEST.MF b/bundles/org.eclipse.ui.navigator/META-INF/MANIFEST.MF
index 46d9ae0..0259916 100644
--- a/bundles/org.eclipse.ui.navigator/META-INF/MANIFEST.MF
+++ b/bundles/org.eclipse.ui.navigator/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Plugin.name
Bundle-SymbolicName: org.eclipse.ui.navigator; singleton:=true
-Bundle-Version: 3.5.300.qualifier
+Bundle-Version: 3.5.400.qualifier
Bundle-Activator: org.eclipse.ui.internal.navigator.NavigatorPlugin
Bundle-Vendor: %Plugin.providerName
Bundle-Localization: plugin
diff --git a/bundles/org.eclipse.ui.navigator/pom.xml b/bundles/org.eclipse.ui.navigator/pom.xml
index 1c267d2..c88d236 100644
--- a/bundles/org.eclipse.ui.navigator/pom.xml
+++ b/bundles/org.eclipse.ui.navigator/pom.xml
@@ -19,6 +19,6 @@
</parent>
<groupId>org.eclipse.ui</groupId>
<artifactId>org.eclipse.ui.navigator</artifactId>
- <version>3.5.300-SNAPSHOT</version>
+ <version>3.5.400-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/Binding.java b/bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/Binding.java
index ec34b6f..6023363 100644
--- a/bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/Binding.java
+++ b/bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/extensions/Binding.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2010 IBM Corporation and others.
+ * Copyright (c) 2006-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
@@ -7,6 +7,7 @@
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * Matthieu Wipliez <matthieu.wipliez@synflow.com> (Synflow SAS) - [CommonNavigator] Implementation of Binding isVisibleExtension not excluding as expected - http://bugs.eclipse.org/425867
******************************************************************************/
package org.eclipse.ui.internal.navigator.extensions;
@@ -48,36 +49,34 @@ class Binding {
* @see org.eclipse.ui.internal.navigator.extensions.INavigatorViewerDescriptor#isVisibleExtension(java.lang.String)
*/
boolean isVisibleExtension(String anExtensionId) {
-
-
// Have we seen this pattern before?
if (knownIds.containsKey(anExtensionId)) {
// we have, don't recompute
return ((Boolean) knownIds.get(anExtensionId)).booleanValue();
}
-
- for (Iterator itr = includePatterns.iterator(); itr.hasNext();) {
+
+ for (Iterator itr = excludePatterns.iterator(); itr.hasNext();) {
Pattern pattern = (Pattern) itr.next();
if (pattern.matcher(anExtensionId).matches()) {
- // keep track of the result for next time
- knownIds.put(anExtensionId, Boolean.TRUE);
+ knownIds.put(anExtensionId, Boolean.FALSE);
if (Policy.DEBUG_RESOLUTION) {
- System.out.println("Viewer Binding: " + TAG_EXTENSION +//$NON-NLS-1$
+ System.out.println("Viewer Binding: EXCLUDED: " + TAG_EXTENSION +//$NON-NLS-1$
" to: " + anExtensionId); //$NON-NLS-1$
}
- return true;
+ return false;
}
}
- for (Iterator itr = excludePatterns.iterator(); itr.hasNext();) {
+ for (Iterator itr = includePatterns.iterator(); itr.hasNext();) {
Pattern pattern = (Pattern) itr.next();
if (pattern.matcher(anExtensionId).matches()) {
- knownIds.put(anExtensionId, Boolean.FALSE);
+ // keep track of the result for next time
+ knownIds.put(anExtensionId, Boolean.TRUE);
if (Policy.DEBUG_RESOLUTION) {
- System.out.println("Viewer Binding: EXCLUDED: " + TAG_EXTENSION +//$NON-NLS-1$
+ System.out.println("Viewer Binding: " + TAG_EXTENSION +//$NON-NLS-1$
" to: " + anExtensionId); //$NON-NLS-1$
}
- return false;
+ return true;
}
}