Examples of canExecute()


Examples of com.fray.evo.action.EcAction.canExecute()

      {
        s.invalidActions++;
        continue;
      }
                        EcAction.CanExecuteResult canExecute;
      while (!(canExecute= a.canExecute(s, log)).can)
      {
        if (s.seconds > s.targetSeconds || destination.waypointMissed(s))
        {
          if (s.settings.overDrone && s.getDrones() < s.getOverDrones(s))
            log.printFailure( GameLog.FailReason.OverDrone, mergedDestination, s );
View Full Code Here

Examples of com.xebialabs.overthere.OverthereFile.canExecute()

        assertThat("Expected temporary file to be readable", tempFile.canRead(), equalTo(true));
        assertThat("Expected temporary file to be writeable", tempFile.canWrite(), equalTo(true));

        // Windows systems don't support the concept of checking for executability
        if (connection.getHostOperatingSystem() == OperatingSystemFamily.UNIX) {
            assertFalse("Expected temporary file to not be executable", tempFile.canExecute());
        }

        DataInputStream in = new DataInputStream(tempFile.getInputStream());
        try {
            final byte[] contentsRead = new byte[contents.length];
View Full Code Here

Examples of com.xebialabs.overthere.OverthereFile.canExecute()

    @Assumption(methods = "onUnix")
    public void shouldSetExecutableOnUnix() {
        OverthereFile remoteFile = connection.getTempFile("executable.sh");
        OverthereUtils.write(generateRandomBytes(256), remoteFile);

        assertThat(remoteFile.canExecute(), equalTo(false));
        remoteFile.setExecutable(true);
        assertThat(remoteFile.canExecute(), equalTo(true));
        remoteFile.setExecutable(false);
        assertThat(remoteFile.canExecute(), equalTo(false));
    }
View Full Code Here

Examples of com.xebialabs.overthere.OverthereFile.canExecute()

        OverthereFile remoteFile = connection.getTempFile("executable.sh");
        OverthereUtils.write(generateRandomBytes(256), remoteFile);

        assertThat(remoteFile.canExecute(), equalTo(false));
        remoteFile.setExecutable(true);
        assertThat(remoteFile.canExecute(), equalTo(true));
        remoteFile.setExecutable(false);
        assertThat(remoteFile.canExecute(), equalTo(false));
    }

    @Test
View Full Code Here

Examples of com.xebialabs.overthere.OverthereFile.canExecute()

        assertThat(remoteFile.canExecute(), equalTo(false));
        remoteFile.setExecutable(true);
        assertThat(remoteFile.canExecute(), equalTo(true));
        remoteFile.setExecutable(false);
        assertThat(remoteFile.canExecute(), equalTo(false));
    }

    @Test
    @Assumption(methods = "onUnix")
    public void shouldExecuteSimpleCommandOnUnix() {
View Full Code Here

Examples of de.mhus.lib.cao.CaoAction.canExecute()

      } catch (Exception e) {
        e.printStackTrace();
      }
    }
   
    if (action != null && action.canExecute(list)) {
      MForm config = action.createConfiguration(list);
      return action.execute(list, config);
    }
    return null;
  }
View Full Code Here

Examples of eu.admire.workbench.visualeditor.features.DoubleClickFeature.canExecute()

   
    ICustomFeature customFeature =
        new DoubleClickFeature(getFeatureProvider());
    // canExecute() tests especially if the context contains a EClass

    if (customFeature.canExecute(context)) {
      return customFeature;
    }

    return super.getDoubleClickFeature(context);
View Full Code Here

Examples of java.io.File.canExecute()

          File file = RegainToolkit.urlToFile(url);
          // Check whether the file is readable.
          if (!file.canRead()) {
            mCrawlerJobProfiler.abortMeasuring();
            mLog.debug("File rights: canRead: " + file.canRead() +
                    " canExecute: " + file.canExecute() +
                    " canWrite: " + file.canWrite() + " exists: " + file.exists() +
                    " for url: " + url + ", canonical url: " + file.getCanonicalPath());
            logError("File is not readable: '" + url + "'", null, false);
            continue;
          } else if (file.isDirectory()) {
View Full Code Here

Examples of java.io.File.canExecute()

            } else return false;
        }

        private File findShell() {
            File f = new File("/bin/sh");
            if(f.exists() && f.canExecute()) return f;
            f = new File("/bin/bash");
            if(f.exists() && f.canExecute()) return f;
            System.err.println("Unable to find system shell");
            return null;
        }
View Full Code Here

Examples of java.io.File.canExecute()

        private File findShell() {
            File f = new File("/bin/sh");
            if(f.exists() && f.canExecute()) return f;
            f = new File("/bin/bash");
            if(f.exists() && f.canExecute()) return f;
            System.err.println("Unable to find system shell");
            return null;
        }
     
        static final String RESTART_SCRIPT_NAME = "tempRestartFreenet.sh";
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.