Author: vyemialyanchyk
Date: 2010-02-25 13:20:19 -0500 (Thu, 25 Feb 2010)
New Revision: 20496
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/ProjectUtils.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5944 - bugfix with
ProjectUtils.removeProjectNature - fixed
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/ProjectUtils.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/ProjectUtils.java 2010-02-25
18:13:27 UTC (rev 20495)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/ProjectUtils.java 2010-02-25
18:20:19 UTC (rev 20496)
@@ -148,9 +148,10 @@
String[] natures = description.getNatureIds();
String[] newNatures = new String[natures.length - 1];
- for(int i = 0; i < natures.length; i++) {
- if (!natures[i].equals(nature) )
- newNatures[i] = natures[i];
+ for(int i = 0, j = 0; i < natures.length; i++) {
+ if (!natures[i].equals(nature)) {
+ newNatures[j++] = natures[i];
+ }
}
description.setNatureIds(newNatures);
project.setDescription(description, monitor);