[
https://issues.jboss.org/browse/FORGE-719?page=com.atlassian.jira.plugin....
]
Lincoln Baxter III commented on FORGE-719:
------------------------------------------
We're trying to design the next Plugin API - as we call it in Forge 1. So we need a
programming model that lets people declare interactions in a manner that is agnostic of
the UI it will eventually be presented in.
{code}public interface Interaction
{
public String getName();
public Set<Rule> getRules();
public Set<Input> getInputs();
public PreparedInteraction prepare(PopulatedInput... inputs);
}{code}
{code}public interface PopulatedInput<T>
{
public T getValue();
}{code}
{code}public interface PreparedInteraction
{
public void perform();
}{code}
This is just an example initial interface. My idea here is that each interaction has a
name (possibly something we can move to an Annotation instead, but just thinking out
loud.) Each interaction also has a set of inputs. This would be every possible input that
could ever be required to run the plugin. The rules would then be used to specify which
inputs to show or not show, and in what order. The inputs become populated as their values
are filled in by the UI/Rules, and then those populated inputs are passed to the prepare()
method, which returns an object ready to perform() the given interaction.
I know this is a bit rough around the edges, but it's an idea. We should probably look
at some other frameworks out there and see what other people have done, and try to take
some of what works and adapt it for Forge.
Design an user interface API for addons
---------------------------------------
Key: FORGE-719
URL:
https://issues.jboss.org/browse/FORGE-719
Project: Forge
Issue Type: Story
Components: Brainstorming
Reporter: George Gastaldi
Fix For: 2.0.0.Alpha1
Requirements:
- It must be usable in a Shell UI
- It should be usable in a Visual UI (SWT, Swing)
- It must be typesafe, therefore allowing the use of complex types.
Let's use this JIRA to brainstorm about it.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira