12.12.1-10 baseline

Former-commit-id: 07d77ee5ca986f9762ec9c3276e8320e3f363ebc
This commit is contained in:
Steve Harris 2012-12-06 09:12:15 -06:00
parent 19962f41ba
commit 45f5150eb6
16 changed files with 12 additions and 1972 deletions

View file

@ -1,105 +0,0 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.viz.aviation;
import java.io.FileNotFoundException;
import java.util.List;
import org.apache.commons.configuration.ConfigurationException;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority;
import com.raytheon.viz.aviation.climatology.CigVisDistributionDlg;
import com.raytheon.viz.avncommon.AvnMessageMgr.StatusMessageType;
import com.raytheon.viz.avnconfig.TafSiteConfigFactory;
/**
* This class is a handler for bring up the Ceiling/Visibility Distribution
* dialog.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Nov 23, 2010 mnash Initial creation
*
* </pre>
*
* @author mnash
* @version 1.0
*/
@Deprecated
// No long used @see com.raytheon.viz.aviation.CigVisDistComponent
// TODO remove from base line.
public class CigVisDistAction extends AbstractHandler {
private static final transient IUFStatusHandler statusHandler = UFStatus
.getHandler(CigVisDistAction.class);
private CigVisDistributionDlg cigVisDistDialog;
private List<String> siteList;
/*
* (non-Javadoc)
*
* @see
* org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.
* ExecutionEvent)
*/
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
try {
if (siteList == null) {
siteList = TafSiteConfigFactory.getInstance().getSiteList();
}
} catch (ConfigurationException e) {
statusHandler.handle(Priority.PROBLEM, "Configuration error", e);
return null;
} catch (FileNotFoundException e) {
statusHandler.handle(Priority.PROBLEM,
"Missing configuration file", e);
return null;
}
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getShell();
if (cigVisDistDialog == null
|| cigVisDistDialog.getShell().isDisposed()) {
cigVisDistDialog = new CigVisDistributionDlg(shell, siteList,
StatusMessageType.Metar, null);
cigVisDistDialog.open();
cigVisDistDialog = null;
} else {
cigVisDistDialog.getShell().setVisible(true);
cigVisDistDialog.getShell().setFocus();
}
return null;
}
}

View file

@ -1,102 +0,0 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.viz.aviation;
import java.io.FileNotFoundException;
import java.util.List;
import org.apache.commons.configuration.ConfigurationException;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority;
import com.raytheon.viz.aviation.climatology.CigVisTrendDlg;
import com.raytheon.viz.avncommon.AvnMessageMgr.StatusMessageType;
import com.raytheon.viz.avnconfig.TafSiteConfigFactory;
/**
* Action class for launching the Ceiling/Visibility Trend dialog.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Nov 23, 2010 mnash Initial creation
*
* </pre>
*
* @author mnash
* @version 1.0
*/
@Deprecated
// TODO no longer used remove from the base line
public class CigVisTrendAction extends AbstractHandler {
private static final transient IUFStatusHandler statusHandler = UFStatus
.getHandler(CigVisTrendAction.class);
private CigVisTrendDlg cigVisTrendDialog;
private List<String> siteList;
/*
* (non-Javadoc)
*
* @see
* org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.
* ExecutionEvent)
*/
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
try {
if (siteList == null) {
siteList = TafSiteConfigFactory.getInstance().getSiteList();
}
} catch (ConfigurationException e) {
statusHandler.handle(Priority.PROBLEM, "Configuration error", e);
return null;
} catch (FileNotFoundException e) {
statusHandler.handle(Priority.PROBLEM,
"Missing configuration file", e);
return null;
}
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getShell();
if (cigVisTrendDialog == null
|| cigVisTrendDialog.getShell().isDisposed()) {
cigVisTrendDialog = new CigVisTrendDlg(shell, siteList,
StatusMessageType.Metar, null);
cigVisTrendDialog.open();
cigVisTrendDialog = null;
} else {
cigVisTrendDialog.getShell().setVisible(true);
cigVisTrendDialog.getShell().setFocus();
}
return null;
}
}

View file

@ -1,101 +0,0 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.viz.aviation;
import java.io.FileNotFoundException;
import java.util.List;
import org.apache.commons.configuration.ConfigurationException;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority;
import com.raytheon.viz.aviation.climatology.MetarDisplayDialog;
import com.raytheon.viz.avncommon.AvnMessageMgr.StatusMessageType;
import com.raytheon.viz.avnconfig.TafSiteConfigFactory;
/**
* Action class for the Climate's METAR Display.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Nov 22, 2010 mnash Initial creation
*
* </pre>
*
* @author mnash
* @version 1.0
*/
@Deprecated
// TODO no longer used remove from the base line
public class MetarAction extends AbstractHandler {
private static final transient IUFStatusHandler statusHandler = UFStatus
.getHandler(MetarAction.class);
private MetarDisplayDialog metarDialog;
private List<String> siteList;
/*
* (non-Javadoc)
*
* @see
* org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.
* ExecutionEvent)
*/
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
try {
if (siteList == null) {
siteList = TafSiteConfigFactory.getInstance().getSiteList();
}
} catch (ConfigurationException e) {
statusHandler.handle(Priority.PROBLEM, "Configuration error", e);
return null;
} catch (FileNotFoundException e) {
statusHandler.handle(Priority.PROBLEM,
"Missing configuration file", e);
return null;
}
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getShell();
if (metarDialog == null || metarDialog.getShell().isDisposed()) {
metarDialog = new MetarDisplayDialog(shell, siteList,
StatusMessageType.Metar, null);
metarDialog.open();
metarDialog = null;
} else {
metarDialog.getShell().setVisible(true);
metarDialog.getShell().setFocus();
}
return null;
}
}

