My plugin has to write to the eclipse console - for testing purpose I simplified my code, so that I only have the following:
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
System.out.println("Tecomp Plugin is running");
MessageConsole myConsole = new MessageConsole("My Console", null);
//myConsole.activate();
ConsolePlugin.getDefault().getConsoleManager().addConsoles(new IConsole[]{ myConsole });
ConsolePlugin.getDefault().getConsoleManager().showConsoleView(myConsole);
final MessageConsoleStream stream = myConsole.newMessageStream();
stream.setActivateOnWrite(true);
stream.println("Hi there!");
stream.close();
}
It's a simple plugin, the method start belogs to the class extending AbstractUIPlugin - it't no rcp application. Code works fine inside the runtime workbench - once the plugin is installed, the output gets lost somewhere. The rest of the plugin is working properly.
Is there perhaps a problem with the ConsolePlugin? Or are streams handled differently in the runtime workbench and the development workbench?
I tried both - a feature project and directly copying the plugin jar to the eclipse directory - for installing the plugin - same result for both...
Any help is welcome, because I'm struggeling with that problem for a while now...
Regards, Kathi
Edit:
it doesn't seem to be a problem of the Console... I provided my own view for printing the output, but although declard in the plugin.xml there is no view after installing the plugin... here is what I did: -export the plugin with the ExportWizard into a jar-archive -copied this archive to /usr/share/eclipse/plugins -restarted eclipse
or with a feature project: -exported the feature-project containing my plugin with the ExportWizard -removed the above jar archive from the eclipse dir -installed the feature -restarted eclipse
both didn't word - did I get something wrong with installing the plugin? The jar-archive is ok, I checked it - it's the latest version. But somehow it seems that eclipse is still working with some older plugin without the changes I made
regards, Kathi
Edit:
I implemented the IStartup Interface end extended the org.eclipse.ui.startup point, but nothing changed... I really thinks it's an installation problem somehow. I commented out some output but it's still printed to the debug console. Is there some sort of plugin cache in eclipse? So that the new code doesn't get read?
Edit:
Thanks for the suggestions, but starting eclipse with the -clean option didn't help - I'll try to install the plugin in some other environment next week - perhaps there is something wrong with mine...