Index: cpplite/manifest.mf =================================================================== RCS file: /cvs/cpplite/manifest.mf,v retrieving revision 1.16 diff -u -r1.16 manifest.mf --- cpplite/manifest.mf 2 Nov 2002 21:07:47 -0000 1.16 +++ cpplite/manifest.mf 13 Nov 2002 21:47:57 -0000 @@ -12,8 +12,8 @@ OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@ OpenIDE-Module-Specification-Version: 1.7 OpenIDE-Module-Module-Dependencies: org.openide.compiler > 1.0, org.openide.execution > 1.0, org.openide.deprecated > 1.0 -OpenIDE-Module-Requires: org.openide.compiler.CompilationEngine, org.openide.execution.ExecutionEngine -OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.17 +OpenIDE-Module-Requires: org.openide.compiler.CompilationEngine, org.openide.execution.ExecutionEngine, org.openide.modules.InstalledFileLocator +OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.21 OpenIDE-Module: org.netbeans.modules.cpplite.CPPSupport/1 Name: org/netbeans/modules/cpplite/compiler/cpp/CPPCompilerType.class Index: cpplite/src/org/netbeans/modules/cpplite/Bundle.properties =================================================================== RCS file: /cvs/cpplite/src/org/netbeans/modules/cpplite/Bundle.properties,v retrieving revision 1.8 diff -u -r1.8 Bundle.properties --- cpplite/src/org/netbeans/modules/cpplite/Bundle.properties 23 Jan 2002 20:59:23 -0000 1.8 +++ cpplite/src/org/netbeans/modules/cpplite/Bundle.properties 13 Nov 2002 21:47:57 -0000 @@ -53,8 +53,3 @@ ERR_cath_not_found=Proper cathegory for file can not be found. ANN_readInstanceArgs=Error while reading instance of class: {0}. - -findRunnableScript_0={0}{3}modules{3}bin{3} -findRunnableScript_1={1}{3}modules{3}bin{3} -findRunnableScript_2={0}{3}bin{3} -findRunnableScript_3={1}{3}bin{3} Index: cpplite/src/org/netbeans/modules/cpplite/Utils.java =================================================================== RCS file: /cvs/cpplite/src/org/netbeans/modules/cpplite/Utils.java,v retrieving revision 1.10 diff -u -r1.10 Utils.java --- cpplite/src/org/netbeans/modules/cpplite/Utils.java 23 Jan 2002 20:59:23 -0000 1.10 +++ cpplite/src/org/netbeans/modules/cpplite/Utils.java 13 Nov 2002 21:47:57 -0000 @@ -57,6 +57,7 @@ import org.openide.ErrorManager; import java.text.Format; import java.text.MessageFormat; +import org.openide.modules.InstalledFileLocator; /** Common utilities. * @@ -292,12 +293,7 @@ } /**This finds script in some binaries storage directories. - * Because there is no supported way in IDE to find - * anything in IDE, this is "hope to work" only. - * The method reads patterns from bundle. The keys - * are in form findRunnableScript_{number}. The numbers - * have to be continuous from 0. First break means - * stop for reading patterns. + * Currently uses modules/bin/ directories. * * In fact, it is not possible to find out whether * the script is executable (except executing it), @@ -310,31 +306,7 @@ * */ public static File findRunnableScript(String scriptName) { - String formatBundleKeyPattern = "findRunnableScript_"; - int counter = 0; - String[] patterns = new String[] { - System.getProperty("netbeans.home"), - System.getProperty("netbeans.user"), - System.getProperty("user.home"), - File.separator, - }; - - while (true) { - String key = formatBundleKeyPattern + counter++; - String pattern = Utils.getLocalized(key); - - if (pattern == key) - break; //XXX!! - Format formatPattern = new MessageFormat(pattern); - String directory = formatPattern.format(patterns); - File script = new File(directory, scriptName); - - if (script.isFile()) { - return script; - } - } - - return null; + return InstalledFileLocator.getDefault().locate("modules/bin/" + scriptName, "org.netbeans.modules.cpplite.CPPSupport", false); // NOI18N } public static Object newInstance(Class clazz, Object[] params) throws NoSuchMethodException,