Ignore:
Timestamp:
11/22/11 19:52:54 (13 years ago)
Author:
masberg
Message:

Remove unused method that had problems in its logic and caused compiler warnings. Whitespace tweaks. Remove unnecessary SuppressWarnings? annotation for the class itself.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/org.modelica.mdt.ui/src/org/modelica/mdt/ui/actions/OpenActionUtil.java

    r491 r1116  
    2626import org.eclipse.jface.viewers.LabelProvider;
    2727
    28 @SuppressWarnings("unchecked")
    2928public class OpenActionUtil {
    30    
     29
    3130    private OpenActionUtil() {
    3231        // no instance.
    3332    }
    34        
     33
    3534    /**
    3635     * Opens the editor on the given element and subsequently selects it.
     
    3938        open(element, true);
    4039    }
    41    
     40
    4241    /**
    4342     * Opens the editor on the given element and subsequently selects it.
     
    5352        }
    5453    }
    55    
    56     /**
    57      * Filters out source references from the given code resolve results.
    58      * A utility method that can be called by subclasses.
    59      */
    60     public static List filterResolveResults(IModelicaElement[] codeResolveResults) {
    61         int nResults= codeResolveResults.length;
    62         List refs= new ArrayList(nResults);
    63         for (int i= 0; i < nResults; i++) {
    64             if (codeResolveResults[i] instanceof IModelicaElement)
    65                 refs.add(codeResolveResults[i]);
    66         }
    67         return refs;
    68     }
    69                        
     54
    7055    /**
    7156     * Shows a dialog for resolving an ambiguous java element.
     
    7358     */
    7459    public static IModelicaElement selectModelicaElement(IModelicaElement[] elements, Shell shell, String title, String message) {
    75        
     60
    7661        int nResults= elements.length;
    77        
     62
    7863        if (nResults == 0)
    7964            return null;
    80        
     65
    8166        if (nResults == 1)
    8267            return elements[0];
    83                                
     68
    8469        ElementListSelectionDialog dialog= new ElementListSelectionDialog(shell, new LabelProvider());
    8570        dialog.setTitle(title);
    8671        dialog.setMessage(message);
    8772        dialog.setElements(elements);
    88        
     73
    8974        if (dialog.open() == Window.OK) {
    9075            Object[] selection= dialog.getResult();
Note: See TracChangeset for help on using the changeset viewer.