diff options
Diffstat (limited to 'bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsil/actions/AddWSILToFavoritesAction.java')
-rw-r--r-- | bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsil/actions/AddWSILToFavoritesAction.java | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsil/actions/AddWSILToFavoritesAction.java b/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsil/actions/AddWSILToFavoritesAction.java deleted file mode 100644 index 81be94bfa..000000000 --- a/bundles/org.eclipse.wst.ws.explorer/wsexplorer-src/org/eclipse/wst/ws/internal/explorer/platform/wsil/actions/AddWSILToFavoritesAction.java +++ /dev/null @@ -1,66 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package org.eclipse.wst.ws.internal.explorer.platform.wsil.actions; - -import java.util.Hashtable; -import org.eclipse.wst.ws.internal.explorer.platform.constants.ActionInputs; -import org.eclipse.wst.ws.internal.explorer.platform.favorites.constants.FavoritesModelConstants; -import org.eclipse.wst.ws.internal.explorer.platform.perspective.Controller; -import org.eclipse.wst.ws.internal.explorer.platform.perspective.Node; -import org.eclipse.wst.ws.internal.explorer.platform.wsil.datamodel.WsilElement; -import org.eclipse.wst.ws.internal.explorer.platform.wsil.perspective.WSILPerspective; - -public class AddWSILToFavoritesAction extends AddToFavoritesAction -{ - public AddWSILToFavoritesAction(Controller controller) - { - super(controller); - } - - public boolean favoriteExists() - { - String wsilURL = getWsilUrl(); - Hashtable table = new Hashtable(); - table.put(FavoritesModelConstants.PROP_WSIL_URL, wsilURL); - return favoriteExists(table, FavoritesModelConstants.REL_WSIL_FOLDER_NODE); - } - - public boolean executeSingleLinkAction() - { - WSILPerspective wsilPerspective = controller_.getWSILPerspective(); - String wsilURL = getWsilUrl(); - Hashtable table = new Hashtable(); - table.put(FavoritesModelConstants.PROP_WSIL_URL, wsilURL); - if (isMultipleLinkAction() && favoriteExists(table, FavoritesModelConstants.REL_WSIL_FOLDER_NODE)) - { - wsilPerspective.getMessageQueue().addMessage(wsilPerspective.getMessage("MSG_ERROR_FAVORITES_ALREADY_EXISTS", wsilURL)); - return false; - } - if (addToFavorites(table, FavoritesModelConstants.REL_WSIL_FOLDER_NODE)) - { - wsilPerspective.getMessageQueue().addMessage(wsilPerspective.getMessage("MSG_INFO_ADD_TO_FAVORITES_SUCCESSFUL", wsilURL)); - return true; - } - else - { - wsilPerspective.getMessageQueue().addMessage(wsilPerspective.getMessage("MSG_ERROR_ADD_TO_FAVORITES", wsilURL)); - return false; - } - } - - private String getWsilUrl() - { - int nodeID = Integer.parseInt((String) propertyTable_.get(ActionInputs.NODEID)); - Node selectedNode = nodeManager_.getNode(nodeID); - WsilElement selectedElement = (WsilElement) selectedNode.getTreeElement(); - return selectedElement.getWsilUrl(); - } -} |