Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.CoreException


      }       
      // adds things like the top level metainf info,
      // probably not required in most cases
      extendedClasspath.add(pluginIdToJarPath("org.apache.uima.runtime"));
    } catch (IOException e) {
      throw new CoreException(new Status(IStatus.ERROR, LauncherPlugin.ID, IStatus.OK,
              "Failed to compose classpath!", e));
    }
   
    // Dump classpath
//    for (String cp : extendedClasspath) {
View Full Code Here


                        }
                    }
                }

                if (!status.isOK())
                    throw new CoreException(status);
            }
        };
        IRunnableWithProgress uiOperation = new IRunnableWithProgress() {
            public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
                try {
View Full Code Here

                project.open(monitor);
            } else {
                project.create(monitor);
            }
        } else {
            throw new CoreException(new Status(IStatus.ERROR, Plugin.PLUGIN_ID, 0, "Incorrect path (not a project): " + location, null));
        }
    }
View Full Code Here

        String bsn = templateConfig.getContributor().getName();
        Bundle bundle = BundleUtils.findBundle(Plugin.getDefault().getBundleContext(), bsn, null);
        String paths = templateConfig.getAttribute("paths");
        if (paths == null)
            throw new CoreException(new Status(IStatus.ERROR, Plugin.PLUGIN_ID, 0, "Template is missing 'paths' property.", null));

        StringTokenizer tokenizer = new StringTokenizer(paths, ",");
        progress.setWorkRemaining(tokenizer.countTokens());

        while (tokenizer.hasMoreTokens()) {
View Full Code Here

                file.create(entry.openStream(), false, monitor);
            } else {
                file.setContents(entry.openStream(), false, true, monitor);
            }
        } catch (IOException e) {
            throw new CoreException(new Status(IStatus.ERROR, Plugin.PLUGIN_ID, 0, "Failed to load data from template source bundle.", e));
        }
    }
View Full Code Here

            Collection<Project> projects = null;
            try {
                Workspace ws = Central.getWorkspace();
                projects = ws.getBuildOrder();
            } catch (Exception e) {
                throw new CoreException(new Status(IStatus.ERROR, NewBuilder.PLUGIN_ID, 0, "Error rebuilding bnd projects after creating workspace configuration.", e));
            }
            if (projects == null || projects.isEmpty())
                return Status.OK_STATUS;

            SubMonitor progress = SubMonitor.convert(monitor, projects.size());
View Full Code Here

                            }
                        }
                        return true;
                    } catch (Exception e) {
                        e.printStackTrace();
                        throw new CoreException(new Status(Status.ERROR, BndtoolsConstants.CORE_PLUGIN_ID, "During checking project changes", e));
                    }
                }

            });
View Full Code Here

                                }
                            }
                        }
                        return true;
                    } catch (Exception e) {
                        throw new CoreException(new Status(Status.ERROR, BndtoolsConstants.CORE_PLUGIN_ID, "During checking project changes", e));
                    }
                }

            });
        } catch (CoreException e) {
View Full Code Here

            FileOutputStream out = null;
            try {
                out = new FileOutputStream(propertiesFile);
                props.store(out, new Date().toString());
            } catch (final IOException e) {
                throw new CoreException(new Status(Status.ERROR, NewBuilder.PLUGIN_ID, "Failure to write container source attachments", e));
            } finally {
                IO.close(out);
            }
        }
    }
View Full Code Here

            InputStream in = null;
            try {
                in = new FileInputStream(propertiesFile);
                props.load(in);
            } catch (final IOException e) {
                throw new CoreException(new Status(Status.ERROR, NewBuilder.PLUGIN_ID, "Failure to read container source attachments", e));
            } finally {
                IO.close(in);
            }
        }
View Full Code Here

TOP

Related Classes of org.eclipse.core.runtime.CoreException

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.