示例#1
0
  @Override
  public void run() {
    Shell shell = getWorkbenchWindow().getShell();
    if (null == selection) {
      ISelection autoselection = getWorkbenchWindow().getSelectionService().getSelection();
      if (autoselection instanceof IStructuredSelection)
        this.selection = (IStructuredSelection) autoselection;
    }

    try {
      primRun(shell);
      this.selection = null;
    } catch (Throwable t) {
      J2EEUIPlugin.logError(t);
      String ERROR_OCCURRED_TITLE =
          J2EEUIMessages.getResourceString("ERROR_OCCURRED_TITLE"); // $NON-NLS-1$
      String ERROR_OCCURRED_MESSAGE =
          J2EEUIMessages.getResourceString("ERROR_OCCURRED_MESSAGE"); // $NON-NLS-1$
      ErrorDialog.openError(shell, ERROR_OCCURRED_TITLE, ERROR_OCCURRED_MESSAGE, t, 0, false);
    }
  }
/**
 * @author vijayb
 *     <p>To change the template for this generated type comment go to Window - Preferences - Java -
 *     Code Generation - Code and Comments
 */
public interface J2EEPropertiesConstants {
  // J2EEUIMessages.getResourceString("Import_Classes");
  public String J2EE_LEVEL = J2EEUIMessages.getResourceString("J2EE_Level"); // $NON-NLS-1$
  public String J2EE_12 = J2EEUIMessages.getResourceString("J2EE_12"); // $NON-NLS-1$
  public String J2EE_12_DESCRIPTION =
      J2EEUIMessages.getResourceString("J2EE_12_DESCRIPTION"); // $NON-NLS-1$
  public String J2EE_13 = J2EEUIMessages.getResourceString("J2EE_13"); // $NON-NLS-1$
  public String J2EE_13_DESCRIPTION =
      J2EEUIMessages.getResourceString("J2EE_13_DESCRIPTION"); // $NON-NLS-1$
  public String J2EE_14_DESCRIPTION =
      J2EEUIMessages.getResourceString("J2EE_14_DESCRIPTION"); // $NON-NLS-1$
  public String EJB_LEVEL = J2EEUIMessages.getResourceString("EJB_LEVEL"); // $NON-NLS-1$
  public String EJB_11 = J2EEUIMessages.getResourceString("EJB_11"); // $NON-NLS-1$
  public String EJB_11_DESCRIPTION =
      J2EEUIMessages.getResourceString("EJB_11_DESCRIPTION"); // $NON-NLS-1$
  public String EJB_20 = J2EEUIMessages.getResourceString("EJB_20"); // $NON-NLS-1$
  public String EJB_20_DESCRIPTION =
      J2EEUIMessages.getResourceString("EJB_20_DESCRIPTION"); // $NON-NLS-1$
  public String EJB_21_DESCRIPTION =
      J2EEUIMessages.getResourceString("EJB_21_DESCRIPTION"); // $NON-NLS-1$
  public String CONNECTOR_LEVEL =
      J2EEUIMessages.getResourceString("CONNECTOR_LEVEL"); // $NON-NLS-1$
  public String CONNECTOR_10 = J2EEUIMessages.getResourceString("CONNECTOR_10"); // $NON-NLS-1$
  public String CONNECTOR_15 = J2EEUIMessages.getResourceString("CONNECTOR_15"); // $NON-NLS-1$
  public String CONNECTOR_10_DESCRIPTION =
      J2EEUIMessages.getResourceString("CONNECTOR_10_DESCRIPTION"); // $NON-NLS-1$
  public String CONNECTOR_15_DESCRIPTION =
      J2EEUIMessages.getResourceString("CONNECTOR_15_DESCRIPTION"); // $NON-NLS-1$
  public String WEB_LEVEL = J2EEUIMessages.getResourceString("WEB_LEVEL"); // $NON-NLS-1$
  public String WEB_22_DESCRIPTION =
      J2EEUIMessages.getResourceString("WEB_22_DESCRIPTION"); // $NON-NLS-1$
  public String WEB_23_DESCRIPTION =
      J2EEUIMessages.getResourceString("WEB_23_DESCRIPTION"); // $NON-NLS-1$
  public String WEB_24_DESCRIPTION =
      J2EEUIMessages.getResourceString("WEB_24_DESCRIPTION"); // $NON-NLS-1$
  public String APP_CLIENT_LEVEL =
      J2EEUIMessages.getResourceString("APP_CLIENT_LEVEL"); // $NON-NLS-1$
  public String APP_CLIENT_12_DESCRIPTION =
      J2EEUIMessages.getResourceString("APP_CLIENT_12_DESCRIPTION"); // $NON-NLS-1$
  public String APP_CLIENT_13_DESCRIPTION =
      J2EEUIMessages.getResourceString("APP_CLIENT_13_DESCRIPTION"); // $NON-NLS-1$
  public String APP_CLIENT_14_DESCRIPTION =
      J2EEUIMessages.getResourceString("APP_CLIENT_14_DESCRIPTION"); // $NON-NLS-1$
  public String DESCRIPTION = J2EEUIMessages.getResourceString("DESCRIPTION"); // $NON-NLS-1$
  public String WEB_CONTEXT_ROOT =
      J2EEUIMessages.getResourceString("WEB_CONTEXT_ROOT"); // $NON-NLS-1$
  public String WEB_CONTENT_FOLDER_NAME =
      J2EEUIMessages.getResourceString("WEB_CONTENT_FOLDER_NAME"); // $NON-NLS-1$
}
 /** @see J2EEJavaClassProviderHelper#getTypeString(String) */
 @Override
 public String getTypeString(String className) {
   return J2EEUIMessages.getResourceString(
       "Local_Interface_UI_", new Object[] {className}); // $NON-NLS-1$ = "Local Interface"
 }