File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
visualvm/heapviewer/src/org/graalvm/visualvm/heapviewer/java/impl Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
@@ -61,33 +61,28 @@ class JavaPreviewPlugin extends HeapViewPlugin {
61
61
62
62
private final Heap heap ;
63
63
64
- private InstanceScrollPane component ;
64
+ private InstanceScrollPane component ;
65
65
66
66
67
67
public JavaPreviewPlugin (HeapContext context ) {
68
68
super (Bundle .JavaPreviewPlugin_Name (), Bundle .JavaPreviewPlugin_Description (), Icons .getIcon (HeapWalkerIcons .PROPERTIES ));
69
69
heap = context .getFragment ().getHeap ();
70
70
}
71
71
72
- protected JComponent createComponent () {
73
- if (component == null ) init ();
74
- return component ;
75
- }
76
-
77
72
78
73
@ Override
79
74
protected void closed () {
80
75
// TODO: should cancel the preview
81
76
}
82
77
83
-
84
78
protected void nodeSelected (HeapViewerNode node , boolean adjusting ) {
85
79
component .showInstance (node == null ? null : HeapViewerNode .getValue (node , DataType .INSTANCE , heap ));
86
80
}
87
81
88
82
89
- private void init () {
90
- component = new InstanceScrollPane ();
83
+ protected JComponent createComponent () {
84
+ if (component == null ) component = new InstanceScrollPane ();
85
+ return component ;
91
86
}
92
87
93
88
You can’t perform that action at this time.
0 commit comments