Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Alexander Diewald
AF3-new
Commits
7c7c6d67
Commit
7c7c6d67
authored
Sep 16, 2020
by
Simon Barner
Browse files
Merge branch '4059' into 'master'
Project: Fix Internal References for Imported Projects See merge request af3/af3!369
parents
fee1eb05
38b840f2
Changes
2
Hide whitespace changes
Inline
Side-by-side
org.fortiss.af3.project/src/org/fortiss/af3/project/utils/.ratings
View file @
7c7c6d67
...
...
@@ -3,7 +3,7 @@ FileUtils.java 70e81c85ae7c2d8076e190ebad7eae648451b645 GREEN
FunctionScopeUtils.java 054c92406affa0c0ad8ac7a067de9608d0bbca2b GREEN
LibraryModelElementFactory.java a5a30a0e6b274d220c397d9bf0f14756d49bd19f GREEN
ProjectModelElementFactory.java 2963d3a1fe651025bae3ae4dc0b6e0b77bbaadd5 GREEN
ProjectUtils.java
3452992b488694431110a2e6f6183661accd6695
GREEN
ProjectUtils.java
f1465eb779a321f3bf895dd5a6983fdfd9e0fa70
GREEN
TestCaseProjectUtils.java 83dc50f1fc28c7f1d9dcde9e4e0d02480656b7aa GREEN
TypeScopeUtils.java 54f2397f0d6720c90948ccc295f1a63b7319daac GREEN
VariableScopeUtils.java 031591687c2461a990d0534cf4ed4d6df39b1551 GREEN
org.fortiss.af3.project/src/org/fortiss/af3/project/utils/ProjectUtils.java
View file @
7c7c6d67
...
...
@@ -15,6 +15,7 @@
+--------------------------------------------------------------------------*/
package
org.fortiss.af3.project.utils
;
import
static
org
.
conqat
.
lib
.
commons
.
filesystem
.
FileSystemUtils
.
copyFile
;
import
static
org
.
conqat
.
lib
.
commons
.
reflect
.
ReflectionUtils
.
pickInstanceOf
;
import
static
org
.
eclipse
.
core
.
resources
.
ResourcesPlugin
.
getWorkspace
;
import
static
org
.
fortiss
.
af3
.
project
.
AF3Project
.
AF3_PRJ_SUFFIX
;
...
...
@@ -264,7 +265,11 @@ public final class ProjectUtils {
doCopyExternalDocuments
(
sourceFileProject
,
sourceFileURI
,
targetFileURI
);
// Perform the copy to the actual target (workspace) for the kernel to perform the import.
saveProject
(
sourceFileProject
,
targetFileURI
);
// We need to copy the file instead of creating a new resource from the FileProject since
// few internal references would point to the original file (NOTE: This can only be observed
// with few entities and only with large projects). This indicates a problem in EMF's href
// resolution algorithm.
copyFile
(
new
File
(
sourceFileURI
.
toFileString
()),
new
File
(
targetFileURI
.
toFileString
()));
// Using the Java-API is not directly possible, as we would need to load the file before,
// which could destroy some element references. Using listeners we can avoid the problem by
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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