[JBoss JIRA] (JBIDE-21668) Fix collection setters in ResourcesUIModel
by Fred Bricon (JIRA)
[ https://issues.jboss.org/browse/JBIDE-21668?page=com.atlassian.jira.plugi... ]
Fred Bricon reassigned JBIDE-21668:
-----------------------------------
Assignee: Viacheslav Kabanovich (was: Jeff Cantrill)
> Fix collection setters in ResourcesUIModel
> ------------------------------------------
>
> Key: JBIDE-21668
> URL: https://issues.jboss.org/browse/JBIDE-21668
> Project: Tools (JBoss Tools)
> Issue Type: Enhancement
> Components: openshift
> Affects Versions: 4.4.0.Alpha1
> Reporter: Viacheslav Kabanovich
> Assignee: Viacheslav Kabanovich
> Fix For: 4.4.0.Alpha1
>
>
> Created as follow up to JBIDE-21590.
> Collections setters in ResourcesUIModel, for instance
> {code}
> public void setBuildConfigs(Collection<IResourceUIModel> buildConfigs) {
> firePropertyChange(PROP_BUILD_CONFIGS, resources.get(ResourceKind.BUILD_CONFIG), resources.put(ResourceKind.BUILD_CONFIG, new ArrayList<>(buildConfigs)));
> }
> {code}
> fire incorrect newValue object, because java.util.Map.put(key, value) returns old object associated with the key, not the one just set.
> At this moment, this does not create any bugs, because these setters are still not used, all changes go through ResourcesUIModel.add, ResourcesUIModel.remove, ResourcesUIModel.update that have correct notification. But bugs may appear as soon as collection setters are used, so that they better be fixed, for instance this way :
> {code}
> public void setBuildConfigs(Collection<IResourceUIModel> buildConfigs) {
> setResourcesForKind(buildConfigs, ResourceKind.BUILD_CONFIG);
> }
> private void setResourcesForKind(Collection<IResourceUIModel> list, String kind) {
> List<IResourceUIModel> oldList = resources.get(kind);
> List<IResourceUIModel> newList = new ArrayList<IResourceUIModel>(list);
> resources.put(kind, newList);
> firePropertyChange(getProperty(kind), oldList, newList);
> }
> {code}
> and with use of private setResourcesForKind all other setters will remain one-liners.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 12 months
[JBoss JIRA] (JBIDE-21668) Fix collection setters in ResourcesUIModel
by Fred Bricon (JIRA)
[ https://issues.jboss.org/browse/JBIDE-21668?page=com.atlassian.jira.plugi... ]
Fred Bricon updated JBIDE-21668:
--------------------------------
Issue Type: Task (was: Enhancement)
> Fix collection setters in ResourcesUIModel
> ------------------------------------------
>
> Key: JBIDE-21668
> URL: https://issues.jboss.org/browse/JBIDE-21668
> Project: Tools (JBoss Tools)
> Issue Type: Task
> Components: openshift
> Affects Versions: 4.4.0.Alpha1
> Reporter: Viacheslav Kabanovich
> Assignee: Viacheslav Kabanovich
> Fix For: 4.4.0.Alpha1
>
>
> Created as follow up to JBIDE-21590.
> Collections setters in ResourcesUIModel, for instance
> {code}
> public void setBuildConfigs(Collection<IResourceUIModel> buildConfigs) {
> firePropertyChange(PROP_BUILD_CONFIGS, resources.get(ResourceKind.BUILD_CONFIG), resources.put(ResourceKind.BUILD_CONFIG, new ArrayList<>(buildConfigs)));
> }
> {code}
> fire incorrect newValue object, because java.util.Map.put(key, value) returns old object associated with the key, not the one just set.
> At this moment, this does not create any bugs, because these setters are still not used, all changes go through ResourcesUIModel.add, ResourcesUIModel.remove, ResourcesUIModel.update that have correct notification. But bugs may appear as soon as collection setters are used, so that they better be fixed, for instance this way :
> {code}
> public void setBuildConfigs(Collection<IResourceUIModel> buildConfigs) {
> setResourcesForKind(buildConfigs, ResourceKind.BUILD_CONFIG);
> }
> private void setResourcesForKind(Collection<IResourceUIModel> list, String kind) {
> List<IResourceUIModel> oldList = resources.get(kind);
> List<IResourceUIModel> newList = new ArrayList<IResourceUIModel>(list);
> resources.put(kind, newList);
> firePropertyChange(getProperty(kind), oldList, newList);
> }
> {code}
> and with use of private setResourcesForKind all other setters will remain one-liners.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 12 months
[JBoss JIRA] (JBIDE-21420) Delete more OpenShift projects at once
by Fred Bricon (JIRA)
[ https://issues.jboss.org/browse/JBIDE-21420?page=com.atlassian.jira.plugi... ]
Fred Bricon reassigned JBIDE-21420:
-----------------------------------
Assignee: Jeff MAURY
> Delete more OpenShift projects at once
> --------------------------------------
>
> Key: JBIDE-21420
> URL: https://issues.jboss.org/browse/JBIDE-21420
> Project: Tools (JBoss Tools)
> Issue Type: Enhancement
> Components: openshift
> Affects Versions: 4.3.1.Beta2
> Reporter: Marián Labuda
> Assignee: Jeff MAURY
> Labels: explorer, openshift_v3
> Fix For: 4.4.0.Alpha1
>
>
> It would be nice to remove more projects at once. Currently I can only delete project by project by selecting and choosing delete in its context menu. I would like to select more projects and choose Delete project(s)... in theirs context menu as it is similar for OpenShift 2 domains.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 12 months
[JBoss JIRA] (JBIDE-20911) open local terminal with oc already logged in
by Fred Bricon (JIRA)
[ https://issues.jboss.org/browse/JBIDE-20911?page=com.atlassian.jira.plugi... ]
Fred Bricon updated JBIDE-20911:
--------------------------------
Fix Version/s: 4.4.x
(was: 4.4.0.Alpha1)
> open local terminal with oc already logged in
> ---------------------------------------------
>
> Key: JBIDE-20911
> URL: https://issues.jboss.org/browse/JBIDE-20911
> Project: Tools (JBoss Tools)
> Issue Type: Feature Request
> Components: openshift
> Reporter: Max Rydahl Andersen
> Fix For: 4.4.x
>
>
> it would be great to have a "Show in > OpenShift CLI" in openshift explorer and on projects that are known to be on openshift that would use local terminal (like: https://v.usetapes.com/ISfR95tJK8) but have `oc login --token=<tokenforlogin> --server=<serverurl>` executed at start.
> This would allow users to work with CLI whenever the UI does not have exactly the command needed by user.
> * This assumes users have oc in their path
> * might need different commands based on what OS (windows vs *nix)
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 12 months
[JBoss JIRA] (JBIDE-21376) Application wizard: should allow to create an app from an image (currently only from template)
by Fred Bricon (JIRA)
[ https://issues.jboss.org/browse/JBIDE-21376?page=com.atlassian.jira.plugi... ]
Fred Bricon closed JBIDE-21376.
-------------------------------
Resolution: Duplicate Issue
Closing as duplicate of JBIDE-22118
> Application wizard: should allow to create an app from an image (currently only from template)
> ----------------------------------------------------------------------------------------------
>
> Key: JBIDE-21376
> URL: https://issues.jboss.org/browse/JBIDE-21376
> Project: Tools (JBoss Tools)
> Issue Type: Feature Request
> Components: openshift
> Affects Versions: 4.3.1.Beta1
> Reporter: Xavier Coulon
> Labels: application_wizard, openshift_v3
> Fix For: 4.4.0.Alpha1
>
> Attachments: Screenshot 2015-12-21 16.44.02.png, Screenshot 2015-12-21 16.44.24.png, Screenshot 2015-12-21 18.06.40.png
>
>
> The application wizard in the Eclipse tooling currently only allows to create application from templates. The web console additionally allows creating from images and git source.
> One can see the difference when comparing the listing of options in Eclipse vs the listing in the web console (which also includes images):
> {quote}
> Running OpenShift using our openshift-vagrant box, I can see different proposals between the web console and the Eclipse tooling when adding an application in a project. For example, {{jboss-eap64-openshift:1.1}} is not proposed in the Eclipse tooling.
> See attached screenshots.
> {quote}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 12 months