Package org.eclipse.sapphire.ui

Examples of org.eclipse.sapphire.ui.ISapphirePart.nearest()


    @Override
    protected Object run( final Presentation context )
    {
        final ISapphirePart part = getPart();
        final CalendarEditor editor = part.nearest( CalendarEditor.class );
        final Element modelElement = part.getModelElement();
       
        ContactDetailsJumpHandler.jump( editor, modelElement );
       
        return null;
View Full Code Here


      {
        enabled = true;
      }
      else
      {
        SapphireDiagramEditorPagePart diagramPart = part.nearest(SapphireDiagramEditorPagePart.class);
        List<ISapphirePart> selectedParts = diagramPart.getSelections();
        for (ISapphirePart selectedPart : selectedParts)
        {
          if (selectedPart instanceof DiagramNodePart || selectedPart instanceof ShapePart ||
              (selectedPart instanceof DiagramConnectionPart && ((DiagramConnectionPart)selectedPart).removable()))
View Full Code Here

    try
    {
      IViewPart propertiesView = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView("org.eclipse.ui.views.PropertySheet");
     
      ISapphirePart sapphirePart = getPart();
      SapphireEditor editor = sapphirePart.nearest(SapphireEditor.class);
      editor.setFocus();
      propertiesView.setFocus();
    }
    catch (PartInitException e)
    {
View Full Code Here

                      final ActionHandlerDef def )
    {
        super.init( action, def );
       
        final ISapphirePart part = getPart();
        SapphireDiagramEditorPagePart editorPart = part.nearest(SapphireDiagramEditorPagePart.class);
        editorPart.attach
        (
            new FilteredListener<SelectionChangedEvent>()
            {
                @Override
View Full Code Here

        final ISapphirePart part = getPart();
      ShapeFactoryPart shapeFactory = (ShapeFactoryPart)part.parent();
      Element element = part.getLocalModelElement();
      ElementList<?> list = shapeFactory.getModelElementList();
    list.moveUp(element);
    SapphireDiagramEditorPagePart editorPart = part.nearest(SapphireDiagramEditorPagePart.class);
    editorPart.setSelections(Collections.singletonList(part), true);
    refreshEnablement();
    return null;
  }
}
View Full Code Here

                      final ActionHandlerDef def )
    {
        super.init( action, def );
       
        final ISapphirePart part = getPart();
        SapphireDiagramEditorPagePart editorPart = part.nearest(SapphireDiagramEditorPagePart.class);
        editorPart.attach
        (
            new FilteredListener<SelectionChangedEvent>()
            {
                @Override
View Full Code Here

        final ISapphirePart part = getPart();
      ShapeFactoryPart shapeFactory = (ShapeFactoryPart)part.parent();
      Element element = part.getLocalModelElement();
      ElementList<?> list = shapeFactory.getModelElementList();
    list.moveDown(element);
    SapphireDiagramEditorPagePart editorPart = part.nearest(SapphireDiagramEditorPagePart.class);
    editorPart.setSelections(Collections.singletonList(part), true);
    refreshEnablement();
    return null;
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.