View | Details | Raw Unified | Return to bug 250145
Collapse All | Expand All

(-)src/org/eclipse/jst/pagedesigner/itemcreation/customizer/IDropCustomizer.java (-2 / +16 lines)
Lines 11-22 Link Here
11
 *******************************************************************************/
11
 *******************************************************************************/
12
package org.eclipse.jst.pagedesigner.itemcreation.customizer;
12
package org.eclipse.jst.pagedesigner.itemcreation.customizer;
13
13
14
import org.eclipse.core.resources.IFile;
14
import org.eclipse.core.runtime.IAdaptable;
15
import org.eclipse.core.runtime.IAdaptable;
15
import org.eclipse.core.runtime.IStatus;
16
import org.eclipse.core.runtime.IStatus;
17
import org.eclipse.jst.pagedesigner.dom.IDOMPosition;
16
18
17
/**
19
/**
18
 * Interface used to declare an object that customizes tag creation data prior
20
 * Interface used to declare an object that customizes tag creation data prior
19
 * to a drop.  The drop customizer should be used to illicit data on per-drop basis.
21
 * to a drop.  The drop customizer should be used to ellicit data on per-drop basis.
20
 * 
22
 * 
21
 * Clients should not implement this interface.  Extend AbstractDropCustomizer instead.
23
 * Clients should not implement this interface.  Extend AbstractDropCustomizer instead.
22
 * 
24
 * 
Lines 27-32 Link Here
27
public interface IDropCustomizer 
29
public interface IDropCustomizer 
28
{
30
{
29
    /**
31
    /**
32
     * This is deprecated and is no longer called directly.  AbstractDropCustomizer
33
     * will call this from runCustomizer(IFile) in the default case.
34
     * 
35
     * @return the status condition of the customizer
36
     * @deprecated
37
     */
38
    public IStatus runCustomizer();
39
40
    /**
30
     * Executed when the user performs a drop gesture for a tag, but before the
41
     * Executed when the user performs a drop gesture for a tag, but before the
31
     * command is dispatched to create the tag in the target document.  Implementers
42
     * command is dispatched to create the tag in the target document.  Implementers
32
     * may do calculations or raise customization UI.  There return value is used
43
     * may do calculations or raise customization UI.  There return value is used
Lines 39-48 Link Here
39
     * NOTE: This method may be called on the UI thread, although this is not guaranteed.
50
     * NOTE: This method may be called on the UI thread, although this is not guaranteed.
40
     * Implementer should ensure that anything that is long-running (such as a dialog)
51
     * Implementer should ensure that anything that is long-running (such as a dialog)
41
     * is user-cancellable and that any UI code is run on the display thread.
52
     * is user-cancellable and that any UI code is run on the display thread.
53
     * @param file 
54
     * @param position the position in the target file where the new tag will be dropped
42
     * 
55
     * 
43
     * @return the status condition of the customizer
56
     * @return the status condition of the customizer
44
     */
57
     */
45
    public IStatus runCustomizer();
58
59
    public IStatus runCustomizer(final IFile file, final IDOMPosition position);
46
60
47
    /**
61
    /**
48
     * @return the customization data.  This method will only be called after runCustomizer
62
     * @return the customization data.  This method will only be called after runCustomizer
(-)src/org/eclipse/jst/pagedesigner/itemcreation/customizer/AbstractDropCustomizer.java (+13 lines)
Lines 11-19 Link Here
11
 *******************************************************************************/
11
 *******************************************************************************/
12
package org.eclipse.jst.pagedesigner.itemcreation.customizer;
12
package org.eclipse.jst.pagedesigner.itemcreation.customizer;
13
13
14
import org.eclipse.core.resources.IFile;
14
import org.eclipse.core.runtime.IAdaptable;
15
import org.eclipse.core.runtime.IAdaptable;
15
import org.eclipse.core.runtime.IStatus;
16
import org.eclipse.core.runtime.IStatus;
16
import org.eclipse.core.runtime.Status;
17
import org.eclipse.core.runtime.Status;
18
import org.eclipse.jst.pagedesigner.dom.IDOMPosition;
17
19
18
/**
20
/**
19
 * Clients should extend to implement their own IDropCustomizer.
21
 * Clients should extend to implement their own IDropCustomizer.
Lines 23-28 Link Here
23
 * @author cbateman
25
 * @author cbateman
24
 *
26
 *
25
 */
27
 */
28
/**
29
 * @author cbateman
30
 *
31
 */
26
public abstract class AbstractDropCustomizer implements IDropCustomizer 
32
public abstract class AbstractDropCustomizer implements IDropCustomizer 
27
{
33
{
28
    /* (non-Javadoc)
34
    /* (non-Javadoc)
Lines 40-43 Link Here
40
    {
46
    {
41
        return Status.OK_STATUS;
47
        return Status.OK_STATUS;
42
    }
48
    }
49
    
50
    public IStatus runCustomizer(final IFile file, final IDOMPosition position)
51
    {
52
        // backward compatibility: call the deprecated method to ensure that
53
        // existing users are not broken
54
        return runCustomizer();
55
    }
43
}
56
}

Return to bug 250145