Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.QualifiedName


   * @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) {
      ToolModelActivator.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) {
      ToolModelActivator.showError("Error getting Cursor 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 RepositorySession getRepositorySession(IProject project){
    RepositorySession repos = null;
    try {
      repos = (RepositorySession)project.getSessionProperty(new QualifiedName(ToolProjectSupport.PROJECT_QUALIFIED_NAME, ToolProjectSupport.REPOS_SESSION_OBJECT));
      if (repos == null){
        /*
         * create a RepositorySession based on the project properties
         * and store it as a session property
         */
       
        String repository = project.getPersistentProperty(ToolProjectSupport.reposQualifiedName);
        String workspace = project.getPersistentProperty(ToolProjectSupport.workspaceQualifiedName);
        String workspacePassword = project.getPersistentProperty(ToolProjectSupport.worspacePasswordQualifiedName);
        File reposDir = ToolProjectSupport.getInterfaceDir();
        IPath interfacePath = new Path(reposDir.getAbsolutePath());
        repos = new RepositorySession(repository, workspace, workspacePassword, interfacePath, project);
        project.setSessionProperty(new QualifiedName(ToolProjectSupport.PROJECT_QUALIFIED_NAME, ToolProjectSupport.REPOS_SESSION_OBJECT), repos);
      }
     
    } catch (CoreException e) {
      ToolPlugin.showError("Cannot connect to Repository session", e);
    } catch (CouldNotConnectException e) {
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>();
        LoadPlanCacheJob runner = new LoadPlanCacheJob(project, cache);
        runner.setPriority(Job.INTERACTIVE);
//        runner.schedule();
//        runner.join();
        project.setSessionProperty(new QualifiedName(ToolProjectSupport.PROJECT_QUALIFIED_NAME, ToolProjectSupport.PLAN_CACHE), cache);
      }
    } catch (CoreException e) {
      ToolModelActivator.showError("Error getting Plan cache", e);
//    } catch (InterruptedException e) {
//      ToolModelActivator.showError("Error getting Plan cache", e);
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) {
      ToolModelActivator.showError("Error getting class cache", e);
    }
    return cache;
View Full Code Here

      analysis_combo.add(AVALIABLE_ANALYSES[i][0]);

   
     
     try {
      String analysis = res.getPersistentProperty(new QualifiedName("", P_ANALYSIS));
      analysis_combo.select(DEFAULT_ANALYSIS);
      for(int i = 0; i < AVALIABLE_ANALYSES.length; ++i){
        if (AVALIABLE_ANALYSES[i][1].equals(analysis)){
          analysis_combo.select(i);
          break;
View Full Code Here

  public static String getAnalysis(IResource res){
    String ret = AVALIABLE_ANALYSES[DEFAULT_ANALYSIS][1];
    String analysis;

    try {
      analysis = res.getPersistentProperty(new QualifiedName("", P_ANALYSIS));
    } catch (CoreException e) {
      return ret;
    }
   
    for(int i = 0; i < AVALIABLE_ANALYSES.length; ++i){
View Full Code Here

   * @param res resource (for example project)
   * @return true if goblin is to analyse all fuinctions.
   */
  public static boolean getAllFuns(IResource res){
    try {
      String  allfuns = res.getPersistentProperty(new QualifiedName("", P_ANALYSE_ALLFUNS));
      return allfuns==null?false:allfuns.equals("true");
    } catch (Throwable e) {
      return false;
    }
  } 
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.