Skip to content

Commit 1fb3cd7

Browse files
author
jan
committed
move getArchitecture and getVendor to BoardDescription
1 parent 4c315c2 commit 1fb3cd7

File tree

1 file changed

+0
-38
lines changed

1 file changed

+0
-38
lines changed

io.sloeber.core/src/io/sloeber/core/txt/TxtFile.java

-38
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212
import java.util.List;
1313
import java.util.Map;
1414

15-
import org.eclipse.core.runtime.IPath;
1615
import org.eclipse.core.runtime.IStatus;
17-
import org.eclipse.core.runtime.Path;
1816
import org.eclipse.core.runtime.Status;
1917

2018
import io.sloeber.autoBuild.helpers.api.KeyValueTree;
@@ -119,43 +117,7 @@ public String getNiceNameFromID(String myBoardID) {
119117
return myData.getValue(myBoardID + DOT + NAME);
120118
}
121119

122-
/*
123-
* Returns the architecture based on the platform file name Caters for the
124-
* packages (with version number and for the old way if the boards file does not
125-
* exists returns avr
126-
*/
127-
public String getArchitecture() {
128-
129-
IPath platformFile = new Path(this.mLoadedTxtFile.toString().trim());
130-
String architecture = platformFile.removeLastSegments(1).lastSegment();
131-
if (architecture == null) {// for error conditions
132-
architecture = AVR;
133-
}
134-
if (architecture.contains(DOT)) { // This is a version number so
135-
// package
136-
architecture = platformFile.removeLastSegments(2).lastSegment();
137-
}
138-
return architecture;
139-
}
140120

141-
/*
142-
* Returns the architecture based on the platform file name Caters for the
143-
* packages (with version number and for the old way if the boards file does not
144-
* exists returns avr
145-
*/
146-
public String getVendor() {
147-
148-
IPath platformFile = new Path(this.mLoadedTxtFile.toString().trim());
149-
String vendor = platformFile.removeLastSegments(2).lastSegment();
150-
if (vendor == null) {// for error conditions
151-
vendor = "NotFound"; //$NON-NLS-1$
152-
}
153-
if (vendor.contains(DOT)) { // This is a version number so
154-
// package
155-
vendor = platformFile.removeLastSegments(3).lastSegment();
156-
}
157-
return vendor;
158-
}
159121

160122
/**
161123
* Given a nice name look for the ID The assumption is that the txt file

0 commit comments

Comments
 (0)