Java Code Examples for org.eclipse.core.runtime.IPath.isValidPath()

The following are Jave code examples for showing how to use isValidPath() of the org.eclipse.core.runtime.IPath class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: Hydrograph   File:   Source Code and License Vote up 6 votes
private boolean isFileExistsOnLocalFileSystem(String value) {
	Matcher matchs=Pattern.compile(Constants.PARAMETER_REGEX).matcher(value);
		return true;
	IPath jobFilePath = new Path(value);
	try {
		if (jobFilePath.isValidPath(value)) {
			if (ResourcesPlugin.getWorkspace().getRoot().getFile(jobFilePath).exists())
				return true;
			else if (jobFilePath.toFile().exists())
				return true;
	} catch (PatternSyntaxException|SecurityException e) {

	return false;