~ubuntu-branches/ubuntu/trusty/eclipse-linuxtools/trusty

« back to all changes in this revision

Viewing changes to valgrind/org.eclipse.linuxtools.valgrind.launch/src/org/eclipse/linuxtools/internal/valgrind/launch/ValgrindOptionsTab.java

  • Committer: Package Import Robot
  • Author(s): tony mancill
  • Date: 2013-05-13 21:43:22 UTC
  • mfrom: (1.2.1) (2.1.2 experimental)
  • Revision ID: package-import@ubuntu.com-20130513214322-6frgd9du1n0w2uo7
Tags: 1.2.1-1
* Team upload.
* New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
97
97
        
98
98
        protected Exception ex;
99
99
        
 
100
        /**
 
101
         * @since 1.2
 
102
         */
 
103
        protected boolean noToolCombo;
 
104
        
100
105
        private Version valgrindVersion;
101
106
        private boolean checkVersion;
102
107
        
155
160
 
156
161
                createVerticalSpacer(top, 1);
157
162
 
158
 
                createToolCombo(top);
 
163
                // provide the tool combo if it is not excluded
 
164
                if (!noToolCombo)
 
165
                        createToolCombo(top);
159
166
 
160
167
                createVerticalSpacer(top, 1);
161
168
 
200
207
                
201
208
                scrollTop.setContent(top);
202
209
                recomputeSize();
 
210
                
 
211
                updateLaunchConfigurationDialog();
203
212
        }
204
213
 
205
214
        protected void recomputeSize() {
498
507
 
499
508
                if (checkVersion) {
500
509
                        try {
501
 
                                IProject project = CDebugUtils.verifyCProject(configuration).getProject();
 
510
                                IProject project;
 
511
                                try {
 
512
                                        project = CDebugUtils.verifyCProject(configuration).getProject();
 
513
                                } catch (Exception e1) {
 
514
                                        // no project is still a possibility the validator handles
 
515
                                        project = null;
 
516
                                }
502
517
                                valgrindVersion = getPlugin().getValgrindVersion(project);
503
518
                        } catch (CoreException e) {
504
519
                                ex = e;
508
523
                updateErrorOptions();
509
524
 
510
525
                try {
511
 
                        tool = configuration.getAttribute(LaunchConfigurationConstants.ATTR_TOOL, LaunchConfigurationConstants.DEFAULT_TOOL);
512
 
                        int select = -1;
513
 
                        for (int i = 0; i < tools.length && select < 0; i++) {
514
 
                                if (tool.equals(tools[i])) {
515
 
                                        select = i;
 
526
                        if (!noToolCombo) {
 
527
                                tool = configuration.getAttribute(LaunchConfigurationConstants.ATTR_TOOL, LaunchConfigurationConstants.DEFAULT_TOOL);
 
528
                                int select = -1;
 
529
                                for (int i = 0; i < tools.length && select < 0; i++) {
 
530
                                        if (tool.equals(tools[i])) {
 
531
                                                select = i;
 
532
                                        }
516
533
                                }
517
 
                        }
518
534
 
519
 
                        if (select != -1) {
520
 
                                toolsCombo.select(select);
 
535
                                if (select != -1) {
 
536
                                        toolsCombo.select(select);
 
537
                                }
521
538
                        }
522
539
                        handleToolChanged();
523
540
                        
615
632
        public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
616
633
                launchConfigurationWorkingCopy = configuration;
617
634
                
618
 
                configuration.setAttribute(LaunchConfigurationConstants.ATTR_TOOL, LaunchConfigurationConstants.DEFAULT_TOOL);
 
635
                if (noToolCombo)
 
636
                        configuration.setAttribute(LaunchConfigurationConstants.ATTR_TOOL, tool);
 
637
                else    
 
638
                        configuration.setAttribute(LaunchConfigurationConstants.ATTR_TOOL, LaunchConfigurationConstants.DEFAULT_TOOL);
619
639
                configuration.setAttribute(LaunchConfigurationConstants.ATTR_GENERAL_TRACECHILD, LaunchConfigurationConstants.DEFAULT_GENERAL_TRACECHILD);
620
640
                configuration.setAttribute(LaunchConfigurationConstants.ATTR_GENERAL_FREERES, LaunchConfigurationConstants.DEFAULT_GENERAL_FREERES);
621
641