Java Code Examples for org.eclipse.jdt.core.JavaCore#getPlugin()

The following examples show how to use org.eclipse.jdt.core.JavaCore#getPlugin() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TypeBinding.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
private JavaElement getUnresolvedJavaElement(org.eclipse.jdt.internal.compiler.lookup.TypeBinding typeBinding ) {
	if (JavaCore.getPlugin() == null) {
		return null;
	}
	if (this.resolver instanceof DefaultBindingResolver) {
		DefaultBindingResolver defaultBindingResolver = (DefaultBindingResolver) this.resolver;
		if (!defaultBindingResolver.fromJavaProject) return null;
		return org.eclipse.jdt.internal.core.util.Util.getUnresolvedJavaElement(
				typeBinding,
				defaultBindingResolver.workingCopyOwner,
				defaultBindingResolver.getBindingsToNodesMap());
	}
	return null;
}
 
Example 2
Source File: MethodBinding.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
private JavaElement getUnresolvedJavaElement() {
	if (JavaCore.getPlugin() == null) {
		return null;
	}
	if (!(this.resolver instanceof DefaultBindingResolver)) return null;

	DefaultBindingResolver defaultBindingResolver = (DefaultBindingResolver) this.resolver;
	if (!defaultBindingResolver.fromJavaProject) return null;
	return Util.getUnresolvedJavaElement(
			this.binding,
			defaultBindingResolver.workingCopyOwner,
			defaultBindingResolver.getBindingsToNodesMap());
}
 
Example 3
Source File: JavaIndenter.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 2 votes vote down vote up
/**
 * Returns <code>true</code> if the class is used outside the workbench,
 * <code>false</code> in normal mode
 *
 * @return <code>true</code> if the plug-ins are not available
 */
private boolean isStandalone() {
	return JavaCore.getPlugin() == null;
}