blob: 723c1facb5c154ea3b60ef6057fad1421d7e1404 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2007 Chase Technology Ltd - http://www.chasetechnology.co.uk
* 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:
* Doug Satchwell (Chase Technology Ltd) - initial API and implementation
*******************************************************************************/
package org.eclipse.wst.xsl.internal.debug.ui.actions;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.wst.xsl.internal.debug.ui.XSLDebugUIPlugin;
import org.eclipse.wst.xsl.internal.debug.ui.tabs.main.StylesheetViewer;
public class OpenDialogAction extends AbstractStylesheetAction
{
protected static final String LAST_PATH_SETTING = "LAST_PATH_SETTING";
private String fPrefix = null;
public OpenDialogAction(String label, StylesheetViewer viewer, String dialogSettingsPrefix)
{
super(label, viewer);
fPrefix = dialogSettingsPrefix;
}
protected String getDialogSettingsPrefix()
{
return fPrefix;
}
protected String getDialogSetting(String settingName)
{
return getDialogSettings().get(getDialogSettingsPrefix() + "." + settingName);
}
protected void setDialogSetting(String settingName, String value)
{
getDialogSettings().put(getDialogSettingsPrefix() + "." + settingName, value);
}
protected IDialogSettings getDialogSettings()
{
IDialogSettings settings = XSLDebugUIPlugin.getDefault().getDialogSettings();
return settings;
}
@Override
protected int getActionType()
{
return ADD;
}
}