This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 28733
Collapse All | Expand All

(-)cpplite/manifest.mf (-2 / +2 lines)
Lines 12-19 Link Here
12
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
12
OpenIDE-Module-Implementation-Version: @BUILD_NUMBER_SUBST@
13
OpenIDE-Module-Specification-Version: 1.7
13
OpenIDE-Module-Specification-Version: 1.7
14
OpenIDE-Module-Module-Dependencies: org.openide.compiler > 1.0, org.openide.execution > 1.0, org.openide.deprecated > 1.0
14
OpenIDE-Module-Module-Dependencies: org.openide.compiler > 1.0, org.openide.execution > 1.0, org.openide.deprecated > 1.0
15
OpenIDE-Module-Requires: org.openide.compiler.CompilationEngine, org.openide.execution.ExecutionEngine
15
OpenIDE-Module-Requires: org.openide.compiler.CompilationEngine, org.openide.execution.ExecutionEngine, org.openide.modules.InstalledFileLocator
16
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.17
16
OpenIDE-Module-IDE-Dependencies: IDE/1 > 3.21
17
OpenIDE-Module: org.netbeans.modules.cpplite.CPPSupport/1
17
OpenIDE-Module: org.netbeans.modules.cpplite.CPPSupport/1
18
18
19
Name: org/netbeans/modules/cpplite/compiler/cpp/CPPCompilerType.class
19
Name: org/netbeans/modules/cpplite/compiler/cpp/CPPCompilerType.class
(-)cpplite/src/org/netbeans/modules/cpplite/Bundle.properties (-5 lines)
Lines 53-60 Link Here
53
ERR_cath_not_found=Proper cathegory for file can not be found.
53
ERR_cath_not_found=Proper cathegory for file can not be found.
54
54
55
ANN_readInstanceArgs=Error while reading instance of class: {0}.
55
ANN_readInstanceArgs=Error while reading instance of class: {0}.
56
57
findRunnableScript_0={0}{3}modules{3}bin{3}
58
findRunnableScript_1={1}{3}modules{3}bin{3}
59
findRunnableScript_2={0}{3}bin{3}
60
findRunnableScript_3={1}{3}bin{3}
(-)cpplite/src/org/netbeans/modules/cpplite/Utils.java (-31 / +3 lines)
Lines 57-62 Link Here
57
import org.openide.ErrorManager;
57
import org.openide.ErrorManager;
58
import java.text.Format;
58
import java.text.Format;
59
import java.text.MessageFormat;
59
import java.text.MessageFormat;
60
import org.openide.modules.InstalledFileLocator;
60
61
61
/** Common utilities.
62
/** Common utilities.
62
 *
63
 *
Lines 292-303 Link Here
292
    }
293
    }
293
    
294
    
294
    /**This finds script in some binaries storage directories.
295
    /**This finds script in some binaries storage directories.
295
     * Because there is no supported way in IDE to find
296
     * Currently uses modules/bin/ directories.
296
     * anything in IDE, this is "hope to work" only.
297
     * The method reads patterns from bundle. The keys
298
     * are in form findRunnableScript_{number}. The numbers
299
     * have to be continuous from 0. First break means
300
     * stop for reading patterns.
301
     *
297
     *
302
     * In fact, it is not possible to find out whether
298
     * In fact, it is not possible to find out whether
303
     * the script is executable (except executing it),
299
     * the script is executable (except executing it),
Lines 310-340 Link Here
310
     *
306
     *
311
     */
307
     */
312
    public static File findRunnableScript(String scriptName) {
308
    public static File findRunnableScript(String scriptName) {
313
        String    formatBundleKeyPattern = "findRunnableScript_";
309
        return InstalledFileLocator.getDefault().locate("modules/bin/" + scriptName, "org.netbeans.modules.cpplite.CPPSupport", false); // NOI18N
314
        int       counter = 0;
315
        String[]  patterns = new String[] {
316
            System.getProperty("netbeans.home"),
317
            System.getProperty("netbeans.user"),
318
            System.getProperty("user.home"),
319
            File.separator,
320
        };
321
       
322
        while (true) {
323
            String key = formatBundleKeyPattern + counter++;
324
            String pattern = Utils.getLocalized(key);
325
	   
326
  	    if (pattern == key)
327
 	        break; //XXX!!
328
	    Format formatPattern = new MessageFormat(pattern);
329
	    String directory = formatPattern.format(patterns);
330
            File script = new File(directory, scriptName);
331
          
332
            if (script.isFile()) {
333
                return script;
334
            }
335
        }
336
       
337
        return null;
338
    }
310
    }
339
    
311
    
340
    public static Object newInstance(Class clazz, Object[] params) throws NoSuchMethodException,
312
    public static Object newInstance(Class clazz, Object[] params) throws NoSuchMethodException,

Return to bug 28733