Author: vyemialyanchyk
Date: 2010-09-28 11:33:19 -0400 (Tue, 28 Sep 2010)
New Revision: 25277
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationJavaClasspathTab.java
Log:
https://jira.jboss.org/browse/JBIDE-7197 - fix updated -> more accurate reset
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationJavaClasspathTab.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationJavaClasspathTab.java 2010-09-28
15:32:12 UTC (rev 25276)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/ConsoleConfigurationJavaClasspathTab.java 2010-09-28
15:33:19 UTC (rev 25277)
@@ -35,8 +35,9 @@
protected boolean configurationFileWillBeCreated = false;
// for validation process optimization:
// presave last time validated configuration and validate result,
- // to avoid several unnecessary validation -> rebuild for ConsoleConfig
- // is rather slow operation - so several time rebuild is visible.
+ // to avoid several unnecessary validation -> buildWith for ConsoleConfig
+ // is rather slow operation (for classpaths with many jar files) -
+ // so several time rebuild is visible for GUI performance operation.
protected ILaunchConfiguration lastValidatedLaunchConfig = null;
protected String lastErrorMessage = null;
protected boolean lastRes = false;
@@ -93,12 +94,20 @@
if (flagTryToBuild) {
try {
ccTest.buildWith(null, false);
- ccTest.reset();
} catch (Exception ex) {
resUserClasses = false;
setErrorMessage(ex.getMessage());
}
+ // accurate reset for ccTest after buildWith, should avoid possible
"leaks"
try {
+ ccTest.reset();
+ } catch (Exception ex) {
+ if (resUserClasses) {
+ resUserClasses = false;
+ setErrorMessage(ex.getMessage());
+ }
+ }
+ try {
lastValidatedLaunchConfig = launchConfig.getWorkingCopy();
} catch (CoreException e1) {
lastValidatedLaunchConfig = null;