Author: scabanovich
Date: 2009-09-21 07:42:44 -0400 (Mon, 21 Sep 2009)
New Revision: 17675
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/action/InsertAction.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/action/InsertAction2.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/handler/FormatHandler.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeDndUtil.java
Log:
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/action/InsertAction.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/action/InsertAction.java 2009-09-21
11:41:56 UTC (rev 17674)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/action/InsertAction.java 2009-09-21
11:42:44 UTC (rev 17675)
@@ -19,6 +19,7 @@
import org.eclipse.wst.sse.ui.StructuredTextEditor;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.ui.views.palette.PaletteInsertHelper;
+import org.jboss.tools.jst.jsp.jspeditor.dnd.JSPPaletteInsertHelper;
import org.jboss.tools.jst.web.tld.TLDToPaletteHelper;
import org.jboss.tools.jst.web.tld.URIConstants;
import org.jboss.tools.vpe.editor.context.VpePageContext;
@@ -145,7 +146,7 @@
*/
// if(((Node)region).getNodeType() == Node.ELEMENT_NODE)
p.put("selectionProvider", selProvider); //$NON-NLS-1$
- PaletteInsertHelper.insertIntoEditor(sourceEditor.getTextViewer(), p);
+ JSPPaletteInsertHelper.getInstance().insertIntoEditor(sourceEditor.getTextViewer(),
p);
}
/**
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/action/InsertAction2.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/action/InsertAction2.java 2009-09-21
11:41:56 UTC (rev 17674)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/menu/action/InsertAction2.java 2009-09-21
11:42:44 UTC (rev 17675)
@@ -19,6 +19,7 @@
import org.eclipse.wst.sse.ui.StructuredTextEditor;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.ui.views.palette.PaletteInsertHelper;
+import org.jboss.tools.jst.jsp.jspeditor.dnd.JSPPaletteInsertHelper;
import org.jboss.tools.jst.web.tld.TLDToPaletteHelper;
import org.jboss.tools.jst.web.tld.URIConstants;
import org.jboss.tools.vpe.editor.menu.InsertType;
@@ -215,7 +216,7 @@
// if(((Node)region).getNodeType() == Node.ELEMENT_NODE)
p.put(PaletteInsertHelper.PROPOPERTY_SELECTION_PROVIDER,
selectionProvider);
- PaletteInsertHelper.insertIntoEditor(sourceEditor.getTextViewer(), p);
+ JSPPaletteInsertHelper.getInstance().insertIntoEditor(sourceEditor.getTextViewer(),
p);
}
/**
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/handler/FormatHandler.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/handler/FormatHandler.java 2009-09-21
11:41:56 UTC (rev 17674)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/toolbar/format/handler/FormatHandler.java 2009-09-21
11:42:44 UTC (rev 17675)
@@ -26,6 +26,7 @@
import org.w3c.dom.NodeList;
import org.jboss.tools.common.model.ui.views.palette.PaletteInsertHelper;
+import org.jboss.tools.jst.jsp.jspeditor.dnd.JSPPaletteInsertHelper;
import org.jboss.tools.vpe.VpePlugin;
import org.jboss.tools.vpe.editor.template.textformating.FormatData;
import org.jboss.tools.vpe.editor.template.textformating.TextFormatingData;
@@ -121,7 +122,7 @@
p.put("selectionProvider", selProvider); //$NON-NLS-1$
- PaletteInsertHelper.insertIntoEditor(viewer, p);
+ JSPPaletteInsertHelper.getInstance().insertIntoEditor(viewer, p);
String documentText = document.get();
int newStartOffset = documentText.substring(startOffcet).indexOf(nodeSource);
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeDndUtil.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeDndUtil.java 2009-09-21
11:41:56 UTC (rev 17674)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeDndUtil.java 2009-09-21
11:42:44 UTC (rev 17675)
@@ -18,6 +18,7 @@
import org.jboss.tools.common.model.ui.dnd.DnDUtil;
import org.jboss.tools.common.model.ui.editor.IModelObjectEditorInput;
import org.jboss.tools.common.model.ui.views.palette.PaletteInsertHelper;
+import org.jboss.tools.jst.jsp.jspeditor.dnd.JSPPaletteInsertHelper;
import org.jboss.tools.vpe.VpePlugin;
import org.mozilla.interfaces.nsIFile;
import org.mozilla.interfaces.nsISupports;
@@ -42,7 +43,7 @@
try {
DnDUtil.paste(input.getXModelObject(), properties);
- PaletteInsertHelper.insertIntoEditor(viewer, properties);
+ JSPPaletteInsertHelper.getInstance().insertIntoEditor(viewer, properties);
} catch (XModelException ex) {
VpePlugin.getPluginLog().logError(ex);
}