Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.QualifiedName


   * @param value  The value of the preference to save
   */
  private void saveValue(String name, String value){
    try{
      //  Set the preference into the project preference store and make sure this object remembers it to (setValue call)
      m_project.setPersistentProperty(new QualifiedName(m_pageID, name), value);
      super.setValue(name,value);
    }catch(CoreException e){
      System.out.println("Cannot set persistent property, failure or doesn't exist");
    }
  }
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

        String relativePath = null;
        IProject prj = fileObject.getProject();
        String miiProject = null;

        try {
            miiProject = prj.getPersistentProperty(new QualifiedName("", DBConsts.MII_PROJECT));
        }
        catch (CoreException e) {
            e.printStackTrace();
        }
View Full Code Here

import org.eclipse.ui.internal.browser.DefaultBrowserSupport;

public final class Config {
    public static String getValue (IResource res, String key, String defaultValue) {
        try {
            return res.getPersistentProperty(new QualifiedName("", key));
        }
        catch (CoreException e) {
            return defaultValue;
        }
    }
View Full Code Here

        }
    }
   
    public static void setValue (IResource res, String key, String value) {
        try {
            res.setPersistentProperty(new QualifiedName("", key), value);
        }
        catch (CoreException e) {
            e.printStackTrace();
        }
    }
View Full Code Here

   * Configures an Eclipse project as a Map/Reduce 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"));
   
    path += File.separatorChar +  "share" + File.separatorChar +"hadoop";
    String[] dirs={"common","mapreduce","hdfs","yarn"};
    final ArrayList<File> coreJars = new ArrayList<File>();
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());
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

    // Populate owner text field
    try {
      String owner =
        ((IResource) getElement()).getPersistentProperty(
          new QualifiedName("", OWNER_PROPERTY));
      ownerText.setText((owner != null) ? owner : DEFAULT_OWNER);
    } catch (CoreException e) {
      ownerText.setText(DEFAULT_OWNER);
    }
  }
View Full Code Here

 
  public boolean performOk() {
    // store the value in the owner text field
    try {
      ((IResource) getElement()).setPersistentProperty(
        new QualifiedName("", OWNER_PROPERTY),
        ownerText.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.