org.eclipse.emf.common.util.Monitor Java Examples
The following examples show how to use
org.eclipse.emf.common.util.Monitor.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: M2DocLauncher.java From M2Doc with Eclipse Public License 1.0 | 6 votes |
/** * Launches the given {@link Generation}. * * @param generation * the {@link Generation} to launch * @param monitor * the {@link Monitor} */ private void launchGenerationConfiguration(Generation generation, final Monitor monitor) { try { System.out.println("Input: " + generation.eResource().getURI()); List<URI> generated = GenconfUtils.generate(generation, M2DocPlugin.getClassProvider(), monitor); for (URI uri : generated) { System.out.println("Output: " + uri.toString()); } monitor.worked(1); } catch (DocumentGenerationException | IOException | DocumentParserException e) { final String message = String.format(ERROR_LAUNCHING_GENCONF, generation.eResource().getURI().toString(), e.getMessage()); M2DocLauncherPlugin.INSTANCE .log(new Status(IStatus.ERROR, M2DocLauncherPlugin.INSTANCE.getSymbolicName(), message, e)); } }
Example #2
Source File: EdgeChangePostProcessor.java From statecharts with Eclipse Public License 1.0 | 6 votes |
@Override public void postComparison(Comparison comparison, Monitor monitor) { for (Diff diff : comparison.getDifferences()) { if (diff instanceof EdgeChange) { EdgeChange edgeChange = (EdgeChange) diff; switch (edgeChange.getKind()) { case ADD: postProcessEdgeAddition(edgeChange); break; case DELETE: postProcessEdgeDeletion(edgeChange); break; default: // do nothing } } } }
Example #3
Source File: SCTMatchEngineFactory.java From statecharts with Eclipse Public License 1.0 | 6 votes |
@Override public Comparison match(IComparisonScope scope, Monitor monitor) { Predicate<EObject> predicate = new Predicate<EObject>() { @Override public boolean apply(EObject eobject) { // We only want to diff the SGraph and notation elements, // not the transient palceholders for concrete languages EPackage ePackage = eobject.eClass().getEPackage(); return ePackage == SGraphPackage.eINSTANCE || ePackage == NotationPackage.eINSTANCE; } }; if (scope instanceof DefaultComparisonScope) { DefaultComparisonScope defaultScope = (DefaultComparisonScope) scope; defaultScope.setEObjectContentFilter(predicate); defaultScope.setResourceContentFilter(predicate); } return super.match(scope, monitor); }
Example #4
Source File: GenerateJavaCode.java From uml2solidity with Eclipse Public License 1.0 | 6 votes |
/** * Launches the generation described by this instance. * * @param monitor * This will be used to display progress information to the user. * @throws IOException * This will be thrown if any of the output files cannot be saved to disk. * @generated not */ @Override public void doGenerate(Monitor monitor) throws IOException { //org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(model); /* * If you want to check for potential errors in your models before the launch of the generation, you * use the code below. */ //if (model != null && model.eResource() != null) { // List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> errors = model.eResource().getErrors(); // for (org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic : errors) { // System.err.println(diagnostic.toString()); // } //} super.doGenerate(monitor); }
Example #5
Source File: GenerateHtml.java From uml2solidity with Eclipse Public License 1.0 | 5 votes |
/** * Launches the generation described by this instance. * * @param monitor * This will be used to display progress information to the user. * @throws IOException * This will be thrown if any of the output files cannot be saved to disk. * @generated not */ @Override public void doGenerate(Monitor monitor) throws IOException { /* * be sufficient in most cases. If you want to change the content of this method, do NOT forget to * change the "@generated" tag in the Javadoc of this method to "@generated NOT". Without this new tag, * any compilation of the Acceleo module with the main template that has caused the creation of this * class will revert your modifications. If you encounter a problem with an unresolved proxy during the * generation, you can remove the comments in the following instructions to check for problems. Please * note that those instructions may have a significant impact on the performances. */ //org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(model); /* * If you want to check for potential errors in your models before the launch of the generation, you * use the code below. */ //if (model != null && model.eResource() != null) { // List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> errors = model.eResource().getErrors(); // for (org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic : errors) { // System.err.println(diagnostic.toString()); // } //} super.doGenerate(monitor); }
Example #6
Source File: GenerateSingleAbiFiles.java From uml2solidity with Eclipse Public License 1.0 | 5 votes |
/** * Launches the generation described by this instance. * * @param monitor * This will be used to display progress information to the user. * @throws IOException * This will be thrown if any of the output files cannot be saved to disk. * @generated not */ @Override public void doGenerate(Monitor monitor) throws IOException { /* * be sufficient in most cases. If you want to change the content of this method, do NOT forget to * change the "@generated" tag in the Javadoc of this method to "@generated NOT". Without this new tag, * any compilation of the Acceleo module with the main template that has caused the creation of this * class will revert your modifications. If you encounter a problem with an unresolved proxy during the * generation, you can remove the comments in the following instructions to check for problems. Please * note that those instructions may have a significant impact on the performances. */ //org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(model); /* * If you want to check for potential errors in your models before the launch of the generation, you * use the code below. */ //if (model != null && model.eResource() != null) { // List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> errors = model.eResource().getErrors(); // for (org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic : errors) { // System.err.println(diagnostic.toString()); // } //} super.doGenerate(monitor); }
Example #7
Source File: GenerateData.java From neoscada with Eclipse Public License 1.0 | 5 votes |
/** * Launches the generation described by this instance. * * @param monitor * This will be used to display progress information to the user. * @throws IOException * This will be thrown if any of the output files cannot be * saved to disk. * @generated */ @Override public void doGenerate ( Monitor monitor ) throws IOException { /* * TODO if you wish to change the generation as a whole, override this. The default behavior should * be sufficient in most cases. If you want to change the content of this method, do NOT forget to * change the "@generated" tag in the Javadoc of this method to "@generated NOT". Without this new tag, * any compilation of the Acceleo module with the main template that has caused the creation of this * class will revert your modifications. If you encounter a problem with an unresolved proxy during the * generation, you can remove the comments in the following instructions to check for problems. Please * note that those instructions may have a significant impact on the performances. */ //org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(model); /* * If you want to check for potential errors in your models before the launch of the generation, you * use the code below. */ //if (model != null && model.eResource() != null) { // List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> errors = model.eResource().getErrors(); // for (org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic : errors) { // System.err.println(diagnostic.toString()); // } //} super.doGenerate(monitor); }
Example #8
Source File: GenerateMixConfig.java From uml2solidity with Eclipse Public License 1.0 | 5 votes |
/** * Launches the generation described by this instance. * * @param monitor * This will be used to display progress information to the user. * @throws IOException * This will be thrown if any of the output files cannot be saved to disk. * @generated not */ @Override public void doGenerate(Monitor monitor) throws IOException { /* * be sufficient in most cases. If you want to change the content of this method, do NOT forget to * change the "@generated" tag in the Javadoc of this method to "@generated NOT". Without this new tag, * any compilation of the Acceleo module with the main template that has caused the creation of this * class will revert your modifications. If you encounter a problem with an unresolved proxy during the * generation, you can remove the comments in the following instructions to check for problems. Please * note that those instructions may have a significant impact on the performances. */ //org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(model); /* * If you want to check for potential errors in your models before the launch of the generation, you * use the code below. */ //if (model != null && model.eResource() != null) { // List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> errors = model.eResource().getErrors(); // for (org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic : errors) { // System.err.println(diagnostic.toString()); // } //} super.doGenerate(monitor); }
Example #9
Source File: GenerateJsTestCode.java From uml2solidity with Eclipse Public License 1.0 | 5 votes |
/** * Launches the generation described by this instance. * * @param monitor * This will be used to display progress information to the user. * @throws IOException * This will be thrown if any of the output files cannot be saved to disk. * @generated not */ @Override public void doGenerate(Monitor monitor) throws IOException { /* * be sufficient in most cases. If you want to change the content of this method, do NOT forget to * change the "@generated" tag in the Javadoc of this method to "@generated NOT". Without this new tag, * any compilation of the Acceleo module with the main template that has caused the creation of this * class will revert your modifications. If you encounter a problem with an unresolved proxy during the * generation, you can remove the comments in the following instructions to check for problems. Please * note that those instructions may have a significant impact on the performances. */ //org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(model); /* * If you want to check for potential errors in your models before the launch of the generation, you * use the code below. */ //if (model != null && model.eResource() != null) { // List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> errors = model.eResource().getErrors(); // for (org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic : errors) { // System.err.println(diagnostic.toString()); // } //} super.doGenerate(monitor); }
Example #10
Source File: GenerateWeb3Contract.java From uml2solidity with Eclipse Public License 1.0 | 5 votes |
/** * Launches the generation described by this instance. * * @param monitor * This will be used to display progress information to the user. * @throws IOException * This will be thrown if any of the output files cannot be saved to disk. * @generated not */ @Override public void doGenerate(Monitor monitor) throws IOException { /* * be sufficient in most cases. If you want to change the content of this method, do NOT forget to * change the "@generated" tag in the Javadoc of this method to "@generated NOT". Without this new tag, * any compilation of the Acceleo module with the main template that has caused the creation of this * class will revert your modifications. If you encounter a problem with an unresolved proxy during the * generation, you can remove the comments in the following instructions to check for problems. Please * note that those instructions may have a significant impact on the performances. */ //org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(model); /* * If you want to check for potential errors in your models before the launch of the generation, you * use the code below. */ //if (model != null && model.eResource() != null) { // List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> errors = model.eResource().getErrors(); // for (org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic : errors) { // System.err.println(diagnostic.toString()); // } //} super.doGenerate(monitor); }
Example #11
Source File: GenerateContracts.java From uml2solidity with Eclipse Public License 1.0 | 5 votes |
/** * Launches the generation described by this instance. * * @param monitor * This will be used to display progress information to the user. * @throws IOException * This will be thrown if any of the output files cannot be * saved to disk. * @generated not */ @Override public void doGenerate(Monitor monitor) throws IOException { /* * be sufficient in most cases. If you want to change the content of this method, do NOT forget to * change the "@generated" tag in the Javadoc of this method to "@generated NOT". Without this new tag, * any compilation of the Acceleo module with the main template that has caused the creation of this * class will revert your modifications. If you encounter a problem with an unresolved proxy during the * generation, you can remove the comments in the following instructions to check for problems. Please * note that those instructions may have a significant impact on the performances. */ //org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(model); /* * If you want to check for potential errors in your models before the launch of the generation, you * use the code below. */ //if (model != null && model.eResource() != null) { // List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> errors = model.eResource().getErrors(); // for (org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic : errors) { // System.err.println(diagnostic.toString()); // } //} super.doGenerate(monitor); }
Example #12
Source File: GenerateJavaTestCode.java From uml2solidity with Eclipse Public License 1.0 | 5 votes |
/** * Launches the generation described by this instance. * * @param monitor * This will be used to display progress information to the user. * @throws IOException * This will be thrown if any of the output files cannot be saved to disk. * @generated not */ @Override public void doGenerate(Monitor monitor) throws IOException { /* * be sufficient in most cases. If you want to change the content of this method, do NOT forget to * change the "@generated" tag in the Javadoc of this method to "@generated NOT". Without this new tag, * any compilation of the Acceleo module with the main template that has caused the creation of this * class will revert your modifications. If you encounter a problem with an unresolved proxy during the * generation, you can remove the comments in the following instructions to check for problems. Please * note that those instructions may have a significant impact on the performances. */ //org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(model); /* * If you want to check for potential errors in your models before the launch of the generation, you * use the code below. */ //if (model != null && model.eResource() != null) { // List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> errors = model.eResource().getErrors(); // for (org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic : errors) { // System.err.println(diagnostic.toString()); // } //} super.doGenerate(monitor); }
Example #13
Source File: GenerateJsCode.java From uml2solidity with Eclipse Public License 1.0 | 5 votes |
/** * Launches the generation described by this instance. * * @param monitor * This will be used to display progress information to the user. * @throws IOException * This will be thrown if any of the output files cannot be saved to disk. * @generated not */ @Override public void doGenerate(Monitor monitor) throws IOException { /* * be sufficient in most cases. If you want to change the content of this method, do NOT forget to * change the "@generated" tag in the Javadoc of this method to "@generated NOT". Without this new tag, * any compilation of the Acceleo module with the main template that has caused the creation of this * class will revert your modifications. If you encounter a problem with an unresolved proxy during the * generation, you can remove the comments in the following instructions to check for problems. Please * note that those instructions may have a significant impact on the performances. */ //org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(model); /* * If you want to check for potential errors in your models before the launch of the generation, you * use the code below. */ //if (model != null && model.eResource() != null) { // List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> errors = model.eResource().getErrors(); // for (org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic : errors) { // System.err.println(diagnostic.toString()); // } //} super.doGenerate(monitor); }
Example #14
Source File: GenerateApplicationFiles.java From uml2solidity with Eclipse Public License 1.0 | 5 votes |
/** * Launches the generation described by this instance. * * @param monitor * This will be used to display progress information to the user. * @throws IOException * This will be thrown if any of the output files cannot be saved to disk. * @generated */ @Override public void doGenerate(Monitor monitor) throws IOException { /* * TODO if you wish to change the generation as a whole, override this. The default behavior should * be sufficient in most cases. If you want to change the content of this method, do NOT forget to * change the "@generated" tag in the Javadoc of this method to "@generated NOT". Without this new tag, * any compilation of the Acceleo module with the main template that has caused the creation of this * class will revert your modifications. If you encounter a problem with an unresolved proxy during the * generation, you can remove the comments in the following instructions to check for problems. Please * note that those instructions may have a significant impact on the performances. */ //org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(model); /* * If you want to check for potential errors in your models before the launch of the generation, you * use the code below. */ //if (model != null && model.eResource() != null) { // List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> errors = model.eResource().getErrors(); // for (org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic : errors) { // System.err.println(diagnostic.toString()); // } //} super.doGenerate(monitor); }
Example #15
Source File: GenerateTaglibs.java From uml2solidity with Eclipse Public License 1.0 | 5 votes |
/** * Launches the generation described by this instance. * * @param monitor * This will be used to display progress information to the user. * @throws IOException * This will be thrown if any of the output files cannot be saved to disk. * @generated */ @Override public void doGenerate(Monitor monitor) throws IOException { /* * TODO if you wish to change the generation as a whole, override this. The default behavior should * be sufficient in most cases. If you want to change the content of this method, do NOT forget to * change the "@generated" tag in the Javadoc of this method to "@generated NOT". Without this new tag, * any compilation of the Acceleo module with the main template that has caused the creation of this * class will revert your modifications. If you encounter a problem with an unresolved proxy during the * generation, you can remove the comments in the following instructions to check for problems. Please * note that those instructions may have a significant impact on the performances. */ //org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(model); /* * If you want to check for potential errors in your models before the launch of the generation, you * use the code below. */ //if (model != null && model.eResource() != null) { // List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> errors = model.eResource().getErrors(); // for (org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic : errors) { // System.err.println(diagnostic.toString()); // } //} super.doGenerate(monitor); }
Example #16
Source File: GenerateContractBeans.java From uml2solidity with Eclipse Public License 1.0 | 5 votes |
/** * Launches the generation described by this instance. * * @param monitor * This will be used to display progress information to the user. * @throws IOException * This will be thrown if any of the output files cannot be saved to disk. * @generated */ @Override public void doGenerate(Monitor monitor) throws IOException { /* * TODO if you wish to change the generation as a whole, override this. The default behavior should * be sufficient in most cases. If you want to change the content of this method, do NOT forget to * change the "@generated" tag in the Javadoc of this method to "@generated NOT". Without this new tag, * any compilation of the Acceleo module with the main template that has caused the creation of this * class will revert your modifications. If you encounter a problem with an unresolved proxy during the * generation, you can remove the comments in the following instructions to check for problems. Please * note that those instructions may have a significant impact on the performances. */ //org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(model); /* * If you want to check for potential errors in your models before the launch of the generation, you * use the code below. */ //if (model != null && model.eResource() != null) { // List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> errors = model.eResource().getErrors(); // for (org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic : errors) { // System.err.println(diagnostic.toString()); // } //} super.doGenerate(monitor); }
Example #17
Source File: GenerateXmlRoutes.java From eip-designer with Apache License 2.0 | 5 votes |
/** * Launches the generation described by this instance. * * @param monitor * This will be used to display progress information to the user. * @throws IOException * This will be thrown if any of the output files cannot be saved to disk. * @generated */ @Override public void doGenerate(Monitor monitor) throws IOException { /* * TODO if you wish to change the generation as a whole, override this. The default behavior should * be sufficient in most cases. If you want to change the content of this method, do NOT forget to * change the "@generated" tag in the Javadoc of this method to "@generated NOT". Without this new tag, * any compilation of the Acceleo module with the main template that has caused the creation of this * class will revert your modifications. If you encounter a problem with an unresolved proxy during the * generation, you can remove the comments in the following instructions to check for problems. Please * note that those instructions may have a significant impact on the performances. */ //org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(model); /* * If you want to check for potential errors in your models before the launch of the generation, you * use the code below. */ //if (model != null && model.eResource() != null) { // List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> errors = model.eResource().getErrors(); // for (org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic : errors) { // System.err.println(diagnostic.toString()); // } //} super.doGenerate(monitor); }
Example #18
Source File: GenerateJavaRoutes.java From eip-designer with Apache License 2.0 | 5 votes |
/** * Launches the generation described by this instance. * * @param monitor * This will be used to display progress information to the user. * @throws IOException * This will be thrown if any of the output files cannot be saved to disk. * @generated */ @Override public void doGenerate(Monitor monitor) throws IOException { /* * TODO if you wish to change the generation as a whole, override this. The default behavior should * be sufficient in most cases. If you want to change the content of this method, do NOT forget to * change the "@generated" tag in the Javadoc of this method to "@generated NOT". Without this new tag, * any compilation of the Acceleo module with the main template that has caused the creation of this * class will revert your modifications. If you encounter a problem with an unresolved proxy during the * generation, you can remove the comments in the following instructions to check for problems. Please * note that those instructions may have a significant impact on the performances. */ //org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(model); /* * If you want to check for potential errors in your models before the launch of the generation, you * use the code below. */ //if (model != null && model.eResource() != null) { // List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> errors = model.eResource().getErrors(); // for (org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic : errors) { // System.err.println(diagnostic.toString()); // } //} super.doGenerate(monitor); }
Example #19
Source File: GenerateSwitchyard.java From eip-designer with Apache License 2.0 | 5 votes |
/** * Launches the generation described by this instance. * * @param monitor * This will be used to display progress information to the user. * @throws IOException * This will be thrown if any of the output files cannot be saved to disk. * @generated */ @Override public void doGenerate(Monitor monitor) throws IOException { /* * TODO if you wish to change the generation as a whole, override this. The default behavior should * be sufficient in most cases. If you want to change the content of this method, do NOT forget to * change the "@generated" tag in the Javadoc of this method to "@generated NOT". Without this new tag, * any compilation of the Acceleo module with the main template that has caused the creation of this * class will revert your modifications. If you encounter a problem with an unresolved proxy during the * generation, you can remove the comments in the following instructions to check for problems. Please * note that those instructions may have a significant impact on the performances. */ //org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(model); /* * If you want to check for potential errors in your models before the launch of the generation, you * use the code below. */ //if (model != null && model.eResource() != null) { // List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> errors = model.eResource().getErrors(); // for (org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic : errors) { // System.err.println(diagnostic.toString()); // } //} super.doGenerate(monitor); }
Example #20
Source File: GenerateRoutes.java From eip-designer with Apache License 2.0 | 5 votes |
/** * Launches the generation described by this instance. * * @param monitor * This will be used to display progress information to the user. * @throws IOException * This will be thrown if any of the output files cannot be saved to disk. * @generated */ @Override public void doGenerate(Monitor monitor) throws IOException { /* * TODO if you wish to change the generation as a whole, override this. The default behavior should * be sufficient in most cases. If you want to change the content of this method, do NOT forget to * change the "@generated" tag in the Javadoc of this method to "@generated NOT". Without this new tag, * any compilation of the Acceleo module with the main template that has caused the creation of this * class will revert your modifications. If you encounter a problem with an unresolved proxy during the * generation, you can remove the comments in the following instructions to check for problems. Please * note that those instructions may have a significant impact on the performances. */ //org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(model); /* * If you want to check for potential errors in your models before the launch of the generation, you * use the code below. */ //if (model != null && model.eResource() != null) { // List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> errors = model.eResource().getErrors(); // for (org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic : errors) { // System.err.println(diagnostic.toString()); // } //} super.doGenerate(monitor); }
Example #21
Source File: GenerateUseCasesDoc.java From uml2solidity with Eclipse Public License 1.0 | 5 votes |
/** * Launches the generation described by this instance. * * @param monitor * This will be used to display progress information to the user. * @throws IOException * This will be thrown if any of the output files cannot be saved to disk. * @generated */ @Override public void doGenerate(Monitor monitor) throws IOException { /* * TODO if you wish to change the generation as a whole, override this. The default behavior should * be sufficient in most cases. If you want to change the content of this method, do NOT forget to * change the "@generated" tag in the Javadoc of this method to "@generated NOT". Without this new tag, * any compilation of the Acceleo module with the main template that has caused the creation of this * class will revert your modifications. If you encounter a problem with an unresolved proxy during the * generation, you can remove the comments in the following instructions to check for problems. Please * note that those instructions may have a significant impact on the performances. */ //org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(model); /* * If you want to check for potential errors in your models before the launch of the generation, you * use the code below. */ //if (model != null && model.eResource() != null) { // List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> errors = model.eResource().getErrors(); // for (org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic : errors) { // System.err.println(diagnostic.toString()); // } //} super.doGenerate(monitor); }
Example #22
Source File: GenerateCodec.java From neoscada with Eclipse Public License 1.0 | 5 votes |
/** * Launches the generation described by this instance. * * @param monitor * This will be used to display progress information to the user. * @throws IOException * This will be thrown if any of the output files cannot be * saved to disk. * @generated */ @Override public void doGenerate ( Monitor monitor ) throws IOException { /* * TODO if you wish to change the generation as a whole, override this. The default behavior should * be sufficient in most cases. If you want to change the content of this method, do NOT forget to * change the "@generated" tag in the Javadoc of this method to "@generated NOT". Without this new tag, * any compilation of the Acceleo module with the main template that has caused the creation of this * class will revert your modifications. If you encounter a problem with an unresolved proxy during the * generation, you can remove the comments in the following instructions to check for problems. Please * note that those instructions may have a significant impact on the performances. */ //org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(model); /* * If you want to check for potential errors in your models before the launch of the generation, you * use the code below. */ //if (model != null && model.eResource() != null) { // List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> errors = model.eResource().getErrors(); // for (org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic : errors) { // System.err.println(diagnostic.toString()); // } //} super.doGenerate(monitor); }
Example #23
Source File: Generate.java From neoscada with Eclipse Public License 1.0 | 5 votes |
/** * Launches the generation described by this instance. * * @param monitor * This will be used to display progress information to the user. * @throws IOException * This will be thrown if any of the output files cannot be * saved to disk. * @generated */ @Override public void doGenerate ( Monitor monitor ) throws IOException { /* * TODO if you wish to change the generation as a whole, override this. The default behavior should * be sufficient in most cases. If you want to change the content of this method, do NOT forget to * change the "@generated" tag in the Javadoc of this method to "@generated NOT". Without this new tag, * any compilation of the Acceleo module with the main template that has caused the creation of this * class will revert your modifications. If you encounter a problem with an unresolved proxy during the * generation, you can remove the comments in the following instructions to check for problems. Please * note that those instructions may have a significant impact on the performances. */ //org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(model); /* * If you want to check for potential errors in your models before the launch of the generation, you * use the code below. */ //if (model != null && model.eResource() != null) { // List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> errors = model.eResource().getErrors(); // for (org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic : errors) { // System.err.println(diagnostic.toString()); // } //} super.doGenerate(monitor); }
Example #24
Source File: Generate.java From neoscada with Eclipse Public License 1.0 | 5 votes |
/** * Launches the generation described by this instance. * * @param monitor * This will be used to display progress information to the user. * @throws IOException * This will be thrown if any of the output files cannot be saved to disk. * @generated */ @Override public void doGenerate(Monitor monitor) throws IOException { /* * TODO if you wish to change the generation as a whole, override this. The default behavior should * be sufficient in most cases. If you want to change the content of this method, do NOT forget to * change the "@generated" tag in the Javadoc of this method to "@generated NOT". Without this new tag, * any compilation of the Acceleo module with the main template that has caused the creation of this * class will revert your modifications. If you encounter a problem with an unresolved proxy during the * generation, you can remove the comments in the following instructions to check for problems. Please * note that those instructions may have a significant impact on the performances. */ //org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(model); /* * If you want to check for potential errors in your models before the launch of the generation, you * use the code below. */ //if (model != null && model.eResource() != null) { // List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> errors = model.eResource().getErrors(); // for (org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic : errors) { // System.err.println(diagnostic.toString()); // } //} super.doGenerate(monitor); }
Example #25
Source File: Content.java From neoscada with Eclipse Public License 1.0 | 5 votes |
/** * Launches the generation described by this instance. * * @param monitor * This will be used to display progress information to the user. * @throws IOException * This will be thrown if any of the output files cannot be saved to disk. * @generated */ @Override public void doGenerate(Monitor monitor) throws IOException { /* * TODO if you wish to change the generation as a whole, override this. The default behavior should * be sufficient in most cases. If you want to change the content of this method, do NOT forget to * change the "@generated" tag in the Javadoc of this method to "@generated NOT". Without this new tag, * any compilation of the Acceleo module with the main template that has caused the creation of this * class will revert your modifications. If you encounter a problem with an unresolved proxy during the * generation, you can remove the comments in the following instructions to check for problems. Please * note that those instructions may have a significant impact on the performances. */ //org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(model); /* * If you want to check for potential errors in your models before the launch of the generation, you * use the code below. */ //if (model != null && model.eResource() != null) { // List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> errors = model.eResource().getErrors(); // for (org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic : errors) { // System.err.println(diagnostic.toString()); // } //} super.doGenerate(monitor); }
Example #26
Source File: GenconfUtils.java From M2Doc with Eclipse Public License 1.0 | 5 votes |
/** * Generate a document from the specified generation configuration. * * @param generation * the generation configuration * @param classProvider * the {@link IClassProvider} * @param monitor * used to track the progress will generating. * @return generated file * @throws DocumentGenerationException * DocumentGenerationException * @throws DocumentParserException * DocumentParserException * @throws IOException * IOException */ public static List<URI> generate(Generation generation, IClassProvider classProvider, Monitor monitor) throws DocumentGenerationException, IOException, DocumentParserException { if (generation == null) { throw new IllegalArgumentException("Null configuration object passed."); } String templateFilePath = generation.getTemplateFileName(); if (templateFilePath == null) { throw new DocumentGenerationException("The template file path isn't set in the provided configuration"); } String resultFilePath = generation.getResultFileName(); if (resultFilePath == null) { throw new DocumentGenerationException("The result file path isn't set in the provided configuration"); } final URI templateURI = getResolvedURI(generation, URI.createURI(generation.getTemplateFileName(), false)); final URI generatedURI = getResolvedURI(generation, URI.createURI(generation.getResultFileName(), false)); final URI validationURI; if (generation.getValidationFileName() != null && !generation.getValidationFileName().isEmpty()) { validationURI = getResolvedURI(generation, URI.createURI(generation.getValidationFileName(), false)); } else { validationURI = null; } // generate result file and validation file. return generate(generation, classProvider, templateURI, generatedURI, validationURI, monitor); }
Example #27
Source File: GenerateMarkDown.java From uml2solidity with Eclipse Public License 1.0 | 5 votes |
/** * Launches the generation described by this instance. * * @param monitor * This will be used to display progress information to the user. * @throws IOException * This will be thrown if any of the output files cannot be saved to disk. * @generated not */ @Override public void doGenerate(Monitor monitor) throws IOException { /* * be sufficient in most cases. If you want to change the content of this method, do NOT forget to * change the "@generated" tag in the Javadoc of this method to "@generated NOT". Without this new tag, * any compilation of the Acceleo module with the main template that has caused the creation of this * class will revert your modifications. If you encounter a problem with an unresolved proxy during the * generation, you can remove the comments in the following instructions to check for problems. Please * note that those instructions may have a significant impact on the performances. */ //org.eclipse.emf.ecore.util.EcoreUtil.resolveAll(model); /* * If you want to check for potential errors in your models before the launch of the generation, you * use the code below. */ //if (model != null && model.eResource() != null) { // List<org.eclipse.emf.ecore.resource.Resource.Diagnostic> errors = model.eResource().getErrors(); // for (org.eclipse.emf.ecore.resource.Resource.Diagnostic diagnostic : errors) { // System.err.println(diagnostic.toString()); // } //} super.doGenerate(monitor); }
Example #28
Source File: EdgeChangePostProcessor.java From statecharts with Eclipse Public License 1.0 | 4 votes |
@Override public void postDiff(Comparison comparison, Monitor monitor) { }
Example #29
Source File: M2DocLauncher.java From M2Doc with Eclipse Public License 1.0 | 4 votes |
/** * Launcher logic. * * @param args * application parameters passed by the Equinox framework. * @return the return value of the application */ public Object doMain(String[] args) { CmdLineParser parser = new CmdLineParser(this); boolean somethingWentWrong = false; try { System.out.println(CLIUtils.getDecorator() .purple(" __ __ _ _ __ __ ___ _ \n" + " \\ \\ / / | | | | | \\/ |__ \\ | | \n" + " \\ \\ /\\ / /__| | ___ ___ _ __ ___ ___ | |_ ___ | \\ / | ) |__| | ___ ___ \n" + " \\ \\/ \\/ / _ \\ |/ __/ _ \\| '_ ` _ \\ / _ \\ | __/ _ \\ | |\\/| | / // _` |/ _ \\ / __|\n" + " \\ /\\ / __/ | (_| (_) | | | | | | __/ | || (_) | | | | |/ /| (_| | (_) | (__ \n" + " \\/ \\/ \\___|_|\\___\\___/|_| |_| |_|\\___| \\__\\___/ |_| |_|____\\__,_|\\___/ \\___|")); System.out.println( CLIUtils.getDecorator().yellow("The command-line launcher to generate .docx from your models.")); parser.parseArgument(args); System.out.println(CLIUtils.RESET); Collection<URI> genconfsURIs = validateArguments(parser); Collection<Generation> loadedGenConfs = new ArrayList<Generation>(); ResourceSet s = new ResourceSetImpl(); for (URI uri : genconfsURIs) { somethingWentWrong = loadGenerationConfigs(loadedGenConfs, s, uri) || somethingWentWrong; } final Monitor monitor = new CLIUtils.ColoredPrinting(System.out); monitor.beginTask("Generating .docx documents", loadedGenConfs.size()); for (Generation generation : loadedGenConfs) { launchGenerationConfiguration(generation, monitor); } } catch (CmdLineException e) { // print the list of available options parser.printUsage(System.err); System.err.println(); somethingWentWrong = true; // problem in the command line M2DocLauncherPlugin.INSTANCE .log(new Status(IStatus.ERROR, M2DocLauncherPlugin.INSTANCE.getSymbolicName(), e.getMessage(), e)); } if (somethingWentWrong) { return APPLICATION_ERROR; } return IApplication.EXIT_OK; }
Example #30
Source File: EdgeChangePostProcessor.java From statecharts with Eclipse Public License 1.0 | 4 votes |
@Override public void postConflicts(Comparison comparison, Monitor monitor) { }