View file

@ -1,102 +0,0 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.viz.aviation;
import java.io.FileNotFoundException;
import java.util.List;
import org.apache.commons.configuration.ConfigurationException;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import com.raytheon.uf.common.status.IUFStatusHandler;
import com.raytheon.uf.common.status.UFStatus;
import com.raytheon.uf.common.status.UFStatus.Priority;
import com.raytheon.viz.aviation.climatology.WindRosePlotDlg;
import com.raytheon.viz.avncommon.AvnMessageMgr.StatusMessageType;
import com.raytheon.viz.avnconfig.TafSiteConfigFactory;
/**
* Action class for Climate's Wind Rose Dialog.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Nov 23, 2010 mnash Initial creation
*
* </pre>
*
* @author mnash
* @version 1.0
*/
@Deprecated
// TODO no longer used remove from the base line
public class WindRoseAction extends AbstractHandler {
private static final transient IUFStatusHandler statusHandler = UFStatus
.getHandler(WindRoseAction.class);
private WindRosePlotDlg windRoseDialog;
private List<String> siteList;
/*
* (non-Javadoc)
*
* @see
* org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.
* ExecutionEvent)
*/
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
try {
if (siteList == null) {
siteList = TafSiteConfigFactory.getInstance().getSiteList();
}
} catch (ConfigurationException e) {
statusHandler.handle(Priority.PROBLEM, "Configuration error", e);
return null;
} catch (FileNotFoundException e) {
statusHandler.handle(Priority.PROBLEM,
"Missing configuration file", e);
return null;
}
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getShell();
if (windRoseDialog == null || windRoseDialog.getShell().isDisposed()) {
windRoseDialog = new WindRosePlotDlg(shell, siteList,
StatusMessageType.WindRose, null);
windRoseDialog.open();
windRoseDialog = null;
} else {
windRoseDialog.getShell().setVisible(true);
windRoseDialog.getShell().setFocus();
}
return null;
}
}

View file

@ -1,183 +0,0 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.viz.aviation.editor;
import java.util.Calendar;
import java.util.TimeZone;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Dialog;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.List;
import org.eclipse.swt.widgets.Shell;
import com.raytheon.uf.common.dataplugin.text.db.StdTextProduct;
import com.raytheon.viz.texteditor.TextWorkstationNotStartedException;
public class RestoreFileSelectDlg extends Dialog {
/**
* Dialog shell.
*/
private Shell shell;
/**
* The display control.
*/
private Display display;
private Font controlFont;
private List fileList;
private java.util.List<Object> list;
/**
* Return object when the shell is disposed.
*/
private int returnIdx = -1;
public RestoreFileSelectDlg(Shell parent) {
super(parent, 0);
}
/**
* Open method used to display the GHG Color dialog.
*
* @return True/False.
* @throws TextWorkstationNotStartedException
*/
public int open(java.util.List<Object> list)
throws TextWorkstationNotStartedException {
Shell parent = getParent();
display = parent.getDisplay();
shell = new Shell(parent, SWT.TITLE);
this.list = list;
// Create the main layout for the shell.
GridLayout mainLayout = new GridLayout(1, false);
mainLayout.marginHeight = 2;
mainLayout.marginWidth = 2;
mainLayout.verticalSpacing = 2;
shell.setLayout(mainLayout);
shell.setText("Restore File");
// Initialize all of the controls and layouts
initializeComponents();
shell.pack();
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
controlFont.dispose();
return returnIdx;
}
/**
* Initialize the controls on the display.
*/
private void initializeComponents() {
controlFont = new Font(shell.getDisplay(), "Monospace", 10, SWT.NORMAL);
createListControl();
// Create the buttons at the bottom of the display.
createBottomButtons();
}
private void createListControl() {
GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
Composite listComp = new Composite(shell, SWT.NONE);
listComp.setLayout(new GridLayout(1, false));
listComp.setLayoutData(gd);
Label listLbl = new Label(listComp, SWT.NONE);
listLbl.setText("Available files to restore:");
gd = new GridData(SWT.FILL, SWT.FILL, true, true);
gd.widthHint = 275;
gd.heightHint = 300;
gd.horizontalSpan = 2;
fileList = new List(listComp, SWT.BORDER | SWT.SINGLE | SWT.V_SCROLL
| SWT.H_SCROLL);
fileList.setLayoutData(gd);
fileList.setFont(controlFont);
for (Object obj : list) {
StdTextProduct tmp = ((StdTextProduct) (obj));
Calendar createTime = Calendar.getInstance(TimeZone
.getTimeZone("GMT"));
createTime.setTimeInMillis(tmp.getRefTime());
String label = tmp.getCccid() + tmp.getNnnid() + tmp.getXxxid()
+ " - " + createTime.getTime().toString();
fileList.add(label);
}
}
private void createBottomButtons() {
GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
Composite mainButtonComp = new Composite(shell, SWT.NONE);
mainButtonComp.setLayout(new GridLayout(1, false));
mainButtonComp.setLayoutData(gd);
gd = new GridData(SWT.CENTER, SWT.DEFAULT, false, false);
Composite buttonComp = new Composite(shell, SWT.NONE);
buttonComp.setLayout(new GridLayout(2, false));
buttonComp.setLayoutData(gd);
gd = new GridData(100, SWT.DEFAULT);
Button restoreBtn = new Button(buttonComp, SWT.PUSH);
restoreBtn.setText("Restore");
restoreBtn.setLayoutData(gd);
restoreBtn.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
int idx = fileList.getSelectionIndex();
returnIdx = idx;
shell.dispose();
}
});
gd = new GridData(100, SWT.DEFAULT);
Button cancelBtn = new Button(buttonComp, SWT.PUSH);
cancelBtn.setText("Cancel");
cancelBtn.setLayoutData(gd);
cancelBtn.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
returnIdx = -1;
shell.dispose();
}
});
}
}

