refresh gives double outline
When an erlang file is shown as out of date, refreshing it in the navigator gives the old "double outline" problem – the structure is shown twice in the outline
Leave a comment
on 2011-03-03 11:39 *
By Vlad Dumitrescu
Updating tickets (#737, #242, #364, #373, #411, #473, #561, #218, #339, #358, #422, #423, #424, #425, #428, #432, #535, #543, #599, #636, #671, #684, #693, #694, #699, #41, #52, #64, #83, #93, #120, #149, #157, #163, #177, #179, #194, #195, #219, #222, #228, #261, #274, #281, #283, #285, #298, #318, #335, #349, #351, #375, #379, #383, #401, #405, #409, #412, #413, #434, #442, #449, #450, #451, #454, #460, #471, #492, #523, #537, #555, #559, #574, #577, #581, #598, #603, #615, #619, #632, #634, #639, #640, #641, #642, #643, #645, #658, #660, #662, #664, #665, #667, #673, #674, #679, #685, #695, #696, #700, #705, #707, #709, #716, #719, #720, #722, #728, #736, #738, #741, #743, #744, #746, #759, #760, #761, #762, #766, #767, #768, #769, #770, #771, #772, #773, #774, #775, #776, #779, #780, #786, #788, #789, #790, #791, #159, #372, #443, #479, #564, #601, #610, #622, #677, #429, #489)
on 2011-03-03 11:40 *
By Vlad Dumitrescu
Updating tickets (#560, #613, #737, #41, #52, #64, #83, #93, #120, #149, #157, #159, #163, #177, #179, #194, #195, #218, #219, #222, #228, #242, #261, #274, #281, #283, #285, #298, #318, #335, #339, #349, #351, #358, #364, #372, #373, #375, #379, #383, #401, #405, #409, #411, #412, #413, #422, #423, #424, #425, #428, #429, #432, #434, #442, #443, #449, #450, #451, #454, #460, #471, #473, #479, #489, #492, #523, #535, #537, #543, #555, #559, #561, #564, #574, #577, #581, #598, #599, #601, #603, #610, #615, #619, #622, #632, #634, #636, #639, #640, #641, #642, #643, #645, #658, #660, #662, #664, #665, #667, #671, #673, #674, #677, #679, #684, #685, #693, #694, #695, #696, #699, #700, #705, #707, #709, #716, #719, #720, #722, #728, #736, #738, #741, #743, #744, #746, #759, #760, #761, #762, #766, #767, #768, #769, #770, #771, #772, #773, #774, #775, #776, #779, #780, #786, #788, #789, #790, #791)
on 2011-08-24 09:17 *
By Vlad Dumitrescu
Updating tickets (#802, #52, #64, #460, #720, #749, #769, #775, #776, #786, #851, #83, #93, #149, #157, #163, #179, #194, #195, #222, #228, #274, #281, #283, #285, #335, #339, #349, #351, #358, #364, #373, #375, #379, #383, #401, #405, #409, #411, #413, #422, #424, #425, #428, #434, #442, #443, #449, #450, #454, #471, #479, #492, #523, #535, #537, #543, #561, #564, #574, #590, #598, #599, #603, #610, #615, #619, #632, #634, #636, #639, #640, #641, #642, #643, #645, #658, #660, #662, #664, #665, #674, #677, #684, #685, #688, #689, #693, #694, #695, #696, #699, #700, #707, #709, #719, #736, #743, #744, #746, #748, #759, #760, #761, #762, #774, #778, #780, #788, #789, #796, #798, #799, #800, #803, #809, #812, #813, #816, #820, #822, #829, #836, #837, #840, #841, #842, #848, #849, #850, #853, #854, #855, #856, #857, #860, #867, #868, #871, #872, #873, #875, #41, #159, #372, #429, #489, #577, #601, #622, #667, #679, #767, #768, #772, #785, #771)
on 2013-01-23 07:39 *
By Vlad Dumitrescu
Found in version changed from 0.8.8 to -none-
Priority changed from Normal (3) to High (2)
Found in version changed from 0.8.8 to -none-
Priority changed from Normal (3) to High (2)
on 2013-01-23 07:39 *
By Vlad Dumitrescu
Estimate changed from None to Medium
Sum of child estimates changed from 0.0 to 3.0
Estimate changed from None to Medium
Sum of child estimates changed from 0.0 to 3.0
on 2013-01-23 07:48 *
By Vlad Dumitrescu
Milestone changed from backlog to sprint #39
Milestone changed from backlog to sprint #39
on 2013-01-23 08:38 *
By Vlad Dumitrescu
Assigned to set to Vlad Dumitrescu
Status changed from New to Test
Assigned to set to Vlad Dumitrescu
Status changed from New to Test
The model is built independently from the editor (the erlang parser gets the file path and reads the contents from there).
When refresh is pressed for a file that was out of sync, the editor gets the content, but the reconciler doesn't handle it as an initial reconcile, but as a regular one, thus temporarily having the content twice.
Solution: When resource is out of sync, don't build a model!
When refresh is pressed for a file that was out of sync, the editor gets the content, but the reconciler doesn't handle it as an initial reconcile, but as a regular one, thus temporarily having the content twice.
Solution: When resource is out of sync, don't build a model!
on 2013-01-23 08:39 *
By Vlad Dumitrescu
Estimate changed from Medium to Small
Sum of child estimates changed from 3.0 to 1.0
Estimate changed from Medium to Small
Sum of child estimates changed from 3.0 to 1.0
on 2013-01-23 14:21 *
By Vlad Dumitrescu
Without that fix, when starting eclipse with an editor whose resource is out-of-sync, there is a scary exception (see below). I thought this would help, but there should be a different event than Activate...
!ENTRY org.eclipse.ui 4 0 2013-01-23 15:19:33.342
!MESSAGE Warning: Detected recursive attempt by part org.erlide.ui.editors.erl.ErlangEditor to create itself (this is probably, but not necessarily, a bug)
!STACK 1
org.eclipse.ui.PartInitException: Warning: Detected recursive attempt by part org.erlide.ui.editors.erl.ErlangEditor to create itself (this is probably, but not necessarily, a bug)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:586)
at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289)
at org.eclipse.ui.internal.EditorManager.findEditor(EditorManager.java:403)
at org.eclipse.ui.internal.EditorManager.findEditor(EditorManager.java:381)
at org.eclipse.ui.internal.WorkbenchPage.findEditor(WorkbenchPage.java:2102)
at org.eclipse.ui.NavigationLocation.getEditorPart(NavigationLocation.java:44)
at org.eclipse.ui.NavigationLocation.getText(NavigationLocation.java:60)
at org.eclipse.ui.internal.NavigationHistoryEntry.<init>(NavigationHistoryEntry.java:49)
at org.eclipse.ui.internal.NavigationHistory.createEntry(NavigationHistory.java:657)
at org.eclipse.ui.internal.NavigationHistory.addEntry(NavigationHistory.java:374)
at org.eclipse.ui.internal.NavigationHistory.markLocation(NavigationHistory.java:214)
at org.eclipse.ui.texteditor.AbstractTextEditor.markInNavigationHistory(AbstractTextEditor.java:6156)
at org.eclipse.ui.texteditor.AbstractTextEditor.selectAndReveal(AbstractTextEditor.java:6131)
at org.eclipse.ui.texteditor.AbstractTextEditor.selectAndReveal(AbstractTextEditor.java:6100)
at org.eclipse.ui.texteditor.AbstractTextEditor.doSetSelection(AbstractTextEditor.java:2854)
at org.eclipse.ui.texteditor.AbstractTextEditor.restoreSelection(AbstractTextEditor.java:2819)
at org.eclipse.ui.texteditor.AbstractTextEditor$5.run(AbstractTextEditor.java:465)
at org.eclipse.ui.texteditor.AbstractTextEditor$ElementStateListener.execute(AbstractTextEditor.java:597)
at org.eclipse.ui.texteditor.AbstractTextEditor$ElementStateListener.elementContentReplaced(AbstractTextEditor.java:469)
at org.eclipse.ui.editors.text.TextFileDocumentProvider$FileBufferListener.bufferContentReplaced(TextFileDocumentProvider.java:265)
at org.eclipse.core.internal.filebuffers.TextFileBufferManager$5.run(TextFileBufferManager.java:730)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.filebuffers.TextFileBufferManager.fireBufferContentReplaced(TextFileBufferManager.java:728)
at org.eclipse.core.internal.filebuffers.ResourceTextFileBuffer.handleFileContentChanged(ResourceTextFileBuffer.java:517)
at org.eclipse.core.internal.filebuffers.ResourceFileBuffer$2.execute(ResourceFileBuffer.java:151)
at org.eclipse.core.internal.filebuffers.ResourceFileBuffer$SafeFileChange.run(ResourceFileBuffer.java:86)
at org.eclipse.ui.internal.editors.text.UISynchronizationContext.run(UISynchronizationContext.java:34)
at org.eclipse.core.internal.filebuffers.TextFileBufferManager.execute(TextFileBufferManager.java:629)
at org.eclipse.core.internal.filebuffers.ResourceFileBuffer$FileSynchronizer.resourceChanged(ResourceFileBuffer.java:180)
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.resources.Resource.refreshLocal(Resource.java:1676)
at org.eclipse.core.internal.resources.File.refreshLocal(File.java:337)
at org.erlide.core.internal.model.erlang.ErlModule.internalBuildStructure(ErlModule.java:105)
at org.erlide.core.internal.model.erlang.ErlModule.buildStructure(ErlModule.java:123)
at org.erlide.core.internal.model.root.Openable.open(Openable.java:144)
at org.erlide.ui.internal.folding.DefaultErlangFoldingStructureProvider.projectionEnabled(DefaultErlangFoldingStructureProvider.java:547)
at org.eclipse.jface.text.source.projection.ProjectionViewer.fireProjectionEnabled(ProjectionViewer.java:489)
at org.eclipse.jface.text.source.projection.ProjectionViewer.enableProjection(ProjectionViewer.java:537)
at org.eclipse.jface.text.source.projection.ProjectionViewer.doOperation(ProjectionViewer.java:1441)
at org.erlide.ui.editors.erl.ErlangEditor.createPartControl(ErlangEditor.java:1159)
at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670)
at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
at org.eclipse.ui.internal.EditorAreaHelper.setVisibleEditor(EditorAreaHelper.java:271)
at org.eclipse.ui.internal.EditorManager.setVisibleEditor(EditorManager.java:1429)
on 2013-01-23 14:29 *
By Vlad Dumitrescu
Status changed from Ongoing to Test
Status changed from Ongoing to Test
I pushed a fix that should work better.
on 2013-01-23 14:35 *
By Vlad Dumitrescu
The refresh is needed so that when we do the reconciling, the editor has the same content as the file. See comment above (https://erlide-tools.assembla.com/spaces/erlide/tickets/598-refresh-gives-double-outline?comment=229644373#comment:229644373) for why the original code gave a double outline (actually, the model had all elements twice).
I think that forcing a refresh is easier than fixing the reconciler.
I think that forcing a refresh is easier than fixing the reconciler.
on 2013-01-23 14:39 *
By Vlad Dumitrescu
Is it a significant slow-down? Can we live with it until the reconciler can handle this situation?
on 2013-01-23 14:48 *
By Vlad Dumitrescu
Note that there is an unrelated slow-down at startup in 0.18. I am looking at it.
on 2013-01-24 12:47 *
By Vlad Dumitrescu
Erlang engine changed from No to Yes
Erlang engine changed from No to Yes
on 2013-01-30 10:02 *
By Vlad Dumitrescu
Status changed from Ongoing to New
Status changed from Ongoing to New
on 2013-01-30 10:03 *
By Vlad Dumitrescu
Component changed from editing support to documentation
Component changed from editing support to documentation
on 2013-01-30 10:03 *
By Vlad Dumitrescu
Component changed from documentation to code scanner/parser
Component changed from documentation to code scanner/parser
on 2013-01-30 10:03 *
By Vlad Dumitrescu
Milestone changed from sprint #39 to sprint #40
Milestone changed from sprint #39 to sprint #40
on 2013-03-01 09:57 *
By Vlad Dumitrescu
Milestone changed from sprint #40 to sprint #41
Milestone changed from sprint #40 to sprint #41
on 2013-03-04 14:14 *
By Vlad Dumitrescu
Assigned to changed from Vlad Dumitrescu to jakobc
Assigned to changed from Vlad Dumitrescu to jakobc
on 2013-03-25 09:46 *
By Vlad Dumitrescu
Status changed from Ongoing to Test
Status changed from Ongoing to Test
on 2013-03-25 21:24 *
By Vlad Dumitrescu
Status changed from Test to Fixed
Status changed from Test to Fixed