You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by Jörn Kottmann <ko...@gmail.com> on 2011/03/21 12:54:05 UTC

Eclipse launch support for AEs

Hi all,

developing/testing AEs inside eclipse is cumbersome because we do not
have launch support for AEs. To run an AE inside eclipse a small helper
class must be created which can instantiate the AE, supply it with CASes
and maybe serialize the processed CASes again.

To ease up this process we should have launch support which is capable of
instantiating an AE (or AAE), supply it with CASes and then serialize 
the CASes
again. The launch support should also be able to run PEARS.

A first simple version of such a wizard could read all xmi files from one
folder and write the results to another folder.

Combined with the Cas Editor we would then have complete eclipse tooling 
for
developing AEs, e.g. for making a simple hello world AE a user might
want to perform the following steps:

1. Write the AE, create the descriptor and type system
2. Import sample texts
3. View the imported texts
4. Run the AE over the imported texts
5. View added annotations

Jörn

Re: Eclipse launch support for AEs

Posted by Tommaso Teofili <to...@gmail.com>.
Same here, most of the times create a custom run configuration which uses
the CVD for that.
Tommaso

2011/3/22 Thilo Götz <tw...@gmx.de>

> I'm all for it.  This has been long missing in our
> tools chain.  I can't begin to count how many times
> I've written/partially copied the helper class you
> describe below.
>
> --Thilo
>
> On 3/22/2011 18:01, Jörn Kottmann wrote:
> > Any opinions/comments on this? Otherwise I will start working on it.
> >
> > Jörn
> >
> > On 3/21/11 12:54 PM, Jörn Kottmann wrote:
> >> Hi all,
> >>
> >> developing/testing AEs inside eclipse is cumbersome because we do not
> >> have launch support for AEs. To run an AE inside eclipse a small helper
> >> class must be created which can instantiate the AE, supply it with CASes
> >> and maybe serialize the processed CASes again.
> >>
> >> To ease up this process we should have launch support which is capable
> of
> >> instantiating an AE (or AAE), supply it with CASes and then serialize
> the CASes
> >> again. The launch support should also be able to run PEARS.
> >>
> >> A first simple version of such a wizard could read all xmi files from
> one
> >> folder and write the results to another folder.
> >>
> >> Combined with the Cas Editor we would then have complete eclipse tooling
> for
> >> developing AEs, e.g. for making a simple hello world AE a user might
> >> want to perform the following steps:
> >>
> >> 1. Write the AE, create the descriptor and type system
> >> 2. Import sample texts
> >> 3. View the imported texts
> >> 4. Run the AE over the imported texts
> >> 5. View added annotations
> >>
> >> Jörn
> >
>

Re: Eclipse launch support for AEs

Posted by Thilo Götz <tw...@gmx.de>.
I'm all for it.  This has been long missing in our
tools chain.  I can't begin to count how many times
I've written/partially copied the helper class you
describe below.

--Thilo

On 3/22/2011 18:01, Jörn Kottmann wrote:
> Any opinions/comments on this? Otherwise I will start working on it.
> 
> Jörn
> 
> On 3/21/11 12:54 PM, Jörn Kottmann wrote:
>> Hi all,
>>
>> developing/testing AEs inside eclipse is cumbersome because we do not
>> have launch support for AEs. To run an AE inside eclipse a small helper
>> class must be created which can instantiate the AE, supply it with CASes
>> and maybe serialize the processed CASes again.
>>
>> To ease up this process we should have launch support which is capable of
>> instantiating an AE (or AAE), supply it with CASes and then serialize the CASes
>> again. The launch support should also be able to run PEARS.
>>
>> A first simple version of such a wizard could read all xmi files from one
>> folder and write the results to another folder.
>>
>> Combined with the Cas Editor we would then have complete eclipse tooling for
>> developing AEs, e.g. for making a simple hello world AE a user might
>> want to perform the following steps:
>>
>> 1. Write the AE, create the descriptor and type system
>> 2. Import sample texts
>> 3. View the imported texts
>> 4. Run the AE over the imported texts
>> 5. View added annotations
>>
>> Jörn
> 

Re: Eclipse launch support for AEs

Posted by Jörn Kottmann <ko...@gmail.com>.
Any opinions/comments on this? Otherwise I will start working on it.

Jörn

