private Gizmo currentGizmo = null;\r
\r
public SelectionAdapter(ScenegraphAdapter adapter) {\r
+ if (adapter == null)\r
+ throw new NullPointerException("Scenegraph adapter must no be null");\r
this.adapter = adapter;\r
}\r
\r
* @param s\r
* @return the filtered selection\r
*/\r
- protected abstract StructuredResourceSelection filterSelection(ISelection s);\r
+ protected StructuredResourceSelection filterSelection(ISelection s) {\r
+ if (!(selection instanceof StructuredResourceSelection))\r
+ return new StructuredResourceSelection();\r
+ return (StructuredResourceSelection) selection;\r
+ }\r
\r
/**\r
* Updates visual part of selection event. Use getCurrentSelection() to get\r