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.

View | Details | Raw Unified | Return to bug 68912
Collapse All | Expand All

(-)manifest.mf (-1 / +1 lines)
Lines 1-6 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.core.multiview/1
2
OpenIDE-Module: org.netbeans.core.multiview/1
3
OpenIDE-Module-Specification-Version: 1.9
3
OpenIDE-Module-Specification-Version: 1.10
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/core/multiview/resources/Bundle.properties
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/core/multiview/resources/Bundle.properties
5
OpenIDE-Module-Layer: org/netbeans/core/multiview/resources/mf-layer.xml
5
OpenIDE-Module-Layer: org/netbeans/core/multiview/resources/mf-layer.xml
6
AutoUpdate-Essential-Module: true
6
AutoUpdate-Essential-Module: true
(-)api/doc/changes/apichanges.xml (+15 lines)
Lines 85-90 Link Here
85
  <changes>
85
  <changes>
86
    <change>
86
    <change>
87
        <api name="multiview_spi"/>
87
        <api name="multiview_spi"/>
88
        <summary>Added marker interface SourceViewMarker to identify elements with sourcecode.</summary>
89
        <version major="1" minor="10"/>
90
        <date day="17" month="9" year="2007"/>
91
        <author login="mkleint"/>
92
        <compatibility addition="yes"/>
93
        <description>
94
Adding a marker interface for <code>MultiViewDescription</code> instances that allows to identify them
95
 as containing source code. The associated <code>MultiViewElement</code>'s visual representation
96
 is assumed to implement <code>CloneableEditorSupport.Pane</code> interface.
97
        </description>
98
        <class package="org.netbeans.core.spi.multiview" name="SourceViewMarker"/>
99
        <issue number="68912"/>
100
    </change>
101
    <change>
102
        <api name="multiview_spi"/>
88
        <summary>Added factory methods to create multiview component</summary>
103
        <summary>Added factory methods to create multiview component</summary>
89
        <version major="1" minor="1"/>
104
        <version major="1" minor="1"/>
90
        <date day="4" month="5" year="2004"/>
105
        <date day="4" month="5" year="2004"/>
(-)src/org/netbeans/core/multiview/MultiViewCloneableTopComponent.java (+17 lines)
Lines 23-28 Link Here
23
import java.util.Collection;
23
import java.util.Collection;
24
import java.util.Iterator;
24
import java.util.Iterator;
25
import java.util.Map;
25
import java.util.Map;
26
import java.util.logging.Level;
27
import java.util.logging.Logger;
26
import javax.swing.Action;
28
import javax.swing.Action;
27
import javax.swing.SwingUtilities;
29
import javax.swing.SwingUtilities;
28
import org.netbeans.core.multiview.MultiViewModel.ActionRequestObserverFactory;
30
import org.netbeans.core.multiview.MultiViewModel.ActionRequestObserverFactory;
Lines 30-35 Link Here
30
import org.netbeans.core.spi.multiview.MultiViewDescription;
32
import org.netbeans.core.spi.multiview.MultiViewDescription;
31
import org.netbeans.core.spi.multiview.MultiViewElement;
33
import org.netbeans.core.spi.multiview.MultiViewElement;
32
import org.netbeans.core.spi.multiview.MultiViewElementCallback;
34
import org.netbeans.core.spi.multiview.MultiViewElementCallback;
35
import org.netbeans.core.spi.multiview.SourceViewMarker;
33
import org.openide.awt.UndoRedo;
36
import org.openide.awt.UndoRedo;
34
import org.openide.text.CloneableEditorSupport;
37
import org.openide.text.CloneableEditorSupport;
35
import org.openide.util.HelpCtx;
38
import org.openide.util.HelpCtx;
Lines 218-223 Link Here
218
                // fingers crossed and hope for the best... could result in bad results once
221
                // fingers crossed and hope for the best... could result in bad results once
219
                // we have multiple editors in the multiview component.
222
                // we have multiple editors in the multiview component.
220
                return el;
223
                return el;
224
            }
225
        }
226
        
227
        MultiViewDescription[] descs = peer.model.getDescriptions();
228
        for (MultiViewDescription desc : descs) {
229
            if (desc instanceof SourceViewMarker) {
230
                peer.tabs.changeVisibleManually(desc);
231
                el = peer.model.getActiveElement();
232
                if (el.getVisualRepresentation() instanceof CloneableEditorSupport.Pane) {
233
                    return el;
234
                } else {
235
                    Logger.getLogger(getClass().getName()).info("MultiViewDescription " + desc.getDisplayName() + "(" + desc.getClass() + 
236
                            ") claimed to contain sources, but it's MutliViewElement.getVisualRepresentation() didn't return a valid CloeanbleEditorSupport.Pane instance.");
237
                }
221
            }
238
            }
222
        }
239
        }
223
        // hopeless case, don't try to create new elements. it's users responsibility to
240
        // hopeless case, don't try to create new elements. it's users responsibility to

Return to bug 68912