Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upSupport an easy way for disabling specific post/pre-processors for Commands #191
Comments
stelfrich
changed the title
Support an easy way for disabling specific post/pre-processors
Support an easy way for disabling specific post/pre-processors for Commands
Sep 25, 2015
This comment has been minimized.
This comment has been minimized.
we probably would want to:
|
This comment has been minimized.
This comment has been minimized.
I like the idea of a However, I don't think we need to add global pre/post-processing toggles—at least not yet. It wouldn't help with the intended use case, and it could result in potentially mystifying behavior when one consumer changes the global behavior for its own needs, which then infects the rest of the system. A way to avoid that would be to create something like |
This comment has been minimized.
This comment has been minimized.
I feel like I missed something.. why wouldn't it help? In the shorter term we could add processing toggle keywords to the |
This comment has been minimized.
This comment has been minimized.
IIUC, the goal is to suppress the display of outputs for a specific module execution, not globally for the context. So we wouldn't want global toggles at the context level. But we could have local toggles on some local object which you spawn, use then trash when done—an execution environment context. This is one of the use cases of
I'd prefer a way to invoke |
This comment has been minimized.
This comment has been minimized.
That's true, @ctrueden.
That would make most sense to me. A somewhat connected question is, how custom pre/post-processors can be announced and utilized by other |
This comment has been minimized.
This comment has been minimized.
For the sake of clarity and complete discussion of options here: at the moment the list of pre/post-processors are effectively global state. Using the
So I think it would allow the problem to be solved, but is not ideal due to being error prone and not threadsafe, at the least... although if we are interested in pursuing controls through a
Actually, a
Then you could reuse an instance of a We can then add convenience methods to the This would still be incomplete, as we would also need to consider places where Modules are created implicitly and add some custom solution (i.e. as I described above for scripts).
All plugins of a given type can be queried at runtime using the PluginService. ImageJ-Ops introduces some more robust options in that you can get usage for all Ops of a particular type by name, without having to reference an actual Java class... so that may be worth generalizing. I think maybe the |
stelfrich commentedSep 25, 2015
@ctrueden on ImageJ-devel:
Currently, there is no fine-grained, easy-to-use possibility to tweak which pre/post-processors are executed for a
Command
. The work-around is to use theModuleService
and provide a complete list or processors when executing therun
method.