create changelog entry
[debian/openrocket] / core / src / net / sf / openrocket / plugin / example / stuff.txt
1
2
3
4 Plugin:
5
6 foo()
7 bar()
8 getValue()
9 setValue()
10
11
12
13 Service:
14
15 getPlugins(args...)
16 capabilities()  ->  "pluginid:service"
17
18
19
20 SwingConfigurator:
21
22 getConfigurationComponent(plugin)
23 capabilities()  ->  "pluginid:config"
24
25
26
27
28 OpenRocketSimulationListener extends SimulationListener implements Service, SwingConfigurator:
29
30
31 constructor:
32   pluginid = class name
33   
34
35 getPlugins():
36   return new this
37
38 capabilities: pluginid:service, pluginid:config
39
40 getConfigurationComponent(plugin)
41   plugin.getConfigurationComponent()
42
43 abstract getConfigurationComponent()
44
45
46
47
48
49 Types of plugins:
50
51
52 AtmosphericModel
53  - Name -> dropdown
54  - Config component -> dialog window (or button)
55  - stateful, non-dynamic
56  - stored
57  
58
59 SimulationListener
60  - Name + menu position -> Add extension menu
61  - Config component -> dialog after edit button
62  - stateful, (dynamic?)
63  - stored
64  
65
66 OptimizationModifier
67  - contains its own name, description, related object
68  - config N/A
69  - stateful, dynamic
70  - not stored
71  
72  
73 OptimizationParameter
74  - name
75  - config N/A
76  - stateful, (dynamic?)
77  - not stored
78  
79
80 PluginDialogWindow
81  - name + menu position -> Menu
82  - stateful, non-dynamic
83  - not stored
84  
85
86 Motor
87  - Name -> Config tab
88  - Config component -> tab contents ????
89  - or a separate configuration interface?
90  - stored
91
92
93
94 Name is common  -  out, instead have name separately in plugin interfaces?
95 Menu position used twice  -  out
96
97 Leave common configuration out
98  -> :config supported by those that make sense
99  -> may have separate interface from SwingConfigurator (e.g. SwingMotorConfigurator)
100
101 Motor
102  -> :loader separately?  for injecting placeholders
103     or store data and call loaders later
104
105
106
107
108 <extension pluginid="com.example.MyFancyExtension">
109   <param type="double" key="altitude">100.0</param>
110   <param type="material" key="mat">
111     <name>Gold</name>
112     <type>bulk</type>
113     <density>16000</density>
114   </param>
115 </extension>
116
117
118 <extension pluginid="com.example.MyFancyExtension">
119   <param type="double" key="altitude">100.0</param>
120   <param type="material" key="mat">
121     <name>Gold</name>
122     <type>bulk</type>
123     <density>16000</density>
124   </param>
125 </extension>
126
127
128 <extension pluginid="com.example.MyFancyExtension">
129 </extension>
130
131
132 <extension pluginid="com.example.MyFancyExtension">
133 </extension>
134
135