Skip to content

Commit 6511811

Browse files
author
jantje
committed
#1472 first batch of changes
1 parent 72c13b8 commit 6511811

File tree

10 files changed

+121
-115
lines changed

10 files changed

+121
-115
lines changed

io.sloeber.application/plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
class="io.sloeber.application.Perspective"
2020
icon="icons/logo_16.png"
2121
id="io.sloeber.application.perspective"
22-
name="Arduino">
22+
name="Sloeber">
2323
</perspective>
2424
</extension>
2525
<extension

io.sloeber.core/src/io/sloeber/core/api/PasswordManager.java

Lines changed: 105 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -11,110 +11,110 @@
1111
import io.sloeber.core.common.Const;
1212

1313
public class PasswordManager {
14-
private String myPassword;
15-
private String myLogin = null;
16-
private String myhost = null;
17-
boolean ret = false;
18-
19-
public PasswordManager() {
20-
// no constructor needed
21-
}
22-
23-
public String getPassword() {
24-
return this.myPassword;
25-
}
26-
27-
public String getLogin() {
28-
return this.myLogin;
29-
}
30-
31-
public String getHost() {
32-
return this.myhost;
33-
}
34-
35-
/**
36-
* Sets the host. If there is no Login,password for this host the method
37-
* returns false. If a login/password for the host is found the method
38-
* returns true
39-
*
40-
* @param host
41-
* @return
42-
*/
43-
public boolean setHost(String host) {
44-
this.myhost = host;
45-
this.myPassword = null;
46-
this.myLogin = null;
47-
48-
String nodename = ConvertHostToNodeName(this.myhost);
49-
ISecurePreferences root = SecurePreferencesFactory.getDefault();
50-
51-
try {
52-
if (root.nodeExists(nodename)) {
53-
54-
ISecurePreferences node = root.node(nodename);
55-
this.myPassword = node.get(Messages.security_password, null);
56-
this.myLogin = node.get(Messages.security_login, null);
57-
return true;
58-
}
59-
60-
} catch (StorageException e) {
61-
Common.log(new Status(IStatus.ERROR, Const.CORE_PLUGIN_ID,
62-
"Set a password on the project properties->arduino page", e)); //$NON-NLS-1$
63-
}
64-
65-
return false;
66-
}
67-
68-
/**
69-
* Sets the login and password for a host
70-
*
71-
* @param host
72-
* @param login
73-
* @param password
74-
* @throws Exception
75-
*/
76-
public void setLoginData(String host, String login, String password) throws Exception {
77-
this.myhost = host;
78-
this.myLogin = login;
79-
this.myPassword = password;
80-
String nodename = ConvertHostToNodeName(this.myhost);
81-
ISecurePreferences root = SecurePreferencesFactory.getDefault();
82-
ISecurePreferences node = root.node(nodename);
83-
84-
node.put(Messages.security_login, this.myLogin, false);
85-
node.put(Messages.security_password, this.myPassword, true);
86-
}
87-
88-
static public void setPwd(String host, String login, String pwd) {
89-
90-
String nodename = ConvertHostToNodeName(host);
91-
ISecurePreferences root = SecurePreferencesFactory.getDefault();
92-
ISecurePreferences node = root.node(nodename);
93-
94-
try {
95-
node.put(Messages.security_login, login, false);
96-
node.put(Messages.security_password, pwd, false);
97-
} catch (StorageException e) {
98-
99-
Common.log(new Status(IStatus.ERROR, Const.CORE_PLUGIN_ID, "failed to set login info", e)); //$NON-NLS-1$
100-
}
101-
102-
}
103-
104-
public static void ErasePassword(String host) {
105-
String nodename = ConvertHostToNodeName(host);
106-
ISecurePreferences root = SecurePreferencesFactory.getDefault();
107-
108-
if (root.nodeExists(nodename)) {
109-
ISecurePreferences node = root.node(nodename);
110-
node.removeNode();// (Messages.security_password, null, true);
111-
}
112-
113-
}
114-
115-
private static String ConvertHostToNodeName(String host) {
116-
117-
return "ssh/" + host.replace(Const.DOT, Const.SLACH); //$NON-NLS-1$
118-
}
14+
private String myPassword;
15+
private String myLogin = null;
16+
private String myhost = null;
17+
boolean ret = false;
18+
19+
public PasswordManager() {
20+
// no constructor needed
21+
}
22+
23+
public String getPassword() {
24+
return this.myPassword;
25+
}
26+
27+
public String getLogin() {
28+
return this.myLogin;
29+
}
30+
31+
public String getHost() {
32+
return this.myhost;
33+
}
34+
35+
/**
36+
* Sets the host. If there is no Login,password for this host the method
37+
* returns false. If a login/password for the host is found the method
38+
* returns true
39+
*
40+
* @param host
41+
* @return
42+
*/
43+
public boolean setHost(String host) {
44+
this.myhost = host;
45+
this.myPassword = null;
46+
this.myLogin = null;
47+
48+
String nodename = ConvertHostToNodeName(this.myhost);
49+
ISecurePreferences root = SecurePreferencesFactory.getDefault();
50+
51+
try {
52+
if (root.nodeExists(nodename)) {
53+
54+
ISecurePreferences node = root.node(nodename);
55+
this.myPassword = node.get(Messages.security_password, null);
56+
this.myLogin = node.get(Messages.security_login, null);
57+
return true;
58+
}
59+
60+
} catch (StorageException e) {
61+
Common.log(new Status(IStatus.ERROR, Const.CORE_PLUGIN_ID,
62+
"Set a password on the project properties->Sloeber page", e)); //$NON-NLS-1$
63+
}
64+
65+
return false;
66+
}
67+
68+
/**
69+
* Sets the login and password for a host
70+
*
71+
* @param host
72+
* @param login
73+
* @param password
74+
* @throws Exception
75+
*/
76+
public void setLoginData(String host, String login, String password) throws Exception {
77+
this.myhost = host;
78+
this.myLogin = login;
79+
this.myPassword = password;
80+
String nodename = ConvertHostToNodeName(this.myhost);
81+
ISecurePreferences root = SecurePreferencesFactory.getDefault();
82+
ISecurePreferences node = root.node(nodename);
83+
84+
node.put(Messages.security_login, this.myLogin, false);
85+
node.put(Messages.security_password, this.myPassword, true);
86+
}
87+
88+
static public void setPwd(String host, String login, String pwd) {
89+
90+
String nodename = ConvertHostToNodeName(host);
91+
ISecurePreferences root = SecurePreferencesFactory.getDefault();
92+
ISecurePreferences node = root.node(nodename);
93+
94+
try {
95+
node.put(Messages.security_login, login, false);
96+
node.put(Messages.security_password, pwd, false);
97+
} catch (StorageException e) {
98+
99+
Common.log(new Status(IStatus.ERROR, Const.CORE_PLUGIN_ID, "failed to set login info", e)); //$NON-NLS-1$
100+
}
101+
102+
}
103+
104+
public static void ErasePassword(String host) {
105+
String nodename = ConvertHostToNodeName(host);
106+
ISecurePreferences root = SecurePreferencesFactory.getDefault();
107+
108+
if (root.nodeExists(nodename)) {
109+
ISecurePreferences node = root.node(nodename);
110+
node.removeNode();// (Messages.security_password, null, true);
111+
}
112+
113+
}
114+
115+
private static String ConvertHostToNodeName(String host) {
116+
117+
return "ssh/" + host.replace(Const.DOT, Const.SLACH); //$NON-NLS-1$
118+
}
119119

120120
}

