Package archmapper.main

Examples of archmapper.main.Preferences


      return;
    }
   
    IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
   
    Preferences pref = new Preferences(project);
    if (pref.getArchitectureMappingFile() == null) {
      if (!confirmSync("Warning", "There is no architecture mapping defined in the "+
          "project preferences.\nThat means that the code generator will "+
          "possibly do nothing.\nContinue?")) {
        return;
      }
View Full Code Here


   * @return
   */
  public Configuration getArchitecture(ContentAssistRequest request) {
    IFile file = getResource(request);
    IProject project = file.getProject();
    Preferences pref = new Preferences(project);
   
    Configuration conf = null;
    IFile archFile = pref.getArchitectureFile();
   
    if (archFile != null) {
      try {
        long thisfileModStamp = getModificationStamp(archFile);
       
        if (lastUsedProject == project &&
            lastLoadedArchitecture != null &&
              loadedArchModificationStamp == thisfileModStamp) {
          // even if both files don't have a modification stamp
          // (e.g. because they are not saved in a real file, but
          // come from a stream), don't reload. Content assist must
          // be fast...
         
          conf = lastLoadedArchitecture;
        } else {
          conf = ArchitectureMappingModel.getArchitectureFromExtensionPoint(
            pref.getArchitectureFile());
                 
          lastUsedProject = project;
          loadedArchModificationStamp = thisfileModStamp;
          lastLoadedArchitecture = conf;
        }
View Full Code Here

   * @param project
   */
  public ArchitectureMappingModel(IProject project) {
    this.project = project;
   
    Preferences pref = new Preferences(project);
    IFile adlFile = pref.getArchitectureFile();
    if (adlFile == null) {
      throw new NoArchitectureException();
    }
   
    conf = getArchitectureFromExtensionPoint(adlFile);
   
    // now, the mapping files have to be read...
    IFile archMappingFile = pref.getArchitectureMappingFile();
    if (pref.isArchitectureMappingPresent() && (
        archMappingFile == null || !archMappingFile.exists())) {
      throw new NoArchitectureMappingException();
    }
   
    if (archMappingFile != null && archMappingFile.exists()) {
View Full Code Here

  public void loadPreferenceStore() {
    IAdaptable adaptable = getElement();
    if (adaptable instanceof IProject) {
      IProject project = (IProject) adaptable;
     
      pref = new Preferences(project);
    }
  }
View Full Code Here

    ArchitectureMappingModel model = null;
    MappingInformation mapping = mappings.get(project);

    if (mapping != null) {
      // look if other mapping files have been declared in the preferences...
      Preferences pref = new Preferences(project);
     
      if (mapping.model.getArchitecture().getAdlFile() != null &&
          !mapping.model.getArchitecture().getAdlFile().equals(pref.getArchitectureFile())) {
        mapping = null;
      } else if (mapping.model.getArchMapping().getMappingFile() != null &&
          !mapping.model.getArchMapping().getMappingFile().equals(pref.getArchitectureMappingFile())) {
        mapping = null;
      }
           
      // look if one of the mapping files has changed since the
      // last parsing...
View Full Code Here

TOP

Related Classes of archmapper.main.Preferences

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.