Commit 978ee355 authored by Johannes Eder's avatar Johannes Eder
Browse files

changed image and document paths

refs 1007
parent 7043c3af
......@@ -21,6 +21,7 @@ import static org.conqat.lib.commons.filesystem.FileSystemUtils.copyFile;
import static org.eclipse.jface.dialogs.MessageDialog.openInformation;
import static org.eclipse.jface.dialogs.MessageDialog.openQuestion;
import static org.eclipse.jface.layout.GridDataFactory.swtDefaults;
import static org.fortiss.af3.mira.ui.utils.ImageUtils.PROJECT_IMAGE_SUBFOLDER;
import static org.fortiss.af3.mira.utils.MiraModelElementFactory.createImageItem;
import static org.fortiss.af3.project.ui.utils.NewProjectUtils.getDefaultGeneralProjectPath;
......@@ -163,7 +164,8 @@ public class ImageSection {
// the image will be copied to the images folder in the AF3
// Project directory
File sourceFile = new File(filename);
File imageFolder = new File(getDefaultGeneralProjectPath(), "images");
File imageFolder =
new File(getDefaultGeneralProjectPath(), PROJECT_IMAGE_SUBFOLDER);
// create image directory if it does not exists
if(!imageFolder.exists() || !imageFolder.isDirectory())
imageFolder.mkdir();
......
......@@ -50,6 +50,12 @@ import org.fortiss.tooling.base.ui.editpart.ExtendedLayerRootEditPart;
*/
public class ImageUtils {
/**
* Subfolder where all referenced images are stored, relative to the general af3 project
* directory.
*/
public static final String PROJECT_IMAGE_SUBFOLDER = "images";
/**
* Exports the content shown in the graphical editor as image to the filesystem
*/
......@@ -145,7 +151,7 @@ public class ImageUtils {
* @return the absolute path
*/
public static File getImageFile(ImageItem item) {
File f1 = new File(getDefaultGeneralProjectPath(), "images");
File f1 = new File(getDefaultGeneralProjectPath(), PROJECT_IMAGE_SUBFOLDER);
return new File(f1, item.getUri());
}
}
......@@ -43,7 +43,11 @@ import org.eclipse.swt.widgets.Shell;
*/
public class RequirementDocumentFileUtils {
public static final String PROJECT_DOCUMENT_SUBFOLDER = "Document";
/**
* Subfolder where all referenced documents are stored, relative to the general af3 project
* directory.
*/
public static final String PROJECT_DOCUMENT_SUBFOLDER = "documents";
/**
* edit file link
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment