Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Importing an existing pdom file into a project.


Hi Tim,

Thanks a lot for the information. Sorry, I was late to catch up on the cdt-dev mailist.

I did not end up creating my own implementation of the indexer functionality. I don't have bandwidth to work on the reported bug. As Markus suggested, I ended up using the existing CDT's functionality to export and import the index with same project name between different workspaces. I would have liked to see a fix to give the ability to create a project with different name, but use the index of another project with different name but structurally same in directory hierarchy wise :).

Markus, thanks for your help on this.

Thanks,
-Sri.



On Tue, May 20, 2008 at 7:14 PM, <Tim.Kelly@xxxxxxxxx> wrote:
Hi Sri -
 
>>I went through the document on prebuilt indexer. It looked like exporting the index file of a project is a straight forward task, but importing part was a little confusing to me. Towards the end of the document it was mentioned that the way it can be configured was through the IDE. I was looking more at complete programmatic approach.
 
By programatic, I guess you mean reading the PDOM? That's where you can implement IReadOnlyPDOMProvider - see the CIndex doc for an example: org_eclipse_cdt_core_CIndex.html 
 
>>- Read only indexer is little restrictive.
 
See this bug for details. I don't have any decent work around for that, but I'd like one : )
 
221358 No way to update a prebuilt PDOM that is in use by an open project.
 

>>What I am trying to do is more like use an existing indexer of a project and apply it to a similar/same project, probably with different name in a different workspace, at the project creation time in a programmatic manner.
 
I may have misunderstood, but I don't think you can do that. Once you change the project name the PDOM is read only only available via the ReadOnly PDOMProvider extension.
 
Cheers,
Tim

From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of ext Srikanth Ranganamyna
Sent: Tuesday, May 20, 2008 8:23 PM

To: CDT General developers list.
Subject: Re: [cdt-dev] Importing an existing pdom file into a project.


Hi Tim,

I went through the document on prebuilt indexer. It looked like exporting the index file of a project is a straight forward task, but importing part was a little confusing to me. Towards the end of the document it was mentioned that the way it can be configured was through the IDE. I was looking more at complete programmatic approach.

- Read only indexer is little restrictive.  Is there a way that this can be converted into an automatic unpalatable indexer file based on the changes made to the files in the project, once imported?

What I am trying to do is more like use an existing indexer of a project and apply it to a similar/same project, probably with different name in a different workspace, at the project creation time in a programmatic manner.

Thanks for the pointers.

Regards,
-Sri.

On Fri, May 16, 2008 at 6:15 PM, <Tim.Kelly@xxxxxxxxx> wrote:
You can generate PDOMs with ExternalExportProjectProvider
and you can provide the pdom for your project configuration with IReadOnlyPDOMProvider
 
What we're doing is indexing hundreds of SDK headers for a known source base and then we provide the resulting
prebiult PDOM to verified projects with IReadOnlyPDOMProvider. However, these PDOM are just created from temporary projects
(not projects in other workspaces) so the indexes cannot be updated without regenerating the whole thing.
 
If that sounds like what yer trying to do see the docs under:
 
org.eclipse.cdt.doc.isv\guide\dom\index\prebuiltIndexes.html
 
 
Tim
 


From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of ext Srikanth Ranganamyna
Sent: Friday, May 16, 2008 6:43 PM

To: CDT General developers list.
Subject: Re: [cdt-dev] Importing an existing pdom file into a project.


I know PDOMManager is an internal class, but I am faced with a task where the amount of time indexing a huge project is not acceptable. So, the idea is to use an existing project's indexed file for another project created in a different workspace with same source tree.

But, although this is working but it is referring to the other workspace's project. Ideally, if there is a method that I can use to change the project name inside the pdom file or something then everything would be great and is exactly what is needed for my task.

Generic Question on Indexer
=====================
I have a huge project that took 2 to 3 hours to create an index file. Is there a way I can make use of this index file in other workspaces where project are created with exact same source tree structure, imagine multiple users pulling a view and creating a project out of it. So, I was looking if there are any capabilities like these available?

At this point in time, I had to use the internal calss, although it is discouraged. I hope I gave u a clarification in my question Markus.

Thanks,
-Sri.

On Fri, May 16, 2008 at 12:11 AM, Schorn, Markus <Markus.Schorn@xxxxxxxxxxxxx> wrote:
I don't exactly understand what you are trying to achieve. Anyways, PDOMManager is an internal class and should not be used from outside of the CDT plugins.
Markus.


From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Srikanth Ranganamyna
Sent: Friday, May 16, 2008 1:37 AM
To: CDT General developers list.
Subject: [cdt-dev] Importing an existing pdom file into a project.
Importance: Low

Hi,

I am new to the eclipse plugin development world and CDT in particular. Here is my problem:-

1. I have created a standard make C Project programatically by turning the indexer off, from an existing source code tree.
2. I turned the indexer on and I can see the pdom file getting created.
3. Now, I want to make use of this index file in the future after creating the project following step 1 method.
4. So, I created the project with indexer turned off and then tried to import the index file using the following method:-

       PDOMManager manager = (PDOMManager) CCorePlugin.getIndexManager();       
       manager.importProjectPDOM(<ICProject>, <InputStream>);

After running this code, there were no exceptions but I cannot see the function calls getting indexed. I am not sure if I am missing something here. Any suggestions?? Please advise.

Btw, I am using the null indexer id to turn the indexer off while creating the project and when I am importing the index file, I am not changing this indexer id.

Thanks,
-Sri.

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev



_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev



_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev



Back to the top