コード例 #1
0
 public void setInput(IWorkbenchPart part, ISelection selection) {
   super.setInput(part, selection);
   if (!(selection instanceof IStructuredSelection)) return;
   Object input = ((IStructuredSelection) selection).getFirstElement();
   if (input instanceof NotationElementGraphicalEditPart) {
     AbstractNotationElement notationElement =
         ((NotationElementGraphicalEditPart) input).getNotationElement();
     input = notationElement.getSemanticElement();
   } else if (input instanceof OutlineEditPart) {
     input = ((OutlineEditPart) input).getModel();
   }
   if (input instanceof NamedElement) {
     setNamedElement((NamedElement) input);
   }
 }
コード例 #2
0
 public void createControls(Composite parent, TabbedPropertySheetPage aTabbedPropertySheetPage) {
   super.createControls(parent, aTabbedPropertySheetPage);
   Composite clientArea = getWidgetFactory().createFlatFormComposite(parent);
   namedElementConfigurationComposite =
       NamedElementConfigurationComposite.create(getWidgetFactory(), clientArea);
 }