Author: svasilyev
Date: 2007-10-09 03:16:52 -0400 (Tue, 09 Oct 2007)
New Revision: 4071
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpeDebug.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualKeyHandler.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/context/VpePageContext.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-1034
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpeDebug.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpeDebug.java 2007-10-09
00:56:31 UTC (rev 4070)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpeDebug.java 2007-10-09
07:16:52 UTC (rev 4071)
@@ -10,27 +10,52 @@
******************************************************************************/
package org.jboss.tools.vpe;
+import org.eclipse.core.runtime.Platform;
+
public class VpeDebug {
- public static final boolean printSourceMutationEvent = false;
- public static final boolean printSourceSelectionEvent = false;
- public static final boolean printSourceModelLifecycleEvent = false;
+ public static final boolean PRINT_SOURCE_MUTATION_EVENT;
+ public static final boolean PRINT_SOURCE_SELECTION_EVENT;
+ public static final boolean PRINT_SOURCE_MODEL_LIFECYCLE_EVENT;
- public static final boolean printVisualMutationEvent = false;
- public static final boolean printVisualSelectionEvent = false;
- public static final boolean printVisualContextMenuEvent = false;
- public static final boolean printVisualMouseEvent = false;
- public static final boolean printVisualDragDropEvent = false;
- public static final boolean printVisualKeyEvent = false;
- public static final boolean printVisualInnerDragDropEvent = false;
+ public static final boolean PRINT_VISUAL_MUTATION_EVENT;
+ public static final boolean PRINT_VISUAL_SELECTION_EVENT;
+ public static final boolean PRINT_VISUAL_CONTEXTMENU_EVENT;
+ public static final boolean PRINT_VISUAL_MOUSE_EVENT;
+ public static final boolean PRINT_VISUAL_DRAGDROP_EVENT;
+ public static final boolean PRINT_VISUAL_KEY_EVENT;
+ public static final boolean PRINT_VISUAL_INNER_DRAGDROP_EVENT;
- public static final boolean visualAddPseudoElement = false;
+ public static final boolean VISUAL_ADD_PSEUDO_ELEMENT;
- public static final boolean visualContextMenuDumpSource = false;
- public static final boolean visualContextMenuDumpMapping = false;
+ public static final boolean VISUAL_CONTEXTMENU_DUMP_SOURCE;
+ public static final boolean VISUAL_CONTEXTMENU_DUMP_MAPPING;
- public static final boolean visualContextMenuTest = false;
+ public static final boolean VISUAL_CONTEXTMENU_TEST;
// usePrintStackTrace = false - The exception is sent on our site
// usePrintStackTrace = true - The exception is printed through printStackTrace
- public static final boolean usePrintStackTrace = false;
+ public static final boolean USE_PRINT_STACK_TRACE;
+
+ static {
+ PRINT_SOURCE_MUTATION_EVENT =
"true".equals(Platform.getDebugOption("/debug/source/mutation_event"));
// $NON-NSL-1$ // $NON-NSL-1$
+ PRINT_SOURCE_SELECTION_EVENT =
"true".equals(Platform.getDebugOption("/debug/source/selection_event"));
// $NON-NSL-1$ // $NON-NSL-1$
+ PRINT_SOURCE_MODEL_LIFECYCLE_EVENT =
"true".equals(Platform.getDebugOption("/debug/source/model_lifecycle_event"));
// $NON-NSL-1$ // $NON-NSL-1$
+
+ PRINT_VISUAL_MUTATION_EVENT =
"true".equals(Platform.getDebugOption("/debug/visual/mutation_event"));
// $NON-NSL-1$ // $NON-NSL-1$
+ PRINT_VISUAL_SELECTION_EVENT =
"true".equals(Platform.getDebugOption("/debug/visual/selection_event"));
// $NON-NSL-1$ // $NON-NSL-1$
+ PRINT_VISUAL_CONTEXTMENU_EVENT =
"true".equals(Platform.getDebugOption("/debug/visual/contextmenu_event"));
// $NON-NSL-1$ // $NON-NSL-1$
+ PRINT_VISUAL_MOUSE_EVENT =
"true".equals(Platform.getDebugOption("/debug/visual/mouse_event"));
// $NON-NSL-1$ // $NON-NSL-1$
+ PRINT_VISUAL_DRAGDROP_EVENT =
"true".equals(Platform.getDebugOption("/debug/visual/dragdrop_event"));
// $NON-NSL-1$ // $NON-NSL-1$
+ PRINT_VISUAL_KEY_EVENT =
"true".equals(Platform.getDebugOption("/debug/visual/key_event")); //
$NON-NSL-1$ // $NON-NSL-1$
+ PRINT_VISUAL_INNER_DRAGDROP_EVENT =
"true".equals(Platform.getDebugOption("/debug/visual/inner_dragdrop_event"));
// $NON-NSL-1$ // $NON-NSL-1$
+
+ VISUAL_ADD_PSEUDO_ELEMENT =
"true".equals(Platform.getDebugOption("/debug/visual/add_pseudo_element"));
// $NON-NSL-1$ // $NON-NSL-1$
+
+ VISUAL_CONTEXTMENU_DUMP_SOURCE =
"true".equals(Platform.getDebugOption("/debug/visual/contextmenu/dump_source"));
// $NON-NSL-1$ // $NON-NSL-1$
+ VISUAL_CONTEXTMENU_DUMP_MAPPING =
"true".equals(Platform.getDebugOption("/debug/visual/contextmenu/dump_mapping"));
// $NON-NSL-1$ // $NON-NSL-1$
+
+ VISUAL_CONTEXTMENU_TEST =
"true".equals(Platform.getDebugOption("/debug/visual/contextmenu/show_test"));
// $NON-NSL-1$ // $NON-NSL-1$
+
+ USE_PRINT_STACK_TRACE =
"true".equals(Platform.getDebugOption("/debug/use_PrintStackTrace"));
// $NON-NSL-1$ // $NON-NSL-1$
+ }
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java 2007-10-09
00:56:31 UTC (rev 4070)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/VpePlugin.java 2007-10-09
07:16:52 UTC (rev 4071)
@@ -82,7 +82,7 @@
// }
public static void reportProblem(Exception throwable) {
- if (VpeDebug.usePrintStackTrace) {
+ if (VpeDebug.USE_PRINT_STACK_TRACE) {
throwable.printStackTrace();
} else {
ProblemReportingHelper.reportProblem(PLUGIN_ID, throwable);
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2007-10-09
00:56:31 UTC (rev 4070)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2007-10-09
07:16:52 UTC (rev 4071)
@@ -327,7 +327,7 @@
// if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE)) {
// return;
// }
- if (VpeDebug.printSourceMutationEvent) {
+ if (VpeDebug.PRINT_SOURCE_MUTATION_EVENT) {
printSourceEvent(notifier, eventType, feature, oldValue, newValue, pos);
}
if(visualBuilder==null) {
@@ -412,7 +412,7 @@
List nodes = event.getSelectedNodes();
if (nodes != null && nodes.size() > 0) {
Node sourceNode = (Node)nodes.get(0);
- if (VpeDebug.printSourceSelectionEvent) {
+ if (VpeDebug.PRINT_SOURCE_SELECTION_EVENT) {
System.out.println(">>>>>>>>>>>>>>
nodeSelectionChanged sourceNode: " + sourceNode.getNodeName() + " " +
event.getCaretPosition()); //$NON-NLS-1$ //$NON-NLS-2$
}
if (event.getSource() instanceof IContentOutlinePage) {
@@ -427,7 +427,7 @@
if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE)) {
return;
}
- if (VpeDebug.printSourceSelectionEvent) {
+ if (VpeDebug.PRINT_SOURCE_SELECTION_EVENT) {
System.out.println(">>>>>>>>>>>>>>
textSelectionChanged " + event.getSource()); //$NON-NLS-1$
}
// if (event.getSource() instanceof StyledText) {
@@ -441,7 +441,7 @@
if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE)) {
return;
}
- if (VpeDebug.printSourceSelectionEvent) {
+ if (VpeDebug.PRINT_SOURCE_SELECTION_EVENT) {
System.out.println(">>>>>>>>>>>>>>
widgetSelected"); //$NON-NLS-1$
}
if (event.getSource() instanceof StyledText) {
@@ -451,7 +451,7 @@
}
public void widgetDefaultSelected(SelectionEvent event) {
- if (VpeDebug.printSourceSelectionEvent) {
+ if (VpeDebug.PRINT_SOURCE_SELECTION_EVENT) {
System.out.println(">>>>>>>>>>>>>>
widgetDefaultSelected"); //$NON-NLS-1$
}
}
@@ -485,7 +485,7 @@
anchorOffset = focusOffset;
}
- if (VpeDebug.printSourceSelectionEvent) {
+ if (VpeDebug.PRINT_SOURCE_SELECTION_EVENT) {
System.out.println("sourceSelectionChanged"); //$NON-NLS-1$
System.out.println(" anchorNode: " + anchorNode.getNodeName()
+ " anchorOffset: " + anchorOffset); //$NON-NLS-1$ //$NON-NLS-2$
System.out.println(" focusNode: " + focusNode.getNodeName() +
" focusOffset: " + focusOffset + " focusPosition: " +
focusPosition); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
@@ -551,7 +551,7 @@
anchorOffset = focusOffset;
}
- if (VpeDebug.printSourceSelectionEvent) {
+ if (VpeDebug.PRINT_SOURCE_SELECTION_EVENT) {
System.out.println("sourceSelectionChanged1"); //$NON-NLS-1$
System.out.println(" anchorNode: " + anchorNode.getNodeName()
+ " anchorOffset: " + anchorOffset); //$NON-NLS-1$ //$NON-NLS-2$
System.out.println(" focusNode: " + focusNode.getNodeName() +
" focusOffset: " + focusOffset + " focusPosition: " +
focusPosition); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
@@ -598,7 +598,7 @@
return;
}
if (event.getType() == ModelLifecycleEvent.MODEL_RELEASED) {
- if (VpeDebug.printSourceModelLifecycleEvent) {
+ if (VpeDebug.PRINT_SOURCE_MODEL_LIFECYCLE_EVENT) {
System.out.println(">>> processPostModelEvent: " +
event.toString()); //$NON-NLS-1$
}
visualBuilder.setSelectionRectangle(null);
@@ -621,7 +621,7 @@
if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
return;
}
- if (VpeDebug.printVisualMutationEvent) {
+ if (VpeDebug.PRINT_VISUAL_MUTATION_EVENT) {
printVisualEvent(mutationEvent);
}
switcher.stopActiveEditor();
@@ -631,7 +631,7 @@
if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
return;
}
- if (VpeDebug.printVisualMutationEvent) {
+ if (VpeDebug.PRINT_VISUAL_MUTATION_EVENT) {
printVisualEvent(mutationEvent);
}
Node targetNode = mutationEvent.getTargetNode();
@@ -648,7 +648,7 @@
if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
return;
}
- if (VpeDebug.printVisualMutationEvent) {
+ if (VpeDebug.PRINT_VISUAL_MUTATION_EVENT) {
printVisualEvent(mutationEvent);
}
Node targetNode = mutationEvent.getTargetNode();
@@ -665,7 +665,7 @@
if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
return;
}
- if (VpeDebug.printVisualMutationEvent) {
+ if (VpeDebug.PRINT_VISUAL_MUTATION_EVENT) {
printVisualEvent(mutationEvent);
}
switcher.stopActiveEditor();
@@ -675,7 +675,7 @@
if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
return;
}
- if (VpeDebug.printVisualMutationEvent) {
+ if (VpeDebug.PRINT_VISUAL_MUTATION_EVENT) {
printVisualEvent(mutationEvent);
}
switcher.stopActiveEditor();
@@ -685,7 +685,7 @@
if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
return;
}
- if (VpeDebug.printVisualMutationEvent) {
+ if (VpeDebug.PRINT_VISUAL_MUTATION_EVENT) {
printVisualEvent(mutationEvent);
}
switcher.stopActiveEditor();
@@ -696,7 +696,7 @@
if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
return;
}
- if (VpeDebug.printVisualMutationEvent) {
+ if (VpeDebug.PRINT_VISUAL_MUTATION_EVENT) {
printVisualEvent(mutationEvent);
}
Node targetNode = mutationEvent.getTargetNode();
@@ -710,7 +710,7 @@
if (switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
mouseUpSelectionReasonFlag = (reason & nsISelectionListener.MOUSEUP_REASON) >
0;
if (mouseUpSelectionReasonFlag || reason == nsISelectionListener.NO_REASON || reason
== nsISelectionListener.KEYPRESS_REASON || reason == nsISelectionListener.SELECTALL_REASON
|| (reason & nsISelectionListener.MOUSEDOWN_REASON) > 0) {
- if (VpeDebug.printVisualSelectionEvent) {
+ if (VpeDebug.PRINT_VISUAL_SELECTION_EVENT) {
System.out.println("<<< notifySelectionChanged: " + reason);
//$NON-NLS-1$
}
selectionBuilder.setSelection(selection);
@@ -740,7 +740,7 @@
return;
}
Element visualDragElement = selectionBuilder.getDragElement(mouseEvent);
- if (VpeDebug.printVisualMouseEvent) {
+ if (VpeDebug.PRINT_VISUAL_MOUSE_EVENT) {
Node visualNode = mouseEvent.getTargetNode();
System.out.println("<<< mouseDown targetNode: " +
visualNode.getNodeName() + " (" + MozillaSupports.getAddress(visualNode) +
") selectedElement: " + (visualDragElement != null ?
visualDragElement.getNodeName() + " (" +
MozillaSupports.getAddress(visualDragElement) + ")" : null)); //$NON-NLS-1$
//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
}
@@ -758,7 +758,7 @@
if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
return;
}
- if (VpeDebug.printVisualMouseEvent) {
+ if (VpeDebug.PRINT_VISUAL_MOUSE_EVENT) {
System.out.println("<<< mouseUp"); //$NON-NLS-1$
}
if (mouseDownSelectionFlag) {
@@ -776,7 +776,7 @@
Node visualNode = mouseEvent.getTargetNode();
if (visualNode != null) {
if (!mouseUpSelectionReasonFlag) {
- if (VpeDebug.printVisualMouseEvent) {
+ if (VpeDebug.PRINT_VISUAL_MOUSE_EVENT) {
System.out.println("<<< mouseClick visualNode: " +
visualNode.getNodeName() + " (" + MozillaSupports.getAddress(visualNode) +
")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
if (visualBuilder.isContentArea(visualNode)) {
@@ -807,7 +807,7 @@
if (!sourceBuilder.openBundleEditors(visualNode)) {
sourceBuilder.openIncludeEditor(visualNode);
}
- if (VpeDebug.printVisualMouseEvent) {
+ if (VpeDebug.PRINT_VISUAL_MOUSE_EVENT) {
System.out.println("<<< mouseDblClick visualNode: " +
visualNode.getNodeName() + " (" + MozillaSupports.getAddress(visualNode) +
")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
}
@@ -820,7 +820,7 @@
}
Node visualNode = mouseEvent.getTargetNode();
if (visualNode != null) {
- if (VpeDebug.printVisualMouseEvent) {
+ if (VpeDebug.PRINT_VISUAL_MOUSE_EVENT) {
System.out.println("<<< mouseMove visualNode: " +
visualNode.getNodeName() + " (" + MozillaSupports.getAddress(visualNode) +
")");
}
visualBuilder.setMoveCursor(mouseEvent);
@@ -829,7 +829,7 @@
}
public void _keyPress(nsIDOMKeyEvent keyEvent) {
- if (VpeDebug.printVisualKeyEvent) {
+ if (VpeDebug.PRINT_VISUAL_KEY_EVENT) {
System.out.println("<<< keyPress type: " + keyEvent.getType() +
" Ctrl: " + keyEvent.isCtrlKey() + " Shift: " +
keyEvent.isShiftKey() + " CharCode: " + keyEvent.getCharCode() + "
KeyCode: " + keyEvent.getKeyCode()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
//$NON-NLS-4$ //$NON-NLS-5$
}
if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
@@ -852,7 +852,7 @@
}
public void keyPress(nsIDOMKeyEvent keyEvent) {
- if (VpeDebug.printVisualKeyEvent) {
+ if (VpeDebug.PRINT_VISUAL_KEY_EVENT) {
System.out.println("<<< keyPress type: " + keyEvent.getType() +
" Ctrl: " + keyEvent.isCtrlKey() + " Shift: " +
keyEvent.isShiftKey() + " CharCode: " + keyEvent.getCharCode() + "
KeyCode: " + keyEvent.getKeyCode()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
//$NON-NLS-4$ //$NON-NLS-5$
}
@@ -1117,7 +1117,7 @@
});
}
- if (VpeDebug.visualContextMenuDumpSource) {
+ if (VpeDebug.VISUAL_CONTEXTMENU_DUMP_SOURCE) {
manager.add(new Action("Dump Source") { //$NON-NLS-1$
public void run() {
DOMTreeDumper dumper = new DOMTreeDumper();
@@ -1126,7 +1126,7 @@
});
}
- if (VpeDebug.visualContextMenuDumpMapping) {
+ if (VpeDebug.VISUAL_CONTEXTMENU_DUMP_MAPPING) {
manager.add(new Action("Dump Mapping") { //$NON-NLS-1$
public void run() {
printMapping();
@@ -1134,7 +1134,7 @@
});
}
- if (VpeDebug.visualContextMenuTest) {
+ if (VpeDebug.VISUAL_CONTEXTMENU_TEST) {
manager.add(new VpeAction("Test", node) { //$NON-NLS-1$
public void run() {
test(actionNode);
@@ -1784,13 +1784,13 @@
}
public void dragEnter(nsIDOMEvent event) {
- if (VpeDebug.printVisualDragDropEvent) {
+ if (VpeDebug.PRINT_VISUAL_DRAGDROP_EVENT) {
System.out.println("<<<<<<<<<<<<<<<<<<<<
DragEnter"); //$NON-NLS-1$
}
}
public void dragExit(nsIDOMEvent event) {
- if (VpeDebug.printVisualDragDropEvent) {
+ if (VpeDebug.PRINT_VISUAL_DRAGDROP_EVENT) {
System.out.println("<<<<<<<<<<<<<<<<<<<<
dragExit"); //$NON-NLS-1$
}
browser.hideDragCaret();
@@ -1805,7 +1805,7 @@
// isFlavor = dragSession.isDataFlavorSupported(nsITransferable.kUnicodeMime);
// isFlavor = dragSession.isDataFlavorSupported(nsITransferable.kNativeHTMLMime);
- if (VpeDebug.printVisualDragDropEvent) {
+ if (VpeDebug.PRINT_VISUAL_DRAGDROP_EVENT) {
System.out.println("<<< outerDragOver isFlavor: " + isFlavor);
//$NON-NLS-1$
}
@@ -1847,7 +1847,7 @@
if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_VISUAL)) {
return;
}
- if (VpeDebug.printVisualDragDropEvent) {
+ if (VpeDebug.PRINT_VISUAL_DRAGDROP_EVENT) {
System.out.println("<<<<<<<<<<<<<<<<<<<<
dragOver"); //$NON-NLS-1$
}
@@ -1878,14 +1878,14 @@
}
public void drop(nsIDOMEvent event) {
- if (VpeDebug.printVisualDragDropEvent) {
+ if (VpeDebug.PRINT_VISUAL_DRAGDROP_EVENT) {
System.out.println("<<< outerDrop"); //$NON-NLS-1$
}
event.preventDefault();
}
public void _drop(nsIDOMEvent event) {
- if (VpeDebug.printVisualDragDropEvent) {
+ if (VpeDebug.PRINT_VISUAL_DRAGDROP_EVENT) {
System.out.println("<<<<<<<<<<<<<<<<<<<<
dragDrop"); //$NON-NLS-1$
}
boolean canDrop = !browser.isMozillaDragFlaver();
@@ -1903,7 +1903,7 @@
caretInfo.showCaret();
caretInfo.hideCaret();
Point range = caretInfo.getSourceSelectionRange();
- if (VpeDebug.printVisualDragDropEvent) {
+ if (VpeDebug.PRINT_VISUAL_DRAGDROP_EVENT) {
System.out.println(" Drop Position: " + range.x +
" " + range.y); //$NON-NLS-1$ //$NON-NLS-2$
}
VpeDndUtil.drop((IModelObjectEditorInput)sourceEditor.getEditorInput(),
(ISourceViewer)sourceEditor.getAdapter(ISourceViewer.class), new
VpeSelectionProvider(range.x, range.y));
@@ -1922,7 +1922,7 @@
// }
onHideTooltip();
- if (VpeDebug.printVisualInnerDragDropEvent) {
+ if (VpeDebug.PRINT_VISUAL_INNER_DRAGDROP_EVENT) {
System.out.print("<<<<<< canInnerDrag"); //$NON-NLS-1$
}
@@ -1937,7 +1937,7 @@
if (dragInfo != null) {
Node dragNode = dragInfo.getNode();
- if (VpeDebug.printVisualInnerDragDropEvent) {
+ if (VpeDebug.PRINT_VISUAL_INNER_DRAGDROP_EVENT) {
System.out.print(" dragNode: " + dragNode.getNodeName() + "(" +
MozillaSupports.getAddress(dragNode) + ")"); //$NON-NLS-1$ //$NON-NLS-2$
//$NON-NLS-3$
}
@@ -1974,7 +1974,7 @@
}
}
- if (VpeDebug.printVisualInnerDragDropEvent) {
+ if (VpeDebug.PRINT_VISUAL_INNER_DRAGDROP_EVENT) {
System.out.println(" canDrag: " + canDrag); //$NON-NLS-1$
}
@@ -2011,7 +2011,7 @@
return null;
}
}
- if (VpeDebug.printVisualInnerDragDropEvent) {
+ if (VpeDebug.PRINT_VISUAL_INNER_DRAGDROP_EVENT) {
System.out.print("<<<<<< canInnerDrop"); //$NON-NLS-1$
}
boolean canDrop = false;;
@@ -2020,7 +2020,7 @@
if (innerDragInfo != null) {
VpeVisualInnerDropInfo visualDropInfo = selectionBuilder.getInnerDropInfo(event);
if (visualDropInfo.getDropContainer() != null) {
- if (VpeDebug.printVisualInnerDragDropEvent) {
+ if (VpeDebug.PRINT_VISUAL_INNER_DRAGDROP_EVENT) {
System.out.print(" x: " + visualDropInfo.getMouseX() + " y: "
+ visualDropInfo.getMouseY() + //$NON-NLS-1$ //$NON-NLS-2$
" container: " + visualDropInfo.getDropContainer().getNodeName() +
//$NON-NLS-1$
"(" + MozillaSupports.getAddress(visualDropInfo.getDropContainer()) +
")" + //$NON-NLS-1$ //$NON-NLS-2$
@@ -2042,7 +2042,7 @@
}
visualDropInfo.Release();
}
- if (VpeDebug.printVisualInnerDragDropEvent) {
+ if (VpeDebug.PRINT_VISUAL_INNER_DRAGDROP_EVENT) {
System.out.println(" canDrop: " + canDrop); //$NON-NLS-1$
}
return new MozillaDropInfo(canDrop, caretParent, caretOffset);
@@ -2051,13 +2051,13 @@
public void innerDrop(nsIDOMMouseEvent event) {
onHideTooltip();
- if (VpeDebug.printVisualInnerDragDropEvent) {
+ if (VpeDebug.PRINT_VISUAL_INNER_DRAGDROP_EVENT) {
System.out.print("<<<<<< innerDrop"); //$NON-NLS-1$
}
if (innerDragInfo != null) {
VpeVisualInnerDropInfo visualDropInfo = selectionBuilder.getInnerDropInfo(event);
if (visualDropInfo.getDropContainer() != null) {
- if (VpeDebug.printVisualInnerDragDropEvent) {
+ if (VpeDebug.PRINT_VISUAL_INNER_DRAGDROP_EVENT) {
System.out.print(" container: " +
visualDropInfo.getDropContainer().getNodeName() + //$NON-NLS-1$
"(" + MozillaSupports.getAddress(visualDropInfo.getDropContainer()) +
")" + //$NON-NLS-1$ //$NON-NLS-2$
" offset: " + visualDropInfo.getDropOffset()); //$NON-NLS-1$
@@ -2086,7 +2086,7 @@
}
//visualDropInfo.Release();
}
- if (VpeDebug.printVisualInnerDragDropEvent) {
+ if (VpeDebug.PRINT_VISUAL_INNER_DRAGDROP_EVENT) {
System.out.println();
}
}
@@ -2174,7 +2174,7 @@
VpePlugin.reportProblem(ex);
}
}
- if (VpeDebug.printVisualInnerDragDropEvent) {
+ if (VpeDebug.PRINT_VISUAL_INNER_DRAGDROP_EVENT) {
System.out.println(" canDrop: " + canDrop + (canDrop ? " container:
" + caretParent.getNodeName() + " offset: " + caretOffset :
"")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
}
return new MozillaDropInfo(canDrop, caretParent, caretOffset);
@@ -2250,7 +2250,7 @@
}
if (visualDropInfo.getDropContainer() != null) {
- if (VpeDebug.printVisualInnerDragDropEvent) {
+ if (VpeDebug.PRINT_VISUAL_INNER_DRAGDROP_EVENT) {
System.out.println(" drop! container: " +
visualDropInfo.getDropContainer().getNodeName()); //$NON-NLS-1$
}
externalDropAny(flavor, data, range, sourceDropInfo ==
null?null:sourceDropInfo.getContainer());
@@ -2435,7 +2435,7 @@
if (!switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE)) {
return;
}
- if (VpeDebug.printSourceSelectionEvent) {
+ if (VpeDebug.PRINT_SOURCE_SELECTION_EVENT) {
System.out.println(">>>>>>>>>>>>>>
selectionChanged " + event.getSource()); //$NON-NLS-1$
}
sourceSelectionChanged();
@@ -2461,7 +2461,7 @@
}
if (visualDropInfo.getDropContainer() != null) {
- if (VpeDebug.printVisualInnerDragDropEvent) {
+ if (VpeDebug.PRINT_VISUAL_INNER_DRAGDROP_EVENT) {
System.out.println(" drop! container: " +
visualDropInfo.getDropContainer().getNodeName()); //$NON-NLS-1$
}
final String finalFlavor = flavor;
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java 2007-10-09
00:56:31 UTC (rev 4070)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java 2007-10-09
07:16:52 UTC (rev 4071)
@@ -86,7 +86,7 @@
if (visualSelectedNode == null) {
visualSelectedNode = visualNode;
}
- if (VpeDebug.printVisualSelectionEvent) {
+ if (VpeDebug.PRINT_VISUAL_SELECTION_EVENT) {
System.out.println(" visualNode: " + visualSelectedNode.getNodeName()
+ "(" + MozillaSupports.getAddress(visualSelectedNode) + ")(" +
MozillaSupports.getRefCount(visualSelectedNode) + ") sourceNode: " +
(sourceNode == null ? null : sourceNode.getNodeName()) + " node: " + node);
}
if (sourceNode != null) {
@@ -343,7 +343,7 @@
}
Node setContextMenuSelection(Node visualNode) {
- if (VpeDebug.printVisualContextMenuEvent) {
+ if (VpeDebug.PRINT_VISUAL_CONTEXTMENU_EVENT) {
System.out.println(">>>>>>>>>>>>>>
onShowContextMenu visualNode: " + visualNode.getNodeName() + "(" +
MozillaSupports.getAddress(visualNode) + ")");
}
visualSelectionController.setCaretEnabled(false);
@@ -674,7 +674,7 @@
visualAnchorOffset = MozillaSupports.getOffset(visualAnchorNode);
if (!anchorStartFlag) visualAnchorOffset++;
}
- if (VpeDebug.printSourceSelectionEvent) {
+ if (VpeDebug.PRINT_SOURCE_SELECTION_EVENT) {
System.out.println("setVisualSelection");
System.out.println(" visualAnchorNode: " +
visualAnchorNode.getNodeName() + "(" +
MozillaSupports.getAddress(visualAnchorNode) + ") visualAnchorContainer: " +
visualAnchorContainer.getNodeName() + "(" +
MozillaSupports.getAddress(visualAnchorContainer) + ") visualAnchorOffset: " +
visualAnchorOffset + " anchorStartFlag: " + anchorStartFlag);
}
@@ -717,7 +717,7 @@
visualFocusOffset = MozillaSupports.getOffset(visualFocusNode);
if (!focusStartFlag) visualFocusOffset++;
}
- if (VpeDebug.printSourceSelectionEvent) {
+ if (VpeDebug.PRINT_SOURCE_SELECTION_EVENT) {
System.out.println(" visualFocusNode: " +
(visualFocusNode != null ?
visualFocusNode.getNodeName() + "(" +
MozillaSupports.getAddress(visualFocusNode) + ")" : null) +
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2007-10-09
00:56:31 UTC (rev 4070)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2007-10-09
07:16:52 UTC (rev 4071)
@@ -636,7 +636,7 @@
private void addPseudoElementImpl(Node visualParent) {
if (!templateManager.isWithoutPseudoElementContainer(visualParent.getNodeName())) {
- if (VpeDebug.visualAddPseudoElement) {
+ if (VpeDebug.VISUAL_ADD_PSEUDO_ELEMENT) {
System.out.println("-------------------- addPseudoElement: " +
visualParent.getNodeName());
}
Element visualPseudoElement = visualDocument.createElement(PSEUDO_ELEMENT);
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualKeyHandler.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualKeyHandler.java 2007-10-09
00:56:31 UTC (rev 4070)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualKeyHandler.java 2007-10-09
07:16:52 UTC (rev 4071)
@@ -90,7 +90,7 @@
} else {
handled = nonctrlKeyPressHandler(keyEvent);
}
- if (VpeDebug.printVisualKeyEvent) {
+ if (VpeDebug.PRINT_VISUAL_KEY_EVENT) {
System.out.println(" handled: " + handled);
}
if (handled) {
@@ -249,7 +249,7 @@
}
Node focusNode = selection.getFocusNode();
- if (VpeDebug.printVisualKeyEvent) {
+ if (VpeDebug.PRINT_VISUAL_KEY_EVENT) {
System.out.println(">>> 1. VpeVisualKeyHandler.deleteRight():
focusNode = " + focusNode + " | focusOffset = " +
selection.getFocusOffset());
}
if (focusNode != null) {
@@ -518,7 +518,7 @@
}
Node focusNode = selection.getFocusNode();
- if (VpeDebug.printVisualKeyEvent) {
+ if (VpeDebug.PRINT_VISUAL_KEY_EVENT) {
System.out.println(">>> 1. VpeVisualKeyHandler.deleteLeft():
focusNode = " + focusNode + " | focusOffset = " +
selection.getFocusOffset());
}
if (focusNode != null) {
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/context/VpePageContext.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/context/VpePageContext.java 2007-10-09
00:56:31 UTC (rev 4070)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/context/VpePageContext.java 2007-10-09
07:16:52 UTC (rev 4071)
@@ -366,7 +366,7 @@
List newTaglibs = getTagLibs();
List delTaglibs = new ArrayList();
if (buildTaglibsDifferences(newTaglibs, delTaglibs)) {
- if (VpeDebug.printSourceMutationEvent) {
+ if (VpeDebug.PRINT_SOURCE_MUTATION_EVENT) {
System.out.println(">>> TaglibsChanged");
}
for (int i = 0; i < taglibListeners.length; i++) {