Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.QualifiedName


      // check if the build state version number has changed since last session
      // (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=98969)
      if (monitor != null)
        monitor.subTask(Messages.javamodel_getting_build_state_number);
      QualifiedName qName = new QualifiedName(JavaCore.PLUGIN_ID, "stateVersionNumber"); //$NON-NLS-1$
      IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
      String versionNumber = null;
      try {
        versionNumber = root.getPersistentProperty(qName);
      } catch (CoreException e) {
View Full Code Here


    private void persistClasspathContainer(IJavaProject project, IClasspathContainer container)
            throws CoreException {
        final IClasspathEntry[] entries = container.getClasspathEntries();
        for (int i = 0; i < entries.length; i++) {
            final IClasspathEntry entry = entries[i];
            final QualifiedName qname = new QualifiedName(container.getPath().toString(),
                    "IClasspathEntry." + i);
            final String encodedClasspathEntry = project.encodeClasspathEntry(entry);
            ResourcesPlugin.getWorkspace().getRoot()
            .setPersistentProperty(qname, encodedClasspathEntry);
        }
View Full Code Here

        final LinkedList<IClasspathEntry> entries = new LinkedList<IClasspathEntry>();
        IClasspathEntry entry = null;
        int i = 0;
        try {
            do {
                final QualifiedName qname = new QualifiedName(container.getPath().toString(),
                        "IClasspathEntry." + i);
                entry = project.decodeClasspathEntry(ResourcesPlugin.getWorkspace().getRoot()
                        .getPersistentProperty(qname));
                if (entry != null) {
                    entries.add(entry);
View Full Code Here

     * @return the value of the sync directory
     */
    public static IPath getSyncDirectoryValue(IProject project) {
        String value = null;
        try {
            value = project.getPersistentProperty(new QualifiedName(Activator.PLUGIN_ID, PROPERTY_SYNC_ROOT));
        } catch (CoreException e) {
            Activator.getDefault().getPluginLogger().error(e.getMessage(), e);
        }

        // TODO central place for defaults
View Full Code Here

     * @param path the value
     */
    public static void setSyncDirectoryPath(IProject project, IPath path) {

        try {
            project.setPersistentProperty(new QualifiedName(Activator.PLUGIN_ID, PROPERTY_SYNC_ROOT), path.toPortableString());
        } catch (CoreException e) {
            Activator.getDefault().getPluginLogger().error(e.getMessage(), e);
        }
    }
View Full Code Here

   * Configures an Eclipse project as a MapReduce project by adding the
   * Hadoop libraries to a project's classpath.
   */
  public void configure() throws CoreException {
    String path =
        project.getPersistentProperty(new QualifiedName(Activator.PLUGIN_ID,
            "hadoop.runtime.path"));

    File dir = new File(path);
    final ArrayList<File> coreJars = new ArrayList<File>();
    dir.listFiles(new FileFilter() {
View Full Code Here

                }

                natures[0] = MapReduceNature.ID;
                description.setNatureIds(natures);

                project.setPersistentProperty(new QualifiedName(
                    Activator.PLUGIN_ID, "hadoop.runtime.path"),
                    firstPage.currentPath);
                project.setDescription(description, new NullProgressMonitor());

                String[] natureIds = project.getDescription().getNatureIds();
View Full Code Here

    XMLInputSource input = null;
    aeDescription = null;
    openingContext = true;
    try {
      try {
        contextFile = fileNeedingContext.getPersistentProperty(new QualifiedName(
                AbstractSection.PLUGIN_ID, AbstractSection.IMPORTABLE_PART_CONTEXT));
      } catch (CoreException e) {
        throw new InternalErrorCDE("unexpected exception", e);
      }
      ContextForPartDialog dialog = new ContextForPartDialog(PlatformUI.getWorkbench().getDisplay()
              .getShells()[0], // ok in Eclipse 3.0
              getFile().getProject().getParent(), thing, getFile().getLocation(), this, contextFile);
      dialog.setTitle("File specifying context for editing importable part");
      if (dialog.open() == Window.CANCEL)
        throw new MultilevelCancel();

      contextFile = dialog.contextPath;

      if (null == contextFile) {
        Utility
                .popMessage(
                        "Context Info",
                        "A context is required to edit this part.  However no context was supplied.  Editing will be cancelled",
                        Utility.INFORMATION);
        throw new MultilevelCancel();
      } else {
        try {
          input = new XMLInputSource(contextFile);
        } catch (IOException e) {
          showContextLoadFailureMessage(e, contextFile);
          throw new MultilevelCancel();
        }
        if (null != input)
          try {
            parseSource(input, contextFile);
          } catch (PartInitException e) {
            showContextLoadFailureMessage(e, contextFile);
            throw new MultilevelCancel();
          }
      }
    } finally {
      openingContext = false;
    }
    if (null == aeDescription) {
      aeDescription = UIMAFramework.getResourceSpecifierFactory().createAnalysisEngineDescription();
    } else {
      try {
        file.setPersistentProperty(new QualifiedName(AbstractSection.PLUGIN_ID,
                AbstractSection.IMPORTABLE_PART_CONTEXT), contextFile);
      } catch (CoreException e) {
        Utility.popMessage("Unexpected Exception", "While loading Context"
                + getMessagesToRootCause(e), Utility.ERROR);
        throw new InternalErrorCDE("Unexpected Exception:" + getMessagesToRootCause(e), e);
View Full Code Here

        updateApplyButton();
      }
    });
   
    try {
      String typeSystemPath = ((IResource) getElement()).getPersistentProperty(new QualifiedName("",
              TYPE_SYSTEM_PROPERTY));
      typeSystemText.setText((typeSystemPath != null) ? typeSystemPath : getDefaultTypeSystemLocation());
    } catch (CoreException e) {
      typeSystemText.setText(DEFAULT_TYPE_SYSTEM_PATH);
    }
View Full Code Here

    // have check, so performOk is only done when ts file is a valid file string
   
    // store the value in the owner text field
    try {
      ((IResource) getElement()).setPersistentProperty(
              new QualifiedName("", TYPE_SYSTEM_PROPERTY), typeSystemText.getText());
    } catch (CoreException e) {
      return false;
    }
    return true;
  }
View Full Code Here

TOP

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

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.