On 28.07.2011 15:38, Chris Nelson wrote:
Can I say "Implements foo" if "foo" isn't in the system?
Yes.
Are therenon-core EPs? Can someone point me to an example?
One example is http://trac-hacks.org/wiki/TagsPlugin which defines
ITagProvider. Quite a few plugins optionally implement this interface,
for example http://trac-hacks.org/wiki/DownloadsPlugin or
http://trac-hacks.org/wiki/ScreenshotsPlugin.
Just make sure the component that implements the other plugin's
interface can be individually enabled or disabled without affecting your
plugins main functionality.
I assumed you would have to do something like this:
try:
from otherplugin.api import IOptionalInterface
except:
IOptionalInterface = None
but the above plugins seem to cope without it.
When I go looking for other interfaces,
http://trac.edgewall.org/wiki/TracDev/PluginDevelopment/ExtensionPoints gets to a
"this page doesn't exist"
Did you see
http://trac.edgewall.org/wiki/TracDev/PluginDevelopment#ExtensionPoints
one level further up? (Maybe we should move that to the page you suggested.)
Peter
--
You received this message because you are subscribed to the Google Groups "Trac
Development" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/trac-dev?hl=en.