Community
Participate
Working Groups
import java.util.*;
import org.eclipse.core.filesystem.URIUtil;
import org.eclipse.core.internal.events.PathVariableChangeEvent;
import org.eclipse.core.internal.utils.FileUtil;
import org.eclipse.core.internal.utils.Messages;
import org.eclipse.core.resources.*;
import org.eclipse.core.runtime.*;
preferences.setToDefault(getKeyForName(varName));
eventType = IPathVariableChangeEvent.VARIABLE_DELETED;
} else {
preferences.setValue(getKeyForName(varName), newValue.toPortableString());
preferences.setValue(getKeyForName(varName), FileUtil.canonicalPath(newValue).toPortableString());
eventType = variableExists ? IPathVariableChangeEvent.VARIABLE_CHANGED : IPathVariableChangeEvent.VARIABLE_CREATED;
}