Package org.eclipse.dltk.internal.core

Examples of org.eclipse.dltk.internal.core.SourceField


      if (modelElement instanceof SourceModule) {
        SourceModule sm = (SourceModule) modelElement;
        try {
          IField[] fields = sm.getFields();
          for (IField iField : fields) {
            SourceField f = (SourceField) iField;
            int fieldType = RutaParseUtils.getTypeOfIModelElement(f);
            if (RutaTypeConstants.RUTA_TYPE_N == type) {
              if (fieldType == RutaTypeConstants.RUTA_TYPE_N
                      || fieldType == RutaTypeConstants.RUTA_TYPE_I
                      || fieldType == RutaTypeConstants.RUTA_TYPE_D
                      || fieldType == RutaTypeConstants.RUTA_TYPE_F) {
                addProposal(startPart, f.getElementName(), CompletionProposal.LOCAL_VARIABLE_REF);
              }
            } else if (type == fieldType) {
              addProposal(startPart, f.getElementName(), CompletionProposal.LOCAL_VARIABLE_REF);
            }

          }
        } catch (ModelException e) {
        }
View Full Code Here


      if (modelElement instanceof SourceModule) {
        SourceModule sm = (SourceModule) modelElement;
        try {
          IField[] fields = sm.getFields();
          for (IField iField : fields) {
            SourceField f = (SourceField) iField;
            int fieldType = RutaParseUtils.getTypeOfIModelElement(f);
            if (RutaTypeConstants.RUTA_TYPE_N == type) {
              if (fieldType == RutaTypeConstants.RUTA_TYPE_N || fieldType == RutaTypeConstants.RUTA_TYPE_I
                      || fieldType == RutaTypeConstants.RUTA_TYPE_D
                      || fieldType == RutaTypeConstants.RUTA_TYPE_F) {
                addProposal(startPart, f.getElementName(), CompletionProposal.LOCAL_VARIABLE_REF);
              }
            } else if (type == fieldType) {
              addProposal(startPart, f.getElementName(), CompletionProposal.LOCAL_VARIABLE_REF);
            }

          }
        } catch (ModelException e) {
        }
View Full Code Here

      }
    };

    for (IModelElement element : elements) {
      if (element instanceof SourceField) {
        SourceField sourceField = (SourceField) element;
        ISourceModule sourceModule = sourceField.getSourceModule();
        if (!offsets.containsKey(sourceModule)) {
          offsets.put(sourceModule, new TreeSet<ISourceRange>(
              sourceRangeComparator));
        }
        try {
          offsets.get(sourceModule).add(sourceField.getSourceRange());
        } catch (ModelException e) {
          if (DLTKCore.DEBUG) {
            e.printStackTrace();
          }
        }
View Full Code Here

TOP

Related Classes of org.eclipse.dltk.internal.core.SourceField

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.