Package org.eclipse.jface.operation

Examples of org.eclipse.jface.operation.IRunnableWithProgress


    planObservable.setValue(plan);
  }

  protected boolean updateConfiguration() {
    try {
      getContainer().run(true, false, new IRunnableWithProgress() {
        public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
          try {
            serviceOfferings = cloudServer.getBehaviour().getServiceOfferings(monitor);
            Collections.sort(serviceOfferings, new Comparator<CloudServiceOffering>() {
              public int compare(CloudServiceOffering o1, CloudServiceOffering o2) {
View Full Code Here


  @Override
  public boolean performFinish() {
    if (!deferServiceAddition && page.getService() != null) {
      try {
        final LocalCloudService localService = page.getService();
        getContainer().run(true, false, new IRunnableWithProgress() {
          public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
            try {
              cloudServer.getBehaviour().createService(new CloudService[] { localService }, monitor);
              // Get the actual Service
              List<CloudService> allServices = cloudServer.getBehaviour().getServices(monitor);
View Full Code Here

  public boolean performFinish() {
    page.setErrorMessage(null);

    final IStatus[] result = new IStatus[1];

    IRunnableWithProgress runnable = null;

    page.setMessage(Messages.MappedURLsWizard_TEXT_UPDATE_URL);

    // If the app module is not deployed, set the URIs in the deployment
    // descriptor.
    if (!applicationModule.isDeployed()) {
      runnable = new IRunnableWithProgress() {
        public void run(IProgressMonitor monitor) {
          try {
            DeploymentInfoWorkingCopy wc = applicationModule.resolveDeploymentInfoWorkingCopy(monitor);
            wc.setUris(page.getURLs());
            wc.save();
          }
          catch (CoreException e) {
            result[0] = e.getStatus();
          }
        }
      };
    }
    else {
      runnable = new IRunnableWithProgress() {
        public void run(IProgressMonitor monitor) {
          try {
            cloudServer.getBehaviour().updateApplicationUrls(appName, page.getURLs(), monitor);
          }
          catch (CoreException e) {
View Full Code Here

    infoWorkingCopy.save();
    final IStatus[] result = new IStatus[1];
    try {

      envVarPage.setMessage(Messages.EnvVarsWizard_TEXT_ENV_VAR);
      getContainer().run(true, true, new IRunnableWithProgress() {
        public void run(IProgressMonitor monitor) {
          try {
            cloudServer.getBehaviour().updateEnvironmentVariables(appModule, monitor);

          }
View Full Code Here

    }

    @Override
    public boolean performFinish() {
        try {
            getContainer().run(false, true, new IRunnableWithProgress() {
                @Override
                public void run(IProgressMonitor monitor) throws InvocationTargetException,
                InterruptedException {
                    final IWorkspace workspace = ResourcesPlugin.getWorkspace();
                    boolean autobuild = workspace.isAutoBuilding();
View Full Code Here

  public static String ATTR_USER_DEFINED_URLS = "org.cloudfoundry.ide.eclipse.server.user.defined.urls"; //$NON-NLS-1$

  public static IStatus runForked(final ICoreRunnable coreRunner, IWizard wizard) {
    try {
      IRunnableWithProgress runner = new IRunnableWithProgress() {
        public void run(final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
          try {
            coreRunner.run(monitor);
          }
          catch (Exception e) {
View Full Code Here

  }

  public static void runForked(final ICoreRunnable coreRunner, IRunnableContext progressService)
      throws OperationCanceledException, CoreException {
    try {
      IRunnableWithProgress runner = new IRunnableWithProgress() {
        public void run(final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
          monitor.beginTask("", IProgressMonitor.UNKNOWN); //$NON-NLS-1$
          try {
            coreRunner.run(monitor);
          }
View Full Code Here

            IFileEditorInput fileInput = (IFileEditorInput) editorInput;

            try
            {
                // Save the editor content (if dirty)
                IRunnableWithProgress saveOperation = new IRunnableWithProgress()
                {
                    public void run(IProgressMonitor monitor)
                        throws InvocationTargetException, InterruptedException
                    {
                        if (editorPart.isDirty())
View Full Code Here

        monitor.beginTask("Saving", IProgressMonitor.UNKNOWN);
        try
        {
            saving = true;
            new ProgressMonitorDialog(getSite().getShell()).run(true, true,
                new IRunnableWithProgress()
                {
                    public void run(IProgressMonitor monitor)
                        throws InvocationTargetException, InterruptedException
                    {
                        try
View Full Code Here

   * using wizard as execution context.
   */
  public boolean performFinish() {
//    final String containerName = page.getContainerName();
    final String fileName = page.getFileName();
    IRunnableWithProgress op = new IRunnableWithProgress() {
      public void run(IProgressMonitor monitor) throws InvocationTargetException {
        try {
          doFinish(fileName, monitor);
        } catch (CoreException e) {
          throw new InvocationTargetException(e);
View Full Code Here

TOP

Related Classes of org.eclipse.jface.operation.IRunnableWithProgress

Copyright © 2018 www.massapicom. 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.