Package org.eclipse.jdt.internal.core

Examples of org.eclipse.jdt.internal.core.NameLookup


  public IAnnotationBinding[] getAnnotations() {
    try {
      INameEnvironment nameEnvironment = this.binding.environment.nameEnvironment;
      if (!(nameEnvironment instanceof SearchableEnvironment))
        return AnnotationBinding.NoAnnotations;
      NameLookup nameLookup = ((SearchableEnvironment) nameEnvironment).nameLookup;
      if (nameLookup == null)
        return AnnotationBinding.NoAnnotations;
      final String pkgName = getName();
      IPackageFragment[] pkgs = nameLookup.findPackageFragments(pkgName, false/*exact match*/);
      if (pkgs == null)
        return AnnotationBinding.NoAnnotations;

      for (int i = 0, len = pkgs.length; i < len; i++) {
        int fragType = pkgs[i].getKind();
View Full Code Here


   */
  public IJavaElement getJavaElement() {
    INameEnvironment nameEnvironment = this.binding.environment.nameEnvironment; // a package binding always has a LooupEnvironment set
    if (!(nameEnvironment instanceof SearchableEnvironment)) return null;
    // this is not true in standalone DOM/AST
    NameLookup nameLookup = ((SearchableEnvironment) nameEnvironment).nameLookup;
    if (nameLookup == null) return null;
    IJavaElement[] pkgs = nameLookup.findPackageFragments(getName(), false/*exact match*/);
    if (pkgs == null) return null;
    if (pkgs.length == 0) {
      // add additional tracing as this should not happen
      org.eclipse.jdt.internal.core.util.Util.log(
        new Status(
View Full Code Here

        super(cu);
    }
   
    protected IJavaCompletionProposal createJavaCompletionProposal(CompletionProposal proposal) {
        // change the name lookup of the completion proposal with woj one
        NameLookup nameLookup = (NameLookup)HookUtil.getPrivateAttributeValue(InternalCompletionProposal.class, "nameLookup", proposal); //$NON-NLS-1$
        if(!HookUtil.setPrivateAttributeValue(InternalCompletionProposal.class, "nameLookup", proposal, new WojNameLookup(nameLookup))) { //$NON-NLS-1$
          WojPlugin.log("exception occured while installing completion"); //$NON-NLS-1$
        }
        IJavaCompletionProposal p = super.createJavaCompletionProposal(proposal);
        return p;
View Full Code Here

import org.jayasoft.woj.client.WojPlugin;
import org.jayasoft.woj.client.util.HookUtil;

public class WojCompletionProposalLabelProvider extends CompletionProposalLabelProvider {
  public String createLabel(CompletionProposal proposal) {
    NameLookup nameLookup = (NameLookup)HookUtil.getPrivateAttributeValue(InternalCompletionProposal.class, "nameLookup", proposal); //$NON-NLS-1$
        if(!HookUtil.setPrivateAttributeValue(InternalCompletionProposal.class, "nameLookup", proposal, new WojNameLookup32(nameLookup))) { //$NON-NLS-1$
          WojPlugin.log("exception occured while installing completion"); //$NON-NLS-1$
        }
    return super.createLabel(proposal);
  }
View Full Code Here

  public IAnnotationBinding[] getAnnotations() {
    try {
      INameEnvironment nameEnvironment = this.binding.environment.nameEnvironment;
      if (!(nameEnvironment instanceof SearchableEnvironment))
        return AnnotationBinding.NoAnnotations;
      NameLookup nameLookup = ((SearchableEnvironment) nameEnvironment).nameLookup;
      if (nameLookup == null)
        return AnnotationBinding.NoAnnotations;
      final String pkgName = getName();
      IPackageFragment[] pkgs = nameLookup.findPackageFragments(pkgName, false/*exact match*/);
      if (pkgs == null)
        return AnnotationBinding.NoAnnotations;

      for (int i = 0, len = pkgs.length; i < len; i++) {
        int fragType = pkgs[i].getKind();
View Full Code Here

   */
  public IJavaElement getJavaElement() {
    INameEnvironment nameEnvironment = this.binding.environment.nameEnvironment; // a package binding always has a LooupEnvironment set
    if (!(nameEnvironment instanceof SearchableEnvironment)) return null;
    // this is not true in standalone DOM/AST
    NameLookup nameLookup = ((SearchableEnvironment) nameEnvironment).nameLookup;
    if (nameLookup == null) return null;
    IJavaElement[] pkgs = nameLookup.findPackageFragments(getName(), false/*exact match*/);
    if (pkgs == null) return null;
    if (pkgs.length == 0) {
      // add additional tracing as this should not happen
      org.eclipse.jdt.internal.core.util.Util.log(
        new Status(
View Full Code Here

  public IAnnotationBinding[] getAnnotations() {
    try {
      INameEnvironment nameEnvironment = this.binding.environment.nameEnvironment;
      if (!(nameEnvironment instanceof SearchableEnvironment))
        return AnnotationBinding.NoAnnotations;
      NameLookup nameLookup = ((SearchableEnvironment) nameEnvironment).nameLookup;
      if (nameLookup == null)
        return AnnotationBinding.NoAnnotations;
      final String pkgName = getName();
      IPackageFragment[] pkgs = nameLookup.findPackageFragments(pkgName, false/*exact match*/);
      if (pkgs == null)
        return AnnotationBinding.NoAnnotations;

      for (int i = 0, len = pkgs.length; i < len; i++) {
        int fragType = pkgs[i].getKind();
View Full Code Here

   */
  public IJavaElement getJavaElement() {
    INameEnvironment nameEnvironment = this.binding.environment.nameEnvironment; // a package binding always has a LooupEnvironment set
    if (!(nameEnvironment instanceof SearchableEnvironment)) return null;
    // this is not true in standalone DOM/AST
    NameLookup nameLookup = ((SearchableEnvironment) nameEnvironment).nameLookup;
    if (nameLookup == null) return null;
    IJavaElement[] pkgs = nameLookup.findPackageFragments(getName(), false/*exact match*/);
    if (pkgs == null) return null;
    if (pkgs.length == 0) {
      // add additional tracing as this should not happen
      org.eclipse.jdt.internal.core.util.Util.log(
        new Status(
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.internal.core.NameLookup

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.