View file

@ -1,313 +0,0 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.viz.avnconfig;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.util.TreeMap;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Dialog;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.List;
import org.eclipse.swt.widgets.Shell;
import com.raytheon.uf.common.localization.LocalizationContext;
import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType;
import com.raytheon.uf.common.localization.LocalizationFile;
import com.raytheon.uf.common.localization.PathManagerFactory;
/**
* This class generates a list of localized files that can be opened in the
* AvnFPS Text Editor.
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
*
* </pre>
*
* @version 1.0
*/
public class OpenSaveDlg extends Dialog {
/**
* Dialog shell.
*/
private Shell shell;
/**
* The display control.
*/
private Display display;
/**
* Used to indicate if the dialog is being used for open or save as dialog.
* Only the OPEN is used.
*/
// TODO remove the SAVE_AS code that is not used change the constructor to
// not use.
@Deprecated
public static enum DialogType {
OPEN, SAVE_AS
};
/**
* Dialog type. This is always OPEN.
*/
@Deprecated
private DialogType dialogType;
/**
* Font used to display file list.
*/
private Font controlFont;
/**
* List of localized files that can be edited.
*/
private List cfgFileList;
/**
* The localize file selected by the user.
*/
private LocalizationFile selectedFile;
/**
* List of localized files used to generate the file list.
*/
private LocalizationFile[] locFiles;
/**
* Uses file's display name as key to get the associated localized file.
*/
private Map<String, LocalizationFile> locFileMap;
/**
* Constructor
*
* @param parent
* shell
* @param type
*/
public OpenSaveDlg(Shell parent, DialogType type) {
super(parent, 0);
dialogType = type;
}
/**
* Display dialog and sets the selected file when user clicks on the Open
* button. Any other close leaves the the selected file null.
*
* @return null
*/
public Object open() {
Shell parent = getParent();
display = parent.getDisplay();
shell = new Shell(parent, SWT.TITLE);
shell.setText("Open Configuration File");
// Create the main layout for the shell.
GridLayout mainLayout = new GridLayout(1, false);
mainLayout.marginHeight = 2;
mainLayout.marginWidth = 2;
mainLayout.verticalSpacing = 2;
shell.setLayout(mainLayout);
// Initialize all of the controls and layouts
initializeComponents();
shell.pack();
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
controlFont.dispose();
return null;
}
/**
* Set up the dialog's display components.
*/
private void initializeComponents() {
locFileMap = new TreeMap<String, LocalizationFile>();
controlFont = new Font(shell.getDisplay(), "Monospace", 10, SWT.NORMAL);
createListControl();
// Create the buttons at the bottom of the display.
createBottomButtons();
getAvailableConfigFiles();
}
/**
* Create the label and the scroll list that will contain the files the user
* can edit.
*/
private void createListControl() {
GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
Composite listComp = new Composite(shell, SWT.NONE);
listComp.setLayout(new GridLayout(1, false));
listComp.setLayoutData(gd);
Label listLbl = new Label(listComp, SWT.NONE);
listLbl.setText("Available Config Files:");
gd = new GridData(SWT.FILL, SWT.FILL, true, true);
gd.widthHint = 400;
gd.heightHint = 400;
gd.horizontalSpan = 2;
cfgFileList = new List(listComp, SWT.BORDER | SWT.SINGLE | SWT.V_SCROLL
| SWT.H_SCROLL);
cfgFileList.setLayoutData(gd);
cfgFileList.setFont(controlFont);
}
/**
* Determine based on DialogType what kind of action button to place at the
* bottom of the dialog.
*/
private void createBottomButtons() {
// TODO Only the DialogType.OPEN is ever used. Code needs to be
// modified to no longer use DialogType.
GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
Composite mainButtonComp = new Composite(shell, SWT.NONE);
mainButtonComp.setLayout(new GridLayout(1, false));
mainButtonComp.setLayoutData(gd);
gd = new GridData(SWT.CENTER, SWT.DEFAULT, false, false);
Composite buttonComp = new Composite(shell, SWT.NONE);
buttonComp.setLayout(new GridLayout(2, false));
buttonComp.setLayoutData(gd);
if (dialogType == DialogType.OPEN) {
gd = new GridData(100, SWT.DEFAULT);
Button openBtn = new Button(buttonComp, SWT.PUSH);
openBtn.setText("Open");
openBtn.setLayoutData(gd);
openBtn.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
int selectedIndex = cfgFileList.getSelectionIndex();
String str = cfgFileList.getItem(selectedIndex);
selectedFile = locFileMap.get(str);
shell.dispose();
}
});
} else if (dialogType == DialogType.SAVE_AS) {
gd = new GridData(100, SWT.DEFAULT);
Button saveBtn = new Button(buttonComp, SWT.PUSH);
saveBtn.setText("Save");
saveBtn.setLayoutData(gd);
saveBtn.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
selectedFile = null;
shell.dispose();
}
});
}
gd = new GridData(100, SWT.DEFAULT);
Button cancelBtn = new Button(buttonComp, SWT.PUSH);
cancelBtn.setText("Cancel");
cancelBtn.setLayoutData(gd);
cancelBtn.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
shell.dispose();
}
});
}
/**
* Obtain from localization the configuration file information and populate
* the dialog scroll list.
*/
private void getAvailableConfigFiles() {
String[] extensions = new String[] { ".xml", ".cfg" };
LocalizationType[] types = new LocalizationType[] {
LocalizationType.CAVE_CONFIG, LocalizationType.CAVE_STATIC,
LocalizationType.COMMON_STATIC };
ArrayList<LocalizationFile> localFiles = new ArrayList<LocalizationFile>();
for (LocalizationType type : types) {
LocalizationContext[] contexts = PathManagerFactory
.getPathManager().getLocalSearchHierarchy(type);
for (LocalizationContext context : contexts) {
localFiles.addAll(Arrays.asList(PathManagerFactory
.getPathManager().listFiles(context, "aviation",
extensions, true, true)));
}
}
locFiles = localFiles.toArray(new LocalizationFile[0]);
if (locFiles == null) {
return;
}
for (int i = 0; i < locFiles.length; i++) {
if (locFiles[i].getName().startsWith("aviation/avnsetup") == false) {
String contextName = locFiles[i].getContext().getContextName();
if (contextName == null) {
contextName = " - " + "BASE";
} else {
contextName = " - " + contextName;
}
locFileMap
.put(locFiles[i].getName() + contextName, locFiles[i]);
}
}
for (String str : locFileMap.keySet()) {
cfgFileList.add(str);
}
if (cfgFileList.getSelectionCount() > 0) {
cfgFileList.setSelection(0);
}
}
/**
* Obtain the localized file selected by the user or null if no file
* selected.
*
* @return lfile
*/
public LocalizationFile getSelectedFile() {
return selectedFile;
}
}

View file

@ -1,580 +0,0 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.viz.avnconfig;
import java.io.FileNotFoundException;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.commons.configuration.ConfigurationException;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.ScrolledComposite;
import org.eclipse.swt.events.ControlAdapter;
import org.eclipse.swt.events.ControlEvent;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Dialog;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import com.raytheon.uf.viz.core.catalog.DirectDbQuery;
import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.viz.avnconfig.AvnConfigConstants.triggerType;
/**
* Trigger editor dialog. There are no longer any references to this class in
* any of the java and python code or in the xml configuration files. Consider
* removing this class from the base line.
*
* <pre>
* SOFTWARE HISTORY
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 22 MAY 2008 1119 lvenable Initial creation.
* 6/16/2008 937 grichard Updated dialog title.
* 9 JUL 2010 5078 rferrel Updated to handle File not Found.
*
* </pre>
*
* @author lvenable
* @version 1.0
*
*/
@Deprecated
public class TriggerEditorDlg extends Dialog {
/**
* Dialog shell.
*/
private Shell shell;
/**
* The display control.
*/
private Display display;
/**
* Composite containing message status controls.
*/
private MessageStatusComp msgStatusComp;
/**
* TAF scrolled composite.
*/
private ScrolledComposite tafScrolledComp;
/**
* METAR scrolled composite.
*/
private ScrolledComposite metarScrolledComp;
/**
* CCFP scrolled composite.
*/
private ScrolledComposite ccfpScrolledComp;
/**
* TAF label and text composite.
*/
private LabelTextComp tafLabelTextComp;
/**
* METAR label and text composite.
*/
private LabelTextComp metarLabelTextComp;
/**
* CCFP label and text composite.
*/
private LabelTextComp ccfpLabelTextComp;
/**
* Map of TAF sites.
*/
private Map<String, String> tafDataMap;
/**
* Map of METAR sites.
*/
private Map<String, String> metarDataMap;
/**
* Map of CCFP data.
*/
private Map<String, String> ccfpDataMap;
/**
* Scrolled composite width.
*/
private final int SCROLLED_COMP_WIDTH = 190;
/**
* Scrolled composite height.
*/
private final int SCROLLED_COMP_HEIGHT = 400;
/**
* Background color of a control that has invalid data.
*/
private Color incorrectColor;
/**
* Text control font.
*/
private Font textFont;
/**
* Constructor.
*
* @param parent
* Parent shell.
*/
public TriggerEditorDlg(Shell parent) {
super(parent, 0);
}
/**
* Open method used to display the dialog.
*
* @return Null.
*/
public Object open() {
Shell parent = getParent();
display = parent.getDisplay();
shell = new Shell(parent, SWT.DIALOG_TRIM);
shell.setText("AvnFPS Trigger Editor");
// Create the main layout for the shell.
GridLayout mainLayout = new GridLayout(1, false);
mainLayout.marginHeight = 3;
mainLayout.marginWidth = 3;
mainLayout.verticalSpacing = 5;
shell.setLayout(mainLayout);
// Initialize all of the controls and layouts
initializeComponents();
shell.pack();
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
incorrectColor.dispose();
textFont.dispose();
return null;
}
/**
* Initialize the components on the display.
*/
private void initializeComponents() {
incorrectColor = new Color(display, new RGB(255, 215, 220));
textFont = new Font(display, "Monospace", 10, SWT.NORMAL);
tafDataMap = new LinkedHashMap<String, String>();
metarDataMap = new LinkedHashMap<String, String>();
ccfpDataMap = new LinkedHashMap<String, String>();
populateDataMaps();
createTopControls();
createScrolledCompositeLists();
createBottomMessageControls();
}
/**
* Create the buttons at the top of the display.
*/
private void createTopControls() {
// ------------------------------------------
// Create the composite for the controls.
// ------------------------------------------
Composite controlComp = new Composite(shell, SWT.NONE);
GridLayout gl = new GridLayout(1, false);
controlComp.setLayout(gl);
GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
controlComp.setLayoutData(gd);
// -------------------------------------------
// Create a button composite for the buttons
// -------------------------------------------
Composite buttonComp = new Composite(controlComp, SWT.NONE);
gl = new GridLayout(4, true);
buttonComp.setLayout(gl);
gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
buttonComp.setLayoutData(gd);
int buttonWidth = 100;
gd = new GridData(SWT.CENTER, SWT.DEFAULT, true, false);
gd.widthHint = buttonWidth;
Button updateBtn = new Button(buttonComp, SWT.PUSH);
updateBtn.setText("Update");
updateBtn
.setToolTipText("Updates missing values using the afos2awips file");
updateBtn.setLayoutData(gd);
updateBtn.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
update();
}
});
gd = new GridData(SWT.CENTER, SWT.DEFAULT, true, false);
gd.widthHint = buttonWidth;
Button makeBtn = new Button(buttonComp, SWT.PUSH);
makeBtn.setText("Make");
makeBtn.setToolTipText("Creates trigger file and updates watchwarn table");
makeBtn.setLayoutData(gd);
makeBtn.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
makeTriggers();
}
});
gd = new GridData(SWT.CENTER, SWT.DEFAULT, true, false);
gd.widthHint = buttonWidth;
Button closeBtn = new Button(buttonComp, SWT.PUSH);
closeBtn.setText("Close");
closeBtn.setToolTipText("Closes this dialog");
closeBtn.setLayoutData(gd);
closeBtn.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
shell.dispose();
}
});
gd = new GridData(SWT.CENTER, SWT.DEFAULT, true, false);
gd.widthHint = buttonWidth;
Button helpBtn = new Button(buttonComp, SWT.PUSH);
helpBtn.setText("Help");
helpBtn.setToolTipText("Shows help");
helpBtn.setLayoutData(gd);
helpBtn.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
String description = "AvnFPS - Trigger Editor Help";
String helpText = "This dialog is used to create a trigger file to get various\ntext products from the FXA text decoder that are important\nto the proper functioning of AvnFPS monitoring\ncapabilities.\n\nThe contents of latest trigger file is loaded when this\ndialog is displayed. Use the \"Update\" button to update any\nmissing entries from AWIPS's afos2awips text file.\n\nYou can modify or add missing PILs in any of the text\nfields as needed. Pressing the\"Make\" button will write the\ntriggers to disk and update the watchwarn table in the\nfxatext database.\n\nThe \"Close\" button quits this application.\n\nThe \"Help\" button displays this help dialog.";
HelpUsageDlg usageDlg = new HelpUsageDlg(shell, description,
helpText);
usageDlg.open();
}
});
}
/**
* Create the main composite that will contain the scrolled composites for
* TAF, METAR, and CCFP.
*/
private void createScrolledCompositeLists() {
// ------------------------------------------
// Create the composite for the controls.
// ------------------------------------------
Composite mainListComp = new Composite(shell, SWT.NONE);
GridLayout gl = new GridLayout(3, false);
mainListComp.setLayout(gl);
GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
mainListComp.setLayoutData(gd);
// ------------------------------
// Create the labels
// ------------------------------
gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
Label tafLbl = new Label(mainListComp, SWT.CENTER);
tafLbl.setText("TAF");
tafLbl.setLayoutData(gd);
gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
Label metarLbl = new Label(mainListComp, SWT.CENTER);
metarLbl.setText("METAR");
metarLbl.setLayoutData(gd);
gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);
Label ccfpLbl = new Label(mainListComp, SWT.CENTER);
ccfpLbl.setText("CCFP");
ccfpLbl.setLayoutData(gd);
createTafSrolledComp(mainListComp);
createMetarSrolledComp(mainListComp);
createCcfpSrolledComp(mainListComp);
}
/**
* Create the TAF scrolled composite.
*
* @param mainListComp
* Parent composite.
*/
private void createTafSrolledComp(Composite mainListComp) {
tafScrolledComp = new ScrolledComposite(mainListComp, SWT.V_SCROLL
| SWT.BORDER);
GridLayout gl = new GridLayout(1, false);
gl.verticalSpacing = 1;
tafScrolledComp.setLayout(gl);
GridData gd = new GridData(SCROLLED_COMP_WIDTH, SCROLLED_COMP_HEIGHT);
gd.heightHint = SCROLLED_COMP_HEIGHT;
tafScrolledComp.setLayoutData(gd);
gl = new GridLayout(1, false);
gl.verticalSpacing = 1;
tafLabelTextComp = new LabelTextComp(tafScrolledComp, tafDataMap,
incorrectColor, textFont);
tafLabelTextComp.setLayout(gl);
tafLabelTextComp.layout();
tafScrolledComp.setContent(tafLabelTextComp);
tafScrolledComp.setExpandHorizontal(true);
tafScrolledComp.setExpandVertical(true);
tafScrolledComp.addControlListener(new ControlAdapter() {
@Override
public void controlResized(ControlEvent e) {
Rectangle r = tafScrolledComp.getClientArea();
tafScrolledComp.setMinSize(tafLabelTextComp.computeSize(
r.width, SWT.DEFAULT));
}
});
tafScrolledComp.layout();
}
/**
* Create the METAR scrolled composite.
*
* @param mainListComp
* Parent composite.
*/
private void createMetarSrolledComp(Composite mainListComp) {
metarScrolledComp = new ScrolledComposite(mainListComp, SWT.V_SCROLL
| SWT.BORDER);
GridLayout gl = new GridLayout(1, false);
gl.verticalSpacing = 1;
metarScrolledComp.setLayout(gl);
GridData gd = new GridData(SCROLLED_COMP_WIDTH, SCROLLED_COMP_HEIGHT);
gd.heightHint = SCROLLED_COMP_HEIGHT;
metarScrolledComp.setLayoutData(gd);
gl = new GridLayout(1, false);
gl.verticalSpacing = 1;
metarLabelTextComp = new LabelTextComp(metarScrolledComp, metarDataMap,
incorrectColor, textFont);
metarLabelTextComp.setLayout(gl);
metarLabelTextComp.layout();
metarScrolledComp.setContent(metarLabelTextComp);
metarScrolledComp.setExpandHorizontal(true);
metarScrolledComp.setExpandVertical(true);
metarScrolledComp.addControlListener(new ControlAdapter() {
@Override
public void controlResized(ControlEvent e) {
Rectangle r = metarScrolledComp.getClientArea();
metarScrolledComp.setMinSize(metarLabelTextComp.computeSize(
r.width, SWT.DEFAULT));
}
});
metarScrolledComp.layout();
}
/**
* Create the CCFP scrolled composite.
*
* @param mainListComp
* Parent composite.
*/
private void createCcfpSrolledComp(Composite mainListComp) {
ccfpScrolledComp = new ScrolledComposite(mainListComp, SWT.V_SCROLL
| SWT.BORDER);
GridLayout gl = new GridLayout(1, false);
gl.verticalSpacing = 1;
ccfpScrolledComp.setLayout(gl);
GridData gd = new GridData(SCROLLED_COMP_WIDTH, SCROLLED_COMP_HEIGHT);
gd.heightHint = SCROLLED_COMP_HEIGHT;
ccfpScrolledComp.setLayoutData(gd);
gl = new GridLayout(1, false);
gl.verticalSpacing = 1;
ccfpLabelTextComp = new LabelTextComp(ccfpScrolledComp, ccfpDataMap,
incorrectColor, textFont);
ccfpLabelTextComp.setLayout(gl);
ccfpLabelTextComp.layout();
ccfpScrolledComp.setContent(ccfpLabelTextComp);
ccfpScrolledComp.setExpandHorizontal(true);
ccfpScrolledComp.setExpandVertical(true);
ccfpScrolledComp.addControlListener(new ControlAdapter() {
@Override
public void controlResized(ControlEvent e) {
Rectangle r = ccfpScrolledComp.getClientArea();
ccfpScrolledComp.setMinSize(ccfpLabelTextComp.computeSize(
r.width, SWT.DEFAULT));
}
});
ccfpScrolledComp.layout();
}
/**
* Create the message status composite.
*/
private void createBottomMessageControls() {
msgStatusComp = new MessageStatusComp(shell, null, null);
}
private void populateDataMaps() {
try {
ITafSiteConfig config = TafSiteConfigFactory.getInstance();
Map<String, String> tafMap = config.getTriggers(triggerType.TAF);
Map<String, String> mtrMap = config.getTriggers(triggerType.METAR);
Map<String, String> cfpMap = config.getTriggers(triggerType.CCFP);
List<String> ids = config.getSiteList();
for (String id : ids) {
String tafPil = tafMap.get(id);
String mtrPil = mtrMap.get(id);
if (tafPil == null) {
tafPil = "";
}
if (mtrPil == null) {
mtrPil = "";
}
tafDataMap.put(id, tafPil);
metarDataMap.put(id, mtrPil);
}
Set<String> keys = cfpMap.keySet();
for (String key : keys) {
ccfpDataMap.put(key, cfpMap.get(key));
}
for (int i = 1; i < 4; i++) {
String n = Integer.toBinaryString(i);
if (n.length() == 1) {
n = "0" + n;
}
if (!ccfpDataMap.containsValue("MKCCFP" + n)) {
ccfpDataMap.put("CFP" + n, "MKCCFP" + n);
}
}
} catch (FileNotFoundException e) {
msgStatusComp.setMessageText(e.getMessage(), new RGB(255, 0, 0));
} catch (ConfigurationException e) {
msgStatusComp.setMessageText("An error occured.",
new RGB(255, 0, 0));
}
}
private void makeTriggers() {
try {
ITafSiteConfig config = TafSiteConfigFactory.getInstance();
config.setTriggers(tafDataMap, metarDataMap, ccfpDataMap);
} catch (FileNotFoundException e) {
msgStatusComp.setMessageText(e.getMessage(), new RGB(255, 0, 0));
} catch (ConfigurationException e) {
msgStatusComp.setMessageText("An error occured.",
new RGB(255, 0, 0));
}
}
private void update() {
try {
ITafSiteConfig config = TafSiteConfigFactory.getInstance();
List<String> ids = config.getSiteList();
Map<String, String> tafMap = new HashMap<String, String>();
Map<String, String> mtrMap = new HashMap<String, String>();
String SQL = "SELECT afosid FROM afos_to_awips";
List<Object[]> data;
data = DirectDbQuery.executeQuery(SQL, "metadata",
DirectDbQuery.QueryLanguage.SQL);
for (Object[] obj : data) {
String afos = (String) obj[0];
if (afos.length() < 6) {
continue;
}
String nnn = afos.substring(3, 6);
if (nnn.equals("TAF")) {
tafMap.put(afos.substring(6, afos.length()), afos);
}
String tmp = afos.substring(0, 3) + "MTR" + afos.substring(6);
mtrMap.put(afos.substring(6, afos.length()), tmp);
}
for (String site : ids) {
if (tafDataMap.get(site) == null
|| tafDataMap.get(site).equals("")) {
tafDataMap.put(site, tafMap.get(site.substring(1)));
tafLabelTextComp.updateTextControl(site,
tafMap.get(site.substring(1)));
}
if (metarDataMap.get(site) == null
|| metarDataMap.get(site).equals("")) {
metarDataMap.put(site, mtrMap.get(site.substring(1)));
metarLabelTextComp.updateTextControl(site,
mtrMap.get(site.substring(1)));
}
}
} catch (FileNotFoundException e) {
msgStatusComp.setMessageText(e.getMessage(), new RGB(255, 0, 0));
} catch (ConfigurationException e) {
msgStatusComp.setMessageText("An error occured.",
new RGB(255, 0, 0));
} catch (VizException e) {
msgStatusComp.setMessageText("An error occured.",
new RGB(255, 0, 0));
}
}
}

View file

@ -1,59 +0,0 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.viz.gfe.actions;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import com.raytheon.viz.gfe.dialogs.isc.ISCRequestReplyDlg;
/**
* Action to show the ISC Request/Reply Dialog
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 08/18/09 1995 bphillip Initial release
*
* </pre>
*
* @author bphillip
* @version 1
*/
public class ShowISCRequestAction extends AbstractHandler {
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getShell();
ISCRequestReplyDlg dialog = new ISCRequestReplyDlg(shell);
dialog.open();
return null;
}
}

View file

@ -1,66 +0,0 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.viz.gfe.actions;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import com.raytheon.viz.gfe.core.DataManager;
import com.raytheon.viz.gfe.dialogs.isc.SendISCDialog;
/**
* Action to show the Send Intersite Grids dialog
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 08/18/09 1995 bphillip Initial release
*
* </pre>
*
* @author bphillip
* @version 1
*/
public class ShowSendISCDialog extends AbstractHandler {
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getShell();
DataManager dm = DataManager.getCurrentInstance();
if (dm != null) {
SendISCDialog dialog = new SendISCDialog(shell, dm);
dialog.setBlockOnOpen(true);
dialog.open();
}
return null;
}
}

View file

@ -1,69 +0,0 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.viz.gfe.actions;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import com.raytheon.viz.gfe.dialogs.sbu.ServiceBackupDlg;
/**
* TODO Add Description
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Aug 4, 2011 randerso Initial creation
*
* </pre>
*
* @author randerso
* @version 1.0
*/
public class ShowServiceBackupDlg extends AbstractHandler {
/*
* (non-Javadoc)
*
* @see
* org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.
* ExecutionEvent)
*/
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
.getShell();
ServiceBackupDlg dialog = new ServiceBackupDlg(shell);
dialog.setBlockOnOpen(true);
dialog.open();
return null;
}
}

View file

@ -1,69 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<purgeRuleSet xmlns:ns2="group">
<!-- Default rule for data not covered by any rules -->
<rule>
<id>
<pluginName>bufrmosETA</pluginName>
<key>default</key>
</id>
<versionsToKeep>5</versionsToKeep>
<delta>=00-01:00:00</delta>
<round>00-01:00:00</round>
</rule>
<rule>
<id>
<pluginName>bufrmosGFS</pluginName>
<key>default</key>
</id>
<versionsToKeep>5</versionsToKeep>
<delta>=00-01:00:00</delta>
<round>00-01:00:00</round>
</rule>
<rule>
<id>
<pluginName>bufrmosAVN</pluginName>
<key>default</key>
</id>
<versionsToKeep>8</versionsToKeep>
<delta>=00-01:00:00</delta>
<round>00-01:00:00</round>
</rule>
<rule>
<id>
<pluginName>bufrmosLAMP</pluginName>
<key>default</key>
</id>
<versionsToKeep>5</versionsToKeep>
<delta>=00-01:00:00</delta>
<round>00-01:00:00</round>
</rule>
<rule>
<id>
<pluginName>bufrmosHPC</pluginName>
<key>default</key>
</id>
<versionsToKeep>5</versionsToKeep>
<delta>=00-01:00:00</delta>
<round>00-01:00:00</round>
</rule>
<rule>
<id>
<pluginName>bufrmosMRF</pluginName>
<key>default</key>
</id>
<versionsToKeep>4</versionsToKeep>
<delta>=00-01:00:00</delta>
<round>00-01:00:00</round>
</rule>
<rule>
<id>
<pluginName>bufrmosNGM</pluginName>
<key>default</key>
</id>
<versionsToKeep>5</versionsToKeep>
<delta>=00-01:00:00</delta>
<round>00-01:00:00</round>
</rule>
</purgeRuleSet>

View file

@ -110,7 +110,7 @@
</levels>
</gribParameterInfo>
<gribParameterInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="parameterInfo">
<short_name>tp_ecmwf</short_name>
<short_name>tp6hr</short_name>
<long_name>total precipitation</long_name>
<units>mm</units>
<udunits>millimeter</udunits>

View file

@ -1,209 +0,0 @@
/**
* This software was developed and / or modified by Raytheon Company,
* pursuant to Contract DG133W-05-CQ-1067 with the US Government.
*
* U.S. EXPORT CONTROLLED TECHNICAL DATA
* This software product contains export-restricted data whose
* export/transfer/disclosure is restricted by U.S. law. Dissemination
* to non-U.S. persons whether in the United States or abroad requires
* an export license or other authorization.
*
* Contractor Name: Raytheon Company
* Contractor Address: 6825 Pine Street, Suite 340
* Mail Stop B8
* Omaha, NE 68106
* 402.291.0100
*
* See the AWIPS II Master Rights File ("Master Rights File.pdf") for
* further licensing information.
**/
package com.raytheon.uf.edex.database.purge;
import java.io.Serializable;
import javax.persistence.Embeddable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.apache.commons.lang.builder.HashCodeBuilder;
import com.raytheon.uf.common.serialization.ISerializableObject;
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
/**
* This class defines the primary key for data purge rules stored in the
* database. This key consists of a sequence number, the pluginName to which
* this rule applies and the key to which this rule applies.
* <p>
* The sequence number is a number obtained from the hibernate_sequence on the
* database. This number has no significance other than to distinguish two rules
* which may have the the same pluginName and same key values. The pluginName is
* the plugin to which this purge rule applies. The key servers as a filter for
* purging. The key value corresponds to the productKey field in the plugin data
* object.
*
*
* <pre>
*
* SOFTWARE HISTORY
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* 2/15/11 #2469 bphillip Initial creation
*
* </pre>
*
* @author bphillip
* @version 1
*/
@Embeddable
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
public class PurgeRulePK implements ISerializableObject, Serializable,
Cloneable {
/** The serial number */
private static final long serialVersionUID = 3400703274820497880L;
/**
* A sequence number defined by the database for uniquely identifying this
* rule
*/
@XmlElement
@DynamicSerializeElement
private Long id;
/** The plugin associated with this rule */
@XmlElement
@DynamicSerializeElement
private String pluginName;
/** The key used by this rule for purging */
@XmlElement
@DynamicSerializeElement
private String key;
/**
* Creates a new PurgeRulePK object
*/
public PurgeRulePK() {
}
/**
* Creates a new plugin rule with the given plugin name and an empty key.
*
* @param pluginName
* The plugin to which this purge rule applies
*/
public PurgeRulePK(String pluginName) {
this.pluginName = pluginName;
this.key = "";
}
/**
* Creates a new plugin rule with the given plugin name and key
*
* @param pluginName
* The plugin to which this purge rule applies
* @param key
* The key to use when applying this rule
*/
public PurgeRulePK(String pluginName, String key) {
this(pluginName);
this.key = key;
}
/**
* Creates a new plugin rule with the given plugin name key, and id value
*
* @param pluginName
* The plugin to which this purge rule applies
* @param key
* The key to use when applying this rule
* @param id
* An identifying number
*/
public PurgeRulePK(String pluginName, String key, long id) {
this(pluginName, key);
this.id = id;
}
public String toString() {
return "Plugin:" + pluginName + " Key:" + key;
}
public int hashCode() {
HashCodeBuilder builder = new HashCodeBuilder();
builder.append(pluginName);
builder.append(key);
return builder.toHashCode();
}
public boolean equals(Object rval) {
if (!(rval instanceof PurgeRulePK)) {
return false;
}
PurgeRulePK rhs = (PurgeRulePK) rval;
return this.pluginName.equals(rhs.getPluginName())
&& this.key.equals(rhs.getKey());
}
/**
* @return the pluginName
*/
public String getPluginName() {
return pluginName;
}
/**
* @param pluginName
* the pluginName to set
*/
public void setPluginName(String pluginName) {
this.pluginName = pluginName;
}
/**
* @return the key
*/
public String getKey() {
return key;
}
/**
* @param key
* the key to set
*/
public void setKey(String key) {
this.key = key;
}
public Object clone() {
PurgeRulePK rval = new PurgeRulePK(this.pluginName, this.key);
rval.setId(this.id);
return rval;
}
/**
* @return the id
*/
public Long getId() {
return id;
}
/**
* @param id
* the id to set
*/
public void setId(Long id) {
this.id = id;
}
}

Binary file not shown.

View file

@ -1,13 +0,0 @@
edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/type/Pair.java
cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/ShuffleZoneGroupsDialog.java
edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/db/dao/GFEDao.java
edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/GridDatabase.java
edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/IFPGridDatabase.java
edexOsgi/com.raytheon.uf.common.dataplugin.gfe/META-INF/MANIFEST.MF
edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/util/GfeUtil.java
edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/D2DGridDatabase.java
edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/NetCDFGridDatabase.java
edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/NetCDFUtils.java
edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/db/dao/GFEDao.java
cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/makehazard/MakeHazardDialog.java
cave/com.raytheon.uf.viz.d2d.core/src/com/raytheon/uf/viz/d2d/core/time/TimeMatcher.java

11
nativeLib/.project Normal file
View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>nativeLib</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>