On 3/21/11 12:54 PM, Jörn Kottmann wrote:
> Hi all,
>
> developing/testing AEs inside eclipse is cumbersome because we do not
> have launch support for AEs. To run an AE inside eclipse a small helper
> class must be created which can instantiate the AE, supply it with CASes
> and maybe serialize the processed CASes again.
>
> To ease up this process we should have launch support which is capable of
> instantiating an AE (or AAE), supply it with CASes and then serialize 
> the CASes
> again. The launch support should also be able to run PEARS.
>
> A first simple version of such a wizard could read all xmi files from one
> folder and write the results to another folder.
>
> Combined with the Cas Editor we would then have complete eclipse 
> tooling for
> developing AEs, e.g. for making a simple hello world AE a user might
> want to perform the following steps:
>
> 1. Write the AE, create the descriptor and type system
> 2. Import sample texts
> 3. View the imported texts
> 4. Run the AE over the imported texts
> 5. View added annotations
>
> Jörn


Re: Eclipse launch support for AEs

Posted by Jörn Kottmann <ko...@gmail.com>.
On 4/8/11 12:42 PM, Marshall Schor wrote:
>
> On 4/8/2011 6:23 AM, Jörn Kottmann wrote:
>> On 4/8/11 12:18 PM, Marshall Schor wrote:
>>> I think so - if you mean, we don't need it for video, sound, etc.
>>>
>>> It's needed also for xml input, if you're supporting that.
>> Currently plain/text files and CAS files are supported as input.
>> I mean we want this feature only for plain/text input files because if the input
>> is a CAS file the language might already be set, and might also differ
>> from view to view.
> +1 that sounds completely correct :-)
Ok, nice, its only a small modification, I checked it in a few minutes ago.
The language can now be set by a text field, I hope that is appropriate,
as far as I know any string is a valid language, right?

Is the language string always lower cased by UIMA? If so we might want
to mention this in the setDocumentLanguage javadoc.

Jörn

Re: Eclipse launch support for AEs

Posted by Marshall Schor <ms...@schor.com>.

On 4/8/2011 6:23 AM, Jörn Kottmann wrote:
> On 4/8/11 12:18 PM, Marshall Schor wrote:
>> I think so - if you mean, we don't need it for video, sound, etc.
>>
>> It's needed also for xml input, if you're supporting that.
>
> Currently plain/text files and CAS files are supported as input.
> I mean we want this feature only for plain/text input files because if the input
> is a CAS file the language might already be set, and might also differ
> from view to view.

+1 that sounds completely correct :-)

-Marshall
>
> There is no support for binary input currently, maybe that should be added also.
> For binary input I believe it would be important to have an option to set the
> mime type.
>
> Jörn
>
>

Re: Eclipse launch support for AEs

Posted by Jörn Kottmann <ko...@gmail.com>.
On 4/8/11 12:18 PM, Marshall Schor wrote:
> I think so - if you mean, we don't need it for video, sound, etc.
>
> It's needed also for xml input, if you're supporting that.

Currently plain/text files and CAS files are supported as input.
I mean we want this feature only for plain/text input files because if 
the input
is a CAS file the language might already be set, and might also differ
from view to view.

There is no support for binary input currently, maybe that should be 
added also.
For binary input I believe it would be important to have an option to 
set the
mime type.

Jörn

Re: Eclipse launch support for AEs

Posted by Marshall Schor <ms...@schor.com>.
I think so - if you mean, we don't need it for video, sound, etc.

It's needed also for xml input, if you're supporting that.

On 4/8/2011 6:03 AM, Jörn Kottmann wrote:
> On 4/8/11 11:57 AM, Marshall Schor wrote:
>> One other feature needed to run the example annotators is the ability to set the
>> "language".  This is because some of the examples make use of the result
>> specification, and are set to only produce results for "English" language
>> subjects-of-analysis.  You can see this if you try running the
>> MeetingDetectorTAE.xml in tutorial/ex4.
>>
> This feature we only need for the plain/text input, right?
>
> Jörn
>
>

Re: Eclipse launch support for AEs

Posted by Jörn Kottmann <ko...@gmail.com>.
On 4/8/11 11:57 AM, Marshall Schor wrote:
> One other feature needed to run the example annotators is the ability to set the
> "language".  This is because some of the examples make use of the result
> specification, and are set to only produce results for "English" language
> subjects-of-analysis.  You can see this if you try running the
> MeetingDetectorTAE.xml in tutorial/ex4.
>
This feature we only need for the plain/text input, right?

Jörn

Re: Eclipse launch support for AEs

Posted by Marshall Schor <ms...@schor.com>.
One other feature needed to run the example annotators is the ability to set the
"language".  This is because some of the examples make use of the result
specification, and are set to only produce results for "English" language
subjects-of-analysis.  You can see this if you try running the
MeetingDetectorTAE.xml in tutorial/ex4.

-Marshall

On 3/21/2011 7:54 AM, Jörn Kottmann wrote:
> Hi all,
>
> developing/testing AEs inside eclipse is cumbersome because we do not
> have launch support for AEs. To run an AE inside eclipse a small helper
> class must be created which can instantiate the AE, supply it with CASes
> and maybe serialize the processed CASes again.
>
> To ease up this process we should have launch support which is capable of
> instantiating an AE (or AAE), supply it with CASes and then serialize the CASes
> again. The launch support should also be able to run PEARS.
>
> A first simple version of such a wizard could read all xmi files from one
> folder and write the results to another folder.
>
> Combined with the Cas Editor we would then have complete eclipse tooling for
> developing AEs, e.g. for making a simple hello world AE a user might
> want to perform the following steps:
>
> 1. Write the AE, create the descriptor and type system
> 2. Import sample texts
> 3. View the imported texts
> 4. Run the AE over the imported texts
> 5. View added annotations
>
> Jörn
>
>

Re: Eclipse launch support for AEs

Posted by Jörn Kottmann <ko...@gmail.com>.
It is fixed now.

Jörn

On 4/6/11 11:11 PM, Marshall Schor wrote:
>
> On 4/6/2011 9:36 AM, Jörn Kottmann wrote:
>> On 4/6/11 2:11 PM, Marshall Schor wrote:
>>> Launching without having the output folder pre-created
>> How could you launch without having the output folder created?
>> The validation should fail, show an error message and disable the
>> "Debug"/"Run" button
>> in the launch dialog.
> 1) create the output folder
> 2) create the run configuration, save it.
> 3) delete the output folder
> 4) run the saved configuration.
>> Jörn
>>
>>


Re: Eclipse launch support for AEs

Posted by Jörn Kottmann <ko...@gmail.com>.
On 4/6/11 11:11 PM, Marshall Schor wrote:
>
> On 4/6/2011 9:36 AM, Jörn Kottmann wrote:
>> On 4/6/11 2:11 PM, Marshall Schor wrote:
>>> Launching without having the output folder pre-created
>> How could you launch without having the output folder created?
>> The validation should fail, show an error message and disable the
>> "Debug"/"Run" button
>> in the launch dialog.
> 1) create the output folder
> 2) create the run configuration, save it.
> 3) delete the output folder
> 4) run the saved configuration.

Thanks for find this, actually we check if a launch configuration is
valid inside the isValid method of the AnalysisEngieMainTab class.
If there is some problem it returns false and sets an error message.

If you run a saved invalid configuration this check is by-passed
and the AnalysisEngineLaunchConfigurationDelegate must throw
a CoreException while construction the program arguments,
which it does not do currently.

Jörn





Re: Eclipse launch support for AEs

Posted by Marshall Schor <ms...@schor.com>.

On 4/6/2011 9:36 AM, Jörn Kottmann wrote:
> On 4/6/11 2:11 PM, Marshall Schor wrote:
>> Launching without having the output folder pre-created
>
> How could you launch without having the output folder created?
> The validation should fail, show an error message and disable the
> "Debug"/"Run" button
> in the launch dialog.

1) create the output folder
2) create the run configuration, save it.
3) delete the output folder
4) run the saved configuration.
>
> Jörn
>
>

Re: Eclipse launch support for AEs

Posted by Jörn Kottmann <ko...@gmail.com>.
On 4/6/11 2:11 PM, Marshall Schor wrote:
> Launching without having the output folder pre-created

How could you launch without having the output folder created?
The validation should fail, show an error message and disable the 
"Debug"/"Run" button
in the launch dialog.

Jörn

Re: Eclipse launch support for AEs

Posted by Jörn Kottmann <ko...@gmail.com>.
Hello,

good catch, the code needs to make an absolute input file path
relative to the input folder path.

As pointed out replaceFirst should not be used. Instead I am using now
startWith to ensure that the input file path really starts with the 
input folder path,
and substring to remove the input folder path from the input file path.

if (inputFilePath.startsWith(inputDirectory.getPath())) {
   relativeInputFilePath = 
inputFilePath.substring(inputDirectory.getPath().length());
}

and finally
new File(outputFolder.getPath(), relativeInputFilePath)
to produce the output file.

Jörn

On 4/6/11 11:48 PM, Marshall Schor wrote:
> Hi -
>
> I ran this in debugging mode and stopped in the RemoteLauncher code.
>
> Line 191-192 is failing to do the right thing.
>
> It's constructing the output path, by first getting the inputFile.getPath()
> which in my instance is:
>
> D:\mavenAlign\uimaj-trunk-data\uimaj-examples\src\main\data\Apache_UIMA.txt
>
> and then trying to replace the first part of it:
>
> D:\mavenAlign\uimaj-trunk-data\uimaj-examples\src\main\data
>
> with the the output folder name (outputFolder.getName() - just returns the last
> part of the path - the final segment of the name, in my case "lout".
>
> The result of this code:
>
> outputFilePath.replaceFirst(inputDirectory.getName(),
>                outputFolder.getName());
>
> is
>
> D:\mavenAlign\uimaj-trunk-lout\uimaj-examples\src\main\data\Apache_UIMA.txt
>
> I think this is because the "replaceFirst" method takes as its first string, a
> "regular expression", not a literal string....  and the backslash is "special".
>
> Would probably be good to scan our code for use of "replaceFirst" to see if all
> uses are treating the first argument as a regular expression :-)
>
> Maven Javadocs plugin has this same kind of problem -see
> http://jira.codehaus.org/browse/MJAVADOC-312
>
> -Marshall
>

Re: Eclipse launch support for AEs

Posted by Marshall Schor <ms...@schor.com>.
Hi -

I ran this in debugging mode and stopped in the RemoteLauncher code.

Line 191-192 is failing to do the right thing.

It's constructing the output path, by first getting the inputFile.getPath()
which in my instance is:

D:\mavenAlign\uimaj-trunk-data\uimaj-examples\src\main\data\Apache_UIMA.txt

and then trying to replace the first part of it:

D:\mavenAlign\uimaj-trunk-data\uimaj-examples\src\main\data

with the the output folder name (outputFolder.getName() - just returns the last
part of the path - the final segment of the name, in my case "lout".

The result of this code:

outputFilePath.replaceFirst(inputDirectory.getName(),
              outputFolder.getName());

is

D:\mavenAlign\uimaj-trunk-lout\uimaj-examples\src\main\data\Apache_UIMA.txt

I think this is because the "replaceFirst" method takes as its first string, a
"regular expression", not a literal string....  and the backslash is "special".

Would probably be good to scan our code for use of "replaceFirst" to see if all
uses are treating the first argument as a regular expression :-)

Maven Javadocs plugin has this same kind of problem -see
http://jira.codehaus.org/browse/MJAVADOC-312

-Marshall



On 4/6/2011 8:16 AM, Jörn Kottmann wrote:
> On 4/6/11 2:11 PM, Marshall Schor wrote:
>> hmmm, not getting any output... it runs, no errors reported in eclipse error log
>> or in console.  Where would UIMA tracing /logging be expected to go?
>>
>
> Currently you can see the output which is written to the console. Will the
> UIMA logger
> by default write to the console?
>
> I tested it again, and it works for me. Do you run on windows?
> And do you have something in your input folder which is actually processed by
> your AE?
>
>> It would be nice to be able to have some menu picks on the launcher to control
>> tracking / logging.
>>
>> Launching without having the output folder pre-created, gives:
>>
>
> That needs to be fixed.
>
> Jörn
>
>

Re: Eclipse launch support for AEs

Posted by Jörn Kottmann <ko...@gmail.com>.
On 4/6/11 2:11 PM, Marshall Schor wrote:
> hmmm, not getting any output... it runs, no errors reported in eclipse error log
> or in console.  Where would UIMA tracing /logging be expected to go?
>

Currently you can see the output which is written to the console. Will 
the UIMA logger
by default write to the console?

I tested it again, and it works for me. Do you run on windows?
And do you have something in your input folder which is actually 
processed by your AE?

> It would be nice to be able to have some menu picks on the launcher to control
> tracking / logging.
>
> Launching without having the output folder pre-created, gives:
>

That needs to be fixed.

Jörn

Re: Eclipse launch support for AEs

Posted by Marshall Schor <ms...@schor.com>.
hmmm, not getting any output... it runs, no errors reported in eclipse error log
or in console.  Where would UIMA tracing /logging be expected to go?

It would be nice to be able to have some menu picks on the launcher to control
tracking / logging.

Launching without having the output folder pre-created, gives:

java.lang.NullPointerException
at
org.apache.uima.ep_launcher.AnalysisEngineLaunchConfigurationDelegate.getProgramArguments(AnalysisEngineLaunchConfigurationDelegate.java:101)
at org.eclipse.jdt.launching.JavaLaunchDelegate.launch(JavaLaunchDelegate.java:63)
at
org.apache.uima.ep_launcher.AnalysisEngineLaunchConfigurationDelegate.launch(AnalysisEngineLaunchConfigurationDelegate.java:161)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:853)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:702)
at
org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:923)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1126)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

but nothing is written into that folder if it is there...

-M

On 4/6/2011 7:57 AM, Marshall Schor wrote:
> ok I'll try this.
>
> -Marshall
>
>
> On 4/6/2011 7:51 AM, Jörn Kottmann wrote:
>> On 4/5/11 9:30 PM, Jörn Kottmann wrote:
>>> Based on your review I suggest the following changes:
>>>
>>> -All paths are relative to the workspace root instead of being relative
>>> to the project. 
>> That is now changed and the selection bug in the output folder dialog is fixed.
>>
>> Jörn
>>
>>
>

Re: Eclipse launch support for AEs

Posted by Marshall Schor <ms...@schor.com>.
ok I'll try this.

-Marshall


On 4/6/2011 7:51 AM, Jörn Kottmann wrote:
> On 4/5/11 9:30 PM, Jörn Kottmann wrote:
>> Based on your review I suggest the following changes:
>>
>> -All paths are relative to the workspace root instead of being relative
>> to the project. 
>
> That is now changed and the selection bug in the output folder dialog is fixed.
>
> Jörn
>
>

Re: Eclipse launch support for AEs

Posted by Jörn Kottmann <ko...@gmail.com>.
On 4/5/11 9:30 PM, Jörn Kottmann wrote:
> Based on your review I suggest the following changes:
>
> -All paths are relative to the workspace root instead of being relative
> to the project. 

That is now changed and the selection bug in the output folder dialog is 
fixed.

Jörn

Re: Eclipse launch support for AEs

Posted by Jörn Kottmann <ko...@gmail.com>.
Hi Marshall,
thanks for your review please appreciate that all paths must be project 
relative,
the output folder is selected incorrectly by the browse dialog and should
be in your sample  "foldername", and the project must be set to "projname".

Based on your review I suggest the following changes:

-All paths are relative to the workspace root instead of being relative
to the project.
- The input and output folder can also be located anywhere in the file 
system.
-  The documentation should say that the output CASes are written in the 
xmi format.

I am unsure if we should do the output folder creation.
Do you think that is nice to have even when the browse dialog works 
correctly?

Did it work even without uima jars in your project?

Jörn

On 4/5/11 9:12 PM, Marshall Schor wrote:
> ok - I gave it try :-)
>
> I built it, and put the jar into my Eclipse's "dropins" directory.
>
> It seems nice :-) !
>
> A couple of small things:
>
> 1) I was surprised when the "input" spec only offered choices within the
> "project".  It seems that although that's a nice default, the data might be
> almost anywhere...
>
> 2) For the output - it does offer more choices, but it seems only to locations
> within the Eclipse workspace - I wanted to write to some temporary space, and
> couldn't specify it then and there - I would have to make up some new Eclipse
> workspace project (or use some pre-existing one), and then put a folder for the
> output there, ahead of time.
>
> It would be nice to let this pick go anywhere, including the file system, and to
> create a new folder right then, if desired.
>
> The documentation doesn't say what format the output is written in.
>
> I made a new folder in another project, and set the output folder in the
> launcher to that, using the browse... to pick it.  But the  configuration
> appears invalid - there is an error message at the top saying "The output folder
> must be a valid folder or not be set!".  The folder is showing as
> "\projname\foldername"
>
> Changing the output project name to be the same as the ProjectName for the
> launcher made no difference...
>
> -Marshall
>
> On 3/30/2011 4:38 AM, Jörn Kottmann wrote:
>> On 3/29/11 11:59 PM, Marshall Schor wrote:
>>> No, I've been swamped today... sorry. -Marshall
>> No problem, I will wait a little until you gave it a try and then
>> fix the paths.  Please also have a look at the documentation.
>>
>> Thanks,
>> Jörn
>>
>>


Re: Eclipse launch support for AEs

Posted by Marshall Schor <ms...@schor.com>.
ok - I gave it try :-)

I built it, and put the jar into my Eclipse's "dropins" directory.

