Examples of Location


Examples of com.android.tools.lint.detector.api.Location

    private void runFileDetectors(Project project, File projectDir) {
        // Look up manifest information
        File manifestFile = new File(project.getDir(), ANDROID_MANIFEST_XML);
        if (manifestFile.exists()) {
            Context context = new Context(mClient, project, manifestFile, mScope);
            context.location = new Location(manifestFile, null, null);
            IDomParser parser = mClient.getParser();
            context.document = parser.parse(context);
            if (context.document != null) {
                project.readManifest(context.document);

                if (mScope.contains(Scope.MANIFEST)) {
                    List<Detector> detectors = mScopeDetectors.get(Scope.MANIFEST);
                    if (detectors != null) {
                        XmlVisitor v = new XmlVisitor(parser, detectors);
                        fireEvent(EventType.SCANNING_FILE, context);
                        v.visitFile(context, manifestFile);
                    }
                }
            }
        }

        // Process both Scope.RESOURCE_FILE and Scope.ALL_RESOURCE_FILES detectors together
        // in a single pass through the resource directories.
        if (mScope.contains(Scope.ALL_RESOURCE_FILES) || mScope.contains(Scope.RESOURCE_FILE)) {
            List<Detector> checks = union(mScopeDetectors.get(Scope.RESOURCE_FILE),
                    mScopeDetectors.get(Scope.ALL_RESOURCE_FILES));
            if (checks.size() > 0) {
                List<ResourceXmlDetector> xmlDetectors =
                        new ArrayList<ResourceXmlDetector>(checks.size());
                for (Detector detector : checks) {
                    if (detector instanceof ResourceXmlDetector) {
                        xmlDetectors.add((ResourceXmlDetector) detector);
                    }
                }
                if (xmlDetectors.size() > 0) {
                    if (project.getSubset() != null) {
                        checkIndividualResources(project, xmlDetectors, project.getSubset());
                    } else {
                        File res = new File(projectDir, RES_FOLDER_NAME);
                        if (res.exists() && xmlDetectors.size() > 0) {
                            checkResFolder(project, res, xmlDetectors);
                        }
                    }
                }
            }
        }

        if (mCanceled) {
            return;
        }

        if (mScope.contains(Scope.JAVA_FILE) || mScope.contains(Scope.ALL_JAVA_FILES)) {
            List<Detector> checks = union(mScopeDetectors.get(Scope.JAVA_FILE),
                    mScopeDetectors.get(Scope.ALL_JAVA_FILES));
            if (checks.size() > 0) {
                List<File> sourceFolders = project.getJavaSourceFolders();
                checkJava(project, sourceFolders, checks);
            }
        }

        if (mCanceled) {
            return;
        }

        if (mScope.contains(Scope.CLASS_FILE)) {
            List<Detector> detectors = mScopeDetectors.get(Scope.CLASS_FILE);
            if (detectors != null) {
                List<File> binFolders = project.getJavaClassFolders();
                checkClasses(project, binFolders, detectors);
            }
        }

        if (mCanceled) {
            return;
        }

        if (mScope.contains(Scope.PROGUARD)) {
            List<Detector> detectors = mScopeDetectors.get(Scope.PROGUARD);
            if (detectors != null) {
                File file = new File(project.getDir(), PROGUARD_CFG);
                if (file.exists()) {
                    Context context = new Context(mClient, project, file, mScope);
                    fireEvent(EventType.SCANNING_FILE, context);
                    context.location = new Location(file, null, null);
                    for (Detector detector : detectors) {
                        if (detector.appliesTo(context, file)) {
                            detector.beforeCheckFile(context);
                            detector.run(context);
                            detector.afterCheckFile(context);
View Full Code Here

Examples of com.asakusafw.compiler.flow.Location

        String compilerWork = cmd.getOptionValue(OPT_COMPILERWORK.getOpt());
        String link = cmd.getOptionValue(OPT_LINK.getOpt());
        String plugin = cmd.getOptionValue(OPT_PLUGIN.getOpt());

        File outputDirectory = new File(output);
        Location hadoopWorkLocation = Location.fromPath(hadoopWork, '/');
        File compilerWorkDirectory = new File(compilerWork);
        List<File> linkingResources = Lists.create();
        if (link != null) {
            for (String s : link.split(File.pathSeparator)) {
                linkingResources.add(new File(s));
View Full Code Here

Examples of com.barrybecker4.common.geometry.Location

    public void render(Graphics2D g2, TilePlacement tilePlacement,
                       Location topLeftCorner, double radius) {

        if (tilePlacement == null) return;
        boolean isOddRow = tilePlacement.getLocation().getRow() % 2 == 1;
        Location location =
            tilePlacement.getLocation().decrementOnCopy(topLeftCorner);

        double x = radius/2
                + ((location.getCol() - (isOddRow ? -0.25:  -0.75)) * 2 * radius * HexUtil.ROOT3D2);
        double y = radius/+ TOP_MARGIN
                + ((location.getRow() + 0.6) * 3.0 * radius / 2.0);

        Point point = new Point((int)x, (int)y);
        drawHexagon(g2, point, radius);
        pathRenderer.drawPath(g2, 0, tilePlacement, point, radius);
        pathRenderer.drawPath(g2, 1, tilePlacement, point, radius);
View Full Code Here

Examples of com.basho.riak.client.core.query.Location

        public List<Entry> getEntries()
        {
            List<Entry> convertedList = new ArrayList<Entry>();
            for (SecondaryIndexQueryOperation.Response.Entry e : coreResponse.getEntryList())
            {
                Location loc = getLocationFromCoreEntry(e);
                Entry ce = new Entry(loc, e.getIndexKey(), converter);
                convertedList.add(ce);
            }
            return convertedList;
        }
View Full Code Here

Examples of com.bbn.openmap.layer.location.Location

     */
    protected Location createLocation(float lat, float lon, String name,
                                      String iconURL) {

        // This will turn into a regular location if iconURL is null.
        Location loc = new URLRasterLocation(lat, lon, name, iconURL);

        // let the layer handler default set these initially...
        loc.setShowName(isShowNames());
        loc.setShowLocation(isShowLocations());

        loc.setLocationHandler(this);
        getLocationDrawingAttributes().setTo(loc.getLocationMarker());
        getNameDrawingAttributes().setTo(loc.getLabel());

        loc.setDetails(name + " is at lat: " + lat + ", lon: " + lon);

        if (iconURL != null) {
            loc.setDetails(loc.getDetails() + " icon: " + iconURL);
        }

        Debug.message("csvlocation", "CSVLocationHandler " + loc.getDetails());

        return loc;
    }
View Full Code Here

Examples of com.bugyal.imentor.server.data.Location

    Ranker disSubRanker = new Ranker().addScorer(new DistanceScorer())
        .addScorer(new SubjectCorrelationScorer());

    Participant p = Participant.createParticipantForTest("abc",
        new Location(17.0, 75.12, "some-location", 40), "abc@ui.com", "100002992300278");
    disSubRanker.rank(sr1, p) ;
   
    assertEquals("name2",sr1.getAllResults().get(0).getP().getName());
    assertEquals("name3",sr1.getAllResults().get(1).getP().getName());
    assertEquals("name1",sr1.getAllResults().get(2).getP().getName());
View Full Code Here

Examples of com.captechconsulting.core.domain.Location

    @RequestMapping(value = "/ticket/{ticketId}/scan/{locationId}", method = RequestMethod.POST)
    @ResponseStatus(HttpStatus.CREATED)
    public LocationVO addLocationScan(@PathVariable long ticketId, @PathVariable long locationId) {
        Ticket ticket = ticketService.get(ticketId);
        Location location = ticketService.addLocationScan(ticket, locationId);
        return mappingService.map(location, LocationVO.class);
    }
View Full Code Here

Examples of com.caucho.quercus.Location

  {
    ArrayList<String> trace = new ArrayList<String>();

    for (int i = _callStackTop - 1; i >= 0; i--) {
      String entry;
      Location location = _callStack[i].getLocation();
      String loc;

      if (location != null && location.getFileName() != null) {
        loc = (" (at " + location.getFileName()
               + ":" + location.getLineNumber() + ")");
      }
      else
        loc = "";
     
      if (_callThisStack[i] != null
View Full Code Here

Examples of com.cburch.logisim.data.Location

    if (circuit == null) return false;
    for (Component comp : components) {
      if (!(comp instanceof Wire)) {
        for (EndData endData : comp.getEnds()) {
          if (endData != null && endData.isExclusive()) {
            Location endLoc = endData.getLocation().translate(dx, dy);
            Component conflict = circuit.getExclusive(endLoc);
            if (conflict != null) {
              if (selfConflicts || !components.contains(conflict)) return true;
            }
          }
        }
        Location newLoc = comp.getLocation().translate(dx, dy);
        Bounds newBounds = comp.getBounds().translate(dx, dy);
        for (Component comp2 : circuit.getAllContaining(newLoc)) {
          Bounds bds = comp2.getBounds();
          if (bds.equals(newBounds)) {
            if (selfConflicts || !components.contains(comp2)) return true;
View Full Code Here

Examples of com.codename1.location.Location

  private String sessionId;

  public void initService(Ads adsComponent) {
    if (getLocation() == null) {
      LocationManager lm = LocationManager.getLocationManager();
      Location loc;
      if (lm.getStatus() == LocationManager.AVAILABLE) {
        try {
          loc = lm.getCurrentLocation();
        } catch (IOException e) {
          Log.e(e);
          loc = lm.getLastKnownLocation();
        }
      } else {
        loc = lm.getLastKnownLocation();
      }

      // Use location if provided, otherwise use either reverse IP or
      // Geocode depending on availability of sensor.
      if (adsComponent.getLocation() != null) {
        LookupLocation lloc = new LookupLocation();
        parseLocation(lloc, loc, adsComponent.getLocation());
        setLocation(lloc);
      } else {
        if (loc == null) {
          LocationLookupService lookup = LocationLookupService.createLookupByIP();
          LookupLocation lloc = lookup.getLocation(new IPAddress(null));
          if (lloc.getLookupStatus() == LookupLocation.STATUS_OK) {
            setLocation(lloc);
          }
        } else {
          LocationLookupService lookup = LocationLookupService.createLookupByGeocode();
          LookupLocation lloc = lookup.getLocation(new Coordinate(loc));
          if (lloc.getLookupStatus() != LookupLocation.STATUS_OK) {
            lloc.setLatitude(loc.getLatitude());
            lloc.setLongtitude(loc.getLongtitude());
          }
        }
      }
    }
    setPost(false);
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.