1
1
/*******************************************************************************
2
- * Copyright (c) 2011, 2017 IBM Corporation and others.
2
+ * Copyright (c) 2011, 2020 IBM Corporation and others.
3
3
* All rights reserved. This program and the accompanying materials
4
4
* are made available under the terms of the Eclipse Public License v1.0
5
5
* which accompanies this distribution, and is available at
@@ -47,9 +47,10 @@ public class RuntimeExplorerViewActionProvider extends CommonActionProvider {
47
47
protected NewQuickServerAction newQuickServerAction ;
48
48
protected ShowInServersAction showInServersAction ;
49
49
protected PropertiesAction propertiesAction ;
50
- protected NewExtendedConfigAction [] createConfigActions = new NewExtendedConfigAction [2 ];
51
- protected NewConfigDropinAction [] newConfigDropinActions = new NewConfigDropinAction [2 ];
50
+ protected NewExtendedConfigAction [] createConfigActions = new NewExtendedConfigAction [1 ];
51
+ protected NewExtendedConfigAction [] newServerEnvActions = new NewExtendedConfigAction [2 ];
52
52
protected NewExtendedConfigAction [] newJVMOptionsActions = new NewExtendedConfigAction [4 ];
53
+ protected NewConfigDropinAction [] newConfigDropinActions = new NewConfigDropinAction [2 ];
53
54
protected AddOnRuntimeAction addOnRuntimeAction ;
54
55
55
56
@ Override
@@ -74,23 +75,26 @@ public void init(ICommonActionExtensionSite aSite) {
74
75
75
76
showInServersAction = new ShowInServersAction (selProvider );
76
77
propertiesAction = new PropertiesAction (selProvider , shell );
77
- //propertiesAction.runtime.
78
+
78
79
createConfigActions [0 ] = new NewExtendedConfigAction (ExtendedConfigFile .BOOTSTRAP_PROPS_FILE , selProvider , viewer );
79
- createConfigActions [1 ] = new NewExtendedConfigAction (ExtendedConfigFile .SERVER_ENV_FILE , selProvider , viewer );
80
80
81
- newConfigDropinActions [0 ] = new NewConfigDropinAction (NewConfigDropinAction .DropinType .DEFAULTS , selProvider , viewer );
82
- newConfigDropinActions [1 ] = new NewConfigDropinAction (NewConfigDropinAction .DropinType .OVERRIDES , selProvider , viewer );
81
+ newServerEnvActions [0 ] = new NewExtendedConfigAction (ExtendedConfigFile .SERVER_ENV_FILE , selProvider , viewer , Constants .SERVER_CONFIG_VAR );
82
+ newServerEnvActions [1 ] = new NewExtendedConfigAction (ExtendedConfigFile .SERVER_ENV_FILE , selProvider , viewer , Constants .WLP_USER_DIR_VAR + "/"
83
+ + Constants .SHARED_FOLDER );
83
84
84
85
newJVMOptionsActions [0 ] = new NewExtendedConfigAction (ExtendedConfigFile .JVM_OPTIONS_FILE , selProvider , viewer , Constants .SERVER_CONFIG_VAR );
85
- newJVMOptionsActions [1 ] = new NewExtendedConfigAction (ExtendedConfigFile .JVM_OPTIONS_FILE , selProvider , viewer , Constants .WLP_INSTALL_VAR + "/"
86
- + Constants .USER_FOLDER + "/"
86
+ newJVMOptionsActions [1 ] = new NewExtendedConfigAction (ExtendedConfigFile .JVM_OPTIONS_FILE , selProvider , viewer , Constants .WLP_USER_DIR_VAR + "/"
87
87
+ Constants .SHARED_FOLDER );
88
88
newJVMOptionsActions [2 ] = new NewExtendedConfigAction (ExtendedConfigFile .JVM_OPTIONS_FILE , selProvider , viewer , Constants .SERVER_CONFIG_VAR + "/"
89
89
+ Constants .CONFIG_DROPINS_FOLDER + "/"
90
90
+ Constants .CONFIG_DEFAULT_DROPINS_FOLDER );
91
91
newJVMOptionsActions [3 ] = new NewExtendedConfigAction (ExtendedConfigFile .JVM_OPTIONS_FILE , selProvider , viewer , Constants .SERVER_CONFIG_VAR + "/"
92
92
+ Constants .CONFIG_DROPINS_FOLDER + "/"
93
93
+ Constants .CONFIG_OVERRIDE_DROPINS_FOLDER );
94
+
95
+ newConfigDropinActions [0 ] = new NewConfigDropinAction (NewConfigDropinAction .DropinType .DEFAULTS , selProvider , viewer );
96
+ newConfigDropinActions [1 ] = new NewConfigDropinAction (NewConfigDropinAction .DropinType .OVERRIDES , selProvider , viewer );
97
+
94
98
addOnRuntimeAction = new AddOnRuntimeAction (shell , selProvider );
95
99
}
96
100
@@ -108,8 +112,13 @@ public void fillContextMenu(IMenuManager menu) {
108
112
MenuManager configMenu = new MenuManager (Messages .menuNewExtendedConfig , Activator .getImageDescriptor (ExtendedConfigFile .BOOTSTRAP_PROPS_FILE ), "extendedConfig" );
109
113
for (int i = 0 ; i < createConfigActions .length ; i ++)
110
114
configMenu .add (createConfigActions [i ]);
115
+ // Add the submenu for server.env
116
+ MenuManager subConfigMenu = new MenuManager (ExtendedConfigFile .SERVER_ENV_FILE , Activator .getImageDescriptor (ExtendedConfigFile .BOOTSTRAP_PROPS_FILE ), ExtendedConfigFile .SERVER_ENV_FILE );
117
+ for (int i = 0 ; i < newServerEnvActions .length ; i ++)
118
+ subConfigMenu .add (newServerEnvActions [i ]);
119
+ configMenu .add (subConfigMenu );
111
120
// Add the submenu for jvm.options
112
- MenuManager subConfigMenu = new MenuManager (ExtendedConfigFile .JVM_OPTIONS_FILE , Activator .getImageDescriptor (ExtendedConfigFile .BOOTSTRAP_PROPS_FILE ), ExtendedConfigFile .JVM_OPTIONS_FILE );
121
+ subConfigMenu = new MenuManager (ExtendedConfigFile .JVM_OPTIONS_FILE , Activator .getImageDescriptor (ExtendedConfigFile .BOOTSTRAP_PROPS_FILE ), ExtendedConfigFile .JVM_OPTIONS_FILE );
113
122
for (int i = 0 ; i < newJVMOptionsActions .length ; i ++)
114
123
subConfigMenu .add (newJVMOptionsActions [i ]);
115
124
configMenu .add (subConfigMenu );
0 commit comments