It seems nice :-) !

A couple of small things:

1) I was surprised when the "input" spec only offered choices within the
"project".  It seems that although that's a nice default, the data might be
almost anywhere...

2) For the output - it does offer more choices, but it seems only to locations
within the Eclipse workspace - I wanted to write to some temporary space, and
couldn't specify it then and there - I would have to make up some new Eclipse
workspace project (or use some pre-existing one), and then put a folder for the
output there, ahead of time.

It would be nice to let this pick go anywhere, including the file system, and to
create a new folder right then, if desired.

The documentation doesn't say what format the output is written in. 

I made a new folder in another project, and set the output folder in the
launcher to that, using the browse... to pick it.  But the  configuration
appears invalid - there is an error message at the top saying "The output folder
must be a valid folder or not be set!".  The folder is showing as
"\projname\foldername"

Changing the output project name to be the same as the ProjectName for the
launcher made no difference...

-Marshall

On 3/30/2011 4:38 AM, Jörn Kottmann wrote:
> On 3/29/11 11:59 PM, Marshall Schor wrote:
>> No, I've been swamped today... sorry. -Marshall
>
> No problem, I will wait a little until you gave it a try and then
> fix the paths.  Please also have a look at the documentation.
>
> Thanks,
> Jörn
>
>

Re: Eclipse launch support for AEs

Posted by Jörn Kottmann <ko...@gmail.com>.
On 3/29/11 11:59 PM, Marshall Schor wrote:
> No, I've been swamped today... sorry. -Marshall

No problem, I will wait a little until you gave it a try and then
fix the paths.  Please also have a look at the documentation.

Thanks,
Jörn

Re: Eclipse launch support for AEs

Posted by Marshall Schor <ms...@schor.com>.

On 3/29/2011 9:55 AM, Jörn Kottmann wrote:
> On 3/29/11 3:50 PM, Marshall Schor wrote:
>> I recall in other Eclipse dialogs, there are variables (usually written with $)
>> that allow the user to specify which they want.
>>
> Yes, I only know of ${workspace_loc} in the Eclipse Application Main tab.

There are lots of variables, e.g.:
file_prompt
folder_prompt
java_type_name
project_loc
project_name
project_path
resource_loc , name, path
selected_resource_loc, name, path
etc.

> In other places it is just relative to the workspace root, like "Common" tab.
> I believe now that doing everything relative to the workspace root would
> be a good solution.
>
> Did you try to run the plugin?
>

No, I've been swamped today... sorry. -Marshall
> Jörn
>
>

Re: Eclipse launch support for AEs

Posted by Jörn Kottmann <ko...@gmail.com>.
On 3/29/11 3:50 PM, Marshall Schor wrote:
> I recall in other Eclipse dialogs, there are variables (usually written with $)
> that allow the user to specify which they want.
>
Yes, I only know of ${workspace_loc} in the Eclipse Application Main tab.
In other places it is just relative to the workspace root, like "Common" 
tab.
I believe now that doing everything relative to the workspace root would
be a good solution.

Did you try to run the plugin?

Jörn

Re: Eclipse launch support for AEs

Posted by Marshall Schor <ms...@schor.com>.

On 3/29/2011 8:25 AM, Jörn Kottmann wrote:
> On 3/29/11 2:13 PM, Jörn Kottmann wrote:
>> On 3/23/11 6:56 PM, Marshall Schor wrote:
>>> It sounds like launching is quite different from "debugging" - so I would vote
>>> to put it into its own plugin.
>>
>> Yeah, I checked it in now and would like to get some feedback,
>> there is one small issue remaining with the resource selection
>> dialog of the output folder, but I guess that we can solve quickly.
>>
>
> Currently the paths in the Main dialog are project relative,
> I guess that should be changed to workspace root relative,
> right?

I recall in other Eclipse dialogs, there are variables (usually written with $)
that allow the user to specify which they want. 

-Marshall
>
> Jörn
>
>

Re: Eclipse launch support for AEs

Posted by Jörn Kottmann <ko...@gmail.com>.
On 3/29/11 2:13 PM, Jörn Kottmann wrote:
> On 3/23/11 6:56 PM, Marshall Schor wrote:
>> It sounds like launching is quite different from "debugging" - so I 
>> would vote
>> to put it into its own plugin.
>
> Yeah, I checked it in now and would like to get some feedback,
> there is one small issue remaining with the resource selection
> dialog of the output folder, but I guess that we can solve quickly.
>

