Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Pre- Activator.start() configuration for tests
Pre- Activator.start() configuration for tests [message #321238] Thu, 11 October 2007 22:27 Go to next message
Eclipse UserFriend
Originally posted by: rob.brainkandy-dot-org.org

I'm writing a logging mechanism for my plug-ins. They're stored in a plug-in
called, com.mycompany.common, and com.mycompany.common is used in other plug-ins
in the suite. The logging mechanism is set up in the Plugin for c.m.c.

I've written plug-in tests for the suite of plug-ins. This means that running
the plug-ins will eventually call this logging mechanism. The thing is, I want
this logging mechanism disabled when running tests. I'd like to do this by
running some code before c.m.c.Plugin.start().

What's a good way to do this using the plug-in architecture and plug-in test
configuration? It seems to me that the best way to do this might actually be to
write a custom product that proxies the org.eclipse.sdk.ide startup. That might
be overkill. Environment variables seems like a messy way to do it.

Thoughts?

Thanks, Robert
Re: Pre- Activator.start() configuration for tests [message #321433 is a reply to message #321238] Tue, 16 October 2007 16:22 Go to previous message
Eclipse UserFriend
One possible solution is to use OO. In the test case, you can have the
test plug-ins set the logging object for the logging mechanism to use.
This logging object simply does noops, that is, log nothing.

The other possibility (a little-bit more work) is to have the
logging-mechanism plug-in to create an extension point that any other
plug-in can extend from. This way any plug-in that wants to log things
via the plug-in that has the logging-mechanism can provide its own
implementation for the logging.


Robert Konigsberg wrote:
> I'm writing a logging mechanism for my plug-ins. They're stored in a
> plug-in called, com.mycompany.common, and com.mycompany.common is used
> in other plug-ins in the suite. The logging mechanism is set up in the
> Plugin for c.m.c.
>
> I've written plug-in tests for the suite of plug-ins. This means that
> running the plug-ins will eventually call this logging mechanism. The
> thing is, I want this logging mechanism disabled when running tests. I'd
> like to do this by running some code before c.m.c.Plugin.start().
>
> What's a good way to do this using the plug-in architecture and plug-in
> test configuration? It seems to me that the best way to do this might
> actually be to write a custom product that proxies the
> org.eclipse.sdk.ide startup. That might be overkill. Environment
> variables seems like a messy way to do it.
>
> Thoughts?
>
> Thanks, Robert
Previous Topic:Ordering of toolbarPath & toolbarPath (PLS HELP)
Next Topic:How To Provide My Own Content To A TextMergeViewer
Goto Forum:
  


Current Time: Mon Nov 10 10:55:07 EST 2025

Powered by FUDForum. Page generated in 1.31667 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top