Permalink
Browse files

renamed IPresentationEngine2 to PresentationEngine

renamed IRendererFactory to RendererFactory
  • Loading branch information...
1 parent b81c6e6 commit 0a984e576838ead37693ecd2f34d7b4a3f35cb44 @toedter committed Jun 8, 2012
@@ -44,7 +44,7 @@
import org.osgi.service.event.EventHandler;
import com.toedter.e4.ui.workbench.generic.GenericRenderer;
-import com.toedter.e4.ui.workbench.generic.IPresentationEngine2;
+import com.toedter.e4.ui.workbench.generic.PresentationEngine;
@SuppressWarnings("restriction")
public class GenericMinMaxAddon {
@@ -227,7 +227,7 @@ public void resetWindows(MUIElement element) {
}
ignoreTagChanges = false;
- IPresentationEngine2 presentationEngine = (IPresentationEngine2) context.get(IPresentationEngine.class);
+ PresentationEngine presentationEngine = (PresentationEngine) context.get(IPresentationEngine.class);
if (window instanceof MTrimmedWindow) {
MTrimmedWindow trimmedWindow = (MTrimmedWindow) window;
List<MTrimBar> trimBars = trimmedWindow.getTrimBars();
@@ -368,7 +368,7 @@ private void createTrim(MUIElement element) {
bar.setVisible(true);
// get the parent trim bar, see bug 320756
- IPresentationEngine2 presentationEngine = (IPresentationEngine2) context.get(IPresentationEngine.class);
+ PresentationEngine presentationEngine = (PresentationEngine) context.get(IPresentationEngine.class);
@SuppressWarnings("unchecked")
MElementContainer<MUIElement> partStack = (MElementContainer<MUIElement>) element;
@@ -406,7 +406,7 @@ private void createTrim(MUIElement element) {
// ask it to be rendered
parent.setToBeRendered(true);
// create the widget
- IPresentationEngine2 presentationEngine = (IPresentationEngine2) context.get(IPresentationEngine.class);
+ PresentationEngine presentationEngine = (PresentationEngine) context.get(IPresentationEngine.class);
presentationEngine.createGui(parent);
}
trimStack.setToBeRendered(true);
@@ -18,7 +18,7 @@
import org.eclipse.e4.ui.workbench.modeling.EModelService;
import com.toedter.e4.ui.workbench.addons.generic.MinMaxProcessor;
-import com.toedter.e4.ui.workbench.generic.IPresentationEngine2;
+import com.toedter.e4.ui.workbench.generic.PresentationEngine;
@SuppressWarnings("restriction")
public class RestoreHandler {
@@ -39,7 +39,7 @@ public void restore(MItem item, EModelService modelService, MWindow window, MApp
}
}
- IPresentationEngine2 presentationEngine = (IPresentationEngine2) application.getContext().get(
+ PresentationEngine presentationEngine = (PresentationEngine) application.getContext().get(
IPresentationEngine.class);
MToolBar barToBeRemoved = null;
MTrimBar currentTrimBar = null;
@@ -37,12 +37,12 @@
import org.osgi.service.event.EventHandler;
@SuppressWarnings("restriction")
-public class GenericPresentationEngine implements IPresentationEngine2 {
+public class GenericPresentationEngine implements PresentationEngine {
@Inject
protected Logger logger;
- protected IRendererFactory rendererFactory;
+ protected RendererFactory rendererFactory;
@Inject
EModelService modelService;
@@ -246,7 +246,7 @@ public void postConstruct(IEclipseContext context) {
// TODO use parameter or registry
IContributionFactory contribFactory = context.get(IContributionFactory.class);
try {
- rendererFactory = (IRendererFactory) contribFactory.create(
+ rendererFactory = (RendererFactory) contribFactory.create(
"bundleclass://com.toedter.e4.ui.workbench.generic/"
+ "com.toedter.e4.ui.workbench.generic.GenericRendererFactory", context);
} catch (Exception e) {
@@ -15,7 +15,7 @@
import org.eclipse.e4.ui.model.application.ui.MUIElement;
@SuppressWarnings("restriction")
-public class GenericRendererFactory implements IRendererFactory {
+public class GenericRendererFactory implements RendererFactory {
public static final String ABSTRACT_RENDERER_FACTORY_URI = "bundleclass://com.toedter.e4.ui.workbench.generic/"
+ "com.toedter.e4.ui.workbench.generic.GenericRendererFactory";
@@ -17,7 +17,7 @@
import org.eclipse.e4.ui.workbench.IPresentationEngine;
@SuppressWarnings("restriction")
-public interface IPresentationEngine2 extends IPresentationEngine {
+public interface PresentationEngine extends IPresentationEngine {
public Object createGui(MUIElement element, MElementContainer<MUIElement> parent);
public void refreshGui(MElementContainer<?> element);
@@ -15,6 +15,6 @@
import org.eclipse.e4.ui.model.application.ui.MUIElement;
@SuppressWarnings("restriction")
-public interface IRendererFactory {
+public interface RendererFactory {
public GenericRenderer getRenderer(MUIElement uiElement);
}
@@ -31,7 +31,7 @@
import at.bestsolution.efxclipse.runtime.services.theme.ThemeManager;
import com.toedter.e4.ui.workbench.generic.GenericPresentationEngine;
-import com.toedter.e4.ui.workbench.generic.IRendererFactory;
+import com.toedter.e4.ui.workbench.generic.RendererFactory;
@SuppressWarnings("restriction")
public class JavaFXPresentationEngine extends GenericPresentationEngine {
@@ -94,7 +94,7 @@ public void postConstruct(IEclipseContext context) {
// TODO use parameter or registry
IContributionFactory contribFactory = context.get(IContributionFactory.class);
try {
- rendererFactory = (IRendererFactory) contribFactory.create(
+ rendererFactory = (RendererFactory) contribFactory.create(
"bundleclass://com.toedter.e4.ui.workbench.renderers.javafx/"
+ "com.toedter.e4.ui.workbench.renderers.javafx.JavaFXRendererFactory", context);
} catch (Exception e) {
@@ -38,7 +38,7 @@
import at.bestsolution.efxclipse.runtime.services.theme.ThemeManager;
import com.toedter.e4.ui.workbench.generic.GenericRenderer;
-import com.toedter.e4.ui.workbench.generic.IPresentationEngine2;
+import com.toedter.e4.ui.workbench.generic.PresentationEngine;
@SuppressWarnings("restriction")
public class WorkbenchWindowRenderer extends GenericRenderer {
@@ -111,7 +111,7 @@ public void processContents(MElementContainer<MUIElement> element) {
Stage stage = (Stage) element.getWidget();
BorderPane root = (BorderPane) stage.getScene().getRoot();
VBox topBox = (VBox) root.getTop();
- IPresentationEngine2 renderer = (IPresentationEngine2) context.get(IPresentationEngine.class.getName());
+ PresentationEngine renderer = (PresentationEngine) context.get(IPresentationEngine.class.getName());
for (MUIElement child : element.getChildren()) {
root.setCenter((Node) child.getWidget());
@@ -32,7 +32,7 @@
import org.eclipse.e4.ui.workbench.IPresentationEngine;
import com.toedter.e4.ui.workbench.generic.GenericRenderer;
-import com.toedter.e4.ui.workbench.generic.IPresentationEngine2;
+import com.toedter.e4.ui.workbench.generic.PresentationEngine;
@SuppressWarnings("restriction")
public class WorkbenchWindowRenderer extends GenericRenderer {
@@ -94,7 +94,7 @@ public void processContents(MElementContainer<MUIElement> element) {
}
}
- IPresentationEngine2 engine = (IPresentationEngine2) context.get(IPresentationEngine.class.getName());
+ PresentationEngine engine = (PresentationEngine) context.get(IPresentationEngine.class.getName());
MWindow window = (MWindow) ((MUIElement) element);
if (window.getMainMenu() != null) {
@@ -137,7 +137,7 @@ public void doLayout(MElementContainer<?> element) {
if ((MUIElement) element instanceof MWindow) {
JFrame jFrame = (JFrame) element.getWidget();
- IPresentationEngine2 engine = (IPresentationEngine2) context.get(IPresentationEngine.class.getName());
+ PresentationEngine engine = (PresentationEngine) context.get(IPresentationEngine.class.getName());
MWindow window = (MWindow) ((MUIElement) element);
Container root = (Container) jFrame.getContentPane();
@@ -32,7 +32,7 @@
import org.osgi.service.event.EventHandler;
import com.toedter.e4.ui.workbench.generic.GenericRenderer;
-import com.toedter.e4.ui.workbench.generic.IPresentationEngine2;
+import com.toedter.e4.ui.workbench.generic.PresentationEngine;
import com.toedter.e4.ui.workbench.swt.SWTPresentationEngine;
import com.toedter.e4.ui.workbench.swt.layouts.SimpleTrimLayout;
@@ -135,7 +135,7 @@ public void processContents(MElementContainer<MUIElement> element) {
Shell shell = (Shell) element.getWidget();
// Populate the main menu
- IPresentationEngine2 renderer = (IPresentationEngine2) context.get(IPresentationEngine.class.getName());
+ PresentationEngine renderer = (PresentationEngine) context.get(IPresentationEngine.class.getName());
if (mWindow.getMainMenu() != null) {
renderer.createGui(mWindow.getMainMenu(), element);
shell.setMenuBar((Menu) mWindow.getMainMenu().getWidget());
@@ -27,7 +27,7 @@
import org.eclipse.equinox.app.IApplication;
import com.toedter.e4.ui.workbench.generic.GenericPresentationEngine;
-import com.toedter.e4.ui.workbench.generic.IRendererFactory;
+import com.toedter.e4.ui.workbench.generic.RendererFactory;
@SuppressWarnings("restriction")
public class SwingPresentationEngine extends GenericPresentationEngine {
@@ -94,7 +94,7 @@ public void postConstruct(IEclipseContext context) {
// TODO use parameter or registry
IContributionFactory contribFactory = context.get(IContributionFactory.class);
try {
- rendererFactory = (IRendererFactory) contribFactory.create(
+ rendererFactory = (RendererFactory) contribFactory.create(
"bundleclass://com.toedter.e4.ui.workbench.renderers.swing/"
+ "com.toedter.e4.ui.workbench.renderers.swing.SwingRendererFactory", context);
} catch (Exception e) {
@@ -29,7 +29,7 @@
import org.eclipse.swt.widgets.Shell;
import com.toedter.e4.ui.workbench.generic.GenericPresentationEngine;
-import com.toedter.e4.ui.workbench.generic.IRendererFactory;
+import com.toedter.e4.ui.workbench.generic.RendererFactory;
@SuppressWarnings("restriction")
public class SWTPresentationEngine extends GenericPresentationEngine {
@@ -102,7 +102,7 @@ public void postConstruct(IEclipseContext context) {
// TODO use parameter or registry
IContributionFactory contribFactory = context.get(IContributionFactory.class);
try {
- rendererFactory = (IRendererFactory) contribFactory.create(
+ rendererFactory = (RendererFactory) contribFactory.create(
"bundleclass://com.toedter.e4.ui.workbench.renderers.swt/"
+ "com.toedter.e4.ui.workbench.renderers.swt.SWTRendererFactory", context);
} catch (Exception e) {

0 comments on commit 0a984e5

Please sign in to comment.