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 236232 Details for
Bug 387147
jsdoc service registry events
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
updates JSDoc
bug387147.patch (text/plain), 4.12 KB, created by
Michael Rennie
on 2013-10-08 12:56:11 EDT
(
hide
)
Description:
updates JSDoc
Filename:
MIME Type:
Creator:
Michael Rennie
Created:
2013-10-08 12:56:11 EDT
Size:
4.12 KB
patch
obsolete
>diff --git a/bundles/org.eclipse.orion.client.core/web/orion/serviceregistry.js b/bundles/org.eclipse.orion.client.core/web/orion/serviceregistry.js >index 8995fc2..c63aae3 100644 >--- a/bundles/org.eclipse.orion.client.core/web/orion/serviceregistry.js >+++ b/bundles/org.eclipse.orion.client.core/web/orion/serviceregistry.js >@@ -1,10 +1,10 @@ > /******************************************************************************* > * @license >- * Copyright (c) 2011, 2012 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 >- * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution >- * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). >+ * Copyright (c) 2011, 2013 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 >+ * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution >+ * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). > * > * Contributors: > * IBM Corporation - initial API and implementation >@@ -132,7 +132,7 @@ > } > } > } >- >+ > function ServiceEvent(type, serviceReference) { > this.type = type; > this.serviceReference = serviceReference; >@@ -140,7 +140,7 @@ > > /** > * Creates a new service registry >- * >+ * > * @name orion.serviceregistry.ServiceRegistry > * @class The Orion service registry > */ >@@ -158,7 +158,7 @@ > var entry = _this._entries[serviceId]; > if (!entry) { > throw new Error("already unregistered"); >- } >+ } > var reference = entry.reference; > _this._serviceEventTarget.dispatchEvent(new ServiceEvent("unregistering", reference)); > _this._entries[serviceId] = null; >@@ -181,13 +181,13 @@ > var entry = _this._entries[serviceId]; > if (!entry) { > throw new Error("already unregistered"); >- } >+ } > var reference = entry.reference; > _this._serviceEventTarget.dispatchEvent(new ServiceEvent("modified", reference)); > } > }; > } >- >+ > ServiceRegistry.prototype = /** @lends orion.serviceregistry.ServiceRegistry.prototype */ > { > >@@ -243,14 +243,14 @@ > if (typeof service === "undefined" || service === null) { > throw new Error("invalid service"); > } >- >+ > if (typeof names === "string") { > names = [names]; > } else if (!Array.isArray(names)) { > names = []; > } >- >- var serviceId = this._entries.length; >+ >+ var serviceId = this._entries.length; > var reference = new ServiceReference(serviceId, names, properties); > var namedReferences = this._namedReferences; > names.forEach(function(name) { >@@ -268,18 +268,34 @@ > }, > > /** >- * Adds a listener for events on this registry >+ * @name addEventListener >+ * @description Adds a listener for events on this registry >+ * @function >+ * @public >+ * @memberOf ServiceRegistry > * @param {String} eventName The name of the event to listen for > * @param {Function} listener The listener to add >+ * >+ * @event modified The service has been changed in the registry >+ * @event registered The service has been successfully registered with the registry >+ * @event unregistering The service is unregistering from the registry > */ > addEventListener: function(eventName, listener) { > this._serviceEventTarget.addEventListener(eventName, listener); > }, > > /** >- * Removes a listener for events on this registry >+ * @name removeEventListener >+ * @description Removes a listener for events on this registry >+ * @function >+ * @public >+ * @memberOf ServiceRegistry > * @param {String} eventName The name of the event to stop listening for > * @param {Function} listener The listener to remove >+ * >+ * @event modified The service has been changed in the registry >+ * @event registered The service has been successfully registered with the registry >+ * @event unregistering The service is unregistering from the registry > */ > removeEventListener: function(eventName, listener) { > this._serviceEventTarget.removeEventListener(eventName, listener);
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 387147
:
236232
|
236296