Community
Participate
Working Groups
Build Identifier: 730ab5024235058a25e77f37a4b0af7d54863eb6 the diagram editor title is changed from Diagram name to last segment of resource URI for example if the file contains space the title contains %20 Reproducible: Always Steps to Reproduce: 1.create a diagram with a diagram name diffrent from file name wich contains space 2.open editor 3.
Created attachment 202816 [details] restore previus version of org.eclipse.graphiti.ui.internal.editor.DiagramEditorInternal.refreshTitle() restore previus version of org.eclipse.graphiti.ui.internal.editor.DiagramEditorInternal.refreshTitle()
Created attachment 202818 [details] fix editor name patch restore old org.eclipse.graphiti.ui.internal.editor.DiagramEditorInternal.refreshTitle()
Comment on attachment 202818 [details] fix editor name patch >From 7820306c01d1bbdd66b74766f8d5d5493453f6e9 Tue, 6 Sep 2011 17:41:47 +0200 >From: rossonifi <filippo.rossoni@valueteam.com> >Date: Tue, 6 Sep 2011 17:41:27 +0200 >Subject: [PATCH] fix editor name > >diff --git a/plugins/org.eclipse.graphiti.ui/src/org/eclipse/graphiti/ui/internal/editor/DiagramEditorInternal.java b/plugins/org.eclipse.graphiti.ui/src/org/eclipse/graphiti/ui/internal/editor/DiagramEditorInternal.java >index 540f6ba..82c4136 100644 >--- a/plugins/org.eclipse.graphiti.ui/src/org/eclipse/graphiti/ui/internal/editor/DiagramEditorInternal.java >+++ b/plugins/org.eclipse.graphiti.ui/src/org/eclipse/graphiti/ui/internal/editor/DiagramEditorInternal.java >@@ -38,6 +38,7 @@ > import org.eclipse.draw2d.geometry.Dimension; > import org.eclipse.draw2d.geometry.Point; > import org.eclipse.emf.common.command.CommandStackListener; >+import org.eclipse.emf.common.util.URI; > import org.eclipse.emf.ecore.EObject; > import org.eclipse.emf.ecore.resource.Resource; > import org.eclipse.emf.ecore.resource.ResourceSet; >@@ -1390,8 +1391,15 @@ > } > > private void refreshTitle() { >- String lastSegment = getDiagramTypeProvider().getDiagram().eResource().getURI().lastSegment(); >- setPartName(lastSegment); >+ String name = getConfigurationProvider().getDiagramTypeProvider().getDiagramTitle(); >+ if (name == null || name.length() == 0) { >+ name = getConfigurationElement().getAttribute("name"); //$NON-NLS-1$ >+ } >+ if (name == null || name.length() == 0) { >+ name = URI.decode(getDiagramTypeProvider().getDiagram().eResource().getURI().lastSegment()); >+ setPartName(name); > } > > @Override
Created attachment 202819 [details] fix editor name patch restore previus org.eclipse.graphiti.ui.internal.editor.DiagramEditorInternal.refreshTitle()
Correct, what we edit in the Diagram editor is the diagram not the file.
I have taken over the attached patch, committed and pushed it to Eclipse. Additionally I have created a SWT bot test for this. commit 4db838b29c0b56526d66e8170104d69c3989e6d3 Author: mwenz <michael.wenz@sap.com> 2011-09-08 14:31:57 Committer: mwenz <michael.wenz@sap.com> 2011-09-08 14:32:54 Parent: 0fd452f7f562e3f43ccc561fd9ef95f5d41af8be (IGaService#ignoreAll renamed to resetAll()) Branches: master
Bookkeeping: Set target release
Part of Graphiti 0.9.0 (Eclipse Juno)