Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Calling project.delete() in case of error occuring during project creation

Hi all,

It would be very helpful if someone can reply for this query.
Let me know if it not very clear.

Thanks & Regards,
Nayna Jain

----- Forwarded by Nayna Jain/India/IBM on 04/02/2010 13:13 -----
                                                                           
             Nayna                                                         
             Jain/India/IBM@IB                                             
             MIN                                                        To 
             Sent by:                  cdt-dev@xxxxxxxxxxx                 
             cdt-dev-bounces@e                                          cc 
             clipse.org                                                    
                                                                   Subject 
                                       [cdt-dev] Calling project.delete()  
             01/02/2010 00:17          in case of error occuring during    
                                       project creation                    
                                                                           
             Please respond to                                             
               "CDT General                                                
             developers list."                                             
             <cdt-dev@eclipse.                                             
                   org>                                                    
                                                                           
                                                                           




Hi all,

We have customized the project creation wizard for our development
environment.

To achieve this we have added a new Wizard Page to New C++ Project Wizard
using extension point org.eclipse.cdt.managedbuilder.ui.newWizardPages

While declaring this extension point in plugin.xml we have also provided
value for the attribute operationClass with name NewProjectWizardOperation

The class NewProjectWizardOperation implements IRunnableWithProgress.

The logic related to our requirements for project creation is written in
the run() method.

However we noticed that even if there is some failure in the logic related
to our requirements then also a the project gets created in the workspace
and is shown in the Package Explorer which we felt is confusing for the
user as that project cannot be actually used by him because of the failure
in our logic.

We are throwing the exception and catching them inside run() method
whenever there is failure in our logic.

Now I wanted to know whether it is OK to call project.delete() method
inside this catch() block inside run() method. SO, that if there is any
failure in our logic and exception is thrown then we delete that bad
project created in workspace and Package Explorer and so it doesn't confuse
the user.

However since there are lot many steps happening during delete() of the
project and also in case of project creation so we wanted to know whether
it is safe to call project.delete() like this from inside the code
implemented by client. Or it might have some internal issues inside CDT
project creation wizard.

Thanks & Regards,
Nayna Jain

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



Back to the top