Skip to content
Snippets Groups Projects
Commit 5b32d381 authored by Nils Christian Ehmke's avatar Nils Christian Ehmke
Browse files

Removed a renaming-bug.

parent fff356d7
No related branches found
No related tags found
No related merge requests found
...@@ -930,6 +930,48 @@ public final class CurrentWorkSpaceProjectBean { ...@@ -930,6 +930,48 @@ public final class CurrentWorkSpaceProjectBean {
} }
} }
/**
* Delivers the name of the currently selected plugin/repository. This is only necessary for the correct renaming of the components.
*
* @return The name of the plugin/repository.
*/
public String getCurrentPluginName() {
synchronized (this) {
if (this.selectedPlugin != null) {
return this.selectedPlugin.getName();
} else {
return this.selectedRepository.getName();
}
}
}
/**
* Sets the name of the currently selected plugin/repository. This is only necessary for the correct renaming of the components.
*
* @param newName
* The new name of the plugin/repository.
*/
public void setCurrentPluginName(final String newName) {
synchronized (this) {
// Rename the plugin/repository and get the old name for the hash map
if (this.selectedPlugin != null) {
final String oldName = this.selectedPlugin.toString();
final MIPlugin plugin = this.pluginMap.get(oldName);
this.selectedPlugin.setName(newName);
// Update the hash map
this.pluginMap.put(plugin.toString(), plugin);
} else {
final String oldName = this.selectedRepository.toString();
final MIRepository repository = this.repositoryMap.get(oldName);
this.selectedRepository.setName(newName);
// Update the hash map
this.repositoryMap.put(repository.toString(), repository);
}
}
}
/** /**
* Delivers the valid connections (between the filters) within the current main project. * Delivers the valid connections (between the filters) within the current main project.
* *
......
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
</f:facet> </f:facet>
<f:facet name="input"> <f:facet name="input">
<h:inputText value="#{property.value}" rendered="#{not stringBean.checkString(property)}"/> <h:inputText value="#{property.value}" rendered="#{not stringBean.checkString(property)}"/>
<h:inputText value="#{currentWorkSpaceProjectBean.selectedPlugin.name}" rendered="#{stringBean.checkString(property)}"/> <h:inputText value="#{currentWorkSpaceProjectBean.currentPluginName}" rendered="#{stringBean.checkString(property)}"/>
</f:facet> </f:facet>
</p:cellEditor> </p:cellEditor>
</p:column> </p:column>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment