fixing SOE during offline inspections (IDEA-152435)

This commit is contained in:
Eugene Zhuravlev
2016-03-12 20:17:43 +01:00
parent efcef1ed92
commit 22b837be69
3 changed files with 4 additions and 8 deletions
@@ -175,8 +175,9 @@ public class AntBuildFileImpl implements AntBuildFileBase {
myProjectOptions.registerProperty(ADDITIONAL_CLASSPATH, "entry", SinglePathEntry.EXTERNALIZER);
myProjectOptions.registerProperty(ANT_REFERENCE, AntReference.EXTERNALIZER);
myAllOptions = new CompositePropertyContainer(new AbstractProperty.AbstractPropertyContainer[]{myWorkspaceOptions, myProjectOptions,
GlobalAntConfiguration.getInstance().getProperties(getProject())});
myAllOptions = new CompositePropertyContainer(new AbstractProperty.AbstractPropertyContainer[]{
myWorkspaceOptions, myProjectOptions, GlobalAntConfiguration.getInstance().getProperties(), configuration.getProperties()
});
myClassloaderHolder = new AntBuildFileClassLoaderHolder(myAllOptions);
}
@@ -640,6 +640,7 @@ public class AntConfigurationImpl extends AntConfigurationBase implements Persis
final Semaphore targetDone = new Semaphore();
targetDone.down();
final Ref<Boolean> result = Ref.create(Boolean.FALSE);
//noinspection SSBasedInspection
SwingUtilities.invokeLater(new Runnable() {
public void run() {
try {
@@ -20,7 +20,6 @@ import com.intellij.lang.ant.AntBundle;
import com.intellij.lang.ant.config.AntBuildFile;
import com.intellij.lang.ant.config.AntBuildTarget;
import com.intellij.lang.ant.config.AntConfiguration;
import com.intellij.lang.ant.config.AntConfigurationBase;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.ServiceManager;
@@ -125,11 +124,6 @@ public class GlobalAntConfiguration implements PersistentStateComponent<Element>
return myProperties;
}
public AbstractProperty.AbstractPropertyContainer getProperties(Project project) {
return new CompositePropertyContainer(new AbstractProperty.AbstractPropertyContainer[]{
myProperties, AntConfigurationBase.getInstance(project).getProperties()});
}
public void addConfiguration(final AntInstallation ant) {
if (getConfiguredAnts().containsKey(ant.getReference())) {
LOG.error("Duplicate name: " + ant.getName());