More on RunConfiguration


Hi,

I have now reached the point where

public RunProfileState getState(
DataContext context,
RunnerInfo runnerInfo,
RunnerSettings runnerSettings,
ConfigurationPerRunnerSettings configurationSettings )
throws ExecutionException

is being called.

At this point, I instantiate "EquinoxRunner" which is a subclass of
JavaCommandLineState. In my subclass I do;

protected JavaParameters createJavaParameters()
throws ExecutionException
{
JavaParameters params = new JavaParameters();
params.setJdk( m_configBean.getJdk() );
params.setMainClass( "org.eclipse.equinox.Main" );
params.setWorkingDirectory( m_configBean.getWorkDir() );
processClasspath( params );
processArguments( params );
processVmArgs( params );
return params;
}

But it seems I also need to subclass TextConsoleBuilder and implement a
ConsoleView. Isn't there any basic ones available? Or have I misunderstood
something at this point?


And thanks for the support...


Cheers
Niclas

5 comments
Comment actions Permalink

I'm quite sure you don't have to tamper with TextConsoleBuilder and ConsoleView. Take a look at the sources of DevKit plugin, there you'll find quite a suitable implementation of a RunConfiguraiton.

0
Comment actions Permalink

Hello Niclas,

NH> But it seems I also need to subclass TextConsoleBuilder and
NH> implement a ConsoleView. Isn't there any basic ones available? Or
NH> have I misunderstood something at this point?

You don't need to implement anything. Just use:
state.setConsoleBuilder(TextConsoleBuilderFactory.getInstance().createBuilder(getProject()));

--
Dmitry Jemerov
Software Developer
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Dmitry Jemerov wrote:

state.setConsoleBuilder(
TextConsoleBuilderFactory
.getInstance()
.createBuilder(getProject()));


Suspect that this existed, but Idea was reporting no implementation existing
in the classpath. And since I now have TextConsoleBuilderFactory as an
unknown class, I suspect that it sits somewhere I am not using.

Is this 6.0 stuff ?? (Well, since it is Saturday, I'll try that and see what
happens.)


Cheers
Niclas



0
Comment actions Permalink

Niclas Hedhman wrote:

Dmitry Jemerov wrote:

>> state.setConsoleBuilder(
>> TextConsoleBuilderFactory
>> .getInstance()
>> .createBuilder(getProject()));
>>


And since I now have TextConsoleBuilderFactory as an unknown class


TextConsoleBuidlerFactory.getInstance()

Please note the wrongly spellt "Buidler" !
(The danger of name completions.. ;o) )

Cheers
Niclas

0
Comment actions Permalink

Hello Niclas,

>>> state.setConsoleBuilder(
>>> TextConsoleBuilderFactory
>>> .getInstance()
>>> .createBuilder(getProject()));
>> And since I now have TextConsoleBuilderFactory as an unknown class
>>
NH> TextConsoleBuidlerFactory.getInstance()
NH>
NH> Please note the wrongly spellt "Buidler" !
NH> (The danger of name completions.. ;o) )

In 5.1, indeed, the class name spelling is incorrect. In 6.0, both the incorrect
and correct spelled classes work.

--
Dmitry Jemerov
Software Developer
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Please sign in to leave a comment.