Skip to content

Importing an ArduinoIDE project with the New Sketch Wizard and using same sketch-name, failed. #424

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jrobert-gh opened this issue Apr 7, 2016 · 8 comments
Assignees
Labels

Comments

@jrobert-gh
Copy link

I followed the procedure you posted in this Arduino Stack Exchange answer but I was not able to create a new Eclipse project from an existing ArduinoIDE sketch.

  • I created a sketch with the ArduinoIDE.
  • In Eclipse I started the New Sketch Wizard and gave the new sketch the same name as I'd used in the ArduinoIDE.
  • What I expected: A new project containing the code I had already written.
  • What actually happened: The original code was replaced by the pro-forma empty sketch.
@jantje
Copy link
Member

jantje commented Apr 8, 2016

I'll have a look at this.

@jantje jantje self-assigned this Apr 8, 2016
@jantje
Copy link
Member

jantje commented Apr 13, 2016

I can confirm that the default files are created.
I'll see what is easiest: A no file project or a test to not replace when copying files.
What is your preference?

@jrobert-gh
Copy link
Author

I think "test to don't replace" is less error prone by not depending on the user to do the right thing. But either would be welcome!

jantje added a commit that referenced this issue Apr 13, 2016
If the file already exists it is not over written. 
This solution Does not work with the samples for arduino IDE imported
projects. You need to select the ino or cpp option to work
I also made sure you can import a arduino project. That is you can now
delete a project and not have the folders removed and directly reimport
the project.
@jantje
Copy link
Member

jantje commented Apr 13, 2016

It seemed pretty simple. a fix should be available tomorrow on the nightly.

@jrobert-gh
Copy link
Author

Excellent - Thanks, Jantje.

@jantje
Copy link
Member

jantje commented Apr 14, 2016

Can you confirm this works at your location?

@jantje jantje added importance: usability OS: all domain: configuration Configuring Sloeber does not work as docummented Status: waiting for confirmation fix works The nightly contains a fix but the fix has not yet been confirmed to work. labels Apr 14, 2016
@jrobert-gh
Copy link
Author

Yes, it did create an Eclipse project that included my existing files without damage.
The only hitch I encountered was that my source code had #included some .h files that Eclipse couldn't find and aren't needed. I deleted those #includes from my source code but the .ino.cpp file wasn't updated to delete them as well; I had to manually edit them out. Thanks Jantje.

@jantje jantje added status: fixed in 3.1 and removed Status: waiting for confirmation fix works The nightly contains a fix but the fix has not yet been confirmed to work. labels Apr 14, 2016
@jantje
Copy link
Member

jantje commented Apr 14, 2016

txs

jantje pushed a commit that referenced this issue May 4, 2016
@jantje jantje closed this as completed Aug 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants