diff --git a/bundles/org.palladiosimulator.retriever.core/src/org/palladiosimulator/retriever/core/workflow/PlantUmlJob.java b/bundles/org.palladiosimulator.retriever.core/src/org/palladiosimulator/retriever/core/workflow/PlantUmlJob.java index cbae6cf9..923ebf35 100644 --- a/bundles/org.palladiosimulator.retriever.core/src/org/palladiosimulator/retriever/core/workflow/PlantUmlJob.java +++ b/bundles/org.palladiosimulator.retriever.core/src/org/palladiosimulator/retriever/core/workflow/PlantUmlJob.java @@ -59,21 +59,27 @@ public void cleanup(final IProgressMonitor arg0) throws CleanupFailedException { @Override public void execute(final IProgressMonitor arg0) throws JobFailedException, UserCanceledException { - final Repository repository = (Repository) getBlackboard().getPartition(repositoryKey); - if ((repository != null) && !repository.eContents().isEmpty()) { - writeFile(arg0, START_UML + new PcmComponentDiagramGenerator(repository).getDiagramText() + END_UML, + final Repository repository = (Repository) this.getBlackboard() + .getPartition(this.repositoryKey); + if ((repository != null) && !repository.eContents() + .isEmpty()) { + this.writeFile(arg0, START_UML + new PcmComponentDiagramGenerator(repository).getDiagramText() + END_UML, COMPONENT_DIAGRAM_NAME); } - final System system = (System) getBlackboard().getPartition(systemKey); - if ((system != null) && !system.eContents().isEmpty()) { - writeFile(arg0, START_UML + new PcmSystemDiagramGenerator(system).getDiagramText() + END_UML, + final System system = (System) this.getBlackboard() + .getPartition(this.systemKey); + if ((system != null) && !system.eContents() + .isEmpty()) { + this.writeFile(arg0, START_UML + new PcmSystemDiagramGenerator(system).getDiagramText() + END_UML, SYSTEM_DIAGRAM_NAME); } - final Allocation allocation = (Allocation) getBlackboard().getPartition(allocationKey); - if ((allocation != null) && !allocation.eContents().isEmpty()) { - writeFile(arg0, START_UML + new PcmAllocationDiagramGenerator(allocation).getDiagramText() + END_UML, + final Allocation allocation = (Allocation) this.getBlackboard() + .getPartition(this.allocationKey); + if ((allocation != null) && !allocation.eContents() + .isEmpty()) { + this.writeFile(arg0, START_UML + new PcmAllocationDiagramGenerator(allocation).getDiagramText() + END_UML, ALLOCATION_DIAGRAM_NAME); } } @@ -84,9 +90,11 @@ public String getName() { } private void writeFile(final IProgressMonitor monitor, final String plantUmlSource, final String fileName) { - if (outputFolder.isPlatformResource()) { - final IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); - final IFile file = root.getFile(new Path(outputFolder.appendSegment(fileName).toPlatformString(true))); + if (this.outputFolder.isPlatformResource()) { + final IWorkspaceRoot root = ResourcesPlugin.getWorkspace() + .getRoot(); + final IFile file = root.getFile(new Path(this.outputFolder.appendSegment(fileName) + .toPlatformString(true))); try { if (!file.exists()) { file.create(new ByteArrayInputStream(new byte[0]), IResource.FORCE, monitor); @@ -97,7 +105,8 @@ private void writeFile(final IProgressMonitor monitor, final String plantUmlSour } } else { - final String path = outputFolder.appendSegment(fileName).devicePath(); + final String path = this.outputFolder.appendSegment(fileName) + .devicePath(); try (FileWriter writer = new FileWriter(path)) { writer.append(plantUmlSource); } catch (final IOException e) { diff --git a/bundles/org.palladiosimulator.retriever.core/src/org/palladiosimulator/retriever/core/workflow/RetrieverJob.java b/bundles/org.palladiosimulator.retriever.core/src/org/palladiosimulator/retriever/core/workflow/RetrieverJob.java index feb25407..6147f045 100644 --- a/bundles/org.palladiosimulator.retriever.core/src/org/palladiosimulator/retriever/core/workflow/RetrieverJob.java +++ b/bundles/org.palladiosimulator.retriever.core/src/org/palladiosimulator/retriever/core/workflow/RetrieverJob.java @@ -58,7 +58,7 @@ public RetrieverJob(final RetrieverConfiguration configuration) { RetrieverBlackboardKeys.RULE_ENGINE_MOCORE_OUTPUT_ALLOCATION, RetrieverBlackboardKeys.RULE_ENGINE_MOCORE_OUTPUT_RESOURCE_ENVIRONMENT)); - super.add(new PlantUmlJob(getBlackboard(), configuration.getOutputFolder(), + super.add(new PlantUmlJob(this.getBlackboard(), configuration.getOutputFolder(), RetrieverBlackboardKeys.RULE_ENGINE_MOCORE_OUTPUT_REPOSITORY, RetrieverBlackboardKeys.RULE_ENGINE_MOCORE_OUTPUT_SYSTEM, RetrieverBlackboardKeys.RULE_ENGINE_MOCORE_OUTPUT_ALLOCATION));