Skip to content
Snippets Groups Projects
Commit aa792a3f authored by Stefano puri's avatar Stefano puri Committed by Gerrit Code Review @ Polarsys.org
Browse files

Merge "small updates, added missing copyright license to few classes" into neon

parents 4496fe3f cdc5402c
No related branches found
No related tags found
No related merge requests found
Showing
with 73 additions and 7 deletions
......@@ -196,7 +196,7 @@
<command
defaultHandler="org.polarsys.chess.verificationService.commands.debug.ContractImplementationOnFileCommand"
id="org.polarsys.chess.verificationService.commands.debug.ContractImplementationOnFileCommand"
name="Check Contract Implementation on .oss and .fmv files">
name="Check Contract Implementation on .oss and .smv files">
</command>
<command
defaultHandler="org.polarsys.chess.verificationService.commands.ExportModelToFileCommand"
......
......@@ -57,6 +57,7 @@ public class CheckValidationPropertyCommand extends AbstractJobCommand {
showPopups = false;
ossFilepath = ocraDirectoryUtil.getOSSFilePath();
resultFilePath = ocraDirectoryUtil.getCommandCheckPropertyResultPath(umlSelectedComponent.getName());
}
......
......@@ -53,7 +53,7 @@ public class ExportModelToFileCommand extends AbstractJobCommand {
umlSelectedComponent = selectionUtil.getUmlComponentFromSelectedObject(event);
umlSelectedResource = umlSelectedComponent.eResource();
isDiscreteTime = MessageTimeModelDialog.openQuestion();
ossFilepath = ocraDirectoryUtil.getOSSFilePath();
ossFilepath = ocraDirectoryUtil.getOSSFilePath();
showPopups = true;
}
......
......@@ -64,6 +64,7 @@ public class ChessSystemModel implements AbstractSystemModel {
@Override
public String getComponentTypeName(Object component) {
if(entityUtil.isBlock((Element) component)) {
return entityUtil.getComponentName(component);
}
......
/*******************************************************************************
* Copyright (C) 2017 Fondazione Bruno Kessler.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Alberto Debiasi - initial API and implementation
******************************************************************************/
package org.polarsys.chess.diagram.ui.commands;
import java.util.Collection;
......@@ -54,7 +64,10 @@ public class GenerateDocumentCommand extends AbstractJobCommand {
private String outputDirectoryName;
private String currentProjectName;
private Collection<Diagram> chessDiagrams;
private String imageExtension;
private String docFormat;
@Override
public void execGUIOperations(ExecutionEvent event,IProgressMonitor monitor) throws Exception {
umlSelectedComponent = selectionUtil.getUmlComponentFromSelectedObject(event);
......@@ -63,6 +76,30 @@ public class GenerateDocumentCommand extends AbstractJobCommand {
currentProjectName = directoryUtils.getCurrentProjectName();
chessDiagrams = chessDiagramsGeneratorService.getDiagrams();
//Display defaultDisplay = Display.getDefault();
//defaultDisplay.syncExec(new Runnable() {
// @Override
// public void run() {
parameterDialog = exportDialogUtils.getCompiledModelToDocumentDialog();
parameterDialog.open();
// }
//});
if (!parameterDialog.goAhead()) {
return;
}
docFormat = parameterDialog.getDocumentFormat();
imageExtension = ".svg";
if (docFormat.equals("tex")) {
imageExtension = ".png";
}
if ((outputDirectoryName == null) || outputDirectoryName.isEmpty()) {
return;
}
}
@Override
......@@ -71,7 +108,7 @@ public class GenerateDocumentCommand extends AbstractJobCommand {
OSS ossModel = ocraTranslatorService.getOssModel(umlSelectedComponent, isDiscreteTime, monitor);
Display defaultDisplay = Display.getDefault();
defaultDisplay.syncExec(new Runnable() {
/*defaultDisplay.syncExec(new Runnable() {
@Override
public void run() {
parameterDialog = exportDialogUtils.getCompiledModelToDocumentDialog();
......@@ -92,7 +129,7 @@ public class GenerateDocumentCommand extends AbstractJobCommand {
if ((outputDirectoryName == null) || outputDirectoryName.isEmpty()) {
return;
}
*/
documentGeneratorService = new DocumentGeneratorServiceFromOssModel(ossModel);
documentGeneratorService.setParametersBeforeDocumentGeneration(outputDirectoryName, imageExtension,
parameterDialog.getShowLeafComponents());
......
/*******************************************************************************
* Copyright (C) 2017 Fondazione Bruno Kessler.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Alberto Debiasi - initial API and implementation
******************************************************************************/
package org.polarsys.chess.diagram.ui.docGenerators;
import java.awt.Dimension;
......
/*******************************************************************************
* Copyright (C) 2017 Fondazione Bruno Kessler.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Alberto Debiasi - initial API and implementation
******************************************************************************/
package org.polarsys.chess.diagram.ui.services;
import java.io.File;
......
/**
/*******************************************************************************
* Copyright (C) 2017 Fondazione Bruno Kessler.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
*/
* Contributors:
* Alberto Debiasi - initial API and implementation
******************************************************************************/
package org.polarsys.chess.diagram.ui.utils;
import org.eclipse.jface.dialogs.MessageDialog;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment