Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2012-12-04 17:53:12 +0000
committerLars Vogel2012-12-04 17:53:12 +0000
commite59c82a625b8c84eddb68f37be80c4886b0741ce (patch)
tree35d8e2e66d3fcdb8ebe423d813d5052aa3393836
parentab892ea3aea9a10c6a6a932cf62494d35a276803 (diff)
downloadeclipse.platform.ui.tools-e59c82a625b8c84eddb68f37be80c4886b0741ce.tar.gz
eclipse.platform.ui.tools-e59c82a625b8c84eddb68f37be80c4886b0741ce.tar.xz
eclipse.platform.ui.tools-e59c82a625b8c84eddb68f37be80c4886b0741ce.zip
Bug 394908 and Bug 394902 - Fixes in DIEditorpart and DIViewPart
-rw-r--r--bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIEditorPart.java4
-rw-r--r--bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIViewPart.java20
2 files changed, 12 insertions, 12 deletions
diff --git a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIEditorPart.java b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIEditorPart.java
index 5b970490..cc103e7a 100644
--- a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIEditorPart.java
+++ b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIEditorPart.java
@@ -93,6 +93,10 @@ public abstract class DIEditorPart<C> extends EditorPart implements IDirtyProvid
makeActions();
}
+ protected IEclipseContext getContext() {
+ return context;
+ }
+
public C getComponent() {
return component;
}
diff --git a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIViewPart.java b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIViewPart.java
index 44d24cc8..0a060eef 100644
--- a/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIViewPart.java
+++ b/bundles/org.eclipse.e4.tools.compat/src/org/eclipse/e4/tools/compat/parts/DIViewPart.java
@@ -25,21 +25,21 @@ public abstract class DIViewPart<C> extends ViewPart {
private IEclipseContext context;
private Class<C> clazz;
private C component;
-
+
public DIViewPart(Class<C> clazz) {
this.clazz = clazz;
}
-
+
@Override
public void init(IViewSite site) throws PartInitException {
super.init(site);
context = PartHelper.createPartContext(this);
-
+
context.declareModifiable(IViewPart.class);
-
+
context.set(IViewPart.class, this);
}
-
+
@Override
public void createPartControl(Composite parent) {
component = PartHelper.createComponent(parent, context, clazz, this);
@@ -48,17 +48,13 @@ public abstract class DIViewPart<C> extends ViewPart {
protected IEclipseContext getContext() {
return context;
}
-
+
public C getComponent() {
return component;
}
-
+
@Override
public void setFocus() {
- try {
- ContextInjectionFactory.invoke(component, Focus.class, context);
- } catch (InjectionException e) {
- // TODO: handle exception
- }
+ ContextInjectionFactory.invoke(component, Focus.class, context);
}
} \ No newline at end of file

Back to the top