Example usage for java.lang InternalError InternalError

List of usage examples for java.lang InternalError InternalError

Introduction

In this page you can find the example usage for java.lang InternalError InternalError.

Prototype

public InternalError(Throwable cause) 

Source Link

Document

Constructs an InternalError with the specified cause and a detail message of (cause==null ?

Usage

From source file:UUID.java

/**
 * DOCUMENT ME!/*  w w w.  j av a 2  s . com*/
 *
 * @param abyte0 DOCUMENT ME!
 *
 * @return DOCUMENT ME!
 */
public static UUID nameUUIDFromBytes(byte[] abyte0) {
    MessageDigest messagedigest;

    try {
        messagedigest = MessageDigest.getInstance("MD5");
    } catch (NoSuchAlgorithmException nosuchalgorithmexception) {
        throw new InternalError("MD5 not supported");
    }

    byte[] abyte1 = messagedigest.digest(abyte0);
    abyte1[6] &= 0xf;
    abyte1[6] |= 0x30;
    abyte1[8] &= 0x3f;
    abyte1[8] |= 0x80;

    return new UUID(abyte1);
}

From source file:com.clustercontrol.hub.etc.action.TransferViewAction.java

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    //?/*from ww w.j a  v a  2s.co  m*/
    IWorkbenchPage page = HandlerUtil.getActiveWorkbenchWindow(event).getActivePage();

    //?
    try {
        page.showView(TransferView.ID);
        IViewPart viewPart = page.findView(TransferView.ID);
        if (viewPart == null)
            throw new InternalError("viewPart is null.");
        TransferView view = (TransferView) viewPart.getAdapter(TransferView.class);
        if (view == null) {
            m_log.info("execute: view is null");
            return null;
        }
        view.setFocus();
    } catch (PartInitException e) {
    }
    return null;
}

From source file:com.clustercontrol.calendar.etc.action.CalendarListAction.java

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    //?//  w w  w  . j a v a2 s. c o m
    IWorkbenchPage page = HandlerUtil.getActiveWorkbenchWindow(event).getActivePage();

    //?
    try {
        page.showView(CalendarListView.ID);
        IViewPart viewPart = page.findView(CalendarListView.ID);
        if (viewPart == null)
            throw new InternalError("viewPart is null.");
        CalendarListView view = (CalendarListView) viewPart.getAdapter(CalendarListView.class);
        if (view == null) {
            m_log.info("execute: view is null");
            return null;
        }
        view.setFocus();
    } catch (PartInitException e) {
    }
    return null;
}

From source file:com.clustercontrol.hub.etc.action.LogScopeTreeViewAction.java

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    //?/* ww  w . ja v  a 2  s.c  o  m*/
    IWorkbenchPage page = HandlerUtil.getActiveWorkbenchWindow(event).getActivePage();

    //?
    try {
        page.showView(LogScopeTreeView.ID);
        IViewPart viewPart = page.findView(LogScopeTreeView.ID);
        if (viewPart == null)
            throw new InternalError("viewPart is null.");
        LogScopeTreeView view = (LogScopeTreeView) viewPart.getAdapter(LogScopeTreeView.class);
        if (view == null) {
            m_log.info("execute: view is null");
            return null;
        }
        view.setFocus();
    } catch (PartInitException e) {
    }
    return null;
}

From source file:com.clustercontrol.calendar.etc.action.CalendarWeekAction.java

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    //?/*from   w w w .  j  a  v  a 2 s. c  o  m*/
    IWorkbenchPage page = HandlerUtil.getActiveWorkbenchWindow(event).getActivePage();

    //?
    try {
        page.showView(CalendarWeekView.ID);
        IViewPart viewPart = page.findView(CalendarWeekView.ID);
        if (viewPart == null)
            throw new InternalError("viewPart is null.");
        CalendarWeekView view = (CalendarWeekView) viewPart.getAdapter(CalendarWeekView.class);
        if (view == null) {
            m_log.info("execute: view is null");
            return null;
        }
        view.setFocus();
    } catch (PartInitException e) {
    }
    return null;
}

From source file:com.clustercontrol.calendar.etc.action.CalendarMonthAction.java

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    //?// w  w w. j  av  a  2s.c o  m
    IWorkbenchPage page = HandlerUtil.getActiveWorkbenchWindow(event).getActivePage();

    //?
    try {
        page.showView(CalendarMonthView.ID);
        IViewPart viewPart = page.findView(CalendarMonthView.ID);
        if (viewPart == null)
            throw new InternalError("viewPart is null.");
        CalendarMonthView view = (CalendarMonthView) viewPart.getAdapter(CalendarMonthView.class);
        if (view == null) {
            m_log.info("execute: view is null");
            return null;
        }
        view.setFocus();
    } catch (PartInitException e) {
    }
    return null;
}

From source file:com.clustercontrol.accesscontrol.etc.action.RoleListAction.java

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    //?//from w w  w  . ja  v a2 s .  c om
    IWorkbenchPage page = HandlerUtil.getActiveWorkbenchWindow(event).getActivePage();

    //?
    try {
        page.showView(RoleListView.ID);
        IViewPart viewPart = page.findView(RoleListView.ID);
        if (viewPart == null)
            throw new InternalError("viewPart is null.");
        RoleListView view = (RoleListView) viewPart.getAdapter(RoleListView.class);
        if (view == null) {
            m_log.info("execute: view is null");
            return null;
        }
        view.setFocus();
    } catch (PartInitException e) {
    }
    return null;
}

From source file:com.clustercontrol.accesscontrol.etc.action.UserListAction.java

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    //?/*from ww  w . j  a v  a  2 s.  com*/
    IWorkbenchPage page = HandlerUtil.getActiveWorkbenchWindow(event).getActivePage();

    //?
    try {
        page.showView(UserListView.ID);
        IViewPart viewPart = page.findView(UserListView.ID);
        if (viewPart == null)
            throw new InternalError("viewPart is null.");
        UserListView view = (UserListView) viewPart.getAdapter(UserListView.class);
        if (view == null) {
            m_log.info("execute: view is null");
            return null;
        }
        view.setFocus();
    } catch (PartInitException e) {
    }
    return null;
}

From source file:com.clustercontrol.jobmanagement.etc.action.JobListAction.java

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    //?/*  ww  w  .  j  a v a  2  s. c  o  m*/
    IWorkbenchPage page = HandlerUtil.getActiveWorkbenchWindow(event).getActivePage();

    //?
    try {
        page.showView(JobListView.ID);
        IViewPart viewPart = page.findView(JobListView.ID);
        if (viewPart == null)
            throw new InternalError("viewPart is null.");
        JobListView view = (JobListView) viewPart.getAdapter(JobListView.class);
        if (view == null) {
            m_log.info("execute: view is null");
            return null;
        }
        view.setFocus();
    } catch (PartInitException e) {
    }
    return null;
}

From source file:com.clustercontrol.jobmanagement.etc.action.JobHistoryAction.java

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    //?//w  ww.j  ava2 s . c o m
    IWorkbenchPage page = HandlerUtil.getActiveWorkbenchWindow(event).getActivePage();

    //?
    try {
        page.showView(JobHistoryView.ID);
        IViewPart viewPart = page.findView(JobHistoryView.ID);
        if (viewPart == null)
            throw new InternalError("viewPart is null.");
        JobHistoryView view = (JobHistoryView) viewPart.getAdapter(JobHistoryView.class);
        if (view == null) {
            m_log.info("execute: view is null");
            return null;
        }
        view.setFocus();
    } catch (PartInitException e) {
    }
    return null;
}