Community
Participate
Working Groups
I tried to follow convention for a new service I was creating, but apparently there's less of a convention than I thought. Here are some places I saw inconsistencies: Service ids ----------- The wiki [1] says that these are Java-style reverse DNS names, which would mean lowercase is preferred. I found a few mixedCase names in use: orion.navigate.openWith orion.navigate.openWith.default orion.edit.contentAssist orion.core.linkScanner editorAction (may be obsolete) Event types ----------- TextView and Editor use CamelCase ("ModelChanging", "InputChanged", etc) ContentAssist uses lowercase ("accept") Services that dispatch events use lowercase ("favoritesChanged", "syntaxChecked", "pluginRemoved", etc) [1] http://wiki.eclipse.org/Orion/Coding_conventions#Services
If we're going to make changes to the service IDs, 0.5 is the right time to do it. Any breaking changes will have to be noted here: http://wiki.eclipse.org/Orion/Plugin_API_Changes/R0.5
Would be good to look at making what we have consistent.
We should be careful about making sweeping changes at this point in 0.5 because it tends to take us awhile to track down all the plugins that need fixing. I am happy to take this as an item for 1.0 cycle.
Another service that desperately needs a name change is orion.core.contenttypes. This is a service that provides access to the list of registered content types. This is an internal service to be used by Orion pages, not by plugins. Note there is also orion.core.contenttype (no "s") which is used by plugins to register content types. The first one should be renamed to something like orion.core.contentTypeDirectory or orion.core.contentTypeRegistry to be clear it provides access to contenttype info, rather than declaring them.
Simon, can you suggest a naming convention for events? camelCase or TitleCase?
I'd suggest camelCase although I would stick to a single lower case word unless there's a good reason -- so "selected", "started" and "removed" are good and "unicornJumped" if you must. You can use a capital if the first word is obviously a capital or acronym -- e.g. DOMActivate. Our eventing is mainly inspired from W3C EventTarget -- http://www.w3.org/TR/DOM-Level-3-Events/ which for historical reasons mainly used pure lower case so you get things like "mouseover" and "mouseout". This was always confusing and in nearly all recent event libraries they use camelCase -- e.g. JQuery, Dojo, Node -- so that's my suggestion although I think in most cases a lower case single word is sufficient.
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see: https://dev.eclipse.org/mhonarc/lists/orion-dev/msg03444.html