File tree Expand file tree Collapse file tree 3 files changed +57
-0
lines changed Expand file tree Collapse file tree 3 files changed +57
-0
lines changed Original file line number Diff line number Diff line change @@ -265,6 +265,26 @@ openmct.install(myPlugin);
265
265
266
266
The plugin will be invoked to configure Open MCT before it is started.
267
267
268
+ ### Included Plugins
269
+
270
+ Open MCT is packaged along with a few general-purpose plugins:
271
+
272
+ * ` openmct.plugins.localStorage ` provides persistence of user-created
273
+ objects in browser-local storage. This is particularly useful in
274
+ development environments.
275
+ * ` openmct.plugins.myItems ` adds a top-level folder named "My Items"
276
+ when the application is first started, providing a place for a
277
+ user to store created items.
278
+
279
+ Generally, you will want to either install these plugins, or install
280
+ different plugins that provide persistence and an initial folder
281
+ hierarchy. Installation is as described [ above] ( #installing-plugins ) :
282
+
283
+ ```
284
+ openmct.install(openmct.plugins.localStorage);
285
+ openmct.install(openmct.plugins.myItems);
286
+ ```
287
+
268
288
### Writing Plugins
269
289
270
290
Plugins configure Open MCT, and should utilize the
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ define([
27
27
'./api/api' ,
28
28
'./selection/Selection' ,
29
29
'./api/objects/object-utils' ,
30
+ './plugins/plugins' ,
30
31
'./ui/ViewRegistry'
31
32
] , function (
32
33
EventEmitter ,
@@ -35,6 +36,7 @@ define([
35
36
api ,
36
37
Selection ,
37
38
objectUtils ,
39
+ plugins ,
38
40
ViewRegistry
39
41
) {
40
42
/**
@@ -278,5 +280,7 @@ define([
278
280
plugin ( this ) ;
279
281
} ;
280
282
283
+ MCT . prototype . plugins = plugins ;
284
+
281
285
return MCT ;
282
286
} ) ;
Original file line number Diff line number Diff line change
1
+ /*****************************************************************************
2
+ * Open MCT, Copyright (c) 2014-2016, United States Government
3
+ * as represented by the Administrator of the National Aeronautics and Space
4
+ * Administration. All rights reserved.
5
+ *
6
+ * Open MCT is licensed under the Apache License, Version 2.0 (the
7
+ * "License"); you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ * http://www.apache.org/licenses/LICENSE-2.0.
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14
+ * License for the specific language governing permissions and limitations
15
+ * under the License.
16
+ *
17
+ * Open MCT includes source code licensed under additional open source
18
+ * licenses. See the Open Source Licenses file (LICENSES.md) included with
19
+ * this source code distribution or the Licensing information page available
20
+ * at runtime from the About dialog for additional information.
21
+ *****************************************************************************/
22
+
23
+ define ( [
24
+ ] , function ( ) {
25
+ return {
26
+ localStorage : function ( openmct ) {
27
+ openmct . legacyRegistry . enable ( 'platform/persistence/local' ) ;
28
+ } ,
29
+ myItems : function ( openmct ) {
30
+ openmct . legacyRegistry . enable ( 'platform/features/my-items' ) ;
31
+ }
32
+ } ;
33
+ } ) ;
You can’t perform that action at this time.
0 commit comments