Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 210480 Details for
Bug 333930
[api] provide ability to get notified of changes to task data and submits
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
changes to ExtensionPointReader
NEW--bug-333930-api-provide-ability-to-get-notified-.patch (text/plain), 2.59 KB, created by
Sam Davis
on 2012-02-02 18:30:59 EST
(
hide
)
Description:
changes to ExtensionPointReader
Filename:
MIME Type:
Creator:
Sam Davis
Created:
2012-02-02 18:30:59 EST
Size:
2.59 KB
patch
obsolete
>From 98cb0b56877f502290c69accd676ec164499c96a Thu, 2 Feb 2012 15:27:07 -0800 >From: Sam Davis <sam.davis@tasktop.com> >Date: Thu, 2 Feb 2012 15:26:22 -0800 >Subject: [PATCH] NEW - bug 333930: [api] provide ability to get notified of changes to task data and submits https://bugs.eclipse.org/bugs/show_bug.cgi?id=333930 > >diff --git a/org.eclipse.mylyn.commons.core/src/org/eclipse/mylyn/commons/core/ExtensionPointReader.java b/org.eclipse.mylyn.commons.core/src/org/eclipse/mylyn/commons/core/ExtensionPointReader.java >index 578e860..c70288d 100644 >--- a/org.eclipse.mylyn.commons.core/src/org/eclipse/mylyn/commons/core/ExtensionPointReader.java >+++ b/org.eclipse.mylyn.commons.core/src/org/eclipse/mylyn/commons/core/ExtensionPointReader.java >@@ -43,6 +43,17 @@ > > private final List<T> items; > >+ private String filterAttributeId; >+ >+ private String filterAttributeValue; >+ >+ public ExtensionPointReader(String pluginId, String extensionId, String elementId, Class<T> clazz, >+ String filterAttributeId, String filterAttributeValue) { >+ this(pluginId, extensionId, elementId, clazz); >+ this.filterAttributeId = filterAttributeId; >+ this.filterAttributeValue = filterAttributeValue; >+ } >+ > public ExtensionPointReader(String pluginId, String extensionId, String elementId, Class<T> clazz) { > Assert.isNotNull(pluginId); > Assert.isNotNull(extensionId); >@@ -89,7 +100,7 @@ > for (IExtension extension : extensions) { > IConfigurationElement[] elements = extension.getConfigurationElements(); > for (IConfigurationElement element : elements) { >- if (element.getName().equals(elementId)) { >+ if (element.getName().equals(elementId) && shouldRead(element)) { > T item = readElement(element, result); > if (item != null) { > items.add(item); >@@ -104,6 +115,20 @@ > return result; > } > >+ /** >+ * Determines whether the element should be instantiated by this ExtensionPointReader. This implementation checks >+ * whether the element defines an attribute with id and value matching filterAttributeId and filterAttributeValue. >+ * If filterAttributeValue is the empty string, an element is also considered to match if it does not define the >+ * attribute. >+ * <p> >+ * Subclasses may override. >+ */ >+ protected boolean shouldRead(IConfigurationElement element) { >+ return filterAttributeId == null || filterAttributeValue == null >+ || filterAttributeValue.equals(element.getAttribute(filterAttributeId)) >+ || (filterAttributeValue.length() == 0 && element.getAttribute(filterAttributeId) == null); >+ } >+ > protected void handleResult(IStatus result) { > if (!result.isOK()) { > StatusHandler.log(result);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 333930
:
210414
|
210415
|
210480
|
211018