Issue #2312 Java 6 compatibility, fix legend menus.
Former-commit-id: 2853536477d39459de3cbb4eef7670734cfad5f8
This commit is contained in:
parent
ee95e4de7e
commit
fe5f0118da
2 changed files with 14 additions and 6 deletions
|
@ -21,7 +21,6 @@
|
|||
package com.raytheon.uf.viz.image.export.handler;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.Closeable;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
|
@ -191,7 +190,7 @@ public class ExportImageHandler extends AbstractImageCaptureHandler {
|
|||
}
|
||||
ImageWriter writer = iter.next();
|
||||
|
||||
Closeable stream = null;
|
||||
FileImageOutputStream stream = null;
|
||||
try {
|
||||
if (images.size() == 1) {
|
||||
stream = new FileImageOutputStream(options.getFileLocation());
|
||||
|
|
|
@ -37,6 +37,8 @@ import org.eclipse.core.runtime.Platform;
|
|||
import org.eclipse.core.runtime.Status;
|
||||
import org.eclipse.jface.action.IMenuManager;
|
||||
import org.eclipse.jface.action.Separator;
|
||||
import org.osgi.framework.Bundle;
|
||||
import org.osgi.framework.wiring.BundleWiring;
|
||||
|
||||
import com.raytheon.uf.viz.core.IDisplayPaneContainer;
|
||||
import com.raytheon.uf.viz.core.drawables.ResourcePair;
|
||||
|
@ -51,9 +53,11 @@ import com.raytheon.viz.ui.UiPlugin;
|
|||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Nov 10, 2006 chammack Initial Creation.
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------- -------- ----------- --------------------------
|
||||
* Nov 10, 2006 chammack Initial Creation.
|
||||
* Jan 20, 2014 2312 bsteffen Use OSGi to load classes instead of
|
||||
* register buddy.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -96,7 +100,12 @@ public class ContextMenuManager {
|
|||
o = config[j].createExecutableExtension("actionClass");
|
||||
Class<?> c = null;
|
||||
if (capInterface != null) {
|
||||
c = Class.forName(capInterface);
|
||||
String bundleName = extensions[i].getContributor()
|
||||
.getName();
|
||||
Bundle bundle = Platform.getBundle(bundleName);
|
||||
BundleWiring wiring = bundle
|
||||
.adapt(BundleWiring.class);
|
||||
c = wiring.getClassLoader().loadClass(capInterface);
|
||||
} else {
|
||||
// if there's no interface but there is an action,
|
||||
// the action applies to all resources
|
||||
|
|
Loading…
Add table
Reference in a new issue