Skip to content

Commit 273342a

Browse files
committed
On mac a file is needed to select the arduino IDE instead of a folder in the preference page.
I made the changes but I can't test them.
1 parent 4533923 commit 273342a

File tree

4 files changed

+27
-12
lines changed

4 files changed

+27
-12
lines changed

Eclipse update site/WebContent/Arduino eclipse plugin FAQ.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,21 +184,22 @@ <h2>How come this plugin is free</h2>
184184
I don't want to think about this, because if I do I quit on the spot.<br>
185185
......(Jantje stopped thinking)<br>
186186
Update: The Arduino team has provided me with plenty of real Arduinos". I'm really pleased they have made those boards available to me. Mostly because I consider it as a recognition to my work by the core Arduino team.<br>
187+
Update 2: Some people jumped in with the development. Some hard to fix (for me) issues are now fixed for me too.<br>
187188
<sup>*</sup>I mean free and not free for 3 years.
188189

189190
<a name="OpenSource"></a>
190191
<h2>You state the plugin is open source. Where can I find the source?</h2>
191192
The first thing to note is that I only update the open source code when I release a new version. The latest and greatest code is as such not available.<br>
192193
You can find the code at <a href="https://github.com/jantje/arduino-eclipse-plugin">https://github.com/jantje/arduino-eclipse-plugin</a>
194+
Update: due to more people collaborating the latest version is at github.
193195

194196
<h1>Arduino IDE Versus The arduino Plugin</h1>
195197
<a name="why"></a>
196198
<h2>Why would I want to use this plugin</h2>
197199
This plugin is not meant to replace the Arduino IDE. I think the Arduino IDE is the place to get started with Arduino, no matter what is your background.
198200
However when you are growing in writing code, or when you come from a software development background you will feel restrained by the Arduino IDE.
199201
In that case the eclipse plugin may be an alternative.<br>
200-
Advantages the eclipse environment has to the Arduino IDE are described in
201-
202+
Advantages the eclipse environment has to the Arduino IDE are described in the next paragraphs. <br>
202203

203204
<a name="benefitIDE"></a>
204205
<h2>What is the benefit of the Arduino IDE to the eclipse plugin</h2>
@@ -244,13 +245,13 @@ <h2>What is the benefit of the eclipse plugin to the Arduino IDE?</h2>
244245
A system to keep hold of your Tasks. (simply adding a comment that starts with TODO will add the todo to the task view )</li><li>
245246
......
246247
</li></ul>
247-
248+
Did I mention compilation speed?<br>
248249
So there are plenty of good things a software developer misses in the Arduino IDE.
249250

250251
<a name="develop"></a>
251252
<h2>What do I need to know to develop code for Arduino with this plugin?</h2>
252253
After you
253-
have read the pro and con's question you may wonder &quot;��how much is there to learn
254+
have read the pro and con's question you may wonder &quot;how much is there to learn
254255
before I get this plugin to work?&quot;<br>
255256

256257
There is good news and there is bad news.

clientdb.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<com.ibm.magnolia.clientmodel:ClientModelRoot xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:com.ibm.magnolia.clientmodel="http:///com/ibm/magnolia/clientmodel.ecore">
33
<workItemEditorHistory>
4+
<internalContents date="2013-10-23T00:43:07.479+0200" description="287: fixed some warnings" repository="https://clm.jkebanking.net/ccm/">
5+
<workItem itemId="_Nwh_EDtrEeOVS9Zte3uxGA"/>
6+
</internalContents>
47
<internalContents date="2013-10-22T23:35:24.189+0200" description="286: issue 26 on github Create new sketch and name start with numbers -> problematic" repository="https://clm.jkebanking.net/ccm/">
58
<workItem itemId="_q5TQkDthEeOVS9Zte3uxGA"/>
69
</internalContents>
Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,36 @@
11
package it.baeyens.arduino.tools;
22

33
import org.eclipse.core.runtime.Path;
4+
import org.eclipse.core.runtime.Platform;
45
import org.eclipse.jface.preference.DirectoryFieldEditor;
6+
import org.eclipse.jface.preference.FieldEditor;
7+
import org.eclipse.jface.preference.FileFieldEditor;
8+
import org.eclipse.jface.preference.StringButtonFieldEditor;
59
import org.eclipse.swt.widgets.Composite;
610

7-
public class MyDirectoryFieldEditor extends DirectoryFieldEditor {
11+
public class MyDirectoryFieldEditor {
812

13+
StringButtonFieldEditor theEditor;
914
String mySuffix = "";// the suffix to append to the given path
1015

11-
@Override
1216
public String getStringValue() {
13-
// TODO Auto-generated method stub
1417
if (mySuffix.isEmpty()) {
15-
return super.getStringValue();
18+
return theEditor.getStringValue();
1619
}
17-
return new Path(super.getStringValue()).append(mySuffix).toString();
20+
return new Path(theEditor.getStringValue()).append(mySuffix).toString();
1821
}
1922

2023
public MyDirectoryFieldEditor(String name, String labelText, Composite parent, String suffix) {
21-
super(name, labelText, parent);
24+
if (Platform.getOS().equals(Platform.OS_MACOSX)) {
25+
theEditor = new FileFieldEditor(name, labelText, parent);
26+
} else {
27+
theEditor = new DirectoryFieldEditor(name, labelText, parent);
28+
}
2229
mySuffix = suffix;
2330
}
2431

32+
public FieldEditor getfield() {
33+
return theEditor;
34+
}
35+
2536
}

it.baeyens.arduino.core/src/it/baeyens/arduino/ui/ArduinoPreferencePage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
public class ArduinoPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
4747

4848
private StringFieldEditor mArduinoIdeVersion;
49-
private DirectoryFieldEditor mArduinoIdePath;
49+
private MyDirectoryFieldEditor mArduinoIdePath;
5050
private DirectoryFieldEditor mArduinoPrivateLibPath;
5151
private boolean mIsDirty = false;
5252
private IPath mPrefBoardFile = null;
@@ -161,7 +161,7 @@ protected void createFieldEditors() {
161161

162162
mArduinoIdePath = new MyDirectoryFieldEditor(ArduinoConst.KEY_ARDUINOPATH, "Arduino IDE path", parent, Common.getArduinoIdeSuffix());
163163

164-
addField(mArduinoIdePath);
164+
addField(mArduinoIdePath.getfield());
165165
mArduinoPrivateLibPath = new DirectoryFieldEditor(ArduinoConst.KEY_PRIVATE_LIBRARY_PATH, "Private Library path", parent);
166166
addField(mArduinoPrivateLibPath);
167167

0 commit comments

Comments
 (0)