[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [Dltk-dev] Problem with DLTK Indexing
|
Alex,
Found I could reuse the BuildPathsPropertyPage with only minor
changes. Since I am implementing DLTK editors in Java projects, the
editors do not appear to be in DLTK standard IScriptProject's or use
IModelElement's. The change required is to make
BuildPathsPropertyPage#getProject and
BuildPathsPropertyPage#isScriptProject protected, rather than
private. Local overriding methods can then be implemented to also
recognize Java projects as valid containers. Works very nicely.
Any chance those methods could be made protected in the DLTK codebase?
Many thanks,
Gerald
At 11:16 AM 12/8/2008, Alex Panchenko wrote:
Addition to the code:
IProject p = ....
IScriptProject proj = DLTKCore.create(p);
----- Original Message -----
From: "Alex Panchenko" <alex@xxxxxxxxx>
To: "DLTK Developer Discussions" <dltk-dev@xxxxxxxxxxx>
Sent: Tuesday, December 9, 2008 12:24:12 AM GMT +06:00 Almaty, Novosibirsk
Subject: Re: [Dltk-dev] Problem with DLTK Indexing
OK, now I understand what's happening.
DLTK uses own setup of the source folders.
So, the answer to your original question: the way to control the
scope of the DLTK indexing is the .buildpath file.
The structure is similar to the .classpath, so if you want DLTK to
parse only "src" folder
then the .buildpath file content should be
<?xml version="1.0" encoding="UTF-8"?>
<buildpath>
<buildpathentry kind="src" path="src"/>
</buildpath>
By default DLTK treats the project root as source folder and tries
to parse all the files.
The .buildpath could be created using the code similar to the following
IBuildpathEntry src = DLTKCore.newSourceEntry(new Path("src"));
proj.setRawBuildpath(new IBuildpathEntry[] { src }, null);
Regards,
Alex
----- Original Message -----
From: "Gerald Rosenberg" <gerald@xxxxxxxxxx>
To: "DLTK Developer Discussions" <dltk-dev@xxxxxxxxxxx>
Sent: Monday, December 8, 2008 11:27:43 PM GMT +06:00 Almaty, Novosibirsk
Subject: Re: [Dltk-dev] Problem with DLTK Indexing
At 07:27 AM 12/8/2008, you wrote:
>Gerald,
>
>I am not sure if we are talking about the same thing.
Seems.
>I mean the details of your DLTK project (i.e. project with some
>scripting nature).
I have built a very standard DLTK editor/builder using Eclipse 3.4.1
and DLTK 0.95.1. The editor is for Antlr grammars and the builder
uses Antlr to generate the Java source for the corresponding
Lexer/Parser. The editor adds its required nature to the .project
file (attached).
>- the .buildpath file of your DLTK project
I have no .buildpath file
>- the directory structure of your DLTK project
D:/DevFiles/WorkSpace34/AntlrDT/.settings
D:/DevFiles/WorkSpace34/AntlrDT/attic
D:/DevFiles/WorkSpace34/AntlrDT/bin
D:/DevFiles/WorkSpace34/AntlrDT/data
D:/DevFiles/WorkSpace34/AntlrDT/icons
D:/DevFiles/WorkSpace34/AntlrDT/META-INF
D:/DevFiles/WorkSpace34/AntlrDT/src <- Java and script files live under here
D:/DevFiles/WorkSpace34/AntlrDT/templates
>Or do do you use DLTK in other ways?
>
>Regards,
>Alex
>
>----- Original Message -----
>From: "Gerald Rosenberg" <gerald@xxxxxxxxxx>
>To: "DLTK Developer Discussions" <dltk-dev@xxxxxxxxxxx>
>Sent: Monday, December 8, 2008 9:07:05 PM GMT +06:00 Almaty, Novosibirsk
>Subject: Re: [Dltk-dev] Problem with DLTK Indexing
>
>Alex:
>
>Don't have a .buildpath; did you mean build.properties?
>
>output.. = bin/
>bin.includes = META-INF/,\
> plugin.xml,\
> log4j.properties,\
> icons/,\
> .,\
> plugin.properties,\
> templates/
>source.. = src/
>bin.excludes = icons/misc/
>
>
>Directory structure is:
>
><workspace root>/<project root>/.settings
><workspace root>/<project root>/attic
><workspace root>/<project root>/bin
><workspace root>/<project root>/data
><workspace root>/<project root>/icons
><workspace root>/<project root>/META-INF
><workspace root>/<project root>/src
><workspace root>/<project root>/templates
>
>Thanks,
>Gerald
>
>At 01:55 AM 12/8/2008, you wrote:
> >Hi Gerald,
> >
> >According to your description it looks like a bug.
> >
> >Could you please provide more details - your folder structure and
> >the contents of the .buildpath file?
> >
> >Regards,
> >Alex
> >
> >----- Original Message -----
> >From: "Gerald Rosenberg" <gerald@xxxxxxxxxx>
> >To: "DLTK Developer Discussions" <dltk-dev@xxxxxxxxxxx>
> >Sent: Monday, December 8, 2008 10:54:58 AM GMT +06:00 Almaty, Novosibirsk
> >Subject: [Dltk-dev] Problem with DLTK Indexing
> >
> >Is there a way to control the scope of DLTK indexing?
> >
> >I have an "attic" folder in my project to hold script snippets, many
> >of which contain completely invalid syntax. That folder is not on
> >the build path, yet it seems that DLTK still tries to index them all.
> >
> >Looks like the indexing job is trying to run the source parser on the
> >snippets and becomes inundated with parser generate errors. The
> >result is a not-quite-frozen workspace -- the CPU pegs and the Java
> >process grows to over 2 Meg. If I cancel the DLTK indexing process,
> >the workbench becomes unstable and I have to restart.
> >
> >_______________________________________________
> >dltk-dev mailing list
> >dltk-dev@xxxxxxxxxxx
> >https://dev.eclipse.org/mailman/listinfo/dltk-dev
> >_______________________________________________
> >dltk-dev mailing list
> >dltk-dev@xxxxxxxxxxx
> >https://dev.eclipse.org/mailman/listinfo/dltk-dev
>
>_______________________________________________
>dltk-dev mailing list
>dltk-dev@xxxxxxxxxxx
>https://dev.eclipse.org/mailman/listinfo/dltk-dev
>_______________________________________________
>dltk-dev mailing list
>dltk-dev@xxxxxxxxxxx
>https://dev.eclipse.org/mailman/listinfo/dltk-dev
_______________________________________________
dltk-dev mailing list
dltk-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dltk-dev
_______________________________________________
dltk-dev mailing list
dltk-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dltk-dev