Author: scabanovich
Date: 2009-09-21 07:41:56 -0400 (Mon, 21 Sep 2009)
New Revision: 17674
Added:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/dnd/JSPPaletteInsertHelper.java
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/dnd/FileDropCommand.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/dnd/PaletteDropCommand.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4913
Splitting PaletteInsertHelper into jsp and non-jsp related parts.
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 2009-09-21
11:40:55 UTC (rev 17673)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/JSPTextEditor.java 2009-09-21
11:41:56 UTC (rev 17674)
@@ -126,6 +126,7 @@
import org.jboss.tools.jst.jsp.editor.ITextFormatter;
import org.jboss.tools.jst.jsp.editor.IVisualContext;
import org.jboss.tools.jst.jsp.editor.IVisualController;
+import org.jboss.tools.jst.jsp.jspeditor.dnd.JSPPaletteInsertHelper;
import org.jboss.tools.jst.jsp.jspeditor.dnd.JSPTagProposalFactory;
import org.jboss.tools.jst.jsp.jspeditor.dnd.TagProposal;
import org.jboss.tools.jst.jsp.outline.JSPContentOutlineConfiguration;
@@ -569,7 +570,7 @@
}
public void insert(Properties p) {
- PaletteInsertHelper.insertIntoEditor(getSourceViewer(), p);
+ JSPPaletteInsertHelper.getInstance().insertIntoEditor(getSourceViewer(), p);
}
}
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/dnd/FileDropCommand.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/dnd/FileDropCommand.java 2009-09-21
11:40:55 UTC (rev 17673)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/dnd/FileDropCommand.java 2009-09-21
11:41:56 UTC (rev 17674)
@@ -61,7 +61,7 @@
properties.put(PaletteInsertHelper.PROPOPERTY_SELECTION_PROVIDER,
getDefaultModel().getDropData().getSelectionProvider());
properties.put(PaletteInsertHelper.PROPOPERTY_ADD_TAGLIB, "true");
//$NON-NLS-1$
addCustomProperties(properties);
- PaletteInsertHelper.insertIntoEditor(
+ JSPPaletteInsertHelper.getInstance().insertIntoEditor(
getDefaultModel().getDropData().getSourceViewer(),
properties
);
Added:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/dnd/JSPPaletteInsertHelper.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/dnd/JSPPaletteInsertHelper.java
(rev 0)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/dnd/JSPPaletteInsertHelper.java 2009-09-21
11:41:56 UTC (rev 17674)
@@ -0,0 +1,15 @@
+package org.jboss.tools.jst.jsp.jspeditor.dnd;
+
+import org.jboss.tools.common.model.ui.views.palette.PaletteInsertHelper;
+
+public class JSPPaletteInsertHelper extends PaletteInsertHelper {
+
+ static JSPPaletteInsertHelper instance = new JSPPaletteInsertHelper();
+
+ public static JSPPaletteInsertHelper getInstance() {
+ return instance;
+ }
+
+ public JSPPaletteInsertHelper() {}
+
+}
Property changes on:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/dnd/JSPPaletteInsertHelper.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/dnd/PaletteDropCommand.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/dnd/PaletteDropCommand.java 2009-09-21
11:40:55 UTC (rev 17673)
+++
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/jspeditor/dnd/PaletteDropCommand.java 2009-09-21
11:41:56 UTC (rev 17674)
@@ -82,7 +82,7 @@
if(endText != null) properties.setProperty(PaletteInsertHelper.PROPOPERTY_END_TEXT,
endText);
if(reformat != null)
properties.setProperty(PaletteInsertHelper.PROPOPERTY_REFORMAT_BODY, reformat);
if(newLine != null) properties.setProperty(PaletteInsertHelper.PROPOPERTY_NEW_LINE,
newLine);
- PaletteInsertHelper.insertIntoEditor(
+ PaletteInsertHelper.getInstance().insertIntoEditor(
getDefaultModel().getDropData().getSourceViewer(),
properties
);