Currently the paths in the Main dialog are project relative,
I guess that should be changed to workspace root relative,
right?

Jörn

Re: Eclipse launch support for AEs

Posted by Jörn Kottmann <ko...@gmail.com>.
On 3/23/11 6:56 PM, Marshall Schor wrote:
> It sounds like launching is quite different from "debugging" - so I would vote
> to put it into its own plugin.

Yeah, I checked it in now and would like to get some feedback,
there is one small issue remaining with the resource selection
dialog of the output folder, but I guess that we can solve quickly.

Jörn


Re: Eclipse launch support for AEs

Posted by Marshall Schor <ms...@schor.com>.
It sounds like launching is quite different from "debugging" - so I would vote
to put it into its own plugin.

-Marshall

On 3/23/2011 1:45 PM, Jörn Kottmann wrote:
> On 3/23/11 2:51 PM, Marshall Schor wrote:
>> In addition, when using Eclipse for debugging, if you've installed the Eclipse
>> UIMA tools, there is a structured debug view of significant UIMA objects, such
>> as the CAS, indexes, feature structures, etc.
>>
>> See
>> http://uima.apache.org/d/uimaj-2.3.1/tutorials_and_users_guides.html#ugr.tug.aae.viewing_UIMA_objects_in_eclipse_debugger
>>
>
> Should we put the launcher into the debug plugin or into a separate one?
>
> An eclipse corner articles suggests to split the launcher into two plugins,
> one which provides the launch support and one for the UI. This way
> other plugins could launch an AE without depending on any UI plugins.
> For me it sounds like that API launch support might not be important
> for us, but maybe I am mistaken.
>
> Jörn
>
>

Re: Eclipse launch support for AEs

Posted by Jörn Kottmann <ko...@gmail.com>.
On 3/23/11 2:51 PM, Marshall Schor wrote:
> In addition, when using Eclipse for debugging, if you've installed the Eclipse
> UIMA tools, there is a structured debug view of significant UIMA objects, such
> as the CAS, indexes, feature structures, etc.
>
> See
> http://uima.apache.org/d/uimaj-2.3.1/tutorials_and_users_guides.html#ugr.tug.aae.viewing_UIMA_objects_in_eclipse_debugger

Should we put the launcher into the debug plugin or into a separate one?

An eclipse corner articles suggests to split the launcher into two plugins,
one which provides the launch support and one for the UI. This way
other plugins could launch an AE without depending on any UI plugins.
For me it sounds like that API launch support might not be important
for us, but maybe I am mistaken.

Jörn

Re: Eclipse launch support for AEs

Posted by Marshall Schor <ms...@schor.com>.
In addition, when using Eclipse for debugging, if you've installed the Eclipse
UIMA tools, there is a structured debug view of significant UIMA objects, such
as the CAS, indexes, feature structures, etc.

See
http://uima.apache.org/d/uimaj-2.3.1/tutorials_and_users_guides.html#ugr.tug.aae.viewing_UIMA_objects_in_eclipse_debugger

-Marshall

On 3/23/2011 5:58 AM, Thilo Götz wrote:
> On 3/23/2011 10:05, Jens Grivolla wrote:
>> Sounds great.  Does this mean that you could use the Eclipse debugger to step
>> through an AE, set breakpoints, etc.?  Or is there already a way to do that?  So
>> far I have always packaged the AE and then run it through CPEgui or CVD with no
>> Eclipse integration for debugging.
> You can run the CPEGui or CVD under the Eclipse debugger, set
> breakpoints in your code and debug that way.  Am I missing
> something?
>
> For CVD, you just need the UIMA core and tools jars in your
> classpath, and start CVD with main() in org.apache.uima.tools.cvd.CVD.
>
> --Thilo
>
>> On 03/21/2011 12:54 PM, Jörn Kottmann wrote:
>>> Hi all,
>>>
>>> developing/testing AEs inside eclipse is cumbersome because we do not
>>> have launch support for AEs. To run an AE inside eclipse a small helper
>>> class must be created which can instantiate the AE, supply it with CASes
>>> and maybe serialize the processed CASes again.
>>>
>>> To ease up this process we should have launch support which is capable of
>>> instantiating an AE (or AAE), supply it with CASes and then serialize
>>> the CASes
>>> again. The launch support should also be able to run PEARS.
>>>
>>> A first simple version of such a wizard could read all xmi files from one
>>> folder and write the results to another folder.
>>>
>>> Combined with the Cas Editor we would then have complete eclipse tooling
>>> for
>>> developing AEs, e.g. for making a simple hello world AE a user might
>>> want to perform the following steps:
>>>
>>> 1. Write the AE, create the descriptor and type system
>>> 2. Import sample texts
>>> 3. View the imported texts
>>> 4. Run the AE over the imported texts
>>> 5. View added annotations
>>>
>>> Jörn
>>>
>>
>

