This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 203903 - override assotiateLookup() in ShellDataObject
Summary: override assotiateLookup() in ShellDataObject
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.1
Hardware: PC Mac OS X
: P3 normal (vote)
Assignee: Alexander Simon
URL:
Keywords:
Depends on: 203980 204072
Blocks:
  Show dependency tree
 
Reported: 2011-10-18 13:28 UTC by Tomas Stupka
Modified: 2011-10-27 13:59 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
shelldataobject patch (1.39 KB, patch)
2011-10-18 13:28 UTC, Tomas Stupka
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Stupka 2011-10-18 13:28:06 UTC
Created attachment 112178 [details]
shelldataobject patch

while fixing issue #200419 changes were made in the ShellDataObject (#1ae7060b5caa) to provide the History tab for shell scripts. Unfortunately, also the method assotiateLookup() had to be overridden to return 1 instead of the default 0. Otherwise the dataobjects lookup isn't properly setup and the result is that some actions in the editors context menu are disabled/misconfigured - e.g. the Diff to... action or all menu items in the Local History and Mercurial submenus. 

the same applies to MakefileDataObject, and probably also to other DataObjects changed because of the mentioned issue. 

see attached patch
Comment 1 Alexander Simon 2011-10-18 15:48:33 UTC
Methods assotiateLookup() were overridden in change set:
http://hg.netbeans.org/core-main/rev/1bb593b72bd5
But multi view editor has a problems with icons and persistence.
For example I see warning in IDE log:
INFO [org.netbeans.core.windows.persistence]: [PersistenceManager.getTopComponentForID] Problem when deserializing TopComponent for tcID:'MultiView-makefile#003DFFC0ADtext#002Ehistory#007C'. Reason: Top component MultiView-makefile#003DFFC0ADtext#002Ehistory#007C could not be located or loaded from Components folder.
INFO [org.netbeans.core.windows.view.ui.TabbedHandler]: TopComponent has no icon: MVCTC[name=Makefile, peer=[model=current=org.netbeans.core.spi.multiview.MultiViewFactory$MapMVD@747ce6]]

Reassign to evaluation.
Comment 2 Alexander Simon 2011-10-18 16:24:32 UTC
(In reply to comment #1)
> Methods assotiateLookup() were overridden in change set:
> http://hg.netbeans.org/core-main/rev/1bb593b72bd5
Sorry, right change set:
http://hg.netbeans.org/cnd-main/rev/503b226f1b76
Comment 3 Tomas Stupka 2011-10-18 16:36:09 UTC
> But multi view editor has a problems with icons and persistence.
> For example I see warning in IDE log:
is there something that doesn't work as expected, or is it just those messages? because the severity is info

i was able to reproduce the icon message - appears when activating the
"History" tab.Caused by the fact that the History tab provides no icon. Seems to be harmless. 

don't know how to reproduce the message coming from the PersistenceManager - might be caused by the History tabs pane being also a TopComponent. cc jarda - he might know better
Comment 4 Alexander Simon 2011-10-18 17:35:07 UTC
(In reply to comment #3)
> > But multi view editor has a problems with icons and persistence.
> > For example I see warning in IDE log:
> is there something that doesn't work as expected, or is it just those messages?
> because the severity is info
Yes, editor pane with makefile does not restored after IDE restarting, instable icon of editor pane - sometime absent and appear after switching between source-history.
Comment 5 Tomas Stupka 2011-10-18 19:21:29 UTC
> INFO [org.netbeans.core.windows.persistence]:
> [PersistenceManager.getTopComponentForID] Problem when deserializing
> TopComponent for tcID:'MultiView-makefile#003DFFC0ADtext#002Ehistory#007C'.
> Reason: Top component MultiView-makefile#003DFFC0ADtext#002Ehistory#007C could
> not be located or loaded from Components folder.
hm, it's only with makefiles i'm able to reproduce this
Comment 6 Vladimir Voskresensky 2011-10-18 20:11:08 UTC
(In reply to comment #5)
> > INFO [org.netbeans.core.windows.persistence]:
> > [PersistenceManager.getTopComponentForID] Problem when deserializing
> > TopComponent for tcID:'MultiView-makefile#003DFFC0ADtext#002Ehistory#007C'.
> > Reason: Top component MultiView-makefile#003DFFC0ADtext#002Ehistory#007C could
> > not be located or loaded from Components folder.
> hm, it's only with makefiles i'm able to reproduce this
with other types of files instead of zero we get two tabs:
https://netbeans.org/bugzilla/show_bug.cgi?id=202681
Comment 7 Quality Engineering 2011-10-19 14:19:14 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/503b226f1b76
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixing Bug #203903 - override assotiateLookup() in ShellDataObject
Comment 8 Tomas Stupka 2011-10-19 16:46:07 UTC
> INFO [org.netbeans.core.windows.persistence]:
> [PersistenceManager.getTopComponentForID] Problem when deserializing
> TopComponent for tcID:'MultiView-makefile#003DFFC0ADtext#002Ehistory#007C'.
> Reason: Top component MultiView-makefile#003DFFC0ADtext#002Ehistory#007C could
> not be located or loaded from Components folder.
is a bug in window system - see issue #203980
Comment 9 Tomas Stupka 2011-10-21 15:12:14 UTC
(In reply to comment #4)
> instable icon of editor pane - sometime absent and appear after switching between
> source-history.
see issue #204072
Comment 10 Alexander Simon 2011-10-27 12:17:43 UTC
It seems all sub-issues was fixed.
Tomas, can I close bug as resolved?
Comment 11 Tomas Stupka 2011-10-27 12:52:55 UTC
feel free to close