Commit b17fcaf0 authored by Jay Jay Billings's avatar Jay Jay Billings

Address #348.

This bug removes all the old viz service factory code from the MOOSE and
Reflectivity UI bundles. I have not noticed any problems because of this
yet, but since EAVP is busted because of the DS changes there may be
"unknown unknowns." Or "known unknowns." I'm not sure which but I just
Rumsfelded this commit message, whoo!
Signed-off-by: default avatarJay Jay Billings <billingsjj@ornl.gov>
parent 47c9b673
......@@ -38,24 +38,6 @@ public class MOOSEEclipseFormWidget extends EclipseFormWidget {
private static final Logger logger = LoggerFactory
.getLogger(MOOSEEclipseFormWidget.class);
/**
* The visualization service factory provided to MOOSEFormEditors through
* OSGi.
*/
private final IVizServiceFactory vizServiceFactory;
/**
* The default constructor.
*
* @param factory
* The visualization service factory provided to MOOSEFormEditors
* through OSGi.
*/
public MOOSEEclipseFormWidget(IVizServiceFactory factory) {
// Nothing to do yet.
this.vizServiceFactory = factory;
}
/**
* This operation displays the {@link MOOSEFormEditor} instead of the
* standard ICEFormEditor.
......@@ -81,8 +63,8 @@ public class MOOSEEclipseFormWidget extends EclipseFormWidget {
// FIXME Since this is a static method, it should probably be set
// from a more general OSGi-referencing service in the main widgets
// bundle.
org.eclipse.ice.client.widgets.ICEFormEditor
.setVizServiceFactory(vizServiceFactory);
// org.eclipse.ice.client.widgets.ICEFormEditor
// .setVizServiceFactory(vizServiceFactory);
} catch (PartInitException e) {
// Dump the stacktrace if something happens.
......
......@@ -66,40 +66,7 @@ public class MOOSEFormWidgetBuilder implements IFormWidgetBuilder {
*/
@Override
public IFormWidget build() {
return new MOOSEEclipseFormWidget(vizServiceFactory);
return new MOOSEEclipseFormWidget();
}
/**
* This method is called by the OSGi implementation to bind the
* {@link IVizServiceFactory} (an OSGi service) to this instance.
*
* @param factory
* The factory service available through OSGi.
*/
public void setVizServiceFactory(IVizServiceFactory factory) {
this.vizServiceFactory = factory;
IConfigurationElement[] elements = Platform.getExtensionRegistry()
.getConfigurationElementsFor("org.eclipse.eavp.viz.service.IVizServiceFactory");
logger.info("MOOSEFormWidgetBuilder: Available configuration elements");
for(IConfigurationElement element : elements){
logger.info(element.getName());
}
return;
}
/**
* This method is called by the OSGi implementation to unbind the
* {@link IVizServiceFactory} (an OSGi service) from this instance.
*
* @param factory
* The factory service that is no longer available through OSGi.
*/
public void unsetVizServiceFactory(IVizServiceFactory factory) {
if (factory == this.vizServiceFactory) {
this.vizServiceFactory = null;
}
}
}
......@@ -237,7 +237,7 @@ public class ICEFormEditor extends SharedHeaderFormEditor
* The service factory that should be used for generating
* visualizations.
*/
public static void setVizServiceFactory(IVizServiceFactory factory) {
public void setVizServiceFactory(IVizServiceFactory factory) {
vizFactory = factory;
Logger staticLogger = LoggerFactory.getLogger(ICEFormEditor.class);
staticLogger.info("ICEFormEditor Message: IVizServiceFactory set!");
......
......@@ -30,24 +30,6 @@ import org.eclipse.ui.PlatformUI;
*/
public class ReflectivityEclipseFormWidget extends EclipseFormWidget {
/**
* The visualization service factory provided to ReflecitvityFormEditors
* through OSGi.
*/
private final IVizServiceFactory vizServiceFactory;
/**
* The default constructor.
*
* @param factory
* The visualization service factory provided to
* ReflectivityFormEditors through OSGi.
*/
public ReflectivityEclipseFormWidget(IVizServiceFactory factory) {
// Nothing to do yet.
this.vizServiceFactory = factory;
}
/**
* This operation displays the {@link ReflectivityFormEditor} instead of the
* standard ICEFormEditor.
......@@ -70,12 +52,6 @@ public class ReflectivityEclipseFormWidget extends EclipseFormWidget {
// later.
ICEFormEditor = (ICEFormEditor) formEditor;
// FIXME Since this is a static method, it should probably be set
// from a more general OSGi-referencing service in the main widgets
// bundle.
org.eclipse.ice.client.widgets.ICEFormEditor
.setVizServiceFactory(vizServiceFactory);
} catch (PartInitException e) {
// Dump the stacktrace if something happens.
e.printStackTrace();
......
......@@ -44,12 +44,6 @@ public class ReflectivityFormWidgetBuilder implements IFormWidgetBuilder {
*/
public static final String name = "Reflectivity Model";
/**
* This class consumes (references) the {@link IVizServiceFactory} OSGi
* service. The factory should be passed down to the ReflectivityFormEditor.
*/
private IVizServiceFactory vizServiceFactory;
/*
* (non-Javadoc)
*
......@@ -68,41 +62,7 @@ public class ReflectivityFormWidgetBuilder implements IFormWidgetBuilder {
*/
@Override
public IFormWidget build() {
return new ReflectivityEclipseFormWidget(vizServiceFactory);
}
/**
* This method is called by the OSGi implementation to bind the
* {@link IVizServiceFactory} (an OSGi service) to this instance.
*
* @param factory
* The factory service available through OSGi.
*/
public void setVizServiceFactory(IVizServiceFactory factory) {
logger.info("ReflectivityFormWidgetBuilder: Setting Viz Service");
this.vizServiceFactory = factory;
IConfigurationElement[] elements = Platform.getExtensionRegistry()
.getConfigurationElementsFor("org.eclipse.eavp.viz.service.IVizServiceFactory");
logger.info("ReflectivityFormWidgetBuilder: Available configuration elements");
for(IConfigurationElement element : elements){
logger.info(element.getName());
}
return;
}
/**
* This method is called by the OSGi implementation to unbind the
* {@link IVizServiceFactory} (an OSGi service) from this instance.
*
* @param factory
* The factory service that is no longer available through OSGi.
*/
public void unsetVizServiceFactory(IVizServiceFactory factory) {
if (factory == this.vizServiceFactory) {
this.vizServiceFactory = null;
}
return new ReflectivityEclipseFormWidget();
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment