Examples of IRegion


Examples of aQute.bnd.properties.IRegion

                if (type == LineType.entry) {
                    String key = reader.key();
                    if ("version".equals(key)) {
                        LineLocation loc = new LineLocation();
                        loc.lineNum = lineNum;
                        IRegion region = reader.region();
                        loc.start = region.getOffset();
                        loc.end = region.getOffset() + region.getLength();
                        return loc;
                    }
                }
                type = reader.next();
                lineNum++;
View Full Code Here

Examples of aQute.bnd.properties.IRegion

                if (type == LineType.entry) {
                    String key = reader.key();
                    if ("version".equals(key)) {
                        LineLocation loc = new LineLocation();
                        loc.lineNum = lineNum;
                        IRegion region = reader.region();
                        loc.start = region.getOffset();
                        loc.end = region.getOffset() + region.getLength();
                        return loc;
                    }
                }
                type = reader.next();
                lineNum++;
View Full Code Here

Examples of jadx.core.dex.nodes.IRegion

    regionStack.push(region);
  }

  @Override
  public final void processBlock(MethodNode mth, IBlock container) {
    IRegion curRegion = regionStack.peek();
    processBlockTraced(mth, container, curRegion);
  }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.core.IRegion

      IJavaElement e = elementsToProcess[i];
      ICompilationUnit cu = getCompilationUnitFor(e);
      if (cu == null) {
        throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.READ_ONLY, e));
      } else {
        IRegion region = (IRegion) childrenToRemove.get(cu);
        if (region == null) {
          region = new Region();
          childrenToRemove.put(cu, region);
          uniqueCUs += 1;
        }
        region.add(e);
      }
    }
    elementsToProcess = new IJavaElement[uniqueCUs];
    Iterator iter = childrenToRemove.keySet().iterator();
    int i = 0;
View Full Code Here

Examples of org.eclipse.jdt.core.IRegion

      IJavaElement e = this.elementsToProcess[i];
      ICompilationUnit cu = getCompilationUnitFor(e);
      if (cu == null) {
        throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.READ_ONLY, e));
      } else {
        IRegion region = (IRegion) this.childrenToRemove.get(cu);
        if (region == null) {
          region = new Region();
          this.childrenToRemove.put(cu, region);
          uniqueCUs += 1;
        }
        region.add(e);
      }
    }
    this.elementsToProcess = new IJavaElement[uniqueCUs];
    Iterator iter = this.childrenToRemove.keySet().iterator();
    int i = 0;
View Full Code Here

Examples of org.eclipse.jface.text.IRegion

              }
            }
          }
        }
        if (!designDBReferenceFound) {
          IRegion designDBValueRegion;
          try {
            designDBValueRegion = tmlInfo.getAttributeValueRegion("designdb");
            charStart = designDBValueRegion.getOffset();
            charEnd = charStart + designDBValueRegion.getLength();
          } catch (BadLocationException e) {
            // ignore just mark the whole line
          }
          MarkerFactory.createErrorMarker(getMarkerID(), file, charStart, charEnd, "Unsatisfied design db reference '" + designDBValue + "'.");
        }
View Full Code Here

Examples of org.eclipse.jface.text.IRegion

          // check if labelfile exists
          try {
            IFile labelFile = designHelper.getLabelFile(labelFilename);
            if (labelFile == null || !labelFile.exists()) {
              try {             
                IRegion attributeRegion = tmlInfo.getAttributeValueRegion("file");
                if (attributeRegion != null) {
                  charStart = attributeRegion.getOffset();
                  charEnd = charStart + attributeRegion.getLength();
                }
              } catch (BadLocationException e) {
              }
             
              MarkerFactory.createErrorMarker(getMarkerID(), file, charStart, charEnd, "Labelfile '" + labelFilename + "' does not exist.", markerAttributes);
            }
          } catch (CoreException e1) {
          }
        }
       
        Set<String> labelKeys = designHelper.getLabelKeys(labelFilename);
   
        if (!labelKeys.contains(labelKey)) {
          try {
            IRegion attributeRegion = tmlInfo.getAttributeValueRegion("key");
            if (attributeRegion != null) {
              charStart = attributeRegion.getOffset();
              charEnd = charStart + attributeRegion.getLength();
            }
          } catch (BadLocationException e) {
          }
          if (labelFilename.equalsIgnoreCase("general")) {
            MarkerFactory.createWarningMarker(getMarkerID(), file, charStart, charEnd, "Cannot resolve label for key '" + labelKey + "'.", markerAttributes);
View Full Code Here

Examples of org.eclipse.jface.text.IRegion

  public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset) {   
    setErrorMessage(null);
    List<ICompletionProposal> proposals = new ArrayList<ICompletionProposal>();   
    try {
      IDocument document = viewer.getDocument();
      IRegion region = TMLContentAssistProcessor.determineRelatedRegion(offset, document);
      if (isOpenPartition(region, document, "<tml:comment>", "</tml:comment>", TMLPartitionScanner.TML_COMMENT)) {
        proposals.addAll(computeCompletionPropsals(document, region, offset, "<tml:comment>", "</tml:comment>"));
      } else if (isOpenPartition(region, document, "<tml:disable>", "</tml:disable>", TMLPartitionScanner.TML_DISABLE)) {
        proposals.addAll(computeCompletionPropsals(document, region, offset, "<tml:disable>", "</tml:disable>"));
      } else {       
View Full Code Here

Examples of org.eclipse.jface.text.IRegion

      referencedFile = WGADesignStructureHelper.findReferencedScript(file, ref, WGADesignStructureHelper.SCRIPT_TYPE_TMLSCRIPT);
      referenceType = REFERENCE_TYPE_SCRIPT;
      referencePath = WGADesignStructureHelper.computeScriptReferencePath(file, ref, WGADesignStructureHelper.SCRIPT_TYPE_TMLSCRIPT);
     
      if (referencedFile == null && referenceType != null) {
        IRegion region;
        try {             
          region = tmlInfo.getAttributeValueRegion(attributeName);
          if (region != null) {
            charStart = region.getOffset();
            charEnd = charStart + region.getLength();
          }
        } catch (BadLocationException e) {
        }         
       
        Map<String, Object> attributes = new HashMap<String, Object>();
View Full Code Here

Examples of org.eclipse.jface.text.IRegion

        referencedFile = WGADesignStructureHelper.findReferencedTMLModule(file, ref, medium);
        referenceType = REFERENCE_TYPE_TML;           
        referencePath = new WGADesignStructureHelper(file).computeTMLModuleReferencePath(file, ref, medium);
      }
      if (referencedFile == null && referenceType != null) {
        IRegion region;
        try {             
          region = tmlInfo.getAttributeValueRegion("name");
          if (region != null) {
            charStart = region.getOffset();
            charEnd = charStart + region.getLength();
          }
        } catch (BadLocationException e) {
        }         
       
        Map<String, Object> attributes = new HashMap<String, Object>();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.