Skip to content

Commit eb98714

Browse files
author
jan
committed
Copy inspect_sys icon from managed build to autoBuild
Also change the links This is because a exception happens when the managedBuild plugins are not available. There is no need for the managedBuild plugins to be available
1 parent c1cbbb5 commit eb98714

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

io.sloeber.autoBuild/build.properties

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ bin.includes = .,\
66
OSGI-INF/l10n/bundle.properties,\
77
schema/,\
88
plugin.xml,\
9-
template/
9+
template/,\
10+
icons/
1011
jars.compile.order = .
1112
src.includes = schema/
553 Bytes
Loading

io.sloeber.autoBuild/src/io/sloeber/autoBuild/internal/AutoBuildLanguageSettingsProvider.java

+9-10
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@
7474
public class AutoBuildLanguageSettingsProvider extends AbstractExecutableExtensionBase
7575
implements ILanguageSettingsBroadcastingProvider {
7676

77-
private static final String CDT_MANAGEDBUILDER_UI_PLUGIN_ID = "org.eclipse.cdt.managedbuilder.ui"; //$NON-NLS-1$
7877
private static final String SCANNER_DISCOVERY_CONSOLE = "org.eclipse.cdt.managedbuilder.ScannerDiscoveryConsole"; //$NON-NLS-1$
7978
private static final String SCANNER_DISCOVERY_GLOBAL_CONSOLE = "org.eclipse.cdt.managedbuilder.ScannerDiscoveryGlobalConsole"; //$NON-NLS-1$
8079
private static final String DEFAULT_CONSOLE_ICON = "icons/obj16/inspect_sys.gif"; //$NON-NLS-1$
@@ -122,7 +121,7 @@ protected IStatus run(IProgressMonitor monitor) {
122121
}
123122
}
124123
} catch (CoreException e) {
125-
return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Error checking markers.", //$NON-NLS-1$
124+
return new Status(IStatus.ERROR, Activator.getId(), "Error checking markers.", //$NON-NLS-1$
126125
e);
127126
}
128127

@@ -145,7 +144,7 @@ protected IStatus run(IProgressMonitor monitor) {
145144
marker.setAttribute(IMarker.LOCATION, msgProperties);
146145
}
147146
} catch (CoreException e) {
148-
return new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Error adding markers.", //$NON-NLS-1$
147+
return new Status(IStatus.ERROR, Activator.getId(), "Error adding markers.", //$NON-NLS-1$
149148
e);
150149
}
151150

@@ -311,7 +310,7 @@ private List<ICLanguageSettingEntry> runForLanguage(String currentLanguageId, St
311310
// that looks in extension points registry and won't find the id, this console
312311
// is not shown
313312
console = CCorePlugin.getDefault()
314-
.getConsole(Activator.PLUGIN_ID + DOT + currentLanguageId + ".console.hidden"); //$NON-NLS-1$
313+
.getConsole(Activator.getId() + DOT + currentLanguageId + ".console.hidden"); //$NON-NLS-1$
315314
}
316315
console.start(currentProject);
317316

@@ -349,7 +348,7 @@ private List<ICLanguageSettingEntry> runForLanguage(String currentLanguageId, St
349348

350349
} catch (Exception e) {
351350
Activator.log(new CoreException(
352-
new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Error running Builtin Specs Detector", e))); //$NON-NLS-1$
351+
new Status(IStatus.ERROR, Activator.getId(), "Error running Builtin Specs Detector", e))); //$NON-NLS-1$
353352
} finally {
354353
monitor.done();
355354
}
@@ -373,14 +372,14 @@ private IConsole startProviderConsole(IProject currentProject, String currentLan
373372
}
374373
ILanguage ld = LanguageManager.getInstance().getLanguage(currentLanguageId);
375374
if (ld != null) {
376-
String consoleId = Activator.PLUGIN_ID + '.' + getId() + '.' + currentLanguageId;
375+
String consoleId = Activator.getId() + '.' + getId() + '.' + currentLanguageId;
377376
String consoleName = getName() + ", " + ld.getName(); //$NON-NLS-1$
378-
URL defaultIcon = Platform.getBundle(CDT_MANAGEDBUILDER_UI_PLUGIN_ID).getEntry(DEFAULT_CONSOLE_ICON);
377+
URL defaultIcon = Platform.getBundle(Activator.getId()).getEntry(DEFAULT_CONSOLE_ICON);
379378
if (defaultIcon == null) {
380379
@SuppressWarnings("nls")
381380
String msg = "Unable to find icon " + DEFAULT_CONSOLE_ICON + " in plugin "
382-
+ CDT_MANAGEDBUILDER_UI_PLUGIN_ID;
383-
Activator.log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, msg));
381+
+ Activator.getId();
382+
Activator.log(new Status(IStatus.ERROR, Activator.getId(), msg));
384383
}
385384

386385
console = CCorePlugin.getDefault().getConsole(extConsoleId, consoleId, consoleName, defaultIcon);
@@ -390,7 +389,7 @@ private IConsole startProviderConsole(IProject currentProject, String currentLan
390389
if (console == null) {
391390
// that looks in extension points registry and won't find the id, this console
392391
// is not shown
393-
console = CCorePlugin.getDefault().getConsole(Activator.PLUGIN_ID + ".console.hidden"); //$NON-NLS-1$
392+
console = CCorePlugin.getDefault().getConsole(Activator.getId() + ".console.hidden"); //$NON-NLS-1$
394393
}
395394

396395
return console;

0 commit comments

Comments
 (0)