+ *
+ * [caret]
+ * class A {
+ * int foo() {
+ * return 1 */*comment*/ 1;
+ * }
+ * }
+ *
+ *
+ * /**[caret]
+ * class A {
+ * int foo() {
+ * return 1 */*comment*/ 1;
+ * }
+ * }
+ *
+ * 'enter';true - if this target is unable to handle the event and parent component should be asked to process it.
- * false - if this target is unable to handle the event and parent component should NOT be asked to process it.
- */
- boolean update(DnDEvent aEvent);
-
- void drop(DnDEvent aEvent);
+import java.awt.Point;
+import java.awt.Image;
+/**
+ * @author Konstantin Bulenkov
+ */
+public interface DnDTarget extends DnDDropHandler, DnDTargetChecker {
void cleanUpOnLeave();
-
void updateDraggedImage(Image image, Point dropPoint, Point imageOffset);
-
}
diff --git a/platform/platform-api/src/com/intellij/ide/dnd/DnDTargetChecker.java b/platform/platform-api/src/com/intellij/ide/dnd/DnDTargetChecker.java
new file mode 100644
index 000000000000..16246b2d0e7a
--- /dev/null
+++ b/platform/platform-api/src/com/intellij/ide/dnd/DnDTargetChecker.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2000-2011 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.intellij.ide.dnd;
+
+/**
+ * @author Konstantin Bulenkov
+ */
+public interface DnDTargetChecker {
+ /**
+ * All
+ *
+ * @param event Drag-n-Drop event
+ * @return true - if this target is unable to handle the event and parent component should be asked to process it.
+ * false - if this target is unable to handle the event and parent component should NOT be asked to process it.
+ *
+ * @see DnDEvent#setDropPossible(boolean, String)
+ * @see DnDEvent#setDropPossible(String, DropActionHandler)
+ */
+ boolean update(DnDEvent event);
+}
diff --git a/platform/platform-api/src/com/intellij/openapi/editor/LazyRangeMarkerFactory.java b/platform/platform-api/src/com/intellij/openapi/editor/LazyRangeMarkerFactory.java
index 11968f74288a..ea7beabfed99 100644
--- a/platform/platform-api/src/com/intellij/openapi/editor/LazyRangeMarkerFactory.java
+++ b/platform/platform-api/src/com/intellij/openapi/editor/LazyRangeMarkerFactory.java
@@ -35,13 +35,13 @@ import java.util.Iterator;
public class LazyRangeMarkerFactory extends AbstractProjectComponent {
private final WeakList