1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 10:16:03 +02:00

log error messagen on extension loading

This commit is contained in:
Michael Scharf 2006-12-07 20:35:32 +00:00
parent e059ef7a3b
commit d78bc8b97e
2 changed files with 12 additions and 4 deletions

View file

@ -15,7 +15,10 @@ import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.RegistryFactory;
import org.eclipse.core.runtime.Status;
import org.eclipse.tm.terminal.internal.control.TerminalPlugin;
/**
* A factory to get {@link ITerminalConnector} instances.
@ -38,11 +41,16 @@ public class TerminalConnectorExtension {
if(conn.isInstalled())
result.add(conn);
}
} catch (NoClassDefFoundError e) {
log(e);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
log(e);
}
}
return (ITerminalConnector[]) result.toArray(new ITerminalConnector[result.size()]);
}
private static void log(Throwable e) {
TerminalPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, TerminalPlugin.PLUGIN_ID, IStatus.OK, e.getMessage(), e));
}
}

View file

@ -22,8 +22,8 @@ import org.eclipse.ui.plugin.AbstractUIPlugin;
public class TerminalPlugin extends AbstractUIPlugin {
protected static TerminalPlugin fDefault;
public static final String PLUGIN_HOME = "org.eclipse.tm.terminal"; //$NON-NLS-1$
public static final String HELP_VIEW = PLUGIN_HOME + ".terminal_view"; //$NON-NLS-1$
public static final String PLUGIN_ID = "org.eclipse.tm.terminal"; //$NON-NLS-1$
public static final String HELP_VIEW = PLUGIN_ID + ".terminal_view"; //$NON-NLS-1$
/**
* The constructor.