Changeset 1233

Show
Ignore:
Timestamp:
11/06/07 18:28:17 (1 year ago)
Author:
koshi
Message:

improved error message.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • org.jalcedo.generator/trunk/org.jalcedo.generator.icon.ui/src/org/jalcedo/generator/icon/ui/Activator.java

    r1205 r1233  
    1919    public static String ICON_FILENAV_NAV = "FILENAV_NAV"; //$NON-NLS-1$ 
    2020    public static String ICON_SEARCH = "SEARCH"; //$NON-NLS-1$ 
     21    public static String ICON_ERROR_TSK = "ERROR_TSK"; //$NON-NLS-1$ 
    2122     
    2223    /** 
  • org.jalcedo.generator/trunk/org.jalcedo.generator.icon.ui/src/org/jalcedo/generator/icon/ui/internal/property/IconPropertyPage.java

    r1223 r1233  
    1010import org.eclipse.jdt.core.IType; 
    1111import org.eclipse.jdt.core.JavaModelException; 
    12 import org.eclipse.jdt.ui.IJavaElementSearchConstants; 
     12//import org.eclipse.jdt.ui.IJavaElementSearchConstants; 
    1313import org.eclipse.jface.dialogs.MessageDialog; 
    1414import org.eclipse.jface.resource.ImageDescriptor; 
     
    3636import org.eclipse.swt.widgets.Text; 
    3737import org.eclipse.ui.IWorkbenchPropertyPage; 
    38 import org.eclipse.ui.IWorkbenchWindow; 
    39 import org.eclipse.ui.PlatformUI; 
     38//import org.eclipse.ui.IWorkbenchWindow; 
     39//import org.eclipse.ui.PlatformUI; 
    4040import org.eclipse.ui.dialogs.PropertyPage; 
    4141import org.eclipse.ui.plugin.AbstractUIPlugin; 
    42 import org.jalcedo.generator.beans.ui.BrowseTypeListener; 
     42//import org.jalcedo.generator.beans.ui.BrowseTypeListener; 
    4343import org.jalcedo.generator.icon.model.IImageKeysModel; 
    4444import org.jalcedo.generator.icon.model.Icon; 
     
    6262     
    6363    private TableViewer iconListViewer; 
     64    private Label image; 
    6465    private Label descriptionLabel; 
    6566    private Button editButton; 
     
    8788        registry.put(Activator.ICON_SEARCH, 
    8889                AbstractUIPlugin.imageDescriptorFromPlugin(Activator.PLUGIN_ID, IImageKeys.SEARCH)); 
     90        registry.put(Activator.ICON_ERROR_TSK, 
     91                AbstractUIPlugin.imageDescriptorFromPlugin(Activator.PLUGIN_ID, IImageKeys.ERROR_TSK)); 
    8992    } 
    9093     
     
    101104        container.setLayoutData(new GridData(GridData.FILL_BOTH)); 
    102105         
    103         descriptionLabel = new Label(container, SWT.NONE); 
     106        Composite description = new Composite(container, SWT.NONE); 
     107        description.setLayout(new GridLayout(2, false)); 
     108        description.setLayoutData(new GridData(GridData.FILL_BOTH)); 
    104109        GridData gd = new GridData(); 
    105110        gd.horizontalSpan = 3; 
    106         descriptionLabel.setLayoutData(gd); 
     111        description.setLayoutData(gd); 
     112        image = new Label(description, SWT.NONE); 
     113        descriptionLabel = new Label(description, SWT.NONE); 
    107114        descriptionLabel.setText(Messages.getString("IconPropertyPage.descriptionPlugin")); //$NON-NLS-1$ 
    108115         
     
    190197        }); 
    191198         
    192       IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); 
    193       BrowseTypeListener browseTypeListener = new BrowseTypeListener( 
    194               window, 
    195               this.project, 
    196               this.interfaceNameText, 
    197               IJavaElementSearchConstants.CONSIDER_INTERFACES 
    198           ); 
    199       browseTypeListener.setTitle(Messages.getString("browseTypeListener.title")); 
    200       browseTypeListener.setDescription(Messages.getString("browseTypeListener.description")); 
    201       this.browseInterfaceButton.addSelectionListener(browseTypeListener); 
     199//        IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); 
     200//        BrowseTypeListener browseTypeListener = new BrowseTypeListener( 
     201//                window, 
     202//                this.project, 
     203//                this.interfaceNameText, 
     204//                IJavaElementSearchConstants.CONSIDER_INTERFACES 
     205//            ); 
     206//        browseTypeListener.setTitle(Messages.getString("browseTypeListener.title")); 
     207//        browseTypeListener.setDescription(Messages.getString("browseTypeListener.description")); 
     208//        this.browseInterfaceButton.addSelectionListener(browseTypeListener); 
    202209         
    203210        this.interfaceNameText.addModifyListener(new InterfaceNameTexeListener()); 
     
    215222            iconListViewer.setInput(imageKeysModel.getList()); 
    216223        } catch (Exception e) { 
     224            image.setImage(Activator.getDefault().getImageRegistry().get("ERROR_TSK")); //$NON-NLS-1$ 
    217225            descriptionLabel.setText(Messages.getString("IconPropertyPage.getSourceDirError")); //$NON-NLS-1$ 
    218226            setEnabled(false); 
    219             e.printStackTrace(); 
    220227        } 
    221228    } 
  • org.jalcedo.generator/trunk/org.jalcedo.generator.icon.ui/src/org/jalcedo/generator/icon/ui/internal/resource/IImageKeys.java

    r1205 r1233  
    2020    public static final String FILENAV_NAV = "icons/org.eclipse.ui/icons/full/eview16/filenav_nav.gif"; 
    2121    public static final String SEARCH = "icons/org.eclipse.search/icons/full/etool16/search.gif"; 
     22    public static final String ERROR_TSK = "icons/org.eclipse.ui/icons/full/obj16/error_tsk.gif"; 
    2223}