org.eclipse.ui.views.properties.IPropertySheetEntry Java Examples

The following examples show how to use org.eclipse.ui.views.properties.IPropertySheetEntry. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ExtendedPropertiesSheetSorter.java    From neoscada with Eclipse Public License 1.0 6 votes vote down vote up
@Override
public int compare ( final IPropertySheetEntry entryA, final IPropertySheetEntry entryB )
{
    final int sortKeyA = getSortKey ( entryA );
    final int sortKeyB = getSortKey ( entryB );

    final int result = Integer.compare ( sortKeyA, sortKeyB );
    if ( result == 0 )
    {
        return super.compare ( entryA, entryB );
    }
    else
    {
        return result;
    }
}
 
Example #2
Source File: ExtendedPropertiesSheetSorter.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
private int getSortKey ( final IPropertySheetEntry entry )
{
    if ( entry instanceof ISortedPropertyDescriptor )
    {
        return ( (ISortedPropertyDescriptor)entry ).getSortKey ();
    }
    else
    {
        return 0;
    }
}
 
Example #3
Source File: UnsortedPropertySheetPage.java    From tracecompass with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public void createControl(Composite parent) {
    super.createControl(parent);
    // Override for unsorted property sheet page
    // See bug 1883 comment 43 and bug 109617
    setSorter(new PropertySheetSorter() {
        @Override
        public void sort(IPropertySheetEntry[] entries) {
            // Empty sorter, do nothing
        }
    });
}