Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
af3
AF3
Commits
978ee355
Commit
978ee355
authored
Jul 01, 2013
by
Johannes Eder
Browse files
changed image and document paths
refs 1007
parent
7043c3af
Changes
3
Hide whitespace changes
Inline
Side-by-side
org.fortiss.af3.mira.ui/trunk/src/org/fortiss/af3/mira/ui/editor/images/ImageSection.java
View file @
978ee355
...
...
@@ -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
();
...
...
org.fortiss.af3.mira.ui/trunk/src/org/fortiss/af3/mira/ui/utils/ImageUtils.java
View file @
978ee355
...
...
@@ -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
());
}
}
org.fortiss.af3.mira.ui/trunk/src/org/fortiss/af3/mira/ui/utils/RequirementDocumentFileUtils.java
View file @
978ee355
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment