Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2012-12-04 17:53:12 +0000
committerLars Vogel2012-12-04 17:53:12 +0000
commitff9e6a1bc16b35ff72fb9b939db55354d44abd18 (patch)
treebb7cf167addd5be5e92aabc458428bfe00cf484a
parentb931bdb4b70d053608dffde5c6e419362a387b48 (diff)
downloadorg.eclipse.e4.tools-ff9e6a1bc16b35ff72fb9b939db55354d44abd18.tar.gz
org.eclipse.e4.tools-ff9e6a1bc16b35ff72fb9b939db55354d44abd18.tar.xz
org.eclipse.e4.tools-ff9e6a1bc16b35ff72fb9b939db55354d44abd18.zip
Bug 394908 and Bug 394902 - Fixes in DIEditorpart and DIViewPartI20121204-2200
-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