Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Fwd: Re: CDT Development

Sorry, but what I thought was a bug (when custom wizard pages are added, the finish button should be disabled) was not. I finally accomplished this by changing my plug-in. So I won't be contributing a patch just yet, but for those with the same problem, here's what I did:

1) Each custom page contains a method called "isCustomPageComplete()". This method is called for each custom page (in their order of appearance) and must return true for each page except the last one which must return false until we get to that page and then it must return true. This will invalidate  the finish button until we get to the last page.

2) Once this is known, it is not too difficult to set a boolean for each page which is true unless the page is visible and return this value when isCustomPageComplete() is called. When we get to the last page it should return true so that the finish button is validated. (so this page returns false by default and true when we're in the page). I set these booleans in the setVisble() method for each page:

For all custom pages except the last one (itsOkToFinish is set to true by default):

@Override
public void setVisible(boolean visible) {
    if (visible) {
           itsOkToFinish = false;
    } else {
           itsOkToFinish = true;
    }
    ...

and for last page (itsOkToFinish is set to false by default):

@Override
public void setVisible(boolean visible) {
    if (visible) {
        itsOkToFinish = true;
    } else {
        itsOkToFinish = false;
    }
    ...

Anyway, I don't regret the time spent setting up a CDT development environment because it's so much easier to follow the CDT plug-ins and it sure helped me to figure this one out!

Antony


On 04/06/2013 09:56, Antony Burton wrote:
OK, understood. I will now look into sharing my bug fix (if it hasn't already been fixed in a later version),

Thanks again for your help,

Antony

 On 03/06/2013 21:25, Marc-André Laperle wrote:
Hi Antony,

This is not a complete set of rules but basically:
-When you add API like protected, public things (fields, methods, classes) inside non-internal packages, you need to bump the minor version.
-When you break the API like removing/renaming protected, public things (fields, methods, classes) inside non-internal packages, you need to bump the major version.
http://wiki.eclipse.org/Eclipse/API_Central

Marc-Andre

On 13-06-03 11:52 AM, Antony Burton wrote:
Hi Marc,
   Fantastic, I followed your section about building the CDT p2 repository and, as if by magic, it works! The only thing I didn't understand to begin with was that Maven should not be installed as a plug-in, but I soon figured it out. One thing I found funny, though, was that when I modified some code, it told me:

to add a @since tag in the new methods I added and that "the minor version should be incremented" in the project MANIFEST.MF

I did this and all works well, but I would like to understand what's happening,

 Thanks Antony


-------- Original Message --------
Subject: Re: [cdt-dev] CDT Development
Date: Fri, 31 May 2013 11:40:58 -0400
From: Marc-André Laperle <marc-andre.laperle@xxxxxxxxxxxx>
Reply-To: CDT General developers list. <cdt-dev@xxxxxxxxxxx>
To: CDT General developers list. <cdt-dev@xxxxxxxxxxx>


Hi Antony,

That's one part of the guide I haven't updated or tested. I actually have never tried this technique. I usually build the whole CDT and install the zip with Install New Software. I added a section about that [1]. I'll try the export technique later and update the section if necessary.

[1] http://wiki.eclipse.org/Getting_started_with_CDT_development#Building_the_CDT_p2_repository

Marc-Andre

On 13-05-31 10:59 AM, Antony Burton wrote:
Hi,
  OK I'm almost there...

I have successfully followed your guide, downloaded the CDT 8.0 repository, imported the project org.eclipse.managedbuilder.ui and modified the file CDTConfigWizardPage.java so that, if custom wizard pages are added, the finish button is disabled (which I think could be a bug and I could contribute this patch if so).
I have tested the modification and all works well.

Now, I'm stuck with "Creating a runtime patch". Here is what I have done:

1) I opened the plugin.xml file in the org.eclipse.managedbuilder.ui project
2) I changed the version to "8.0.3.qualifier"
3) Used the Export Wizard to (as I understood from the guide) create an Archive file, but I couldn't understand what to do with the zipped archive file, I put it in my plugins directory, but that didn't work. I also exported the plugin as a jar file and put it in the plugins folder and that didn't work either.

Could you please explain this last step?

Thanks,

Antony




On 29/05/2013 18:50, Marc-André Laperle wrote:
My bad, I changed the link to the Eclipse archives.

http://archive.eclipse.org/eclipse/downloads

Marc-Andre

On 13-05-29 12:29 PM, Antony Burton wrote:
OK, except there is no download link for Eclipse Classic 3.7.2

Antony

On 29/05/2013 17:58, Marc-André Laperle wrote:
I added a link to the older versions of Eclipse [1] in the Eclipse Setup section.

[1] http://wiki.eclipse.org/Older_Versions_Of_Eclipse

Marc-Andre

On 13-05-29 11:41 AM, Antony Burton wrote:
Thanks for your swift reply!

Yes you're right, It runs as eclipse application despite the errors. Will remove all projects I don't need. Can now start modifying things and then learn how to export the modified plug-in!

The guide is very good. I just got a bit lost because I'm am not working on the latest versions of Eclipse and CDT. As I said, I had trouble finding a 3.7.2 classic version of Eclipse SDK and the first time I tried all this I was using the wrong versions. Anyhow, now it works which is great!

Thanks again,

Antony

On 29/05/2013 17:06, Marc-André Laperle wrote:
On 13-05-29 10:43 AM, Antony Burton wrote:
Hi,
  I'm trying to change some code in CDT for the needs of our project (and maybe for other developers' projects) and I've followed:

http://wiki.eclipse.org/Getting_started_with_CDT_development

I have a couple of questions:

1) I'm at the part "Clone the Repo", which I have done (branch cdt_8_0) and taking heed of the comment: "Select all the projects or individual. Project filter does not seems to work. It maybe easier select all, then close projects you don't need", I've imported everything. But, when the workspace builds there are errors. Should I remove the projects with errors?

Those with errors are:
org.eclipse.cdt.codan.internal.ui.cxx
org.eclipse.cdt.core.lrparser
org.eclipse.cdt.core.lrparser.xlc
org.eclipse.cdt.core.parser.upc
org.eclipse.cdt.launch.remote
org.eclipse.cdt.managedbuilder.core
org.eclipse.cdt.tests

I would remove those projects (unless you really are interested in UPC or remote launching):
org.eclipse.cdt.core.lrparser
org.eclipse.cdt.core.lrparser.xlc
org.eclipse.cdt.core.parser.upc
org.eclipse.cdt.launch.remote

For the other projects, are you getting only API errors? You could ignore them or set your API baseline, as seen in the Eclipse Setup section or the same page. Also, I think org.eclipse.cdt.codan.internal.ui.cxx in 8.0 had an API error that wasn't fixed until later.


2) As suggested by Marc, (in another post) I am working with an Eclipse SDK with no CDT installed, so presumably I need all CDT projects for it to function. Is that right?

No, you can select only the ones you're interested in and their dependencies. For example, if you only import org.eclipse.cdt.ui, the manifest.mf will complain about missing org.eclipse.cdt.core so you'll have to import it as well. On the Getting started page I put a list of projects that you could start with.


As I've taken a long time to get to this point, I don't want to start experimenting and then have to start all over again, so I'm hoping someone could help me out.

I would be happy to contribute my humble offerings if I could understand how this works.

Thanks. Let me know if some parts of the guide needs more clarification.


Thanks,

Antony

PS. I am using Eclipse Indigo 3.7.2 Classic (could not find this in Eclipse site, so downloaded it from FileHippo) and CDT 8.0.2
_______________________________________________
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

_______________________________________________
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



_______________________________________________
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



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


Back to the top