Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.QualifiedName


     * Create a QualifiedName that will be uniquely associated with this
     * class.
     * @return A QualifiedName for this class.
     */
    private QualifiedName createQualifiedName() {
        return new QualifiedName(getClass().toString(),
                SESSION_PROPERTY_PREFIX);
    }
View Full Code Here


     * method so that we can use our own ResourceStub.
     * @param key - The key for the session object
     * @return a DefaultHistoryManager
     */
    protected DefaultHistoryManager getManager(String key) {
        QualifiedName qualifiedId =
                new QualifiedName(QUALIFIER, SESSION_PROPERTY_PREFIX + key);
        return new DefaultHistoryManager(qualifiedId) {
            // we override this so that we can use the mock resource instead of
            // the Eclipse resource
            public IResource getResource() {
                return mockResource;
View Full Code Here

    }
    return result;
  }

  public static void addProjectDataPath(IProject project, IFolder folder) throws CoreException {
    String dataPath = project.getPersistentProperty((new QualifiedName("", CDE_DATA_PATH)));
    String sep = System.getProperty("path.separator");
    if (dataPath == null) {
      dataPath = "";
    }
    String[] split = dataPath.split(sep);
    List<String> paths = Arrays.asList(split);
    String addon = folder.getLocation().toPortableString();
    if (!paths.contains(addon)) {
      if (!StringUtils.isEmpty(dataPath)) {
        dataPath += sep;
      }
      dataPath += addon;
      project.setPersistentProperty(new QualifiedName("", CDE_DATA_PATH), dataPath);
    }
  }
View Full Code Here

      project.setPersistentProperty(new QualifiedName("", CDE_DATA_PATH), dataPath);
    }
  }

  public static void removeProjectDataPath(IProject project, IFolder folder) throws CoreException {
    String dataPath = project.getPersistentProperty((new QualifiedName("", CDE_DATA_PATH)));
    String sep = System.getProperty("path.separator");
    if (dataPath == null) {
      return;
    }
    String path = folder.getLocation().toPortableString();
    if (!StringUtils.isEmpty(dataPath)) {
      dataPath = dataPath.replaceAll(path, "");
      dataPath = dataPath.replaceAll(sep + sep, "");
    }
    project.setPersistentProperty(new QualifiedName("", CDE_DATA_PATH), dataPath);
  }
View Full Code Here

      }
     
    } else {
      // for old versions
      this.root = project.getPersistentProperty(
          new QualifiedName(HTMLPlugin.getDefault().getPluginId(), P_ROOT));
      useDTD = project.getPersistentProperty(
          new QualifiedName(HTMLPlugin.getDefault().getPluginId(), P_USE_DTD));
      validateHTML = project.getPersistentProperty(new QualifiedName(
          HTMLPlugin.getDefault().getPluginId(), P_VALIDATE_HTML));
    }
   
    if(this.root==null){
      this.root = "/";
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

    dataPathUI = new Text(composite, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL);
    gd = new GridData(GridData.FILL_BOTH);
    dataPathUI.setLayoutData(gd);

    try {
      String dataPath = ((IResource) getElement()).getPersistentProperty(new QualifiedName("",
              DATAPATH_PROPERTY_KEY));
      dataPathUI.setText((dataPath != null) ? dataPath : DEFAULT_DATAPATH);
    } catch (CoreException e) {
      dataPathUI.setText(DEFAULT_DATAPATH);
    }
View Full Code Here

  public boolean performOk() {
    // store the value in the owner text field
    try {
      ((IResource) getElement()).setPersistentProperty(
              new QualifiedName("", DATAPATH_PROPERTY_KEY), dataPathUI.getText());
    } catch (CoreException e) {
      return false;
    }
    return true;
  }
View Full Code Here

  }

  public static String getDataPath(IProject project) {
    String dataPath;
    try {
      dataPath = project.getPersistentProperty(new QualifiedName("", DATAPATH_PROPERTY_KEY));
    } catch (CoreException e) {
      dataPath = "";
    }
    if (null == dataPath)
      dataPath = "";
View Full Code Here

    return dataPath;
  }

  public static void setDataPath(IProject project, String dataPath) {
    try {
      project.setPersistentProperty(new QualifiedName("", DATAPATH_PROPERTY_KEY), dataPath);
    } catch (CoreException e) {
      throw new InternalErrorCDE("unhandled exception", e);
    }
  }
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.