Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JBIDE-22592] always fire change for same properties list instance #1261

Merged
merged 1 commit into from Jul 20, 2016

Conversation

adietish
Copy link
Member

No description provided.

if (value != null) {
clone.setValue(value);
p.setValue(value);
Copy link
Member Author

@adietish adietish Jul 20, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DONT clone the parameters, set the value to the existing parameter.

this.template = (ITemplate) source.getSource();
updateTemplateParameters(template);
ITemplate newTemplate = (ITemplate) source.getSource();
if (!Objects.equals(newTemplate, this.template)) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dont update template parameters if we already have the very same template already set

firePropertyChange(PROPERTY_PARAMETERS, oldParameters, this.parameters);

// update selected parameter
setSelectedParameter(getSelectedParameterOrDefault());
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update selected parameter after new parameters have been set.

@fbricon
Copy link
Member

fbricon commented Jul 20, 2016

+1

@adietish adietish merged commit 2a7bd80 into jbosstools:master Jul 20, 2016
@adietish adietish deleted the JBIDE-22592 branch July 20, 2016 12:49
public void setParameters(Collection<IParameter> parameters) {
List<IParameter> oldParameters = new ArrayList<>(this.parameters);
if (parameters == null) {
this.parameters.clear();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May this.originalValueMap be cleared here, too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants