Merge "Issue #237 revert Silver Spring changes to nsharp activator which break windows. Fix grib decoder to handle grib files with lo1 on the dateline. Change-Id: I4991e7f02c8cdcfd608c3c6d987f4d0ea8593f40" into 4-Thin_Client
Former-commit-id:e746b4043a
[formerly00cf561d88
] [formerly42e12cc025
[formerly b28fce87e699357d5ec463fbda5a48590d590560]] Former-commit-id:42e12cc025
Former-commit-id:b1264d105b
This commit is contained in:
commit
7bc07e29ca
2 changed files with 70 additions and 63 deletions
|
@ -1308,7 +1308,7 @@ public class Grib1Decoder extends AbstractDecoder {
|
|||
lon = lon % 360;
|
||||
}
|
||||
|
||||
if (lon > 180) {
|
||||
if (lon >= 180) {
|
||||
lon = (180 - lon % 180) * -1;
|
||||
} else if (lon < -180) {
|
||||
lon = (180 - (-lon % 180));
|
||||
|
|
|
@ -29,8 +29,6 @@ import org.eclipse.ui.plugin.AbstractUIPlugin;
|
|||
import org.osgi.framework.Bundle;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
|
||||
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
|
||||
|
@ -38,83 +36,92 @@ import com.raytheon.uf.common.status.UFStatus;
|
|||
* The activator class controls the plug-in life cycle
|
||||
*/
|
||||
public class Activator extends AbstractUIPlugin {
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(Activator.class);
|
||||
|
||||
private static final transient IUFStatusHandler statusHandler = UFStatus.getHandler(Activator.class);
|
||||
// The plug-in ID
|
||||
public static final String PLUGIN_ID = "gov.noaa.nws.ncep.ui.nsharp";
|
||||
|
||||
// The plug-in ID
|
||||
public static final String PLUGIN_ID = "gov.noaa.nws.ncep.ui.nsharp";
|
||||
private static final String BIGNSHARP = "bignsharp";
|
||||
|
||||
// The shared instance
|
||||
private static Activator plugin;
|
||||
// The shared instance
|
||||
private static Activator plugin;
|
||||
|
||||
/**
|
||||
* The constructor
|
||||
*/
|
||||
public Activator() {
|
||||
}
|
||||
/**
|
||||
* The constructor
|
||||
*/
|
||||
public Activator() {
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void start(BundleContext context) throws Exception {
|
||||
super.start(context);
|
||||
plugin = this;
|
||||
try {
|
||||
Bundle b = this.getBundle();
|
||||
URL url = FileLocator.find(b, new Path("libbignsharp.so"), null);
|
||||
url = FileLocator.resolve(url);
|
||||
System.load(url.getPath());
|
||||
}catch (Throwable e) {
|
||||
statusHandler.handle(UFStatus.Priority.WARN, "An Error occured loading nsharp libraries, nsharp will not work.", e);
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
|
||||
* )
|
||||
*/
|
||||
public void start(BundleContext context) throws Exception {
|
||||
super.start(context);
|
||||
plugin = this;
|
||||
try {
|
||||
Bundle b = this.getBundle();
|
||||
URL url = FileLocator.find(b,
|
||||
new Path(System.mapLibraryName(BIGNSHARP)), null);
|
||||
url = FileLocator.resolve(url);
|
||||
System.load(url.getPath());
|
||||
} catch (Throwable e) {
|
||||
statusHandler
|
||||
.handle(UFStatus.Priority.WARN,
|
||||
"An Error occured loading nsharp libraries, nsharp will not work.",
|
||||
e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see
|
||||
* org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
|
||||
* )
|
||||
*/
|
||||
public void stop(BundleContext context) throws Exception {
|
||||
plugin = null;
|
||||
super.stop(context);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void stop(BundleContext context) throws Exception {
|
||||
plugin = null;
|
||||
super.stop(context);
|
||||
}
|
||||
/**
|
||||
* Returns the shared instance
|
||||
*
|
||||
* @return the shared instance
|
||||
*/
|
||||
public static Activator getDefault() {
|
||||
return plugin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the shared instance
|
||||
*
|
||||
* @return the shared instance
|
||||
*/
|
||||
public static Activator getDefault() {
|
||||
return plugin;
|
||||
}
|
||||
// for plugin to retrieve runtime properties from build.properties
|
||||
protected final static String MY_PROPERTIES = "build.properties";
|
||||
|
||||
protected PropertyResourceBundle myProperties;
|
||||
|
||||
//for plugin to retrieve runtime properties from build.properties
|
||||
protected final static String MY_PROPERTIES = "build.properties";
|
||||
public PropertyResourceBundle getMyProperties() {
|
||||
|
||||
protected PropertyResourceBundle myProperties;
|
||||
if (myProperties == null) {
|
||||
|
||||
try {
|
||||
|
||||
public PropertyResourceBundle getMyProperties(){
|
||||
myProperties = new PropertyResourceBundle(
|
||||
|
||||
if (myProperties == null){
|
||||
FileLocator.openStream(this.getBundle(),
|
||||
|
||||
try {
|
||||
new Path(MY_PROPERTIES), false));
|
||||
|
||||
myProperties = new PropertyResourceBundle(
|
||||
} catch (IOException e) {
|
||||
|
||||
FileLocator.openStream(this.getBundle(),
|
||||
System.out.println("Error open NSHARP build.properties file");
|
||||
|
||||
new Path(MY_PROPERTIES),false));
|
||||
|
||||
} catch (IOException e) {
|
||||
|
||||
System.out.println("Error open NSHARP build.properites file");
|
||||
|
||||
}
|
||||
}
|
||||
return myProperties;
|
||||
}
|
||||
}
|
||||
}
|
||||
return myProperties;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue