Examples of startsWith()


Examples of org.eclipse.core.runtime.IPath.startsWith()

        if (bundle != null) {
            try {
                URL url = FileLocator.resolve(bundle.getEntry("/")); //$NON-NLS-1$
                url = FileLocator.toFileURL(url);
                String path = url.getFile();
                if (path.startsWith("file:")) { //$NON-NLS-1$
                    path = path.substring(5);
                }

                path = new File(path).getAbsolutePath();
View Full Code Here

Examples of org.eclipse.core.runtime.Path.startsWith()

                        resource = (IResource) selection.getFirstElement();
                    }
                   
                    String path = resource.getFullPath().makeRelativeTo( root.getFullPath() ).toString();
                   
                    if( path.startsWith( "/" ) && path.length() > 1 )
                    {
                        path = path.substring( 1 );
                    }
                   
                    textField.setText( path );
View Full Code Here

Examples of org.eclipse.jface.bindings.keys.KeySequence.startsWith()

    for (int i = 0; i < keyBindingsCount; i++) {
      keySequence = (KeySequence) keyBindings[i];

      // Now just double-check to make sure the key is still possible.
      if (prefixSize > 0) {
        if (keySequence.startsWith(currentState, false)) {
          /*
           * Okay, so we have a partial match. Replace the key binding
           * with the required suffix completion.
           */
          final KeyStroke[] oldKeyStrokes = keySequence
View Full Code Here

Examples of org.eclipse.xtext.naming.QualifiedName.startsWith()

      for(IEObjectDescription d : descs) {
        if(searchPath.searchIndexOf(d) == -1)
          continue; // not visible
        EClass ec = d.getEClass();
        QualifiedName name = d.getName();
        if(name.startsWith(prefix)) {
          if(name.getSegmentCount() == prefix.getSegmentCount()) {
            // exact match, check if this is the correct type
            if(DEF_AND_TYPE[0].isSuperTypeOf(ec) || DEF_AND_TYPE[1].isSuperTypeOf(ec)) {
              String parentName = d.getUserData(PPDSLConstants.PARENT_NAME_DATA);
              if(parentName != null && parentName.length() > 0)
View Full Code Here

Examples of org.exist.xmldb.XmldbURI.startsWith()

        if (elementStack == 0) {
            StoredNode node = getCurrentNode();
            if (node != null) {
                DocumentImpl doc = node.getDocument();
                XmldbURI uri = doc.getURI();
                if (!uri.startsWith(XmldbURI.SYSTEM_COLLECTION_URI)) {
                   
                    if (doc.getCollection().getConfiguration(getBroker()).triggerRegistered(VersioningTrigger.class)) {
                        try {
                            long rev = VersioningHelper.getCurrentRevision(getBroker(), doc.getURI());
                            long time = System.currentTimeMillis();
View Full Code Here

Examples of org.fife.ui.rsyntaxtextarea.Token.startsWith()

          // If we're folding PHP.  Note that PHP folding can only be
          // "one level deep," so our logic here is simple.
          if (language>=0 && t.type==Token.SEPARATOR) {

            // <?, <?php, <%, <%!, ...
            if (t.startsWith(LANG_START[language])) {
              if (currentFold==null) {
                currentFold = new Fold(FoldType.CODE, textArea, t.offset);
                folds.add(currentFold);
              }
              else {
View Full Code Here

Examples of org.fusesource.hawtbuf.Buffer.startsWith()

            node.data = paged.get(DATA_ENCODER_DECODER, page);
            node.storedInExtent=true;
        } else {
            Buffer buffer = new Buffer(paged.getPageSize());
            paged.read(page, buffer);
            if ( buffer.startsWith(Extent.DEFAULT_MAGIC) ) {
                // Page data was stored in an extent..
                node.data = DATA_ENCODER_DECODER.load(paged, page);
                node.storedInExtent=true;
            } else {
                // It was just in a plain page..
View Full Code Here

Examples of org.geotools.data.complex.filter.XPathUtil.StepList.startsWith()

            newSteps = steps.subList(startPos, steps.size());
            if (!newSteps.isEmpty()) {
                List<NestedAttributeMapping> nestedMappings = nextFMapping.getNestedMappings();
                if (!nestedMappings.isEmpty()) {
                    for (NestedAttributeMapping mapping : nestedMappings) {
                        if (newSteps.startsWith(mapping.getTargetXPath())) {
                            for (Feature f : nestedFeatures) {
                                // loop to this method
                                values.addAll(getValues(f, mapping, newSteps));
                            }
                        }
View Full Code Here

Examples of org.hornetq.api.core.SimpleString.startsWith()

   public void testStartsWith() throws Exception
   {
      SimpleString s1 = new SimpleString("abcdefghi");

      Assert.assertTrue(s1.startsWith(new SimpleString("abc")));

      Assert.assertTrue(s1.startsWith(new SimpleString("abcdef")));

      Assert.assertTrue(s1.startsWith(new SimpleString("abcdefghi")));
View Full Code Here

Examples of org.hornetq.api.core.SimpleString.startsWith()

   {
      SimpleString s1 = new SimpleString("abcdefghi");

      Assert.assertTrue(s1.startsWith(new SimpleString("abc")));

      Assert.assertTrue(s1.startsWith(new SimpleString("abcdef")));

      Assert.assertTrue(s1.startsWith(new SimpleString("abcdefghi")));

      Assert.assertFalse(s1.startsWith(new SimpleString("abcdefghijklmn")));
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.