summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Haug2013-09-21 08:28:59 (EDT)
committerJuergen Haug2013-09-23 04:34:27 (EDT)
commit3763d1dad760f3731070d22d3172d65d7344ae7d (patch)
treef5d1d8c4ab813c486e3d9a0343f4b8758e923791
parente35469696de3e226a3190bc622e9be2b5dc60902 (diff)
downloadorg.eclipse.etrice-3763d1dad760f3731070d22d3172d65d7344ae7d.zip
org.eclipse.etrice-3763d1dad760f3731070d22d3172d65d7344ae7d.tar.gz
org.eclipse.etrice-3763d1dad760f3731070d22d3172d65d7344ae7d.tar.bz2
[ui] added special characters warning/treatment in filesrefs/changes/70/16670/3
-rw-r--r--plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/contentassist/ImportModelAssist.java6
-rw-r--r--plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/commands/ChangeDiagramInputJob.java2
-rw-r--r--plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/RoomDiagramEditor.java4
3 files changed, 8 insertions, 4 deletions
diff --git a/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/contentassist/ImportModelAssist.java b/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/contentassist/ImportModelAssist.java
index aec88e5..635da68 100644
--- a/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/contentassist/ImportModelAssist.java
+++ b/plugins/org.eclipse.etrice.core.room.ui/src/org/eclipse/etrice/core/ui/contentassist/ImportModelAssist.java
@@ -19,8 +19,10 @@ public class ImportModelAssist {
public static void addPaths(final AbstractContentProposalProvider provider, final ContentAssistContext context,
final ICompletionProposalAcceptor acceptor, final String extension) {
final IPath rootPath = ResourcesPlugin.getWorkspace().getRoot().getFullPath();
- IPath modelPath = new Path(context.getRootModel().eResource().getURI().toPlatformString(false));
- modelPath = ResourcesPlugin.getWorkspace().getRoot().getFile(modelPath).getLocation();
+
+ // toPlatformString(true) to support whitespace & special characters
+ IPath modelPath = new Path(context.getRootModel().eResource().getURI().toPlatformString(true));
+ modelPath = ResourcesPlugin.getWorkspace().getRoot().getFile(modelPath).getLocation();
final URI modelURI = URI.createFileURI(modelPath.toOSString()).trimSegments(1);
IResourceProxyVisitor visitor = new IResourceProxyVisitor() {
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/commands/ChangeDiagramInputJob.java b/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/commands/ChangeDiagramInputJob.java
index bea2a2d..fffd35f 100644
--- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/commands/ChangeDiagramInputJob.java
+++ b/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/commands/ChangeDiagramInputJob.java
@@ -89,7 +89,7 @@ public class ChangeDiagramInputJob extends Job {
protected IStatus run(IProgressMonitor monitor) {
URI diagramURI = diagram.eResource().getURI().trimFragment();
- final IFile diagramFile = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(diagramURI.toPlatformString(false)));
+ final IFile diagramFile = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(diagramURI.toPlatformString(true)));
IContainer diagramFolder = diagramFile.getParent();
// find room files in parent model folder
diff --git a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/RoomDiagramEditor.java b/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/RoomDiagramEditor.java
index df5581b..ff7719f 100644
--- a/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/RoomDiagramEditor.java
+++ b/plugins/org.eclipse.etrice.ui.common/src/org/eclipse/etrice/ui/common/editor/RoomDiagramEditor.java
@@ -211,7 +211,9 @@ public abstract class RoomDiagramEditor extends DiagramEditor {
// show only once
showLostDiagramInputDialog = false;
MessageDialog dialog = new MessageDialog(getGraphicalControl().getShell(),
- "Diagram out-dated", null, "Diagram input lost. Cannot find ROOM file or class for "+diagram.getName(),
+ "Diagram out-dated", null,
+ "Diagram input lost. Cannot find ROOM file or class for "+diagram.getName() +"\n\n"
+ + "Please ensure that no whitespace or special characters are contained in any related path, file or project",
MessageDialog.ERROR, new String[] { "OK", "Reconnect Diagram" }, 0);
int result = dialog.open();