Package archmapper.main.exceptions

Examples of archmapper.main.exceptions.ArchMapperException


            }
           
            try {
              newClassWizard.createType(null);
            } catch (Exception e) {
              throw new ArchMapperException("Error creating new class: "+ e.getMessage(), e);
           
          } catch (JavaModelException e) {
            throw new ArchMapperException(e);
          }
        }
      });
   
    } catch (JavaModelException e1) {
View Full Code Here


            }
           
            try {
              newIfWizard.createType(null);
            } catch (Exception e) {
              throw new ArchMapperException("Error creating new interface: "+ e.getMessage(), e);
            }       
          }
         
        } catch (JavaModelException e) {
          throw new ArchMapperException(e);
        }
      }
    });
  }
View Full Code Here

        IFile file = ((IFolder) resource).getFile(filename);
        if (!file.exists()) {
          try {
            file.create(new ByteArrayInputStream(template.getBytes()), true, null);
          } catch (CoreException e) {
            throw new ArchMapperException("Could not create file "+ file + ": "+ e.getMessage(), e);
          }
        }
      }
     
    } catch (JavaModelException e) {
      throw new ArchMapperException("Error creating new file: "+ e.getMessage(), e);
    }
   
  }
View Full Code Here

   
  }
 
  private static IPackageFragment getOrCreatePackage(String pkg, IJavaProject javaProject) throws JavaModelException {
    if (javaProject.getAllPackageFragmentRoots().length == 0) {
      throw new ArchMapperException("The project does not have a package fragment root - create one!");
    }
   
    IPackageFragmentRoot packageRoot = javaProject.getAllPackageFragmentRoots()[0];
    IJavaElement javaPkg = javaProject.findElement(new Path(pkg));
    if (javaPkg == null) {
View Full Code Here

       
        compUnit.save(null, true);
      }
   
    } catch (JavaModelException e) {
      throw new ArchMapperException("Could not add an attribute to the class "+ qName+ ": " + e.getMessage(), e);
    }
  }
View Full Code Here

      ComponentTypeMapping compTypeMapping = styleMapping.getComponentType(compType);
      if (compTypeMapping != null) {
        ClassType type = compTypeMapping.getClassType(classDef.getType());
       
        if (type == null) {
          throw new ArchMapperException("The class type "+ classDef.getType() +
              " of class "+ classDef.getClassName() + " is not defined!");
        }
        return (type.isSingleton() == Boolean.TRUE);
      }
    } else {
      String connType = getConnectorTypeOf((ConnectorMapping) classDef.getParent());
      ConnectorTypeMapping connTypeMapping = styleMapping.getConnectorTypeMapping(connType);
      if (connTypeMapping != null) {
        ClassType type = connTypeMapping.getClassType(classDef.getType());
       
        if (type == null) {
          throw new ArchMapperException("The class type "+ classDef.getType() +
              " of class "+ classDef.getClassName() + " is not defined!");
        }
        return (type.isSingleton() == Boolean.TRUE);
      }
    }
View Full Code Here

      }
     
      fixMissingLinksInArchitecture(conf);
     
    } catch (JAXBException e) {
      throw new ArchMapperException("Could not load architecture file: "+
          e.getMessage());
    }
   
    return conf;
  }
View Full Code Here

      }
      if (adlFilename.endsWith(fileExt)) {
        try {
          converter = (IAdlConverter) conf.createExecutableExtension("converterClass");
        } catch (CoreException e) {
          throw new ArchMapperException("Could not convert ADL file "+
              adlFile.getName(), e);
        }
      }
    }
   
    if (converter == null) {
      throw new ArchMapperException("No converter for the project's architecture file could be found!");
    }
   
    Configuration conf = converter.convertFromAdl(adlFile);
    conf.setAdlFile(adlFile);
   
View Full Code Here

              ((IExtension) conf.getParent()).getContributor().getName());
          URL url = bundle.getResource(conf.getAttribute("xmlFile"));
          StyleMapping mapping = StyleMappingDAO.read((InputStream) url.getContent());
          return mapping;
        } catch (Exception e) {
          throw new ArchMapperException("Error trying to get a style mapping from an extension point: " + e.getMessage(), e);
        }
      }
    }
   
    return null;   
View Full Code Here

            ISourcecodeGenerator generator = (ISourcecodeGenerator) conf
                .createExecutableExtension("class");
            generator.initialize(model, javaProject);
            styleSpecificGenerators.add(generator);
          } catch (CoreException e) {
            throw new ArchMapperException(
                "Error trying to instantiate style specific sourcecode generator: "
                    + e.getMessage(), e);
          }
        }
View Full Code Here

TOP

Related Classes of archmapper.main.exceptions.ArchMapperException

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.