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 |