Package com.cb.eclipse.folding.java.user

Examples of com.cb.eclipse.folding.java.user.UserDefinedEntry


    delete.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
    delete.setText(FoldingPlugin.getMessage("userdefined.delete"));
    delete.addListener(SWT.Selection, new Listener() {

      public void handleEvent(Event event) {
        UserDefinedEntry removed = (UserDefinedEntry)((IStructuredSelection)viewer.getSelection()).getFirstElement();
        FoldingPlugin.getJavaDomain().getUserDefinedSettings().deleteType(removed.getName());
      }

    });
   
  }
View Full Code Here


    delete.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
    delete.setText(FoldingPlugin.getMessage("userdefined.delete"));
    delete.addListener(SWT.Selection, new Listener() {

      public void handleEvent(Event event) {
        UserDefinedEntry removed = (UserDefinedEntry)((IStructuredSelection)viewer.getSelection()).getFirstElement();
        FoldingPlugin.getJavaDomain().getUserDefinedSettings().deleteType(removed.getName());
      }

    });
   
  }
View Full Code Here

          return null;
      }
    }
   
    public Image getColumnImage(Object element, int columnIndex) {
      UserDefinedEntry entry = (UserDefinedEntry)element;
      switch(columnIndex) {
        case 0:
          return FoldingPlugin.getImages().getCheckBoxImage(entry.isFold());
        case 1:
          return FoldingPlugin.getImages().getCheckBoxImage(entry.isCollapse());
        default:
          return null;
      }
    }
View Full Code Here

      return !(COLUMNS[2].equals(property));
    }
   
    public Object getValue(Object element, String property) {
     
      UserDefinedEntry entry = (UserDefinedEntry)element;
      if(COLUMNS[0].equals(property)) {
        return Boolean.valueOf(entry.isFold());       
      }
      else if (COLUMNS[1].equals(property)){
        return Boolean.valueOf(entry.isCollapse());
      }
      else {
        return entry.getName();
      }
    }
View Full Code Here

    }
   
    public void modify(Object element, String property, Object value) {
     
      TableItem item = (TableItem)element;
      UserDefinedEntry entry = (UserDefinedEntry)item.getData();
      if(COLUMNS[0].equals(property)) {
        entry.setFold(((Boolean)value).booleanValue());
        item.setChecked(entry.isFold());
      }
      else {
        entry.setCollapse(((Boolean)value).booleanValue());
        item.setChecked(entry.isCollapse());
      }
      FoldingPlugin.getJavaDomain().getUserDefinedSettings().entryChanged(entry);
    }
View Full Code Here

    }
    /* (non-Javadoc)
     * @see org.eclipse.jface.viewers.ViewerSorter#compare(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
     */
    public int compare(Viewer viewer, Object e1, Object e2) {
      UserDefinedEntry a = (UserDefinedEntry)e1;
      UserDefinedEntry b = (UserDefinedEntry)e2;
      switch(criteria) {
        case 0:
          return boolCompare(a.isFold(), b.isFold());
        case 1:
          return boolCompare(a.isCollapse(), b.isCollapse());
        default:
          return a.getName().compareTo(b.getName());
      }
    }
View Full Code Here

          return null;
      }
    }
   
    public Image getColumnImage(Object element, int columnIndex) {
      UserDefinedEntry entry = (UserDefinedEntry)element;
      switch(columnIndex) {
        case 0:
          return FoldingPlugin.getImages().getCheckBoxImage(entry.isFold());
        case 1:
          return FoldingPlugin.getImages().getCheckBoxImage(entry.isCollapse());
        default:
          return null;
      }
    }
View Full Code Here

      return !(COLUMNS[2].equals(property));
    }
   
    public Object getValue(Object element, String property) {
     
      UserDefinedEntry entry = (UserDefinedEntry)element;
      if(COLUMNS[0].equals(property)) {
        return Boolean.valueOf(entry.isFold());       
      }
      else if (COLUMNS[1].equals(property)){
        return Boolean.valueOf(entry.isCollapse());
      }
      else {
        return entry.getName();
      }
    }
View Full Code Here

    }
   
    public void modify(Object element, String property, Object value) {
     
      TableItem item = (TableItem)element;
      UserDefinedEntry entry = (UserDefinedEntry)item.getData();
      if(COLUMNS[0].equals(property)) {
        entry.setFold(((Boolean)value).booleanValue());
        item.setChecked(entry.isFold());
      }
      else {
        entry.setCollapse(((Boolean)value).booleanValue());
        item.setChecked(entry.isCollapse());
      }
      FoldingPlugin.getJavaDomain().getUserDefinedSettings().entryChanged(entry);
    }
View Full Code Here

    }
    /* (non-Javadoc)
     * @see org.eclipse.jface.viewers.ViewerSorter#compare(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
     */
    public int compare(Viewer viewer, Object e1, Object e2) {
      UserDefinedEntry a = (UserDefinedEntry)e1;
      UserDefinedEntry b = (UserDefinedEntry)e2;
      switch(criteria) {
        case 0:
          return boolCompare(a.isFold(), b.isFold());
        case 1:
          return boolCompare(a.isCollapse(), b.isCollapse());
        default:
          return a.getName().compareTo(b.getName());
      }
    }
View Full Code Here

TOP

Related Classes of com.cb.eclipse.folding.java.user.UserDefinedEntry

Copyright © 2018 www.massapicom. 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.