Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 1d2c49f5a11a62f07b4400147a9ff5b2cb77f7e3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*******************************************************************************
 * Copyright (c) 2012 THALES GLOBAL SERVICES.
 * This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License 2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 * Contributors:
 *    Obeo - initial API and implementation
 *******************************************************************************/
package org.eclipse.sirius.diagram.ui.tools.internal.palette;

import org.eclipse.gmf.runtime.diagram.ui.internal.parts.PaletteToolTransferDragSourceListener;
import org.eclipse.gmf.runtime.gef.ui.palette.customize.PaletteViewerEx;
import org.eclipse.jface.util.TransferDragSourceListener;

/**
 * Sirius specific {@link PaletteViewerEx}.
 * 
 * @author <a href="mailto:esteban.dugueperoux@obeo.fr">Esteban Dugueperoux</a>
 */
@SuppressWarnings("restriction")
public class SiriusPaletteViewer extends PaletteViewerEx {

    /**
     * Overridden to not add native
     * {@link PaletteToolTransferDragSourceListener} of gmf.
     * 
     * NOTE.: it is to support creation from palette with drag'n drop
     * 
     * {@inheritDoc}
     */
    @Override
    public void addDragSourceListener(TransferDragSourceListener listener) {
        if (!(listener instanceof PaletteToolTransferDragSourceListener)) {
            super.addDragSourceListener(listener);
        }
    }

}

Back to the top