mirror of
https://github.com/arduino/Arduino.git
synced 2024-11-29 10:24:12 +01:00
Makeup-only: fixed some indentation and file headers
This commit is contained in:
parent
5ad4422fc7
commit
8157ebf25a
@ -1,3 +1,26 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
TargetPackage - Represents a hardware package
|
||||
Part of the Arduino project - http://www.arduino.cc/
|
||||
|
||||
Copyright (c) 2011 Cristian Maglie
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
$Id$
|
||||
*/
|
||||
package processing.app.debug;
|
||||
|
||||
import java.io.File;
|
||||
@ -9,36 +32,36 @@ import processing.app.helpers.filefilters.OnlyDirs;
|
||||
|
||||
public class TargetPackage {
|
||||
|
||||
String name;
|
||||
File folder;
|
||||
String name;
|
||||
File folder;
|
||||
|
||||
Map<String, TargetPlatform> platforms = new HashMap<String, TargetPlatform>();
|
||||
Map<String, TargetPlatform> platforms = new HashMap<String, TargetPlatform>();
|
||||
|
||||
public TargetPackage(String _name, File _folder) {
|
||||
name = _name;
|
||||
folder = _folder;
|
||||
public TargetPackage(String _name, File _folder) {
|
||||
name = _name;
|
||||
folder = _folder;
|
||||
|
||||
String[] platformsList = folder.list(new OnlyDirs());
|
||||
for (String platformName : platformsList) {
|
||||
File platformFolder = new File(folder, platformName);
|
||||
TargetPlatform platform = new TargetPlatform(platformName, platformFolder);
|
||||
platforms.put(platformName, platform);
|
||||
}
|
||||
}
|
||||
String[] platformsList = folder.list(new OnlyDirs());
|
||||
for (String platformName : platformsList) {
|
||||
File platformFolder = new File(folder, platformName);
|
||||
TargetPlatform platform = new TargetPlatform(platformName, platformFolder);
|
||||
platforms.put(platformName, platform);
|
||||
}
|
||||
}
|
||||
|
||||
public Map<String, TargetPlatform> getPlatforms() {
|
||||
return platforms;
|
||||
}
|
||||
public Map<String, TargetPlatform> getPlatforms() {
|
||||
return platforms;
|
||||
}
|
||||
|
||||
public Collection<TargetPlatform> platforms() {
|
||||
return platforms.values();
|
||||
}
|
||||
public Collection<TargetPlatform> platforms() {
|
||||
return platforms.values();
|
||||
}
|
||||
|
||||
public TargetPlatform get(String platform) {
|
||||
return platforms.get(platform);
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public TargetPlatform get(String platform) {
|
||||
return platforms.get(platform);
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
|
||||
/*
|
||||
Target - represents a hardware platform
|
||||
TargetPlatform - Represents a hardware platform
|
||||
Part of the Arduino project - http://www.arduino.cc/
|
||||
|
||||
Copyright (c) 2009 David A. Mellis
|
||||
@ -22,7 +21,6 @@
|
||||
|
||||
$Id$
|
||||
*/
|
||||
|
||||
package processing.app.debug;
|
||||
|
||||
import java.io.File;
|
||||
@ -32,71 +30,69 @@ import java.util.Map;
|
||||
import processing.app.helpers.PreferencesMap;
|
||||
|
||||
public class TargetPlatform {
|
||||
private String name;
|
||||
private File folder;
|
||||
private Map<String, PreferencesMap> boards;
|
||||
private Map<String, PreferencesMap> programmers;
|
||||
private PreferencesMap platform;
|
||||
private String name;
|
||||
private File folder;
|
||||
private Map<String, PreferencesMap> boards;
|
||||
private Map<String, PreferencesMap> programmers;
|
||||
private PreferencesMap platform;
|
||||
|
||||
public TargetPlatform(String _name, File _folder) {
|
||||
System.out.println("TargetPlatform: constructor start, name: " + _name);
|
||||
name = _name;
|
||||
folder = _folder;
|
||||
boards = new HashMap<String, PreferencesMap>();
|
||||
programmers = new HashMap<String, PreferencesMap>();
|
||||
platform = new PreferencesMap();
|
||||
public TargetPlatform(String _name, File _folder) {
|
||||
System.out.println("TargetPlatform: constructor start, name: " + _name);
|
||||
name = _name;
|
||||
folder = _folder;
|
||||
boards = new HashMap<String, PreferencesMap>();
|
||||
programmers = new HashMap<String, PreferencesMap>();
|
||||
platform = new PreferencesMap();
|
||||
|
||||
try {
|
||||
File boardsFile = new File(_folder, "boards.txt");
|
||||
if (boardsFile.exists()) {
|
||||
PreferencesMap boardPreferences = new PreferencesMap();
|
||||
boardPreferences.load(boardsFile);
|
||||
boards = boardPreferences.createFirstLevelMap();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
System.err.println("Error loading boards from boards.txt: " + e);
|
||||
}
|
||||
try {
|
||||
File boardsFile = new File(_folder, "boards.txt");
|
||||
if (boardsFile.exists()) {
|
||||
PreferencesMap boardPreferences = new PreferencesMap();
|
||||
boardPreferences.load(boardsFile);
|
||||
boards = boardPreferences.createFirstLevelMap();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
System.err.println("Error loading boards from boards.txt: " + e);
|
||||
}
|
||||
|
||||
try {
|
||||
File platformsFile = new File(_folder, "platforms.txt");
|
||||
if (platformsFile.exists())
|
||||
platform.load(platformsFile);
|
||||
} catch (Exception e) {
|
||||
System.err.println("Error loading platforms from platform.txt: "
|
||||
+ e);
|
||||
}
|
||||
try {
|
||||
File platformsFile = new File(_folder, "platforms.txt");
|
||||
if (platformsFile.exists())
|
||||
platform.load(platformsFile);
|
||||
} catch (Exception e) {
|
||||
System.err.println("Error loading platforms from platform.txt: " + e);
|
||||
}
|
||||
|
||||
try {
|
||||
File programmersFile = new File(_folder, "programmers.txt");
|
||||
if (programmersFile.exists()) {
|
||||
PreferencesMap prefs = new PreferencesMap();
|
||||
prefs.load(programmersFile);
|
||||
programmers = prefs.createFirstLevelMap();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
System.err
|
||||
.println("Error loading programmers from programmers.txt: "
|
||||
+ e);
|
||||
}
|
||||
}
|
||||
try {
|
||||
File programmersFile = new File(_folder, "programmers.txt");
|
||||
if (programmersFile.exists()) {
|
||||
PreferencesMap prefs = new PreferencesMap();
|
||||
prefs.load(programmersFile);
|
||||
programmers = prefs.createFirstLevelMap();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
System.err
|
||||
.println("Error loading programmers from programmers.txt: " + e);
|
||||
}
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public File getFolder() {
|
||||
return folder;
|
||||
}
|
||||
public File getFolder() {
|
||||
return folder;
|
||||
}
|
||||
|
||||
public Map<String, PreferencesMap> getBoards() {
|
||||
return boards;
|
||||
}
|
||||
public Map<String, PreferencesMap> getBoards() {
|
||||
return boards;
|
||||
}
|
||||
|
||||
public Map<String, PreferencesMap> getProgrammers() {
|
||||
return programmers;
|
||||
}
|
||||
public Map<String, PreferencesMap> getProgrammers() {
|
||||
return programmers;
|
||||
}
|
||||
|
||||
public PreferencesMap getPlatform() {
|
||||
return platform;
|
||||
}
|
||||
public PreferencesMap getPlatform() {
|
||||
return platform;
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,26 @@
|
||||
/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
StringReplacer - Utility class for expression formatting
|
||||
Part of the Arduino project - http://www.arduino.cc/
|
||||
|
||||
Copyright (c) 2011 Cristian Maglie
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
$Id$
|
||||
*/
|
||||
package processing.app.helpers;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
Loading…
Reference in New Issue
Block a user