19
19
import java .io .File ;
20
20
import java .io .IOException ;
21
21
import java .net .URL ;
22
+ import java .text .MessageFormat ;
22
23
import java .util .ArrayList ;
23
24
import java .util .HashMap ;
24
25
import java .util .LinkedList ;
65
66
import io .sloeber .autoBuild .api .AutoBuildCommon ;
66
67
import io .sloeber .autoBuild .api .IAutoBuildConfigurationDescription ;
67
68
import io .sloeber .autoBuild .core .Activator ;
69
+ import io .sloeber .autoBuild .core .Messages ;
68
70
import io .sloeber .autoBuild .extensionPoint .providers .InternalBuildRunner ;
69
71
import io .sloeber .autoBuild .schema .api .IOption ;
70
72
74
76
public class AutoBuildLanguageSettingsProvider extends AbstractExecutableExtensionBase
75
77
implements ILanguageSettingsBroadcastingProvider {
76
78
77
- private static final String SCANNER_DISCOVERY_CONSOLE = "org.eclipse.cdt.managedbuilder .ScannerDiscoveryConsole" ; //$NON-NLS-1$
78
- private static final String SCANNER_DISCOVERY_GLOBAL_CONSOLE = "org.eclipse.cdt.managedbuilder .ScannerDiscoveryGlobalConsole" ; //$NON-NLS-1$
79
+ private static final String SCANNER_DISCOVERY_CONSOLE = "io.Sloeber.autoBuild .ScannerDiscoveryConsole" ; //$NON-NLS-1$
80
+ private static final String SCANNER_DISCOVERY_GLOBAL_CONSOLE = "io.Sloeber.autoBuild .ScannerDiscoveryGlobalConsole" ; //$NON-NLS-1$
79
81
private static final String DEFAULT_CONSOLE_ICON = "icons/obj16/inspect_sys.gif" ; //$NON-NLS-1$
80
82
private static final String GMAKE_ERROR_PARSER_ID = "org.eclipse.cdt.core.GmakeErrorParser" ; //$NON-NLS-1$
81
83
@@ -101,10 +103,10 @@ public void addMarker(IResource rc, int lineNumber, String errorDesc, int severi
101
103
@ Override
102
104
public void addMarker (final ProblemMarkerInfo problemMarkerInfo ) {
103
105
final String providerId = getId ();
106
+ final String providerName =getName ();
104
107
// Add markers in a job to avoid deadlocks
105
108
Job markerJob = new Job (
106
- // ManagedMakeMessages.getResourceString(
107
- "AbstractBuiltinSpecsDetector.AddScannerDiscoveryMarkers" ) { //$NON-NLS-1$
109
+ Messages .AddScannerDiscoveryMarkers ) {
108
110
@ Override
109
111
protected IStatus run (IProgressMonitor monitor ) {
110
112
// Avoid duplicates as different languages can generate identical errors
@@ -133,14 +135,12 @@ protected IStatus run(IProgressMonitor monitor) {
133
135
marker .setAttribute (SDMarkerGenerator .ATTR_PROVIDER , providerId );
134
136
135
137
if (problemMarkerInfo .file instanceof IWorkspaceRoot ) {
136
- String msgPreferences = // ManagedMakeMessages.getFormattedString(
137
- "AbstractBuiltinSpecsDetector.ScannerDiscoveryMarkerLocationPreferences" ;
138
- // , //$NON-NLS-1$ providerName);
138
+ String msgPreferences = MessageFormat .format (
139
+ Messages .ScannerDiscoveryMarkerLocationPreferences , providerName );
139
140
marker .setAttribute (IMarker .LOCATION , msgPreferences );
140
141
} else {
141
- String msgProperties = // ManagedMakeMessages.getFormattedString(
142
- "AbstractBuiltinSpecsDetector.ScannerDiscoveryMarkerLocationProperties" ;
143
- // //$NON-NLS-1$ providerName);
142
+ String msgProperties = MessageFormat .format (
143
+ Messages .ScannerDiscoveryMarkerLocationProperties , providerName );
144
144
marker .setAttribute (IMarker .LOCATION , msgProperties );
145
145
}
146
146
} catch (CoreException e ) {
@@ -298,10 +298,8 @@ private List<ICLanguageSettingEntry> runForLanguage(String currentLanguageId, St
298
298
299
299
try (AutoBuildRunnerHelper buildRunnerHelper = new AutoBuildRunnerHelper (currentProject );) {
300
300
SubMonitor subMonitor = SubMonitor .convert (monitor ,
301
- // ManagedMakeMessages.getFormattedString(
302
- "AbstractBuiltinSpecsDetector.RunningScannerDiscovery" , //$NON-NLS-1$
303
- // getName()),
304
- 100 );
301
+ MessageFormat .format (
302
+ Messages .RunningScannerDiscovery , getName ()), 100 );
305
303
306
304
IConsole console ;
307
305
if (isConsoleEnabled ) {
@@ -331,11 +329,11 @@ private List<ICLanguageSettingEntry> runForLanguage(String currentLanguageId, St
331
329
332
330
buildRunnerHelper .prepareStreams (epm , parsers , console , subMonitor .split (TICKS_OUTPUT_PARSING ));
333
331
334
- buildRunnerHelper .greeting (// ManagedMakeMessages
335
- // .getFormattedString(
336
- "AbstractBuiltinSpecsDetector.RunningScannerDiscovery" //$NON-NLS-1$
337
- // , getName())
332
+ buildRunnerHelper .greeting (MessageFormat .format (
333
+ Messages .RunningScannerDiscovery , getName ())
338
334
);
335
+
336
+ System .out .println (currentCommandResolved );
339
337
InternalBuildRunner .launchCommand (currentCommandResolved , autoConf ,
340
338
monitor , buildRunnerHelper );
341
339
@@ -412,7 +410,7 @@ public void startup(ICConfigurationDescription cfgDescription, IWorkingDirectory
412
410
413
411
@ Override
414
412
public boolean processLine (String line ) {
415
- // System.out.println(line);
413
+ System .out .println (line );
416
414
417
415
for (Entry <Pattern , outputTypes > curMatcher : outputMatchers .entrySet ()) {
418
416
Pattern pat = curMatcher .getKey ();
0 commit comments