Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.QualifiedName


    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, !PRESERVE_COMMENTS);
          } 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


        if (project.isOpen() && project.hasNature("org.apache.uima.caseditor.NLPProject")) {
         
          // if ts property is not set ...
          String typeSystemLocation;
          try {
            typeSystemLocation = project.getPersistentProperty(new QualifiedName("",
                TypeSystemLocationPropertyPage.TYPE_SYSTEM_PROPERTY));
          } catch (CoreException e) {
            typeSystemLocation = null;
          }
         
View Full Code Here

  @SuppressWarnings("unchecked")
  public static Map<String, ToolServiceObject> getSOCache(IProject project){
    Map<String, ToolServiceObject> cache = null;
    try {
      cache = (Map<String, ToolServiceObject>)project.getSessionProperty(new QualifiedName(ToolProjectSupport.PROJECT_QUALIFIED_NAME, ToolProjectSupport.SO_CACHE));
      if (cache == null){
        cache = new HashMap<String, ToolServiceObject>();
        project.setSessionProperty(new QualifiedName(ToolProjectSupport.PROJECT_QUALIFIED_NAME, ToolProjectSupport.SO_CACHE), cache);
      }
    } catch (CoreException e) {
      ToolPlugin.showError("Error getting class cache", e);
    }
    return cache;
View Full Code Here

   * @return
   */
  public static Map<String, ToolType> getTypeCache(IProject project){
    Map<String, ToolType> cache = null;
    try {
      cache = (Map<String, ToolType>)project.getSessionProperty(new QualifiedName(ToolProjectSupport.PROJECT_QUALIFIED_NAME, ToolProjectSupport.TYPE_CACHE));
      if (cache == null){
        cache = new HashMap<String, ToolType>();
        project.setSessionProperty(new QualifiedName(ToolProjectSupport.PROJECT_QUALIFIED_NAME, ToolProjectSupport.TYPE_CACHE), cache);
      }
    } catch (CoreException e) {
      ToolPlugin.showError("Error getting class cache", e);
    }
    return cache;
View Full Code Here

  }
 
  public static Map<String, ToolCursor> getCursorCache(IProject project){
    Map<String, ToolCursor> cache = null;
    try {
      cache = (Map<String, ToolCursor>)project.getSessionProperty(new QualifiedName(ToolProjectSupport.PROJECT_QUALIFIED_NAME, ToolProjectSupport.CURSOR_CACHE));
      if (cache == null){
        cache = new HashMap<String, ToolCursor>();
        project.setSessionProperty(new QualifiedName(ToolProjectSupport.PROJECT_QUALIFIED_NAME, ToolProjectSupport.CURSOR_CACHE), cache);
      }
    } catch (CoreException e) {
      ToolPlugin.showError("Error getting Cursor cache", e);
    }
    return cache;
View Full Code Here

    return this.file.getProject();
  }
  public static Map<String, ToolPlan> getPlanCache(IProject project){
    Map<String, ToolPlan> cache = null;
    try {
      cache = (Map<String, ToolPlan>)project.getSessionProperty(new QualifiedName(ToolProjectSupport.PROJECT_QUALIFIED_NAME, ToolProjectSupport.PLAN_CACHE));
      if (cache == null){
        cache = new HashMap<String, ToolPlan>();
        project.setSessionProperty(new QualifiedName(ToolProjectSupport.PROJECT_QUALIFIED_NAME, ToolProjectSupport.PLAN_CACHE), cache);
      }
    } catch (CoreException e) {
      ToolPlugin.showError("Error getting Plan cache", e);
    }
    return cache;
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

   * @return
   */
  public static FScript getRepository(IProject project){
    FScript repos = null;
    try {
      repos = (FScript)project.getSessionProperty(new QualifiedName(ToolProjectSupport.PROJECT_QUALIFIED_NAME, ToolProjectSupport.REPOS_OBJECT));
      if (repos == null){
        /*
         * create a ToolRepository based on the project properties
         * and store it as a session property
         */
       
        String forteRoot = project.getPersistentProperty(ToolProjectSupport.forteRootQualifiedName);
        String repository = project.getPersistentProperty(ToolProjectSupport.reposQualifiedName);
        String workspace = project.getPersistentProperty(ToolProjectSupport.workspaceQualifiedName);
        String workspacePassword = project.getPersistentProperty(ToolProjectSupport.worspacePasswordQualifiedName);
        String logFlags = project.getPersistentProperty(ToolProjectSupport.loggerQualifiedName);
        repos = new FScript(forteRoot, repository, workspace, workspacePassword, logFlags, true);
        project.setSessionProperty(new QualifiedName(ToolProjectSupport.PROJECT_QUALIFIED_NAME, ToolProjectSupport.REPOS_OBJECT), repos);
      }
     
    } catch (CoreException e) {
      ToolPlugin.showError("Error getting repository", e);
    }
View Full Code Here

  @SuppressWarnings("unchecked")
  public static Map<String, ToolServiceObject> getSOCache(IProject project){
    Map<String, ToolServiceObject> cache = null;
    try {
      cache = (Map<String, ToolServiceObject>)project.getSessionProperty(new QualifiedName(ToolProjectSupport.PROJECT_QUALIFIED_NAME, ToolProjectSupport.SO_CACHE));
      if (cache == null){
        cache = new HashMap<String, ToolServiceObject>();
        project.setSessionProperty(new QualifiedName(ToolProjectSupport.PROJECT_QUALIFIED_NAME, ToolProjectSupport.SO_CACHE), cache);
      }
    } catch (CoreException e) {
      ToolModelActivator.showError("Error getting class cache", e);
    }
    return cache;
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.