/** * Returns a new error status for this plug-in with the given message * @param message the message to be included in the status * @param exception the exception to be included in the status or <code>null</code> if none * @return a new error status */ public static IStatus newErrorStatus(String message, Throwable exception) { return new Status(IStatus.ERROR, getUniqueIdentifier(), IConsoleConstants.INTERNAL_ERROR, message, exception); }
/** * Returns a new error status for this plug-in with the given message * @param message the message to be included in the status * @param exception the exception to be included in the status or <code>null</code> if none * @return a new error status */ public static IStatus newErrorStatus(String message, Throwable exception) { return new Status(IStatus.ERROR, getUniqueIdentifier(), IConsoleConstants.INTERNAL_ERROR, message, exception); }
@Override public void handleException(Throwable exception) { IStatus status = new Status(IStatus.ERROR, ConsolePlugin.getUniqueIdentifier(), IConsoleConstants.INTERNAL_ERROR, ConsoleMessages.AbstractConsole_0, exception); ConsolePlugin.log(status); }
/** * @see org.eclipse.core.runtime.ISafeRunnable#handleException(java.lang.Throwable) */ public void handleException(Throwable exception) { IStatus status = new Status(IStatus.ERROR, ConsolePlugin.getUniqueIdentifier(), IConsoleConstants.INTERNAL_ERROR, ConsoleMessages.AbstractConsole_0, exception); ConsolePlugin.log(status); }
public void handleException(Throwable exception) { IStatus status = new Status(IStatus.ERROR, ConsolePlugin.getUniqueIdentifier(), IConsoleConstants.INTERNAL_ERROR, ConsoleMessages.ConsoleManager_0, exception); ConsolePlugin.log(status); }
@Override public void handleException(Throwable exception) { IStatus status = new Status(IStatus.ERROR, ConsolePlugin.getUniqueIdentifier(), IConsoleConstants.INTERNAL_ERROR, ConsoleMessages.ConsoleManager_0, exception); ConsolePlugin.log(status); }
public ConsoleFactoryExtension[] getConsoleFactoryExtensions() { if (fConsoleFactoryExtensions == null) { fConsoleFactoryExtensions = new ArrayList(); IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(ConsolePlugin.getUniqueIdentifier(), IConsoleConstants.EXTENSION_POINT_CONSOLE_FACTORIES); IConfigurationElement[] configurationElements = extensionPoint.getConfigurationElements(); for (int i = 0; i < configurationElements.length; i++) { fConsoleFactoryExtensions.add(new ConsoleFactoryExtension(configurationElements[i])); } } return (ConsoleFactoryExtension[]) fConsoleFactoryExtensions.toArray(new ConsoleFactoryExtension[0]); }
public ConsoleFactoryExtension[] getConsoleFactoryExtensions() { if (fConsoleFactoryExtensions == null) { fConsoleFactoryExtensions = new ArrayList<ConsoleFactoryExtension>(); IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(ConsolePlugin.getUniqueIdentifier(), IConsoleConstants.EXTENSION_POINT_CONSOLE_FACTORIES); IConfigurationElement[] configurationElements = extensionPoint.getConfigurationElements(); for (int i = 0; i < configurationElements.length; i++) { fConsoleFactoryExtensions.add(new ConsoleFactoryExtension(configurationElements[i])); } } return fConsoleFactoryExtensions.toArray(new ConsoleFactoryExtension[0]); }
/** * Utility method with conventions */ public static void errorDialog(Shell shell, String title, String message, Throwable t) { IStatus status; if (t instanceof CoreException) { status= ((CoreException)t).getStatus(); // if the 'message' resource string and the IStatus' message are the same, // don't show both in the dialog if (status != null && message.equals(status.getMessage())) { message= null; } } else { status= new Status(IStatus.ERROR, getUniqueIdentifier(), IConsoleConstants.INTERNAL_ERROR, "Error within Debug UI: ", t); //$NON-NLS-1$ log(status); } ErrorDialog.openError(shell, title, message, status); }
public IConsolePageParticipant[] getPageParticipants(IConsole console) { if(fPageParticipants == null) { fPageParticipants = new ArrayList<ConsolePageParticipantExtension>(); IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(ConsolePlugin.getUniqueIdentifier(), IConsoleConstants.EXTENSION_POINT_CONSOLE_PAGE_PARTICIPANTS); IConfigurationElement[] elements = extensionPoint.getConfigurationElements(); for(int i = 0; i < elements.length; i++) { IConfigurationElement config = elements[i]; ConsolePageParticipantExtension extension = new ConsolePageParticipantExtension(config); fPageParticipants.add(extension); } } ArrayList<IConsolePageParticipant> list = new ArrayList<IConsolePageParticipant>(); for (Iterator<ConsolePageParticipantExtension> i = fPageParticipants.iterator(); i.hasNext();) { ConsolePageParticipantExtension extension = i.next(); try { if (extension.isEnabledFor(console)) { list.add(extension.createDelegate()); } } catch (CoreException e) { ConsolePlugin.log(e); } } return list.toArray(new IConsolePageParticipant[0]); }
public IConsolePageParticipant[] getPageParticipants(IConsole console) { if(fPageParticipants == null) { fPageParticipants = new ArrayList(); IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(ConsolePlugin.getUniqueIdentifier(), IConsoleConstants.EXTENSION_POINT_CONSOLE_PAGE_PARTICIPANTS); IConfigurationElement[] elements = extensionPoint.getConfigurationElements(); for(int i = 0; i < elements.length; i++) { IConfigurationElement config = elements[i]; ConsolePageParticipantExtension extension = new ConsolePageParticipantExtension(config); fPageParticipants.add(extension); } } ArrayList list = new ArrayList(); for(Iterator i = fPageParticipants.iterator(); i.hasNext(); ) { ConsolePageParticipantExtension extension = (ConsolePageParticipantExtension) i.next(); try { if (extension.isEnabledFor(console)) { list.add(extension.createDelegate()); } } catch (CoreException e) { ConsolePlugin.log(e); } } return (IConsolePageParticipant[]) list.toArray(new IConsolePageParticipant[0]); }
/** * Utility method with conventions */ public static void errorDialog(Shell shell, String title, String message, Throwable t) { IStatus status; if (t instanceof CoreException) { status= ((CoreException)t).getStatus(); // if the 'message' resource string and the IStatus' message are the same, // don't show both in the dialog if (status != null && message.equals(status.getMessage())) { ErrorDialog.openError(shell, title, null, status); return; } } else { status= new Status(IStatus.ERROR, getUniqueIdentifier(), IConsoleConstants.INTERNAL_ERROR, "Error within Debug UI: ", t); //$NON-NLS-1$ log(status); } ErrorDialog.openError(shell, title, message, status); }
public IPatternMatchListener[] createPatternMatchListeners(IConsole console) { if (fPatternMatchListeners == null) { fPatternMatchListeners = new ArrayList(); IExtensionPoint extensionPoint= Platform.getExtensionRegistry().getExtensionPoint(ConsolePlugin.getUniqueIdentifier(), IConsoleConstants.EXTENSION_POINT_CONSOLE_PATTERN_MATCH_LISTENERS); IConfigurationElement[] elements = extensionPoint.getConfigurationElements(); for (int i = 0; i < elements.length; i++) {
if (fPatternMatchListeners == null) { fPatternMatchListeners = new ArrayList<PatternMatchListenerExtension>(); IExtensionPoint extensionPoint= Platform.getExtensionRegistry().getExtensionPoint(ConsolePlugin.getUniqueIdentifier(), IConsoleConstants.EXTENSION_POINT_CONSOLE_PATTERN_MATCH_LISTENERS); IConfigurationElement[] elements = extensionPoint.getConfigurationElements(); for (int i = 0; i < elements.length; i++) {
public Expression getEnablementExpression() throws CoreException { if (fEnablementExpression == null) { IConfigurationElement[] elements = fConfig.getChildren(ExpressionTagNames.ENABLEMENT); if (elements.length == 0) { String message = MessageFormat.format("{0} " +getLocalId() + " {1} " + getPluginId() + " {2}", new String[] {ConsoleMessages.PatternMatchListenerExtension_3,ConsoleMessages.PatternMatchListenerExtension_4,ConsoleMessages.PatternMatchListenerExtension_5}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ ConsolePlugin.log(new Status(IStatus.WARNING, ConsolePlugin.getUniqueIdentifier(), IStatus.OK, message, null)); } IConfigurationElement enablement = elements.length > 0 ? elements[0] : null; if (enablement != null) { fEnablementExpression = ExpressionConverter.getDefault().perform(enablement); } } return fEnablementExpression; }
public Expression getEnablementExpression() throws CoreException { if (fEnablementExpression == null) { IConfigurationElement[] elements = fConfig.getChildren(ExpressionTagNames.ENABLEMENT); if (elements.length == 0) { String message = MessageFormat.format("{0} " + getLocalId() + " {1} " + getPluginId() + " {2}", new Object[] { ConsoleMessages.PatternMatchListenerExtension_3, ConsoleMessages.PatternMatchListenerExtension_4, ConsoleMessages.PatternMatchListenerExtension_5 }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ ConsolePlugin.log(new Status(IStatus.WARNING, ConsolePlugin.getUniqueIdentifier(), IStatus.OK, message, null)); } IConfigurationElement enablement = elements.length > 0 ? elements[0] : null; if (enablement != null) { fEnablementExpression = ExpressionConverter.getDefault().perform(enablement); } } return fEnablementExpression; }