| Summary: | Editor title is not decoded last segment of resource URI | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Modeling] Graphiti | Reporter: | Filippo Rossoni <filippo.rossoni> | ||||||||
| Component: | Core | Assignee: | Michael Wenz <michael.wenz> | ||||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | matthias.gorning, michael.wenz | ||||||||
| Version: | 0.8.0 | Flags: | michael.wenz:
juno+
|
||||||||
| Target Milestone: | 0.9.0 | ||||||||||
| Hardware: | All | ||||||||||
| OS: | All | ||||||||||
| Whiteboard: | Juno M2 Theme_bugs | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Filippo Rossoni
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) |