Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 342069 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/cdt/make/core/messages/Messages.java (-2 / +3 lines)
Lines 18-25 Link Here
18
 */
18
 */
19
public class Messages extends NLS {
19
public class Messages extends NLS {
20
	private static final String BUNDLE_NAME = "org.eclipse.cdt.make.core.messages.messages"; //$NON-NLS-1$
20
	private static final String BUNDLE_NAME = "org.eclipse.cdt.make.core.messages.messages"; //$NON-NLS-1$
21
	public static String SCMarkerGenerator_0;
21
	public static String SCMarkerGenerator_Add_Markers;
22
	public static String SCMarkerGenerator_1;
22
	public static String SCMarkerGenerator_Error_Adding_Markers;
23
	public static String SCMarkerGenerator_Discovery_Options_Page;
23
	static {
24
	static {
24
		// initialize resource bundle
25
		// initialize resource bundle
25
		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
26
		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
(-)src/org/eclipse/cdt/make/core/messages/messages.properties (-2 / +3 lines)
Lines 8-12 Link Here
8
# Contributors:
8
# Contributors:
9
#     IBM Corporation - initial API and implementation
9
#     IBM Corporation - initial API and implementation
10
###############################################################################
10
###############################################################################
11
SCMarkerGenerator_0=Add markers to project
11
SCMarkerGenerator_Add_Markers=Add Scanner Discovery markers
12
SCMarkerGenerator_1=Error adding markers.
12
SCMarkerGenerator_Error_Adding_Markers=Error adding markers.
13
SCMarkerGenerator_Discovery_Options_Page=[Discovery Options] page in project properties
(-)src/org/eclipse/cdt/make/internal/core/MakeMessages.properties (-1 / +3 lines)
Lines 38-46 Link Here
38
38
39
ExternalScannerInfoProvider.Provider_Error=Error launching external scanner info generator ({0})
39
ExternalScannerInfoProvider.Provider_Error=Error launching external scanner info generator ({0})
40
ExternalScannerInfoProvider.Reading_Specs=Reading specs ... 
40
ExternalScannerInfoProvider.Reading_Specs=Reading specs ... 
41
ExternalScannerInfoProvider.Invoking_Command=Invoking Command: 
41
ExternalScannerInfoProvider.Invoking_Command=Getting built-in compiler specs: 
42
ExternalScannerInfoProvider.Parsing_Output=Parsing output ... 
42
ExternalScannerInfoProvider.Parsing_Output=Parsing output ... 
43
ExternalScannerInfoProvider.Creating_Markers=Generating markers ... 
43
ExternalScannerInfoProvider.Creating_Markers=Generating markers ... 
44
ExternalScannerInfoProvider.Program_Not_In_Path=Program "{0}" is not found in PATH
45
ExternalScannerInfoProvider.Error_Prefix=Error: 
44
46
45
ScannerInfoCollector.Processing=Processing discovered scanner configuration ... 
47
ScannerInfoCollector.Processing=Processing discovered scanner configuration ... 
46
ScannerInfoCollector.Updating=Updating Scanner Configuration for project 
48
ScannerInfoCollector.Updating=Updating Scanner Configuration for project 
(-)src/org/eclipse/cdt/make/internal/core/scannerconfig2/DefaultRunSIProvider.java (-10 / +79 lines)
Lines 37-42 Link Here
37
import org.eclipse.cdt.make.internal.core.scannerconfig.ScannerInfoConsoleParserFactory;
37
import org.eclipse.cdt.make.internal.core.scannerconfig.ScannerInfoConsoleParserFactory;
38
import org.eclipse.cdt.make.internal.core.scannerconfig.util.TraceUtil;
38
import org.eclipse.cdt.make.internal.core.scannerconfig.util.TraceUtil;
39
import org.eclipse.cdt.utils.EFSExtensionManager;
39
import org.eclipse.cdt.utils.EFSExtensionManager;
40
import org.eclipse.cdt.utils.PathUtil;
40
import org.eclipse.core.resources.IProject;
41
import org.eclipse.core.resources.IProject;
41
import org.eclipse.core.resources.IResource;
42
import org.eclipse.core.resources.IResource;
42
import org.eclipse.core.runtime.IPath;
43
import org.eclipse.core.runtime.IPath;
Lines 44-49 Link Here
44
import org.eclipse.core.runtime.NullProgressMonitor;
45
import org.eclipse.core.runtime.NullProgressMonitor;
45
import org.eclipse.core.runtime.Path;
46
import org.eclipse.core.runtime.Path;
46
import org.eclipse.core.runtime.SubProgressMonitor;
47
import org.eclipse.core.runtime.SubProgressMonitor;
48
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
49
import org.eclipse.core.runtime.preferences.InstanceScope;
50
import org.osgi.service.prefs.BackingStoreException;
47
51
48
/**
52
/**
49
 * New default external scanner info provider of type 'run'
53
 * New default external scanner info provider of type 'run'
Lines 51-59 Link Here
51
 * @author vhirsl
55
 * @author vhirsl
52
 */
56
 */
53
public class DefaultRunSIProvider implements IExternalScannerInfoProvider {
57
public class DefaultRunSIProvider implements IExternalScannerInfoProvider {
58
	/** console id which should match the definition in extension point */
59
	public static final String EXTERNAL_SI_PROVIDER_CONSOLE_ID = "org.eclipse.cdt.make.core.ExternalScannerInfoProviderConsole"; //$NON-NLS-1$
60
	private static final String PREF_CONSOLE_ENABLED = "org.eclipse.cdt.make.core.scanner.discovery.console.enabled"; //$NON-NLS-1$
54
    private static final String EXTERNAL_SI_PROVIDER_ERROR = "ExternalScannerInfoProvider.Provider_Error"; //$NON-NLS-1$
61
    private static final String EXTERNAL_SI_PROVIDER_ERROR = "ExternalScannerInfoProvider.Provider_Error"; //$NON-NLS-1$
55
    private static final String EXTERNAL_SI_PROVIDER_CONSOLE_ID = MakeCorePlugin.getUniqueIdentifier() + ".ExternalScannerInfoProviderConsole"; //$NON-NLS-1$
56
    private static final String LANG_ENV_VAR = "LANG"; //$NON-NLS-1$
62
    private static final String LANG_ENV_VAR = "LANG"; //$NON-NLS-1$
63
	private static final String NEWLINE = System.getProperty("line.separator", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
64
	private static final String PATH_ENV = "PATH"; //$NON-NLS-1$
57
65
58
    protected IResource resource;
66
    protected IResource resource;
59
    protected String providerId;
67
    protected String providerId;
Lines 96-102 Link Here
96
        monitor.beginTask(MakeMessages.getString("ExternalScannerInfoProvider.Reading_Specs"), 100); //$NON-NLS-1$
104
        monitor.beginTask(MakeMessages.getString("ExternalScannerInfoProvider.Reading_Specs"), 100); //$NON-NLS-1$
97
        
105
        
98
        try {
106
        try {
99
            IConsole console = CCorePlugin.getDefault().getConsole(EXTERNAL_SI_PROVIDER_CONSOLE_ID);
107
            String consoleId = EXTERNAL_SI_PROVIDER_CONSOLE_ID;
108
            if (!isConsoleEnabled())
109
                consoleId = EXTERNAL_SI_PROVIDER_CONSOLE_ID+".disabled"; // do not show in Console view //$NON-NLS-1$
110
            
111
            IConsole console = CCorePlugin.getDefault().getConsole(consoleId);
100
            console.start(currentProject);
112
            console.start(currentProject);
101
            OutputStream cos = console.getOutputStream();
113
            OutputStream cos = console.getOutputStream();
102
114
Lines 138-150 Link Here
138
                errMsg = launcher.getErrorMessage();
150
                errMsg = launcher.getErrorMessage();
139
            }
151
            }
140
152
141
            if (errMsg != null) {
153
			if (errMsg != null) {
142
                String errorDesc = MakeMessages.getFormattedString(EXTERNAL_SI_PROVIDER_ERROR, 
154
				String buildCommandStr = fCompileCommand.toString();
143
                        fCompileCommand.toString() + ca);
155
				String errorDesc = MakeMessages.getFormattedString(EXTERNAL_SI_PROVIDER_ERROR,
144
                markerGenerator.addMarker(currentProject, -1, errorDesc, IMarkerGenerator.SEVERITY_WARNING, null);
156
						buildCommandStr + ca);
145
            }
157
				consoleOut.write((errorDesc + NEWLINE).getBytes());
158
				consoleOut.flush();
159
160
				// Launching failed, trying to figure out possible cause
161
				String errorPrefix = MakeMessages.getString("ExternalScannerInfoProvider.Error_Prefix"); //$NON-NLS-1$
162
				Properties envMap = getEnvMap(launcher, env);
163
				String envPath = envMap.getProperty(PATH_ENV);
164
				if (envPath == null) {
165
					envPath = System.getenv(PATH_ENV);
166
				}
167
				StringBuffer buf = new StringBuffer();
168
				if (PathUtil.findProgramLocation(buildCommandStr, envPath) == null) {
169
					buf.append(errMsg).append(NEWLINE);
170
					errMsg = MakeMessages.getFormattedString("ExternalScannerInfoProvider.Program_Not_In_Path", buildCommandStr); //$NON-NLS-1$
171
					buf.append(errorPrefix).append(errMsg).append(NEWLINE);
172
					buf.append(NEWLINE);
173
					buf.append(PATH_ENV + "=[" + envPath + "]").append(NEWLINE); //$NON-NLS-1$//$NON-NLS-2$
174
				} else {
175
					buf.append(errorPrefix).append(errMsg).append(NEWLINE);
176
				}
177
				consoleErr.write(buf.toString().getBytes());
178
				consoleErr.flush();
179
180
				if (!isConsoleEnabled()) {
181
					monitor.subTask(MakeMessages.getString("ExternalScannerInfoProvider.Creating_Markers")); //$NON-NLS-1$
182
					markerGenerator.addMarker(currentProject, -1, errorDesc, IMarkerGenerator.SEVERITY_WARNING, null);
183
				}
184
			}
146
185
147
            monitor.subTask(MakeMessages.getString("ExternalScannerInfoProvider.Creating_Markers")); //$NON-NLS-1$
148
            consoleOut.close();
186
            consoleOut.close();
149
            consoleErr.close();
187
            consoleErr.close();
150
            cos.close();
188
            cos.close();
Lines 212-219 Link Here
212
        return ca;
250
        return ca;
213
    }
251
    }
214
252
215
    protected String[] setEnvironment(ICommandLauncher launcher, Properties initialEnv) {
253
	private Properties getEnvMap(ICommandLauncher launcher, Properties initialEnv) {
216
        // Set the environmennt, some scripts may need the CWD var to be set.
254
		// Set the environmennt, some scripts may need the CWD var to be set.
217
        Properties props = initialEnv != null ? initialEnv : launcher.getEnvironment();
255
        Properties props = initialEnv != null ? initialEnv : launcher.getEnvironment();
218
        
256
        
219
        if (fWorkingDirectory != null) {
257
        if (fWorkingDirectory != null) {
Lines 229-234 Link Here
229
        if (props.containsKey(LANG_ENV_VAR)) {
267
        if (props.containsKey(LANG_ENV_VAR)) {
230
            props.put(LANG_ENV_VAR, "en_US.UTF-8"); //$NON-NLS-1$
268
            props.put(LANG_ENV_VAR, "en_US.UTF-8"); //$NON-NLS-1$
231
        }
269
        }
270
		return props;
271
	}
272
273
    protected String[] setEnvironment(ICommandLauncher launcher, Properties initialEnv) {
274
        Properties props = getEnvMap(launcher, initialEnv);
232
        String[] env = null;
275
        String[] env = null;
233
        ArrayList<String> envList = new ArrayList<String>();
276
        ArrayList<String> envList = new ArrayList<String>();
234
        Enumeration<?> names = props.propertyNames();
277
        Enumeration<?> names = props.propertyNames();
Lines 242-245 Link Here
242
        return env;
285
        return env;
243
    }
286
    }
244
287
288
289
	/**
290
	 * Set preference to stream output of scanner discovery to a console.
291
	 */
292
	public static void setConsoleEnabled(boolean value) {
293
		IEclipsePreferences node = InstanceScope.INSTANCE.getNode(MakeCorePlugin.PLUGIN_ID);
294
		node.putBoolean(PREF_CONSOLE_ENABLED, value);
295
		try {
296
			node.flush();
297
		} catch (BackingStoreException e) {
298
			// TODO Auto-generated catch block
299
			e.printStackTrace();
300
		}
301
	}
302
303
	/**
304
	 * Check preference to stream output of scanner discovery to a console.
305
	 * 
306
	 * @return boolean preference value
307
	 */
308
	public static boolean isConsoleEnabled() {
309
		boolean value = InstanceScope.INSTANCE.getNode(MakeCorePlugin.PLUGIN_ID)
310
				.getBoolean(PREF_CONSOLE_ENABLED, true);
311
		return value;
312
	}
313
	
245
}
314
}
(-)src/org/eclipse/cdt/make/internal/core/scannerconfig2/DefaultSIFileReader.java (-4 / +1 lines)
Lines 44-53 Link Here
44
 * @author vhirsl
44
 * @author vhirsl
45
 */
45
 */
46
public class DefaultSIFileReader implements IExternalScannerInfoProvider {
46
public class DefaultSIFileReader implements IExternalScannerInfoProvider {
47
    private static final String EXTERNAL_SI_PROVIDER_CONSOLE_ID = MakeCorePlugin.getUniqueIdentifier() + ".ExternalScannerInfoProviderConsole"; //$NON-NLS-1$
48
49
    private long fileSize = 0;
47
    private long fileSize = 0;
50
    
51
    private SCMarkerGenerator markerGenerator = new SCMarkerGenerator();
48
    private SCMarkerGenerator markerGenerator = new SCMarkerGenerator();
52
49
53
    public boolean invokeProvider(IProgressMonitor monitor, IResource resource,
50
    public boolean invokeProvider(IProgressMonitor monitor, IResource resource,
Lines 72-78 Link Here
72
        
69
        
73
        try {
70
        try {
74
	        // output
71
	        // output
75
	        IConsole console = CCorePlugin.getDefault().getConsole(EXTERNAL_SI_PROVIDER_CONSOLE_ID);
72
	        IConsole console = CCorePlugin.getDefault().getConsole(DefaultRunSIProvider.EXTERNAL_SI_PROVIDER_CONSOLE_ID);
76
	        console.start(project);
73
	        console.start(project);
77
	        OutputStream ostream;
74
	        OutputStream ostream;
78
	        try {
75
	        try {
(-)src/org/eclipse/cdt/make/internal/core/scannerconfig2/SCMarkerGenerator.java (-8 / +3 lines)
Lines 74-80 Link Here
74
            // we have to add the marker in the job or we can deadlock other
74
            // we have to add the marker in the job or we can deadlock other
75
            // threads that are responding to a resource delta by doing something
75
            // threads that are responding to a resource delta by doing something
76
            // that accesses the project description
76
            // that accesses the project description
77
            Job markerJob = new Job(Messages.SCMarkerGenerator_0) {
77
            Job markerJob = new Job(Messages.SCMarkerGenerator_Add_Markers) {
78
78
79
				@Override
79
				@Override
80
				protected IStatus run(IProgressMonitor monitor) {
80
				protected IStatus run(IProgressMonitor monitor) {
Lines 83-100 Link Here
83
						marker = problemMarkerInfo.file.createMarker(ICModelMarker.C_MODEL_PROBLEM_MARKER);
83
						marker = problemMarkerInfo.file.createMarker(ICModelMarker.C_MODEL_PROBLEM_MARKER);
84
						marker.setAttribute(IMarker.MESSAGE, problemMarkerInfo.description);
84
						marker.setAttribute(IMarker.MESSAGE, problemMarkerInfo.description);
85
			            marker.setAttribute(IMarker.SEVERITY, mapMarkerSeverity(problemMarkerInfo.severity));
85
			            marker.setAttribute(IMarker.SEVERITY, mapMarkerSeverity(problemMarkerInfo.severity));
86
			            marker.setAttribute(IMarker.LINE_NUMBER, problemMarkerInfo.lineNumber);
87
			            marker.setAttribute(IMarker.CHAR_START, -1);
88
			            marker.setAttribute(IMarker.CHAR_END, -1);
89
			            
86
			            
90
			            if (problemMarkerInfo.variableName != null) {
87
			            if (problemMarkerInfo.variableName != null) {
91
			                marker.setAttribute(ICModelMarker.C_MODEL_MARKER_VARIABLE, problemMarkerInfo.variableName);
88
			                marker.setAttribute(ICModelMarker.C_MODEL_MARKER_VARIABLE, problemMarkerInfo.variableName);
92
			            }
89
			            }
93
			            if (problemMarkerInfo.externalPath != null) {
90
			            marker.setAttribute(IMarker.LOCATION, Messages.SCMarkerGenerator_Discovery_Options_Page);
94
			                marker.setAttribute(ICModelMarker.C_MODEL_MARKER_EXTERNAL_LOCATION, problemMarkerInfo.externalPath.toOSString());
95
			            }
96
					} catch (CoreException e) {
91
					} catch (CoreException e) {
97
						return new Status(Status.ERROR, MakeCorePlugin.getUniqueIdentifier(), Messages.SCMarkerGenerator_1, e);
92
						return new Status(Status.ERROR, MakeCorePlugin.getUniqueIdentifier(), Messages.SCMarkerGenerator_Error_Adding_Markers, e);
98
					}
93
					}
99
		            
94
		            
100
					return Status.OK_STATUS;
95
					return Status.OK_STATUS;
(-)plugin.xml (+7 lines)
Lines 440-445 Link Here
440
            name="%GCCPerFileProfile.name"
440
            name="%GCCPerFileProfile.name"
441
            profileId="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile"/>
441
            profileId="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile"/>
442
   </extension>
442
   </extension>
443
   <extension
444
         point="org.eclipse.cdt.core.CBuildConsole">
445
      <CBuildConsole
446
            class="org.eclipse.cdt.make.internal.ui.scannerconfig.ScannerDiscoveryConsole"
447
            id="org.eclipse.cdt.make.core.ExternalScannerInfoProviderConsole">
448
      </CBuildConsole>
449
   </extension>
443
450
444
   <extension
451
   <extension
445
         point="org.eclipse.cdt.ui.cPropertyTab">
452
         point="org.eclipse.cdt.ui.cPropertyTab">
(-)src/org/eclipse/cdt/make/internal/ui/scannerconfig/ScannerDiscoveryConsole.java (+25 lines)
Added Link Here
1
/*******************************************************************************
2
 *  Copyright (c) 2011 Andrew Gvozdev and others.
3
 *  All rights reserved. This program and the accompanying materials
4
 *  are made available under the terms of the Eclipse Public License v1.0
5
 *  which accompanies this distribution, and is available at
6
 *  http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 *  Contributors:
9
 *  Andrew Gvozdev - Initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.cdt.make.internal.ui.scannerconfig;
12
13
import org.eclipse.cdt.internal.ui.buildconsole.CBuildConsole;
14
import org.eclipse.cdt.make.internal.core.scannerconfig2.DefaultRunSIProvider;
15
import org.eclipse.cdt.ui.IBuildConsoleManager;
16
17
public class ScannerDiscoveryConsole extends CBuildConsole {
18
	IBuildConsoleManager fConsoleManager;
19
20
	private static final String CONTEXT_MENU_ID = DefaultRunSIProvider.EXTERNAL_SI_PROVIDER_CONSOLE_ID;
21
22
	public ScannerDiscoveryConsole() {
23
		super("Scanner Discovery Console", CONTEXT_MENU_ID);
24
	}
25
}
(-)src/org/eclipse/cdt/make/ui/dialogs/GCCPerProjectSCDProfilePage.java (+21 lines)
Lines 59-67 Link Here
59
    private Button sipEnabledButton;
59
    private Button sipEnabledButton;
60
    private Text sipRunCommandText;
60
    private Text sipRunCommandText;
61
    private Text sipRunArgsText;
61
    private Text sipRunArgsText;
62
    private Button sipConsoleEnabledButton;
62
    
63
    
63
    private boolean isValid = true;
64
    private boolean isValid = true;
64
65
66
	/**
67
	 * Static variable corresponding to global preference to show scanner
68
	 * discovery console.
69
	 * 
70
	 * @since 7.1
71
	 */
72
	public static boolean isSIConsoleEnabled = false;
73
65
    /* (non-Javadoc)
74
    /* (non-Javadoc)
66
     * @see org.eclipse.cdt.ui.dialogs.AbstractCOptionPage#createControl(org.eclipse.swt.widgets.Composite)
75
     * @see org.eclipse.cdt.ui.dialogs.AbstractCOptionPage#createControl(org.eclipse.swt.widgets.Composite)
67
     */
76
     */
Lines 213-218 Link Here
213
            }
222
            }
214
        });
223
        });
215
        
224
        
225
        // si provider console enabled checkbox
226
        sipConsoleEnabledButton = ControlFactory.createCheckBox(profileGroup, "Stream output to a dedicated console in the Console view (global preference)");
227
        ((GridData)sipConsoleEnabledButton.getLayoutData()).horizontalSpan = 3;
228
        ((GridData)sipConsoleEnabledButton.getLayoutData()).grabExcessHorizontalSpace = true;
229
        sipConsoleEnabledButton.addSelectionListener(new SelectionAdapter() {
230
            @Override
231
            public void widgetSelected(SelectionEvent e) {
232
            	isSIConsoleEnabled = sipConsoleEnabledButton.getSelection();
233
            	return;
234
            }
235
        });
216
236
217
        setControl(page);
237
        setControl(page);
218
        // set the shell variable; must be after setControl
238
        // set the shell variable; must be after setControl
Lines 298-303 Link Here
298
        sipEnabledButton.setSelection(builderInfo.isProviderOutputParserEnabled(providerId));
318
        sipEnabledButton.setSelection(builderInfo.isProviderOutputParserEnabled(providerId));
299
        sipRunCommandText.setText(builderInfo.getProviderRunCommand(providerId));
319
        sipRunCommandText.setText(builderInfo.getProviderRunCommand(providerId));
300
        sipRunArgsText.setText(builderInfo.getProviderRunArguments(providerId));
320
        sipRunArgsText.setText(builderInfo.getProviderRunArguments(providerId));
321
        sipConsoleEnabledButton.setSelection(isSIConsoleEnabled);
301
    }
322
    }
302
    
323
    
303
    private String getProviderIDForSelectedProfile() {
324
    private String getProviderIDForSelectedProfile() {
(-)src/org/eclipse/cdt/managedbuilder/ui/properties/DiscoveryTab.java (+9 lines)
Lines 36-44 Link Here
36
import org.eclipse.cdt.make.core.scannerconfig.InfoContext;
36
import org.eclipse.cdt.make.core.scannerconfig.InfoContext;
37
import org.eclipse.cdt.make.internal.core.scannerconfig.DiscoveredPathInfo;
37
import org.eclipse.cdt.make.internal.core.scannerconfig.DiscoveredPathInfo;
38
import org.eclipse.cdt.make.internal.core.scannerconfig.DiscoveredScannerInfoStore;
38
import org.eclipse.cdt.make.internal.core.scannerconfig.DiscoveredScannerInfoStore;
39
import org.eclipse.cdt.make.internal.core.scannerconfig2.DefaultRunSIProvider;
39
import org.eclipse.cdt.make.internal.core.scannerconfig2.SCProfileInstance;
40
import org.eclipse.cdt.make.internal.core.scannerconfig2.SCProfileInstance;
40
import org.eclipse.cdt.make.internal.core.scannerconfig2.ScannerConfigProfileManager;
41
import org.eclipse.cdt.make.internal.core.scannerconfig2.ScannerConfigProfileManager;
41
import org.eclipse.cdt.make.ui.dialogs.AbstractDiscoveryPage;
42
import org.eclipse.cdt.make.ui.dialogs.AbstractDiscoveryPage;
43
import org.eclipse.cdt.make.ui.dialogs.GCCPerProjectSCDProfilePage;
42
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
44
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
43
import org.eclipse.cdt.managedbuilder.core.IInputType;
45
import org.eclipse.cdt.managedbuilder.core.IInputType;
44
import org.eclipse.cdt.managedbuilder.core.IResourceInfo;
46
import org.eclipse.cdt.managedbuilder.core.IResourceInfo;
Lines 539-544 Link Here
539
	 * 
541
	 * 
540
	 */
542
	 */
541
	private void initializeProfilePageMap() {
543
	private void initializeProfilePageMap() {
544
		GCCPerProjectSCDProfilePage.isSIConsoleEnabled = DefaultRunSIProvider.isConsoleEnabled();
545
		
542
		pagesList = new ArrayList<DiscoveryProfilePageConfiguration>(5);
546
		pagesList = new ArrayList<DiscoveryProfilePageConfiguration>(5);
543
		IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(NAMESPACE, POINT);
547
		IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(NAMESPACE, POINT);
544
		if (point == null)
548
		if (point == null)
Lines 605-615 Link Here
605
		}
609
		}
606
610
607
		clearChangedDiscoveredInfos();
611
		clearChangedDiscoveredInfos();
612
		
613
		DefaultRunSIProvider.setConsoleEnabled(GCCPerProjectSCDProfilePage.isSIConsoleEnabled);
608
	}
614
	}
609
615
610
	@Override
616
	@Override
611
	protected void performOK() {
617
	protected void performOK() {
612
		performOK(true);
618
		performOK(true);
619
		DefaultRunSIProvider.setConsoleEnabled(GCCPerProjectSCDProfilePage.isSIConsoleEnabled);
613
	}
620
	}
614
621
615
	private void performOK(boolean ok) {
622
	private void performOK(boolean ok) {
Lines 765-770 Link Here
765
			}
772
			}
766
		}
773
		}
767
		updateData();
774
		updateData();
775
		
776
		DefaultRunSIProvider.setConsoleEnabled(false);
768
	}
777
	}
769
778
770
	@Override
779
	@Override
(-)src/org/eclipse/cdt/internal/ui/buildconsole/CBuildConsole.java (+5 lines)
Lines 27-32 Link Here
27
	public CBuildConsole() {
27
	public CBuildConsole() {
28
		fConsoleManager = CUIPlugin.getDefault().getConsoleManager();
28
		fConsoleManager = CUIPlugin.getDefault().getConsoleManager();
29
	}
29
	}
30
	
31
	public CBuildConsole(String consoleName, String contextId) {
32
		fConsoleManager = CUIPlugin.getDefault().getConsoleManager(consoleName, contextId);
33
	}
34
30
35
31
	public void start(IProject project ) {
36
	public void start(IProject project ) {
32
		this.project = project;
37
		this.project = project;

Return to bug 342069