Re: Eclipse launch support for AEs

Posted by Thilo Götz <tw...@gmx.de>.
On 3/23/2011 10:05, Jens Grivolla wrote:
> Sounds great.  Does this mean that you could use the Eclipse debugger to step
> through an AE, set breakpoints, etc.?  Or is there already a way to do that?  So
> far I have always packaged the AE and then run it through CPEgui or CVD with no
> Eclipse integration for debugging.

You can run the CPEGui or CVD under the Eclipse debugger, set
breakpoints in your code and debug that way.  Am I missing
something?

For CVD, you just need the UIMA core and tools jars in your
classpath, and start CVD with main() in org.apache.uima.tools.cvd.CVD.

--Thilo

> 
> On 03/21/2011 12:54 PM, Jörn Kottmann wrote:
>> Hi all,
>>
>> developing/testing AEs inside eclipse is cumbersome because we do not
>> have launch support for AEs. To run an AE inside eclipse a small helper
>> class must be created which can instantiate the AE, supply it with CASes
>> and maybe serialize the processed CASes again.
>>
>> To ease up this process we should have launch support which is capable of
>> instantiating an AE (or AAE), supply it with CASes and then serialize
>> the CASes
>> again. The launch support should also be able to run PEARS.
>>
>> A first simple version of such a wizard could read all xmi files from one
>> folder and write the results to another folder.
>>
>> Combined with the Cas Editor we would then have complete eclipse tooling
>> for
>> developing AEs, e.g. for making a simple hello world AE a user might
>> want to perform the following steps:
>>
>> 1. Write the AE, create the descriptor and type system
>> 2. Import sample texts
>> 3. View the imported texts
>> 4. Run the AE over the imported texts
>> 5. View added annotations
>>
>> Jörn
>>
> 
> 

Re: Eclipse launch support for AEs

Posted by Jörn Kottmann <ko...@gmail.com>.
On 3/23/11 10:05 AM, Jens Grivolla wrote:
> Sounds great.  Does this mean that you could use the Eclipse debugger 
> to step through an AE, set breakpoints, etc.?  Or is there already a 
> way to do that?  So far I have always packaged the AE and then run it 
> through CPEgui or CVD with no Eclipse integration for debugging.

You will be able to select a specifier you would like to run in eclipse, 
then it can either be started
in "run" or "debug" mode. The AE will then be supplied with CASes which 
are either read in as xmi/xcas
or created from plain text files, optionally the processed CASes can be 
written to an output folder for
later inspection with the Cas Editor.

I am working on this in my spare time, but I already made good progress 
and hopefully will be able to
have something ready soon.

Many just create a small helper class which does that instead of 
CPEgui/CVD, but I personally find that quit
annoying ... because it must be done over and over again.

Jörn

Re: Eclipse launch support for AEs

Posted by Jens Grivolla <j+...@grivolla.net>.
Sounds great.  Does this mean that you could use the Eclipse debugger to 
step through an AE, set breakpoints, etc.?  Or is there already a way to 
do that?  So far I have always packaged the AE and then run it through 
CPEgui or CVD with no Eclipse integration for debugging.

On 03/21/2011 12:54 PM, Jörn Kottmann wrote:
> Hi all,
>
> developing/testing AEs inside eclipse is cumbersome because we do not
> have launch support for AEs. To run an AE inside eclipse a small helper
> class must be created which can instantiate the AE, supply it with CASes
> and maybe serialize the processed CASes again.
>
> To ease up this process we should have launch support which is capable of
> instantiating an AE (or AAE), supply it with CASes and then serialize
> the CASes
> again. The launch support should also be able to run PEARS.
>
> A first simple version of such a wizard could read all xmi files from one
> folder and write the results to another folder.
>
> Combined with the Cas Editor we would then have complete eclipse tooling
> for
> developing AEs, e.g. for making a simple hello world AE a user might
> want to perform the following steps:
>
> 1. Write the AE, create the descriptor and type system
> 2. Import sample texts
> 3. View the imported texts
> 4. Run the AE over the imported texts
> 5. View added annotations
>
> Jörn
>