Skip to main content
summaryrefslogtreecommitdiffstats
blob: 2017cff12998849351dcf63945baee668a1d0c16 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*******************************************************************************
 *  Copyright (c) 2008  Oracle. 
 *  All rights reserved.  This program and the accompanying materials are 
 *  made available under the terms of the Eclipse Public License v1.0 which 
 *  accompanies this distribution, and is available at 
 *  http://www.eclipse.org/legal/epl-v10.html
 *  
 *  Contributors: 
 *  	Oracle - initial API and implementation
 *******************************************************************************/
package org.eclipse.jpt.core.internal.resource;

import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
import org.eclipse.core.runtime.QualifiedName;
import org.eclipse.core.runtime.content.IContentDescription;
import org.eclipse.core.runtime.content.ITextContentDescriber;

/**
 * This class simply returns INDETERMINATE for any contents it receives.
 * 
 * It is used currently for org.eclipse.jpt.core.content.baseJpaContent in order
 * to make that content type act as an "abstract" content type.
 */
public class IndeterminateContentDescriber implements ITextContentDescriber
{
	public int describe(InputStream contents, IContentDescription description) throws IOException {
		return INDETERMINATE;
	}
	
	public int describe(Reader contents, IContentDescription description) throws IOException {
		return INDETERMINATE;
	}
	
	public QualifiedName[] getSupportedOptions() {
		return new QualifiedName[0];
	}
}

Back to the top