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 255967
Collapse All | Expand All

(-)a/groovy.grails/src/org/netbeans/modules/groovy/grails/api/GrailsPlatform.java (-5 / +24 lines)
Lines 504-510 Link Here
504
        public static final Version VERSION_DEFAULT = new Version(1, null, null, null, null);
504
        public static final Version VERSION_DEFAULT = new Version(1, null, null, null, null);
505
505
506
        public static final Version VERSION_1_1 = new Version(1, 1, null, null, null);
506
        public static final Version VERSION_1_1 = new Version(1, 1, null, null, null);
507
507
        
508
        public static final Version VERSION_2 = new Version(2, null, null, null, null);
509
        
510
        public static final Version VERSION_3 = new Version(3, null, null, null, null);
511
        
508
        private final int major;
512
        private final int major;
509
513
510
        private final Integer minor;
514
        private final Integer minor;
Lines 708-716 Link Here
708
712
709
        @Override
713
        @Override
710
        public Process call() throws Exception {
714
        public Process call() throws Exception {
711
            File grailsExecutable = RuntimeHelper.getGrailsExecutable(
715
            
712
                    new File(GrailsSettings.getInstance().getGrailsBase()), descriptor.isDebug());
716
            Version platformVersion = GrailsPlatform.getDefault().getVersion();
713
717
            File grailsExecutable = null;
718
            //if we're still using grails 1 we have a special debug command:
719
            if (platformVersion.compareTo(Version.VERSION_2) < 0) {
720
                grailsExecutable = RuntimeHelper.getGrailsExecutable(
721
                    new File(GrailsSettings.getInstance().getGrailsBase()), true);
722
            } else {
723
                grailsExecutable = RuntimeHelper.getGrailsExecutable(
724
                    new File(GrailsSettings.getInstance().getGrailsBase()), false);
725
            }
714
            if (grailsExecutable == null || !grailsExecutable.exists()) {
726
            if (grailsExecutable == null || !grailsExecutable.exists()) {
715
                LOGGER.log(Level.WARNING, "Executable doesn''t exist: {0}", grailsExecutable.getAbsolutePath());
727
                LOGGER.log(Level.WARNING, "Executable doesn''t exist: {0}", grailsExecutable.getAbsolutePath());
716
728
Lines 745-751 Link Here
745
                command.append(" ").append(env.toString());
757
                command.append(" ").append(env.toString());
746
            }
758
            }
747
            command.append(" ").append(descriptor.getName());
759
            command.append(" ").append(descriptor.getName());
748
            command.append(" ").append(createCommandArguments(descriptor.getArguments()));
760
            if (descriptor.isDebug()) {                
761
                if (platformVersion.compareTo(Version.VERSION_3) >= 0) {
762
                    command.append(" ").append("--debug-jvm"); // NOI18N
763
                } else if (platformVersion.compareTo(Version.VERSION_2) >= 0) {
764
                    command.append(" ").append("--debug-fork"); // NOI18N
765
                }
766
            }
767
            command.append(" ").append(createCommandArguments(descriptor.getArguments()));            
749
768
750
            String preProcessUUID = UUID.randomUUID().toString();
769
            String preProcessUUID = UUID.randomUUID().toString();
751
770

Return to bug 255967