Examples of Location


Examples of com.google.dart.engine.index.Location

        int offset = property.getFieldNameOffset();
        if (offset == -1) {
          continue;
        }
        int length = field.getName().length();
        Location location = new Location(property, offset, length);
        // getter reference
        if (property.getPropertyKind().callsGetter()) {
          PropertyAccessorElement getter = field.getGetter();
          if (getter != null) {
            store.recordRelationship(getter, IndexConstants.IS_REFERENCED_BY_QUALIFIED, location);
View Full Code Here

Examples of com.google.dart.engine.utilities.source.LineInfo.Location

   * @param contentOffset the offset of the contents in the larger file
   * @return the first Dart token
   */
  public static com.google.dart.engine.scanner.Token scanDartSource(Source source,
      LineInfo lineInfo, String contents, int contentOffset, AnalysisErrorListener errorListener) {
    Location location = lineInfo.getLocation(contentOffset);
    Scanner scanner = new Scanner(
        source,
        new SubSequenceReader(contents, contentOffset),
        errorListener);
    scanner.setSourceStart(location.getLineNumber(), location.getColumnNumber());
    return scanner.tokenize();
  }
View Full Code Here

Examples of com.google.gwt.uibinder.rebind.XMLElement.Location

  protected static String locationOf(XMLElement context) {
    if (context == null) {
      return "";
    }

    Location location = context.getLocation();
    if (location != null) {
      String displayFileName = location.getSystemId();
      if (displayFileName == null) {
        // We see this in the test cases that don't use actual source files
        displayFileName = "Unknown";
      } else {
        // Parse the system id as a URI, which is almost always is
        try {
          URI uri = new URI(location.getSystemId());
          String path = uri.getPath();
          if (path != null) {
            displayFileName = path.substring(path.lastIndexOf('/') + 1);
          }
        } catch (URISyntaxException e) {
          // Fall back to the raw system id
        }
      }
      // Log in a way that usually triggers IDE hyperlinks
      return " Element " + context.toString() + " (" + displayFileName + ":"
          + location.getLineNumber() + ")";
    } else {
      /*
       * This shouldn't occur unless the XMLElement came from a DOM Node created
       * by something other than W3cDocumentBuilder.
       */
 
View Full Code Here

Examples of com.google.livingstories.client.Location

        if (GlobalUtil.isContentEmpty(photoUrl)) {
          savePlayer(null);
        } else {
          AssetContentItem photo = new AssetContentItem(null, new Date(), new HashSet<Long>(),
              photoUrl, Importance.MEDIUM, null, AssetType.IMAGE, name, previewPhotoUrl);
          photo.setLocation(new Location(null, null, ""));
          photo.setPublishState(PublishState.PUBLISHED);
          contentService.createOrChangeContentItem(photo, new AsyncCallback<BaseContentItem>() {
            @Override
            public void onFailure(Throwable caught) {
              problemLabel.setVisible(true);
              callbackWork.onFailure(caught);
              resetButtons();
            }

            @Override
            public void onSuccess(BaseContentItem result) {
              savePlayer((AssetContentItem)result);
            }
          });
        }
       
       
      }
     
      private void savePlayer(AssetContentItem photo) {
        List<String> aliasList = new ArrayList<String>();
        for (String alias : aliasesBox.getText().split(",")) {
          String trimmed = alias.trim();
          if (!trimmed.isEmpty()) {
            aliasList.add(trimmed);
          }
        }
       
        // Collections.emptySet() and Collections.emptyList() don't serialize properly.
        PlayerContentItem player = new PlayerContentItem(null, new Date(), new HashSet<Long>(),
            bioArea.getText(), Importance.MEDIUM, nameBox.getText(), aliasList,
            typeSelector.getSelectedConstant(), photo);
        // Kinda broken, but this isn't done automatically:
        player.setLocation(new Location(null, null, ""));
        player.setPublishState(PublishState.PUBLISHED);
        problemLabel.setVisible(false);
        contentService.createOrChangeContentItem(player, new AsyncCallback<BaseContentItem>() {
          @Override
          public void onFailure(Throwable caught) {
View Full Code Here

Examples of com.googlecode.mashups.services.generic.api.Location

   
    public void testGetLocationFromAddress() throws Exception {
        LocationService locationService = GenericServicesFactory.getLocationService();
       
        try {
            Location location = locationService.getLocationFromAddress("Cairo, Egypt");
           
            System.out.println("LatLng for (\"Cairo, Egypt\") is: " + location.getLatitude() +", " + location.getLongitude());
        } catch (Exception e) {
            e.printStackTrace();
            fail("Unable to get the location from the address ...");
        }       
    }
View Full Code Here

Examples of com.hp.hpl.jena.tdb.base.file.Location

//                                            int dftKeyLength, int dftValueLength,
//                                            int readCacheSize,int writeCacheSize)
   
    public static void dumpNodeIndex(String dir)
    {
        Location location = new Location(dir) ;
        Index nodeToId = SetupTDB.makeIndex(location,  Names.indexNode2Id, SystemTDB.LenNodeHash, SystemTDB.SizeOfNodeId, -1 ,-1) ;
        Iterator<Record> iter = nodeToId.iterator() ;
        while(iter.hasNext())
        {
            System.out.println(iter.next()) ;
View Full Code Here

Examples of com.intellij.execution.Location

  }

  @NotNull
  @Override
  public List<Location> getLocation(@NotNull String protocolId, @NotNull String locationData, Project project) {
    final Location location;
    if (PROTOCOL_ID__CONFIG_FILE.equals(protocolId)) {
      location = getConfigLocation(locationData);
    }
    else if (PROTOCOL_ID__TEST_SUITE.equals(protocolId)) {
      location = getTestLocation(locationData, true);
View Full Code Here

Examples of com.jcloisterzone.board.Location

    public static String getTileId(Expansion expansion, Element xml) {
        return expansion.getCode() + "." + xml.getAttribute("id");
    }

    public static  Location union(String[] locations) {
        Location u = null;
        for (String locStr : locations) {
            Location loc = Location.valueOf(locStr);
            u = loc.union(u);
        }
        return u;
    }
View Full Code Here

Examples of com.l2jfrozen.gameserver.model.Location

        activeChar.sendMessage("You can't restart in Event!");
        return;
      }
      try
      {
        Location loc = null;
        Castle castle = null;
        Fort fort = null;
       
        if (activeChar.isInJail())
        {
          _requestedPointType = 27;
        }
        else if (activeChar.isFestivalParticipant())
        {
          _requestedPointType = 4;
        }
       
        if (activeChar.isPhoenixBlessed())
          activeChar.stopPhoenixBlessing(null);
       
        switch (_requestedPointType)
        {
          case 1: // to clanhall
           
            if (activeChar.getClan() != null)
            {
             
              if (activeChar.getClan().getHasHideout() == 0)
              {
                // cheater
                activeChar.sendMessage("You may not use this respawn point!");
                Util.handleIllegalPlayerAction(activeChar, "Player " + activeChar.getName() + " used respawn cheat.", IllegalPlayerAction.PUNISH_KICK);
                return;
              }
              loc = MapRegionTable.getInstance().getTeleToLocation(activeChar, MapRegionTable.TeleportWhereType.ClanHall);
             
              if (ClanHallManager.getInstance().getClanHallByOwner(activeChar.getClan()) != null && ClanHallManager.getInstance().getClanHallByOwner(activeChar.getClan()).getFunction(ClanHall.FUNC_RESTORE_EXP) != null)
              {
                activeChar.restoreExp(ClanHallManager.getInstance().getClanHallByOwner(activeChar.getClan()).getFunction(ClanHall.FUNC_RESTORE_EXP).getLvl());
              }
             
              break;       
            }
           
            loc = MapRegionTable.getInstance().getTeleToLocation(activeChar, MapRegionTable.TeleportWhereType.Town);
            break;
          case 2: // to castle
            Boolean isInDefense = false;
            castle = CastleManager.getInstance().getCastle(activeChar);
            fort = FortManager.getInstance().getFort(activeChar);
            MapRegionTable.TeleportWhereType teleportWhere = MapRegionTable.TeleportWhereType.Town;
           
            if (castle != null && castle.getSiege().getIsInProgress())
            {
              // siege in progress
              if (castle.getSiege().checkIsDefender(activeChar.getClan()))
              {
                isInDefense = true;
              }
            }
           
            if (fort != null && fort.getSiege().getIsInProgress())
            {
              // siege in progress
              if (fort.getSiege().checkIsDefender(activeChar.getClan()))
              {
                isInDefense = true;
              }
            }
           
            if (activeChar.getClan().getHasCastle() == 0 && activeChar.getClan().getHasFort() == 0 && !isInDefense)
            {
              // cheater
              activeChar.sendMessage("You may not use this respawn point!");
              Util.handleIllegalPlayerAction(activeChar, "Player " + activeChar.getName() + " used respawn cheat.", IllegalPlayerAction.PUNISH_KICK);
              return;
            }
           
            if (CastleManager.getInstance().getCastleByOwner(activeChar.getClan()) != null)
              teleportWhere = MapRegionTable.TeleportWhereType.Castle;
            else if (FortManager.getInstance().getFortByOwner(activeChar.getClan()) != null)
              teleportWhere = MapRegionTable.TeleportWhereType.Fortress;
           
            loc = MapRegionTable.getInstance().getTeleToLocation(activeChar, teleportWhere);
            break;
         
          case 3: // to siege HQ
            L2SiegeClan siegeClan = null;
            castle = CastleManager.getInstance().getCastle(activeChar);
            fort = FortManager.getInstance().getFort(activeChar);
           
            if (castle != null && castle.getSiege().getIsInProgress())
            {
              siegeClan = castle.getSiege().getAttackerClan(activeChar.getClan());
            }
            else if (fort != null && fort.getSiege().getIsInProgress())
            {
              siegeClan = fort.getSiege().getAttackerClan(activeChar.getClan());
            }
           
            if (siegeClan == null || siegeClan.getFlag().size() == 0)
            {
              // cheater
              activeChar.sendMessage("You may not use this respawn point!");
              Util.handleIllegalPlayerAction(activeChar, "Player " + activeChar.getName() + " used respawn cheat.", IllegalPlayerAction.PUNISH_KICK);
              return;
            }
           
            loc = MapRegionTable.getInstance().getTeleToLocation(activeChar, MapRegionTable.TeleportWhereType.SiegeFlag);
            break;
         
          case 4: // Fixed or Player is a festival participant
            if (!activeChar.isGM() && !activeChar.isFestivalParticipant())
            {
              // cheater
              activeChar.sendMessage("You may not use this respawn point!");
              Util.handleIllegalPlayerAction(activeChar, "Player " + activeChar.getName() + " used respawn cheat.", IllegalPlayerAction.PUNISH_KICK);
              return;
            }
           
            loc = new Location(activeChar.getX(), activeChar.getY(), activeChar.getZ()); // spawn them where they died
            break;
         
          case 27: // to jail
            if (!activeChar.isInJail())
              return;
            loc = new Location(-114356, -249645, -2984);
            break;
         
          default:
            if (activeChar.getKarma() > 0 && Config.ALT_KARMA_TELEPORT_TO_FLORAN)
            {
              loc = new Location(17836, 170178, -3507);// Floran Village
              break;
            }
            loc = MapRegionTable.getInstance().getTeleToLocation(activeChar, MapRegionTable.TeleportWhereType.Town);
            break;       
        }
View Full Code Here

Examples of com.liferay.samples.portlet.eventlisting.model.Location

  public static Location toModel(LocationSoap soapModel) {
    if (soapModel == null) {
      return null;
    }

    Location model = new LocationImpl();

    model.setLocationId(soapModel.getLocationId());
    model.setName(soapModel.getName());
    model.setDescription(soapModel.getDescription());
    model.setStreetAddress(soapModel.getStreetAddress());
    model.setCity(soapModel.getCity());
    model.setStateOrProvince(soapModel.getStateOrProvince());
    model.setCountry(soapModel.getCountry());
    model.setCompanyId(soapModel.getCompanyId());
    model.setGroupId(soapModel.getGroupId());
    model.setUserId(soapModel.getUserId());
    model.setCreateDate(soapModel.getCreateDate());
    model.setModifiedDate(soapModel.getModifiedDate());

    return model;
  }
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.