Example usage for org.springframework.ide.eclipse.core SpringCorePreferences getString

List of usage examples for org.springframework.ide.eclipse.core SpringCorePreferences getString

Introduction

In this page you can find the example usage for org.springframework.ide.eclipse.core SpringCorePreferences getString.

Prototype

public String getString(String key, String defaultValue) 

Source Link

Usage

From source file:org.eclipse.virgo.ide.jdt.internal.core.util.ClasspathUtils.java

/**
 * Returns configured source attachment paths for a given jar resource path.
 * @param project the java project which preferences needs to be checked.
 * @param file the jar that needs a source attachment
 *//*from   w  w  w .j  a  v  a2 s .  co  m*/
public static IPath getSourceAttachment(IJavaProject project, File file) {
    SpringCorePreferences prefs = SpringCorePreferences.getProjectPreferences(project.getProject(),
            JdtCorePlugin.PLUGIN_ID);
    String value = prefs.getString("source.attachment-" + file.getName(), null);
    if (value != null) {
        return new Path(value);
    }
    return null;
}