Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 336307

Summary: An internal error occurred during package rename
Product: [Technology] Tigerstripe Reporter: Maria Kolchinskaja <mshulgina>
Component: DiagramsAssignee: Project Inbox <tigerstripe.diagram-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: skanton, yuri
Version: unspecified   
Target Milestone: 0.5M0   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
precondition for test
none
336307 patch
none
336307_c4 patch none

Description Maria Kolchinskaja CLA 2011-02-03 23:23:07 EST
Build Identifier: 

Precondition:
Create a Tigerstripe Project with 'simple' package.
Create 'simple.moved' and 'simple.movedOther' subpackages.
Create artifacts of all types in 'simple' package.
Create class diagrams with artifacts from 'simple' package inside package and outside .
(these steps are done and result is saved and exported as rename.zip file)

Steps:
Import rename.zip file
Select menu item "Refactor Model/Rename..." for the 'simple' package.
Check 'rename subpackages' checkbox.
Rename 'simple' package to 'complicated'.

Result:
1. error message is occured:
An internal error occurred during: "Diagram Synchronization (model-refactoring)".
java.lang.NullPointerException

2. Extends link to simple.DataMiddle in DataBottom artifact is not updated. Error is displayed: simple cannot be resolved to a type

3. On a diagram, simple.AssociatedEnt element is not renamed

4. Instance diagram could be opened in editor


Reproducible: Always
Comment 1 Maria Kolchinskaja CLA 2011-02-03 23:24:46 EST
Created attachment 188287 [details]
precondition for test
Comment 2 Anton Salnik CLA 2011-02-22 08:43:16 EST
Created attachment 189485 [details]
336307 patch
Comment 3 Yuri Strot CLA 2011-02-22 11:16:19 EST
Patch applied.
Comment 4 Maria Kolchinskaja CLA 2011-02-25 04:04:31 EST
When I rename package with closed editors - all ok.

Open all diagrams and some artifacts in editors.
Select menu item "Refactor Model/Rename..." for the 'simple' package.
Check 'rename subpackages' checkbox.
Rename 'simple' package to 'complicated'.


Result:
1. All editors and diagrams are closed exept 'outside-class-diagram' and 'outside-instance-diagram'. These diagrams marked ad 'dirty'.

2. Internal Error is occured:

org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:4083)
at org.eclipse.swt.SWT.error(SWT.java:3998)
at org.eclipse.swt.SWT.error(SWT.java:3969)
at org.eclipse.swt.widgets.Widget.error(Widget.java:468)
at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:359)
at org.eclipse.swt.widgets.Table.deselectAll(Table.java:1966)
at org.eclipse.jface.viewers.TableViewer.doDeselectAll(TableViewer.java:277)
at org.eclipse.jface.viewers.AbstractTableViewer.setSelectionToWidget(AbstractTableViewer.java:880)
at org.eclipse.jface.viewers.StructuredViewer.setSelectionToWidget(StructuredViewer.java:1743)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1429)
at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1383)
at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1485)
at org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer.java:537)
at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1444)
at org.eclipse.tigerstripe.workbench.ui.internal.editors.artifacts.ArtifactMethodsSection.onExtendedArtifactChange(ArtifactMethodsSection.java:495)
at org.eclipse.tigerstripe.workbench.ui.internal.editors.artifacts.ModelComponentSectionPart$1.artifactChanged(ModelComponentSectionPart.java:82)
at org.eclipse.tigerstripe.workbench.internal.core.model.ArtifactManager.notifyArtifactChanged(ArtifactManager.java:1587)
at org.eclipse.tigerstripe.workbench.internal.core.model.ArtifactManager.addArtifact(ArtifactManager.java:1836)
at org.eclipse.tigerstripe.workbench.internal.core.model.ArtifactManager.artifactResourceChanged(ArtifactManager.java:2750)
at org.eclipse.tigerstripe.workbench.internal.core.TigerstripeWorkspaceNotifier.signalArtifactResourceChanged(TigerstripeWorkspaceNotifier.java:127)
at org.eclipse.tigerstripe.workbench.internal.builder.WorkspaceListener.checkArtifactResourceChanged(WorkspaceListener.java:453)
at org.eclipse.tigerstripe.workbench.internal.builder.WorkspaceListener.resourceChanged(WorkspaceListener.java:329)
at org.eclipse.core.internal.events.NotificationManager$2.run(NotificationManager.java:291)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:285)
at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:149)
at org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:327)
at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:1181)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:157)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:242)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Comment 5 Anton Salnik CLA 2011-02-26 00:16:39 EST
Created attachment 189873 [details]
336307_c4 patch
Comment 6 Yuri Strot CLA 2011-02-28 06:37:55 EST
336307_c4 patch applied.
Comment 7 Maria Kolchinskaja CLA 2011-03-10 00:45:01 EST
Open all diagrams and some artifacts in editors.
Select menu item "Refactor Model/Rename..." for the 'simple' package.
Check 'rename subpackages' checkbox.
Rename 'simple' package to 'complicated'.

Result:

1. All editors and diagrams are closed exept 'outside-class-diagram' and
'outside-instance-diagram'. These diagrams marked ad 'dirty'.

2. When I open default diagram from 'simple' package it marked as dirty
Comment 8 Anton Salnik CLA 2011-03-14 08:07:56 EDT
It's standard Tigerstripe behaviour. TS closes diagrams which are moved and if related elements are updated then diagram configuration are cleaned on load.
Comment 9 Yuri Strot CLA 2011-03-14 10:44:32 EDT
This issue finally fixed by Anton.