[jbosstools-issues] [JBoss JIRA] (JBIDE-16519) Environment Variables wizard: use the updated openshift-java-client API for manipulating env vars
Andre Dietisheim (JIRA)
issues at jboss.org
Tue Feb 11 12:25:29 EST 2014
[ https://issues.jboss.org/browse/JBIDE-16519?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12943539#comment-12943539 ]
Andre Dietisheim edited comment on JBIDE-16519 at 2/11/14 12:24 PM:
--------------------------------------------------------------------
It looks like the only change that's required is where the tooling is updating env variables:
{code:title=https://github.com/jbosstools/jbosstools-openshift/blob/master/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/environment/EditEnvironmentVariablesWizard.java#L93}
private void update(List<EnvironmentVariableItem> toUpdate, IApplication application) {
for (EnvironmentVariableItem variable : toUpdate) {
IEnvironmentVariable environmentVariable = application.getEnvironmentVariable(variable.getName());
if (environmentVariable != null) {
environmentVariable.update(variable.getValue());
}
}
}
{code}
Addition and removal are already calling methods on the application:
{code:title=https://github.com/jbosstools/jbosstools-openshift/blob/master/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/environment/EditEnvironmentVariablesWizard.java#L83}
private void add(List<EnvironmentVariableItem> toAdd, IApplication application) {
for (EnvironmentVariableItem variable : toAdd) {
application.addEnvironmentVariable(variable.getName(), variable.getValue());
}
}
{code}
{code:title=https://github.com/jbosstools/jbosstools-openshift/blob/master/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/environment/EditEnvironmentVariablesWizard.java#L100}
private void remove(List<String> namesToRemove, IApplication application) {
for (String name : namesToRemove) {
application.removeEnvironmentVariable(name);
}
}
{code}
was (Author: adietish):
It looks like the only change that's required is where the tooling is updating env variables:
{code:title=https://github.com/jbosstools/jbosstools-openshift/blob/master/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/environment/EditEnvironmentVariablesWizard.java#L93}
private void update(List<EnvironmentVariableItem> toUpdate, IApplication application) {
for (EnvironmentVariableItem variable : toUpdate) {
IEnvironmentVariable environmentVariable = application.getEnvironmentVariable(variable.getName());
if (environmentVariable != null) {
environmentVariable.update(variable.getValue());
}
}
}
{code}
Addition and removal are already calling methods on the application:
{code:title=https://github.com/jbosstools/jbosstools-openshift/blob/master/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/environment/EditEnvironmentVariablesWizard.java#L83}
private void add(List<EnvironmentVariableItem> toAdd, IApplication application) {
for (EnvironmentVariableItem variable : toAdd) {
application.addEnvironmentVariable(variable.getName(), variable.getValue());
}
}
{code}
{code:title=https://github.com/jbosstools/jbosstools-openshift/blob/master/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/environment/EditEnvironmentVariablesWizard.java#L100}
private void remove(List<String> namesToRemove, IApplication application) {
for (String name : namesToRemove) {
application.removeEnvironmentVariable(name);
}
}
{code}
> Environment Variables wizard: use the updated openshift-java-client API for manipulating env vars
> -------------------------------------------------------------------------------------------------
>
> Key: JBIDE-16519
> URL: https://issues.jboss.org/browse/JBIDE-16519
> Project: Tools (JBoss Tools)
> Issue Type: Enhancement
> Components: openshift
> Reporter: Andre Dietisheim
>
> In OSJC-53 we're changing the API for env vars in the openshift-java-client. Once this change is done we have to make sure the Eclipse tooling is using the latest API
--
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
More information about the jbosstools-issues
mailing list