Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2008 IBM Corporation and others. 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: IBM Corporation - initial API and implementation /
 
 package org.eclipse.jdt.internal.codeassist.impl;
 
 import java.util.Map;
 
 import  org.eclipse.core.runtime.IProgressMonitor;
 
 public class AssistSourceType extends ResolvedSourceType {
 	private Map bindingCache;
 	private Map infoCache;
 
 	private String uniqueKey;
 	private boolean isResolved;
 
 	public AssistSourceType(JavaElement parentString nameMap bindingCacheMap infoCache) {
 		super(parentnamenull);
 		this. = bindingCache;
 		this. = infoCache;
 	}
 
 	public Object getElementInfo(IProgressMonitor monitorthrows JavaModelException {
 		return this..get(this);
 	}
 
 		if (isResolved()) {
 		}
 		return getFullyQualifiedName('.'true/*show parameters*/);
 	}
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.jdt.internal.core.SourceType#getKey()
 	 */
 	public String getKey() {
 		if (this. == null) {
 			Binding binding = (Bindingthis..get(this);
 			if (binding != null) {
 				this. = true;
 				this. = new String(binding.computeUniqueKey());
 			} else {
 				this. = false;
 				try {
 					this. = getKey(thisfalse/*don't open*/);
 				} catch (JavaModelException e) {
 					// happen only if force open is true
 					return null;
 				}
 			}
 		}
 		return this.;
 	}
 
 	public boolean isResolved() {
 		getKey();
 		return this.;
 	}
 
 	protected void toStringInfo(int tabStringBuffer bufferObject info,boolean showResolvedInfo) {
 		super.toStringInfo(tabbufferinfoshowResolvedInfo && isResolved());
 	}
 
 	public IAnnotation getAnnotation(String annotationName) {
 		return new AssistAnnotation(thisannotationNamethis.);
 	}
 
 	public IField getField(String fieldName) {
 		return new AssistSourceField(thisfieldNamethis.this.);
 	}
 
 	public IInitializer getInitializer(int count) {
 		return new AssistInitializer(thiscountthis.this.);
 	}
 
 	public IMethod getMethod(String selectorString[] parameterTypeSignatures) {
 		return new AssistSourceMethod(thisselectorparameterTypeSignaturesthis.this.);
 	}
 
 	public IType getType(String typeName) {
 		return new AssistSourceType(thistypeNamethis.this.);
	}
	public IType getType(String typeNameint count) {
		AssistSourceType type = new AssistSourceType(thistypeNamethis.this.);
		type.occurrenceCount = count;
		return type;
	}
	public ITypeParameter getTypeParameter(String typeParameterName) {
		return new AssistTypeParameter(thistypeParameterNamethis.);
	}
New to GrepCode? Check out our FAQ X