Examples of nearest()


Examples of org.eclipse.sapphire.samples.sqlschema.Column.nearest()

    @Override
    protected String compute()
    {
        final Column column = context( Column.class );
        final Table table = column.nearest( Table.class );
       
        for( final ForeignKey fk : table.getForeignKeys() )
        {
            for( final ForeignKey.ColumnAssociation fkcol : fk.getColumnAssociations() )
            {
View Full Code Here

Examples of org.eclipse.sapphire.samples.sqlschema.Column.nearest()

    @Override
    protected String compute()
    {
        final Column column = context( Column.class );
        final Table table = column.nearest( Table.class );
       
        final PrimaryKey pk = table.getPrimaryKey().content();
       
        if( pk != null)
        {
View Full Code Here

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

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

      {
        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

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

    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

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

                      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

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

        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

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

                      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

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

        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

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

    public FunctionResult evaluate( final FunctionContext context )
    {
        if( context instanceof PartFunctionContext )
        {
            final SapphirePart part = ( (PartFunctionContext) context ).part();
            final MasterDetailsEditorPagePart page = part.nearest( MasterDetailsEditorPagePart.class );
           
            if( page != null )
            {
                final Element element = part.getLocalModelElement();
               
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.