blob: 4d391fbcdd643c93070eca26310ec85744c558c4 [file] [log] [blame]
kchong38cbf172006-03-29 03:38:21 +00001/*******************************************************************************
2 * Copyright (c) 2001, 2006 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11package org.eclipse.wst.xsd.adt.design.editpolicies;
12
13import org.eclipse.gef.editpolicies.SelectionEditPolicy;
14import org.eclipse.wst.xsd.adt.design.editparts.model.IFeedbackHandler;
15
16public class ADTSelectionFeedbackEditPolicy extends SelectionEditPolicy
17{
18
19 public ADTSelectionFeedbackEditPolicy()
20 {
21 super();
22 }
23
24 protected void hideSelection()
25 {
26 if (getHost() instanceof IFeedbackHandler)
27 {
28 ((IFeedbackHandler) getHost()).removeFeedback();
29 }
30 }
31
32 protected void showSelection()
33 {
34 if (getHost() instanceof IFeedbackHandler)
35 {
36 ((IFeedbackHandler) getHost()).addFeedback();
37 }
38 }
39
40}