Hi:
> I’m trying to write an Eclipse 4 application using EPICS and CSS.
> From inspection of the code, CSS’s views use the Eclipse 3.x compatibility layer; they inherit from ViewPart and call creatPartControl() to build the view.
> Elements of the Eclipse 4 application model on the other hand use > annotations (i.e. @PostConstruct) to do the same.
> If I try and use a CSS ViewPart in my Eclipse 4 application, I typically get nullPointerExceptions where the CSS class tries to access the Eclipse 3.x API (e.g. getSite()).
> Does anyone have any advice on how I can get around this issue to use CSS views in my Eclipse 4 application?
You can have POD-type contributions with @PostConstruct etc.
Just search for @PostConstruct in the CSS sources and you'll find the Clock plugin as an example.
(https://github.com/ControlSystemStudio/cs-studio/blob/master/applications/apputil/apputil-plugins/org.csstudio.utility.clock/src/org/csstudio/utility/clock/ClockView.java )
The associated plugin.xml registers that POD as an "e4view" (https://github.com/ControlSystemStudio/cs-studio/blob/master/applications/apputil/apputil-plugins/org.csstudio.utility.clock/plugin.xml#L10).
For what it's worth, the "compatibility layer" is somewhat misnamed.
RCP is not going away, E4 is not replacing it.
A better way to describe it:
E4 is a low-level model-based description of parts, menues etc. which are then rendered by SWT.
That's great for building a new standalone browser for your DVD collection, or for a clock.
For an application you typically also want online help, preference UI, file navigator, ..
That's what RCP adds on top of E4.
The "compatibility layer" would better be named "rich application layer" or "workspace and workbench layer".
The Eclipse IDE for example will continue to use it.
See also "Tips and tricks for your Eclipse 4 migration." on https://www.eclipsecon.org/na2016/conference/session-slides
-Kay
- References:
- Using CSS ViewParts in Eclipse 4 adrian.potter
- Navigate by Date:
- Prev:
Using CSS ViewParts in Eclipse 4 adrian.potter
- Next:
RE: EPICS Redundancy Penning, Joerg
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
<2017>
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Using CSS ViewParts in Eclipse 4 adrian.potter
- Next:
XYgraph pv_name Amien Crombie
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
<2017>
2018
2019
2020
2021
2022
2023
2024
|