From 55555523e2c1ab2fcfaa38918256dafe483d7876 Mon Sep 17 00:00:00 2001 From: jpmoresmau Date: Sun, 4 Jan 2015 17:09:46 +0100 Subject: [PATCH] find proper file --- .../haskell/buildwrapper/BuildWrapperPlugin.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net.sf.eclipsefp.haskell.buildwrapper/src/net/sf/eclipsefp/haskell/buildwrapper/BuildWrapperPlugin.java b/net.sf.eclipsefp.haskell.buildwrapper/src/net/sf/eclipsefp/haskell/buildwrapper/BuildWrapperPlugin.java index 814e6e376..2ad381bfc 100644 --- a/net.sf.eclipsefp.haskell.buildwrapper/src/net/sf/eclipsefp/haskell/buildwrapper/BuildWrapperPlugin.java +++ b/net.sf.eclipsefp.haskell.buildwrapper/src/net/sf/eclipsefp/haskell/buildwrapper/BuildWrapperPlugin.java @@ -295,7 +295,7 @@ public static void deleteAllProblems(IProject p) { /** * cache project cabal file if cabal file doesn't have same name than project */ - private static Map m=new HashMap<>(); + private static Map cabalFileCache=new HashMap<>(); /** * get the cabal file path @@ -339,8 +339,8 @@ public static IPath getCabalFile(final IPath projectPath, final String name) { public static IFile getCabalFile(final IProject project) { IFile f=project.getFile(new Path(project.getName()).addFileExtension(FileUtil.EXTENSION_CABAL)); if (f==null || !f.exists()){ // oh oh - IFile f2=m.get(project); - if (f2==null){ + IFile f2=cabalFileCache.get(project); + if (f2==null || !f2.exists()){ try { // find a cabal file IResource[] children=project.members(); @@ -359,7 +359,7 @@ public static IFile getCabalFile(final IProject project) { // log error, we've taken a random cabal file logError(NLS.bind(BWText.project_cabal_duplicate, project.getName()),null); } - m.put(project, f); + cabalFileCache.put(project, f); } catch (CoreException ce){ logError(NLS.bind(BWText.project_members_list_error, project.getName()), ce); }