mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
More accurate check for resource existence accounting for variables.
This commit is contained in:
parent
aa67c9cce3
commit
0847bf37d8
1 changed files with 18 additions and 10 deletions
|
@ -21,9 +21,9 @@ import org.eclipse.jface.viewers.IDecoration;
|
|||
import org.eclipse.swt.graphics.Image;
|
||||
|
||||
import org.eclipse.cdt.core.settings.model.ACPathEntry;
|
||||
import org.eclipse.cdt.core.settings.model.CMacroEntry;
|
||||
import org.eclipse.cdt.core.settings.model.ICLanguageSettingEntry;
|
||||
import org.eclipse.cdt.core.settings.model.ICSettingEntry;
|
||||
import org.eclipse.cdt.core.settings.model.util.CDataUtil;
|
||||
import org.eclipse.cdt.ui.CDTSharedImages;
|
||||
import org.eclipse.cdt.ui.CUIPlugin;
|
||||
|
||||
|
@ -128,8 +128,16 @@ public class LanguageSettingsImages {
|
|||
*/
|
||||
public static IStatus getStatus(ICLanguageSettingEntry entry) {
|
||||
if (entry instanceof ACPathEntry) {
|
||||
if (!entry.isResolved()) {
|
||||
ICLanguageSettingEntry[] entries = CDataUtil.resolveEntries(new ICLanguageSettingEntry[] {entry}, null);
|
||||
if (entries != null && entries.length > 0) {
|
||||
entry = entries[0];
|
||||
}
|
||||
|
||||
}
|
||||
ACPathEntry acEntry = (ACPathEntry)entry;
|
||||
IPath path = new Path(acEntry.getName());
|
||||
String acEntryName = acEntry.getName();
|
||||
IPath path = new Path(acEntryName);
|
||||
if (!path.isAbsolute()) {
|
||||
String msg = "Using relative paths is ambiguous and not recommended. It can cause unexpected side-effects.";
|
||||
return new Status(IStatus.INFO, CUIPlugin.PLUGIN_ID, msg);
|
||||
|
|
Loading…
Add table
Reference in a new issue