Skip to content

Commit e53ded4

Browse files
author
jantje
committed
#825 onle warning when values are not ok
user must change the warnings.
1 parent 060aba3 commit e53ded4

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

io.sloeber.core/src/io/sloeber/core/Activator.java

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import org.eclipse.ui.plugin.AbstractUIPlugin;
2929
import org.osgi.framework.BundleContext;
3030
import org.osgi.service.prefs.BackingStoreException;
31+
import org.osgi.service.prefs.Preferences;
3132

3233
import cc.arduino.packages.discoverers.SloeberNetworkDiscovery;
3334
import io.sloeber.core.common.Common;
@@ -133,9 +134,19 @@ private static void testKnownIssues() {
133134
errorString += addString + "The Workspacepath can not contain spaces " + workSpacePath;
134135
addString = "\nand\n";
135136
}
136-
137+
Preferences myScope = InstanceScope.INSTANCE.getNode("org.eclipse.cdt.core").node("indexer");
138+
String indexAllFiles= myScope.get("indexAllFiles", new String());
139+
String indexUnusedHeaders= myScope.get("indexUnusedHeadersWithDefaultLang", new String());
140+
if(!"false".equalsIgnoreCase(indexAllFiles)) {
141+
errorString += addString + "The indexer option \"index source files not included in the build\" must be off in windows->preferences->C/C++->indexer " ;
142+
addString = "\nand\n";
143+
}
144+
if(!"false".equalsIgnoreCase(indexUnusedHeaders)) {
145+
errorString += addString + "The indexer option \"index unused headers\" must be off in windows->preferences->C/C++->indexer " ;
146+
addString = "\nand\n";
147+
}
137148
if (!errorString.isEmpty()) {
138-
errorString += "\nSloeber might still function but if you get strange results you know where to look.\n";
149+
errorString += "\n\nSloeber might still function but if you get strange results you know where to look.\n";
139150
errorString += "Do not create an issue if you see this!!!";
140151
Common.log(new Status(IStatus.ERROR, PLUGIN_ID, errorString));
141152
}

0 commit comments

Comments
 (0)