io.sloeber.core/src/io/sloeber/core/api/Serial.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ public void connect(int maxTries) {
172172
} else if (SerialPortException.TYPE_PORT_NOT_FOUND.equals(e.getExceptionType())) {
173173
Common.log(new Status(IStatus.ERROR, Const.CORE_PLUGIN_ID, "Serial port " //$NON-NLS-1$
174174
+ this.portName
175-
+ " not found. Did you select the right one from the project properties -> Arduino -> Arduino?", //$NON-NLS-1$
175+
+ " not found. Did you select the right one from the project properties -> Sloeber?", //$NON-NLS-1$
176176
e));
177177
} else {
178178
Common.log(new Status(IStatus.ERROR, Const.CORE_PLUGIN_ID,

io.sloeber.core/src/io/sloeber/core/messages.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Upload_error_network=ERROR: Network upload using programmer not supported
6161
Upload_Error_serial_monitor_restart=Failed to restart serial monitor
6262
Upload_failed=Failed to run the Upload recipe
6363
Upload_failed_upload_file=failed to upload "{FILE}"
64-
Upload_login_credentials_missing=No credentials to login to "{HOST}"; add credentials in project properties->Arduino
64+
Upload_login_credentials_missing=No credentials to login to "{HOST}"; add credentials in project properties->Sloeber
6565
Upload_no_arduino_sketch=The current selected project is not an arduino sketch
6666
Upload_Project_nature_unaccesible=Can't access project nature
6767
Upload_sending_sketch=Sending sketch "{FILE}" to "{PORT}".

io.sloeber.core/src/io/sloeber/core/messages_nl.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ failed_to_remove_lib=Het verwijderen van bibliotheek "{LIB}" is mislukt.
2828
Boards_Get_menu_item_id_from_name_failed=Voor het bord ${BOARDID} kan het menu item met naam ${MENUITEMNAME} van het menu met ID ${MENUID} niet gevonden worden
2929
Helpers_Create_folder_failed=Het maken van de map "{FOLDER}" is mislukt.
3030
Helpers_delete_folder_failed=Het verwijderen van de map "{FOLDER}" is mislukt.
31-
Helpers_error_boards_TXT=De arduino configuratie van het project "{PROJECT}" is stuk.\nConfiguratie: "{CONFIG}" \nBoardsBestand: "{FILE}" \n"{BOARDID}"
31+
Helpers_error_boards_TXT=De Sloeber configuratie van het project "{PROJECT}" is stuk.\nConfiguratie: "{CONFIG}" \nBoardsBestand: "{FILE}" \n"{BOARDID}"
3232
Helpers_Error_File_does_not_exists=Het bestand "{FILE}" is zoek.
3333
Helpers_error_link_folder_is_empty=De map waar je met "{FILE}" naar wil linken bevat geen bestanden.
3434
Helpers_Error_parsing_IO_exception=Probleem bij het verwerken van het bestand "{FILE}" I/O exception.
@@ -61,7 +61,7 @@ Upload_error_network=Fout: opladen via netwerk is niet ondersteunt voor een prog
6161
Upload_Error_serial_monitor_restart=Het herstarten van de seriële monitor is mislukt.
6262
Upload_failed=Fout: het uploaden is mislukt
6363
Upload_failed_upload_file=Fout: het uploaden van bestand "{FILE}" is mislukt.
64-
Upload_login_credentials_missing=Geen gebruikersnaam/wachtwoord gevonden voor "{HOST}"; voeg die toe via de project eigenschappen->arduino
64+
Upload_login_credentials_missing=Geen gebruikersnaam/wachtwoord gevonden voor "{HOST}"; voeg die toe via de project eigenschappen->Sloeber
6565
Upload_no_arduino_sketch=Het huidige geselecteerde project wordt niet herkent als een arduino sketch.
6666
Upload_Project_nature_unaccesible=De aard van het project kan niet gelezen worden.
6767
Upload_sending_sketch=Het bestand "{FILE}" wordt via de seriële poort "{PORT}" opgeladen.

io.sloeber.ui.nl1/OSGI-INF/l10n/bundle_it.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#Properties file for io.sloeber.ui
2-
category.arduino.description = Operazioni Arduino Plugin
2+
category.arduino.description = Operazioni Sloeber Plugin
33
colorDefinition.background.description = Colore dello sfondo del grafico X-Y
44
colorDefinition.background.label = Colore dello sfondo
55
colorDefinition.foreground.description = Colore primo piano del grafico X-Y

io.sloeber.ui.nl1/OSGI-INF/l10n/bundle_nl.properties

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#Properties file for io.sloeber.ui
2-
category.arduino.description = Arduino Plugin opdrachten
2+
category.arduino.description = Sloeber Plugin opdrachten
33
colorDefinition.background.description = De achtergrond kleur van de X-Y grafiek
44
colorDefinition.background.label = Achtergrond kleur
55
colorDefinition.foreground.description = De Voorgrond kleur van de X-Y grafiek
@@ -57,6 +57,12 @@ command.open.sloeber.preferences.description = Open Sloeber voorkeuren
5757
command.open.sloeber.preferences.name = Voorkeuren
5858
command.openSerialMonitorAction.description = Open de seriële monitor en maak een seriële connectie met de upload poort en de baudrate van het geselecteerde project.
5959
command.preferences.label = Voorkeuren
60+
command.program.label = Gebruik de programmer om de sketch op te laden.
61+
command.program.description = Laad het geselecteerde project op naar he bord gebruik makend van de geselecteerde programmer
62+
command.program.tooltip = Gebruik deze knop om ge sketch op te laden met behulp van een programmer.
63+
command.burnBootloader.label = Brand een bootloader op je bord.
64+
command.burnBootloader.description = Gebruik makend van de gekozen programmer brand je een bootloader op je bord zodat je kan uploaden zonder programmer.
65+
command.burnBootloader.tooltip = Gebruik deze knop om een bootloader op je bord te branden.
6066
command.reattachLibraries.description = Vraag sloeber om de bibliotheken gebruikt in het geselecteerde project opnieuw te importeren.
6167
command.reattachLibraries.name = Herimporteer de bibliotheken.
6268
command.upgrade.info.description=Open een web pagina met informatie over bug fixes en nieuwere versies

io.sloeber.ui/OSGI-INF/l10n/bundle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#Properties file for io.sloeber.ui
2-
category.arduino.description = Arduino Plugin commands
2+
category.arduino.description = Sloeber Plugin commands
33
colorDefinition.background.description = The background color of the plotter
44
colorDefinition.background.label = Background color
55
colorDefinition.foreground.description = The foreground color of the plotter

io.sloeber.ui/src/io/sloeber/ui/messages_it.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,5 +133,5 @@ ui_show_all_warnings = Mostra tutti gli avvisi?
133133
ui_switch_to_serial_monitor_after_upload = Switch to Serial monitor after upload
134134
ui_url_for_index_file = Inserisci gli URL per i file package_index.json o library_index.json, uno per linea.
135135
ui_use_arduino_toolchain_selection = Seleziona la toolchain, ad esempio Arduino IDE.
136-
ui_workspace_settings = Impostazioni Arduino per questo workspace:
136+
ui_workspace_settings = Impostazioni Sloeber per questo workspace:
137137
yes = Si

io.sloeber.ui/src/io/sloeber/ui/messages_nl.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ ui_select_folder=Kies de map die de code bevat
125125
ui_show_all_warnings=Toon alle waarschuwingen?
126126
ui_url_for_index_file=Geef json url's op voor pakketten en bibliotheken.1 url per lijn.
127127
ui_use_arduino_toolchain_selection=Kies de toolchain zoals de Arduino IDE.
128-
ui_workspace_settings=Arduino voorkeuren voor deze werkplaats:
128+
ui_workspace_settings=Sloeber voorkeuren voor deze werkplaats:
129129
yes=ja
130130
Invalid_Private_Hardware_folder=[sloeber]/arduinoPlugin is geen geldig prive Hardware pad.
131131
Invalid_Private_Library_folder=[sloeber]/arduinoPlugin is geen geldig prive bibliotheek pad.

0 commit comments

Comments
 (0)