Author: scabanovich
Date: 2007-10-01 08:56:45 -0400 (Mon, 01 Oct 2007)
New Revision: 3921
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPTextEditor.java
Log:
JBIDE-861
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPTextEditor.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPTextEditor.java 2007-10-01
12:46:03 UTC (rev 3920)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPTextEditor.java 2007-10-01
12:56:45 UTC (rev 3921)
@@ -650,11 +650,11 @@
public void runDropCommand(final String flavor, final String data) {
XModelBuffer b = XModelTransferBuffer.getInstance().getBuffer();
- final XModelObject o = b.source();
+ final XModelObject o = b == null ? null : b.source();
Display.getDefault().asyncExec(new Runnable() {
public void run() {
if (parentEditor.getVisualEditor().getController() != null) {
- if(!XModelTransferBuffer.getInstance().isEnabled()) {
+ if(o != null && !XModelTransferBuffer.getInstance().isEnabled()) {
XModelTransferBuffer.getInstance().enable();
XModelTransferBuffer.getInstance().getBuffer().addSource(o);
}
Show replies by date